function RegisterForm_Validator(theForm)
{

  if (theForm.strDate.value == "")
  {
    alert("Please enter a value for the \"Date\" field.");
    theForm.strDate.focus();
    return (false);
  }


  if (theForm.strApplicantName.value == "")
  {
    alert("Please enter a value for the \"Name of Carrier\" field.");
    theForm.strApplicantName.focus();
    return (false);
  }
  
  
  if (theForm.strMailingAddr.value == "")
  {
    alert("Please enter a value for the \"Carrier Mailing Address\" field.");
    theForm.strMailingAddr.focus();
    return (false);
  }
  
  if (theForm.strCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.strCity.focus();
    return (false);
  }
  
  if (theForm.lngStateID){
	  if (theForm.lngStateID.value == "0")
	  {
	    alert("Please select a State/Province.");
	    theForm.lngStateID.focus();
	    return (false);
	  }
  }  

  if (theForm.strZIP.value == "")
  {
    alert("Please enter a value for the \"ZIP Code\" field.");
    theForm.strZIP.focus();
    return (false);
  }
  
  if ((theForm.strPhoneArea.value == "" && theForm.strPhone.value == "")) 
  {
  	alert("Please enter a value for the \"Phone\" field.");
    theForm.strPhoneArea.focus();
   	return (false);
  }
  
  if ((theForm.strPhoneArea2.value == "" && theForm.strPhone2.value == "")) 
  {
  	alert("Please enter a value for the \"Phone\" field.");
    theForm.strPhoneArea2.focus();
   	return (false);
  }  
 
  if (theForm.strMC.value == "")
  {
    alert("Please enter a value for the \"M.C. Number\" field.");
    theForm.strMC.focus();
    return (false);
  }
  
  if (theForm.strSCAC.value == "")
  {
    alert("Please enter a value for the \"SCAC\" field.");
    theForm.strSCAC.focus();
    return (false);
  }

  if (theForm.strFedID.value == "")
  {
    alert("Please enter a value for the \"Federal I.D. Number\" field.");
    theForm.strFedID.focus();
    return (false);
  }

  if (theForm.strDOTRating.value == "")
  {
    alert("Please enter a value for the \"D.O.T. Rating\" field.");
    theForm.strDOTRating.focus();
    return (false);
  }

  if (theForm.strEquipType.value == "")
  {
    alert("Please enter a value for the \"Equipment Type\" field.");
    theForm.strEquipType.focus();
    return (false);
  }

 
  if (theForm.strEmail.value == "")
  {
    alert("Please enter a value for the \"E-mail\" field.");
    theForm.strEmail.focus();
    return (false);
  }
 
  
  if (theForm.strEmail.value != "")
  {   
	  strError = validateEmail(theForm.strEmail.value)
	  if (strError != "") {
			alert(strError);
	    	theForm.strEmail.focus();
	    	return (false);
	  }
  }  
 
 
 
  
  

 
  
  
  if (!(theForm.ck_OpAuth.checked))
  {
    alert("To submit the form, please check the \"operating authority\" statement.");
    theForm.ck_OpAuth.focus();
    return (false);
  }  
  
  
  if (!(theForm.ck_Insurance.checked))
  {
    alert("To submit the form, please check the \"certificate of insurance\" statement.");
    theForm.ck_Insurance.focus();
    return (false);
  }  
  
  if (theForm.ck_Insurance.checked)
  {  
	  if ((!(theForm.ck_Ins_Cargo.checked)) && (!(theForm.ck_Ins_Auto.checked)) && (!(theForm.ck_Ins_WorkComp.checked)))
	  {
	    alert("Please check at least one insurance type under the \"certificate of insurance\" statement.");
	    theForm.strFedID.focus();
	    return (false);
	  }
  }
  

  if (!(theForm.ck_SS.checked))
  {
    alert("To submit the form, please check the \"Federal I.D. or Social Security number\" statement.");
    theForm.ck_SS.focus();
    return (false);
  }  
  

  if (!(theForm.ck_MCC.checked))
  {
    alert("To submit the form, please check the \"Extra Mile Motor Carrier Contract\" statement.");
    theForm.ck_MCC.focus();
    return (false);
  }  
  

  if (!(theForm.ck_ICC.checked))
  {
    alert("To submit the form, please check the \"Extra Mile ICC License\" statement.");
    theForm.ck_ICC.focus();
    return (false);
  }  
  

  if (!(theForm.ck_Surety.checked))
  {
    alert("To submit the form, please check the \"Extra Mile Surety Bond\" statement.");
    theForm.ck_Surety.focus();
    return (false);
  }  
  

  if (!(theForm.ck_CreditApp.checked))
  {
    alert("To submit the form, please check the \"Extra Mile Online Credit Application\" statement.");
    theForm.ck_CreditApp.focus();
    return (false);
  }  
  

  if (!(theForm.ck_References.checked))
  {
    alert("To submit the form, please check the \"service references\" statement.");
    theForm.ck_References.focus();
    return (false);
  }  

  

  
   return (true);  
}
