function validate_form() {
	if(document.contactform.fullname.value==null||document.contactform.fullname.value==""){
	 alert("Please Enter Your Full Name.");
	 document.contactform.fullname.focus();
	 return false;
	}
    if(document.contactform.email.value==null||document.contactform.email.value==""){
	 alert("Please Enter Your Email Address.");
	 document.contactform.email.focus();
	 return false;
	} else {
		var email = document.contactform.email.value;
		if (!(echeck(email))) {
			return false;
		}
    }
	if(document.contactform.phone.value==null||document.contactform.phone.value==""){
	 alert("Please Enter Your Phone Number.");
	 document.contactform.phone.focus();
	 return false;
	}
	if(document.contactform.pain.value==null||document.contactform.pain.value==""){
	 alert("Please Discribe Your Contract Interest - Like \"Natural Lawn Care\".");
	 document.contactform.pain.focus();
	 return false;
	}
document.contactform.action = "http://www.lawn-wranglers.com/wp-content/themes/default/emailform/headercontact.php";
return true;
alert("Thank you for contacting me! I'll be in touch shortly.");
}


function echeck(str) {
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		  alert("Invalid Email Address")
		  document.contactform.email.focus();
		  return false
		}
		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		  alert("Invalid Email Address")
		  document.contactform.email.focus();
		  return false
		}
		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		  alert("Invalid Email Address")
		  document.contactform.email.focus();
		  return false
		}
		 if (str.indexOf(at,(lat+1))!=-1){
		  alert("Invalid Email Address")
		  document.contactform.email.focus();
		  return false
		 }
		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		  alert("Invalid Email Address")
		  document.contactform.email.focus();
		  return false
		 } 
         if (str.indexOf(dot,(lat+2))==-1){
		  alert("Invalid Email Address")
		  document.contactform.email.focus();
		  return false
		 } 
         if (str.indexOf(" ")!=-1){
		  alert("Invalid Email Address")
		  document.contactform.email.focus();
		  return false
		 } return true
	}
