
function chgchecks(source, choose, fieldname, totalrecs){
// =================================================================================================
// Programmer:		Sandra Clark			
//
// Description:	    If the choose all checkbox is checked, check all checkboxes.
//
// Parameters:
//					source: 	form name
//					choose: 	Name of checkbox which governs whether or not to select all
//					fieldname:		Prefix to checkbox names which will be selected. Checkboxes
//								must be in a loop with a numeric ending which is the only thing
//								which differentiates them.
//					totalrecs:	Number of records to loop through
// =================================================================================================
	if (source.choose.checked == true){
			for (i = 1; i<= totalrecs; i++){
				var theobject = eval('source.' +fieldname+i);
				theobject.checked = true;
			}
	} else if (source.choose.checked == false){
		for (i = 1; i<= totalrecs; i++){
				var theobject = eval('source.' +fieldname+i);
				theobject.checked = false;
			}
	}
}
// =================================================================================================
