// 03/31/2005	Bridget Muiruri	Don't autocheck all elements if none are checked.// the following validates the user form// and then generates error messages// and if there are no error messages, then submitfunction isValid(targetForm){		var myFormList		var msg="";		var nextValue;		myFormList = targetForm.elements;// Make sure at least one category is checked. If not, go ahead and check all of them for the user (because we can safely assume they want to search all categories).		targetArray = Array(myFormList.startup, myFormList.financing, myFormList.training, myFormList.procurement, myFormList.business_development)		if (!(hasOneChecked(targetArray)))		// b.muiruri - change to include incomplete records in search results			//checkAll(targetArray)// city and state. If they enter a city, they must choose a state as well.		if ((myFormList.program_city.value != "") && (!(hasOneSelected(myFormList.program_state))))			msg+=" * Please select the State where your City is located.\n\n";// Show error message OR submit the form		if (msg == ""){			return true		} else {			alert(msg);			return false;		}}// This is to be run when the page loadsfunction onLoad(targetForm) {		var myFormList		myFormList = targetForm.elements;		// If all of the category checkboxes are unchecked, then check all of them (because we can safely assume the user wants to search all categories).		targetArray = Array(myFormList.startup, myFormList.financing, myFormList.training, myFormList.procurement, myFormList.business_development)		if (!(hasOneChecked(targetArray)))			checkAll(targetArray)}