
function Form_Validator(theForm) {
   if (theForm.Contact.value.length < 5) {
      alert("Please enter a valid value for the \"Your Name\" field.");
      theForm.Contact.focus();
      return (false);
   }
   if (theForm.Company.value.length < 5) {
      alert("Please enter a valid value for the \"Company Name\" field.");
      theForm.Company.focus();
      return (false);
   }
   if (theForm.City.value.length < 5) {
      alert("Please enter a valid value for the \"Company City\" field.");
      theForm.City.focus();
      return (false);
   }
   if (theForm.State.value.length < 2) {
      alert("Please enter a valid value for the \"State or Province\" field.");
      theForm.State.focus();
      return (false);
   }
   if (theForm.email.value.length < 10 || theForm.email.value.indexOf("@") == -1 || theForm.email.value.indexOf(".") == -1) {
      alert("Please enter a valid value for the \"Email Address\" field.");
      theForm.email.focus();
      return (false);
   }
   if (theForm.SacramentoCounty[0].checked) {  
      alert("Please enter a valid value for the \"Is Your Business Located In Sacramento County?\" field.");
      theForm.email.focus();
      return (false);
   }  
   if (theForm.WebSiteIs[0].checked) {  
      alert("Please enter a valid value for the \"In Regard To Your Website Estimate\" field.");
      theForm.email.focus();
      return (false);
   }  
   if (theForm.WebSiteURL.value.length < 1 && theForm.WebSiteIs[2].checked) {
      alert("Please enter a valid value for the \"Website Address (URL)\" field.");
      theForm.WebSiteURL.focus();
      return (false);
   }
   return (true);
}


