function getCheckedValues(box) { // box is the pointer to the form checkbox. e.g., myForm.myCheckbox; RETURN array of strings
	var val = [];
	if (box.length) {
		for (var ii=0;ii<box.length;ii++) {
			if (box[ii].checked) val[val.length] = box[ii].value;
		}
	} else {
		if (box.checked) val[0] = box.value;
	}
	return val;
}

function getCheckedBoxes(box) { // box is the pointer to the form checkbox. e.g., myForm.myCheckbox; ; RETURN array of pointers
	var array = [];
	if (box.length) {
		for (var ii=0;ii<box.length;ii++) {
			if (box[ii].checked) array[array.length] = box[ii];
		}
	} else {
		if (box.checked) array[0] = box;
	}
	return array;
}

function getAllBoxes(box) { // box is the pointer to the form checkbox. e.g., myForm.myCheckbox
	var array = [];
	if (box.length) {
		for (var ii=0;ii<box.length;ii++) {
			array[array.length] = box[ii];
		}
	} else {
		array[0] = box;
	}
	return array;
}

function checkAllBoxes(box, chk, trigger) { // box is the pointer to the form checkbox. e.g., myForm.myCheckbox.   SAME for trigger.  trigger is used when chk is null.
	if (chk == null) {
		chk = trigger.checked;
	}
	var allBoxes = getAllBoxes(box);
	for (var ii=0;ii<allBoxes.length;ii++) {
		allBoxes[ii].checked = chk;
	}
}
