<script language="JavaScript" type="text/javascript">
<!--



function CheckForm(){

   var err = "no"

   var f = document.forms[0];

   if ((f.firstname.value.length>0)

    && (f.lastname.value.length>0)

    && (f.address1.value.length>0)

    && (f.city.value.length>0) 

    && (f.zip.value.length>0)

    && (f.email.value.length>0)

    && (f.phone.value.length>0) 

    && (f.cellphone.value.length>0)

    && (f.referral.selectedIndex>0) 




    && (f.check1.checked==true || f.check2.checked==true || f.check3.checked==true || f.check4.checked==true || f.check5.checked==true || f.check6.checked==true || f.check7.checked==true || /*f.check8.checked==true || f.check9.checked==true || f.check10.checked==true || f.check11.checked==true || */f.check12.checked==true || f.check13.checked==true || f.check14.checked==true || f.check15.checked==true || f.check16.checked==true || f.check17.checked==true/* || f.check18.checked==true || f.check19.checked==true*/)

    ){



    var checkeMail = checkEmail(f.email.value);

      if(checkeMail == 'good'){

         f.whichCustomer.value = "2";

         f.submit();

      }else{

         f.email.focus();

         f.email.select();

         alert(checkeMail);

         return false;

      }

      var checkZip = checkNumeric(f.zip.value);

      if(checkZip == 'good'){

         f.submit();

      }else{

         f.zip.focus();

         f.zip.select();

         alert(checkZip);

         return false;

      }



   }else{

      alert('Please populate all required fields.');

	  return false;

   }



}



function checkEmail(strng) {

   var error = "good"

   var emailFilter=/^.+@.+\..{2,3}$/;

   if (!(emailFilter.test(strng))) { 

      error = "Please enter a valid email address.\n";

   }



   var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\'\[\]]/

   if (strng.match(illegalChars)) {

      error = "The email address contains illegal characters.\n";

   }

   return error;

}



 function checkNumeric(elem){

   var error="good";

   var numericExpression = /^[0-9]+$/;

   if(!(elem.value.match(numericExpression))){

       error=" The zipcode contains non-numeric characters.\n";

   } 

   return error;

}



//-->

</script>