/*-------------------------------------------------------------------------
COMPANY:		KENROB & Associates, Inc.

FILENAME:	advisory.js
PURPOSE:		General routines for advisory forms
MODIFICATION HISTORY:
Initial revision 02/24/2004 Rachel Ethier
-------------------------------------------------------------------------*/
// This function checks all of the advisory type checkboxes. It is executed when the
// "Show All advisory types" radiobutton is clicked. 
function checkAll(form,value) {
	if (( value != true ) && (value != false )) {
		alert("checkAll called with a bad 'value' argument (" + value + ")");
		return false;
	}
	for (var e = 0; e < form.length; e++) {
		var box = form.elements[e];
		if (box.type == "checkbox") box.checked = value;
	}
	return true;
}

// Function to uncheck all of the advisory type checkboxes, then check only the Ground Delay Programs one.
function checkGdelay(form) {
	checkAll(form, false);
	form.Gdelay.checked = true;
	return true;
}
