<!-- Begin
function formCheck(formobj){

	// Enter name of mandatory fields
	var fieldRequired = Array("Date", "Name", "Address", "City", "StateZip", "Phone", "Signature", "Signature2", "SignatureDate");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("Date of Application", "Your Name", "Current Address", "Current City", "Current State and Zip", "Phone", "Signature - Use Valid E-mail Address", "Signature - Use Valid E-mail Address", "Date of Signature");
	// dialog message
	var alertMsg = "Please complete the following fields:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "checkbox":
				if (fieldRequired[i] == "My_Interest1"){
					if ((formobj.elements["My_Interest1"].checked == false) && (formobj.elements["My_Interest2"].checked == false) && (formobj.elements["My_Interest3"].checked == false) && (formobj.elements["My_Interest4"].checked == false) && (formobj.elements["My_Interest5"].checked == false)){
						alertMsg += " - " + fieldDescription[i] + "\n";
					}
					break;
				}
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	// Enter name of fields to check for http:
	var fieldHttpCheck = Array("Date", "Name", "SSN", "Birthdate", "DOBCityState", "Address", "City", "State", "Zip", "HomePhone", "Education", "Expiration", "License", "DLState", "FelonyExplanation", "StartDate", "EmergencyContact", "ECRelationship", "ECTelephone", "Signature", "SignatureDate");
	// Enter field description to appear in the dialog box
	var fieldHttpDescription = Array("Date of Application", "Your Name", "SSN", "Birthdate", "DOBCityState", "Current Address", "Current City", "Current State", "Current Zip", "Home Phone", "Education", "Driver's License Expiration", "Driver's License Number", "Driver's License State", "Felony Explanation", "Expected Start Date", "Emergency Contact", "Emergency Contact Relationship", "Emergency Contact Telephone", "Signature - Use Valid E-mail Address", "Date of Signature");
	// dialog message
	var	alertHttpMsg = "Please remove web links in fields:\n";
	var	l_HttpMsg = alertHttpMsg.length;
	
	for (var i = 0; i < fieldHttpCheck.length; i++){
		var obj = formobj.elements[fieldHttpCheck[i]];
		if (obj){
			switch(obj.type){
			case "text":
			case "textarea":
				if (obj.value != "" && obj.value != null){
					if (obj.value.indexOf("http:") != -1){
						alertHttpMsg += " - " + fieldHttpDescription[i] + "\n";
					}
				}
				break;
			default:
			}
		}
	}

	if (alertMsg.length == l_Msg && alertHttpMsg.length == l_HttpMsg){
		return true;
	} else {
		if (alertMsg.length != l_Msg){
			if (alertHttpMsg.length != l_HttpMsg) {
				alertMsg = alertMsg + "\n" + alertHttpMsg;
			}
		} else {
			alertMsg = alertHttpMsg;
		}
		alert(alertMsg);
		return false;
	}
}
//  End -->

