/*
Return a comma-separated list of all checked element names in thisForm.
*/

function getCheckboxList(formObj) {
	
	// Mac MSIE counts from 1..N; the rest count from 0..N-1
	var first = 0;
	var last = formObj.length - 1;
	var ua = navigator.userAgent;
	if ( (ua.search(/mac/i) != -1) && (ua.search(/msie/i) != -1) ) {
		first++; last++;
	}

	var i, e;
	var args = "";
	for (i=first; i<=last; i++) {
		e = formObj.elements[i];
		if (e.checked)
			args += e.name + ",";
	}

	if (args.length > 0)
		args = args.substr(0, (args.length - 1));

	return args;
}

