// Verify form field submissions of required fields before submission
<!--
function validate() {
	
	var themessage = "Please complete or fix the following fields:\n";
	var str = "";
	var mystate = document.orderMowingForm1.f_state.selectedIndex;
	
	if (document.orderMowingForm1.f_name.value=="") {
		themessage = themessage + "- First & Last Name\n";
	}
	if (document.orderMowingForm1.f_address1.value=="") {
		themessage = themessage + "- Address\n";
	}
	if (document.orderMowingForm1.f_city.value=="") {
		themessage = themessage + "- City\n";
	}
	if (mystate==0) {
		themessage = themessage + "- State\n";
	}
	if (document.orderMowingForm1.f_zip.value=="") {
		themessage = themessage + "- Zip Code\n";
	}
	if(document.orderMowingForm1.f_zip.value!= "" && !validateZip(document.orderMowingForm1.f_zip.value)){
		themessage = themessage + "- We're sorry. We currently do not service your Zip Code.\n";
	}
	if (document.orderMowingForm1.f_day_phone.value=="") {
		themessage = themessage + "- Phone (day)\n";
	}
	if (document.orderMowingForm1.f_email.value=="") {
		themessage = themessage + "- E-mail Address\n";
	}
	//alert if fields are empty and cancel form submit
	if (themessage == "Please complete or fix the following fields:\n") {
		return true
	}	else {
		alert(themessage);
		return false;
	}
}

function validateZip(zipCode){
	var found = false;
	for(var i = 0; i < zipCodeList.length; i++){
		if(zipCode == zipCodeList[i]){
			found = true;
			break;
		}
	}
	return found;

}
//-->
