function RegisterForm_Validator(theForm)
{

  if (theForm.strApplicantName.value == "")
  {
    alert("Please enter a value for the \"Name of Company or Individual\" field.");
    theForm.strApplicantName.focus();
    return (false);
  }
  
  if (theForm.strYearsInBusiness.value == "")
  {
    alert("Please enter a value for the \"Years in Business\" field.");
    theForm.strYearsInBusiness.focus();
    return (false);
  }
  
  if (theForm.strAnnualSales.value == "")
  {
    alert("Please enter a value for the \"Annual Sales\" field.");
    theForm.strAnnualSales.focus();
    return (false);
  }

  if (theForm.strMailingAddr.value == "")
  {
    alert("Please enter a value for the \"Applicant 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.strBillContact.value == "")
  {
    alert("Please enter a value for the \"Billing Point of Contact\" field.");
    theForm.strBillContact.focus();
    return (false);
  }
  
  if (theForm.strEmail.value == "")
  {
    alert("Please enter a value for the \"E-mail Address\" 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.selBusinessType[0].checked || theForm.selBusinessType[1].checked || theForm.selBusinessType[2].checked || theForm.selBusinessType[3].checked))
  {
    alert("Please enter a value for the \"Business Type\" field.");
    theForm.selBusinessType[0].focus();
    return (false);
  }


  if ((theForm.strFedID.value == "" && theForm.selBusinessType[0].checked))
  {
    alert("Please enter a value for the \"Federal ID Number\" field.");
    theForm.strFedID.focus();
    return (false);
  }
  
  if ((theForm.strStateInc.value == "" && theForm.selBusinessType[0].checked))
  {
    alert("Please enter a value for the \"State Incorporated\" field.");
    theForm.strStateInc.focus();
    return (false);
  }




  
  if (theForm.strName_Prin1.value == "")
  {
    alert("Please enter a value for the \"Name of Principal #1\" field.");
    theForm.strName_Prin1.focus();
    return (false);
  }

  if (theForm.strTitle_Prin1.value == "")
  {
    alert("Please enter a value for the \"Title of Principal #1\" field.");
    theForm.strTitle_Prin1.focus();
    return (false);
  }

  if (theForm.strAddr_Prin1.value == "")
  {
    alert("Please enter a value for the \"Home Address (Principal #1)\" field.");
    theForm.strAddr_Prin1.focus();
    return (false);
  }
  
  if (theForm.strCity_Prin1.value == "")
  {
    alert("Please enter a value for the \"City (Principal #1)\" field.");
    theForm.strCity_Prin1.focus();
    return (false);
  }
  
  if (theForm.lngStateID_Prin1)
  {
	  if (theForm.lngStateID_Prin1.value == "0")
	  {
	    alert("Please select the State/Province (Principal #1).");
	    theForm.lngStateID_Prin1.focus();
	    return (false);
	  }
  }  

  if (theForm.strZIP_Prin1.value == "")
  {
    alert("Please enter a value for the \"ZIP Code (Principal #1)\" field.");
    theForm.strZIP_Prin1.focus();
    return (false);
  }
  
  if (theForm.strSS_Prin1.value == "")
  {
    alert("Please enter a value for the \"Social Security # (Principal #1)\" field.");
    theForm.strSS_Prin1.focus();
    return (false);
  }  
  
  if ((theForm.strPhoneArea_Prin1.value == "" && theForm.strPhone_Prin1.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Principal #1)\" field.");
    theForm.strPhoneArea_Prin1.focus();
   	return (false);
  }
  

  
  
  
  
  if (theForm.strName_Prin2.value == "")
  {
    alert("Please enter a value for the \"Name of Principal #2\" field.");
    theForm.strName_Prin2.focus();
    return (false);
  }

  if (theForm.strTitle_Prin2.value == "")
  {
    alert("Please enter a value for the \"Title of Principal #2\" field.");
    theForm.strTitle_Prin2.focus();
    return (false);
  }

  if (theForm.strAddr_Prin2.value == "")
  {
    alert("Please enter a value for the \"Home Address (Principal #2)\" field.");
    theForm.strAddr_Prin2.focus();
    return (false);
  }
  
  if (theForm.strCity_Prin2.value == "")
  {
    alert("Please enter a value for the \"City (Principal #2)\" field.");
    theForm.strCity_Prin2.focus();
    return (false);
  }
  
  if (theForm.lngStateID_Prin2){
	  if (theForm.lngStateID_Prin2.value == "0")
	  {
	    alert("Please select the State/Province (Principal #2).");
	    theForm.lngStateID_Prin2.focus();
	    return (false);
	  }
  }  

  if (theForm.strZIP_Prin2.value == "")
  {
    alert("Please enter a value for the \"ZIP Code (Principal #2)\" field.");
    theForm.strZIP_Prin2.focus();
    return (false);
  }
  
  if (theForm.strSS_Prin2.value == "")
  {
    alert("Please enter a value for the \"Social Security # (Principal #2)\" field.");
    theForm.strSS_Prin2.focus();
    return (false);
  }  
  
  if ((theForm.strPhoneArea_Prin2.value == "" && theForm.strPhone_Prin2.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Principal #2)\" field.");
    theForm.strPhoneArea_Prin2.focus();
   	return (false);
  }
  
  
  
  
    
  if (!(theForm.selQuestion1[0].checked || theForm.selQuestion1[1].checked))
  {
    alert("Please select an answer for Question #1.");
    theForm.selQuestion1[0].focus();
    return (false);
  }

  if ((theForm.strQuestion1a.value == "" && theForm.selQuestion1[0].checked))
  {
    alert("Please enter an answer for the \"Give business name & location\" field.");
    theForm.strQuestion1a.focus();
    return (false);
  }

    
  if (!(theForm.selQuestion2a[0].checked || theForm.selQuestion2a[1].checked))
  {
    alert("Please select an answer for Question #2a (Business Bankruptcy).");
    theForm.selQuestion2a[0].focus();
    return (false);
  }

  if (!(theForm.selQuestion2b[0].checked || theForm.selQuestion2b[1].checked))
  {
    alert("Please select an answer for Question #2b (Personal Bankruptcy).");
    theForm.selQuestion2b[0].focus();
    return (false);
  }


  if (!(theForm.selQuestion3[0].checked || theForm.selQuestion3[1].checked))
  {
    alert("Please select an answer for Question #3.");
    theForm.selQuestion3[0].focus();
    return (false);
  }

  
  if (!(theForm.selQuestion4[0].checked || theForm.selQuestion4[1].checked))
  {
    alert("Please select an answer for Question #4.");
    theForm.selQuestion4[0].focus();
    return (false);
  }

  if ((theForm.strQuestion4.value == "" && theForm.selQuestion4[0].checked))
  {
    alert("Please enter an answer for the \"Which assets & to whom?\" field.");
    theForm.strQuestion4.focus();
    return (false);
  }

  
  

  
  
    if (theForm.strOrderPerson.value == "")
  {
    alert("Please enter a value for the \"Person authorized to place order\" field.");
    theForm.strOrderPerson.focus();
    return (false);
  }

  if (theForm.strOrderPersonTitle.value == "")
  {
    alert("Please enter a value for the \"Title of person authorized to place order\" field.");
    theForm.strOrderPersonTitle.focus();
    return (false);
  }

  if (theForm.strBankName.value == "")
  {
    alert("Please enter a value for the \"Bank Name\" field.");
    theForm.strBankName.focus();
    return (false);
  }
  
  if (theForm.strBankCity.value == "")
  {
    alert("Please enter a value for the \"City of Bank\" field.");
    theForm.strBankCity.focus();
    return (false);
  }
  
  if (theForm.lngStateID_Bank)
  {
	  if (theForm.lngStateID_Bank.value == "0")
	  {
	    alert("Please select the State/Province of Bank.");
	    theForm.lngStateID_Bank.focus();
	    return (false);
	  }
  }  

  if (theForm.strBankZIP.value == "")
  {
    alert("Please enter a value for the \"ZIP Code of Bank\" field.");
    theForm.strBankZIP.focus();
    return (false);
  }
  
  if (theForm.strBankOfficer.value == "")
  {
    alert("Please enter a value for the \"Name of Bank Officer\" field.");
    theForm.strBankOfficer.focus();
    return (false);
  }  
  
  if ((theForm.strPhoneArea_Bank.value == "" && theForm.strPhone_Bank.value == "")) {
  	alert("Please enter a value for the \"Phone Number of Bank\" field.");
    theForm.strPhoneArea_Bank.focus();
   	return (false);
  }

  if (theForm.strCreditRequest.value == "")
  {
    alert("Please enter an amount in the \"Credit Request\" field.");
    theForm.strCreditRequest.focus();
    return (false);
  }
  
  
  
  

  if (theForm.strBusName_Ref1.value == "")
  {
    alert("Please enter a value for the \"Name of Business (Reference #1)\" field.");
    theForm.strBusName_Ref1.focus();
    return (false);
  }

  if (theForm.strContact_Ref1.value == "")
  {
    alert("Please enter a value for the \"Name of Contact Person (Reference #1)\" field.");
    theForm.strContact_Ref1.focus();
    return (false);
  }

  if (theForm.strStreet_Ref1.value == "")
  {
    alert("Please enter a value for the \"Street Address (Reference #1)\" field.");
    theForm.strStreet_Ref1.focus();
    return (false);
  }
  
  if (theForm.strCity_Ref1.value == "")
  {
    alert("Please enter a value for the \"City (Reference #1)\" field.");
    theForm.strCity_Ref1.focus();
    return (false);
  }
  
  if (theForm.lngStateID_Ref1)
  {
	  if (theForm.lngStateID_Ref1.value == "0")
	  {
	    alert("Please select the State/Province (Reference #1).");
	    theForm.lngStateID_Ref1.focus();
	    return (false);
	  }
  }  

  if (theForm.strZIP_Ref1.value == "")
  {
    alert("Please enter a value for the \"ZIP Code (Reference #1)\" field.");
    theForm.strZIP_Ref1.focus();
    return (false);
  }
    
  if ((theForm.strPhoneArea_Ref1.value == "" && theForm.strPhone_Ref1.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Reference #1)\" field.");
    theForm.strPhoneArea_Ref1.focus();
   	return (false);
  }
  
  if ((theForm.strPhoneArea2_Ref1.value == "" && theForm.strPhone2_Ref1.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Reference #1)\" field.");
    theForm.strPhoneArea2_Ref1.focus();
   	return (false);
  }






  if (theForm.strBusName_Ref2.value == "")
  {
    alert("Please enter a value for the \"Name of Business (Reference #2)\" field.");
    theForm.strBusName_Ref2.focus();
    return (false);
  }

  if (theForm.strContact_Ref2.value == "")
  {
    alert("Please enter a value for the \"Name of Contact Person (Reference #2)\" field.");
    theForm.strContact_Ref2.focus();
    return (false);
  }

  if (theForm.strStreet_Ref2.value == "")
  {
    alert("Please enter a value for the \"Street Address (Reference #2)\" field.");
    theForm.strStreet_Ref2.focus();
    return (false);
  }
  
  if (theForm.strCity_Ref2.value == "")
  {
    alert("Please enter a value for the \"City (Reference #2)\" field.");
    theForm.strCity_Ref2.focus();
    return (false);
  }
  
  if (theForm.lngStateID_Ref2)
  {
	  if (theForm.lngStateID_Ref2.value == "0")
	  {
	    alert("Please select the State/Province (Reference #2).");
	    theForm.lngStateID_Ref2.focus();
	    return (false);
	  }
  }  

  if (theForm.strZIP_Ref2.value == "")
  {
    alert("Please enter a value for the \"ZIP Code (Reference #2)\" field.");
    theForm.strZIP_Ref2.focus();
    return (false);
  }
    
  if ((theForm.strPhoneArea_Ref2.value == "" && theForm.strPhone_Ref2.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Reference #2)\" field.");
    theForm.strPhoneArea_Ref2.focus();
   	return (false);
  }
  
  if ((theForm.strPhoneArea2_Ref2.value == "" && theForm.strPhone2_Ref2.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Reference #2)\" field.");
    theForm.strPhoneArea2_Ref2.focus();
   	return (false);
  }
  

  
  
  
  
  
  if (theForm.strBusName_Ref3.value == "")
  {
    alert("Please enter a value for the \"Name of Business (Reference #3)\" field.");
    theForm.strBusName_Ref3.focus();
    return (false);
  }

  if (theForm.strContact_Ref3.value == "")
  {
    alert("Please enter a value for the \"Name of Contact Person (Reference #3)\" field.");
    theForm.strContact_Ref3.focus();
    return (false);
  }

  if (theForm.strStreet_Ref3.value == "")
  {
    alert("Please enter a value for the \"Street Address (Reference #3)\" field.");
    theForm.strStreet_Ref3.focus();
    return (false);
  }
  
  if (theForm.strCity_Ref3.value == "")
  {
    alert("Please enter a value for the \"City (Reference #3)\" field.");
    theForm.strCity_Ref3.focus();
    return (false);
  }
  
  if (theForm.lngStateID_Ref3)
  {
	  if (theForm.lngStateID_Ref3.value == "0")
	  {
	    alert("Please select the State/Province (Reference #3).");
	    theForm.lngStateID_Ref3.focus();
	    return (false);
	  }
  }  

  if (theForm.strZIP_Ref3.value == "")
  {
    alert("Please enter a value for the \"ZIP Code (Reference #3)\" field.");
    theForm.strZIP_Ref3.focus();
    return (false);
  }
    
  if ((theForm.strPhoneArea_Ref3.value == "" && theForm.strPhone_Ref3.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Reference #3)\" field.");
    theForm.strPhoneArea_Ref3.focus();
   	return (false);
  }
  
  if ((theForm.strPhoneArea2_Ref3.value == "" && theForm.strPhone2_Ref3.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Reference #3)\" field.");
    theForm.strPhoneArea2_Ref3.focus();
   	return (false);
  }
  

  
  
  
  
  if (theForm.strBusName_Ref4.value == "")
  {
    alert("Please enter a value for the \"Name of Business (Reference #4)\" field.");
    theForm.strBusName_Ref4.focus();
    return (false);
  }

  if (theForm.strContact_Ref4.value == "")
  {
    alert("Please enter a value for the \"Name of Contact Person (Reference #4)\" field.");
    theForm.strContact_Ref4.focus();
    return (false);
  }

  if (theForm.strStreet_Ref4.value == "")
  {
    alert("Please enter a value for the \"Street Address (Reference #4)\" field.");
    theForm.strStreet_Ref4.focus();
    return (false);
  }
  
  if (theForm.strCity_Ref4.value == "")
  {
    alert("Please enter a value for the \"City (Reference #4)\" field.");
    theForm.strCity_Ref4.focus();
    return (false);
  }
  
  if (theForm.lngStateID_Ref4){
	  if (theForm.lngStateID_Ref4.value == "0")
	  {
	    alert("Please select the State/Province (Reference #4).");
	    theForm.lngStateID_Ref4.focus();
	    return (false);
	  }
  }  

  if (theForm.strZIP_Ref4.value == "")
  {
    alert("Please enter a value for the \"ZIP Code (Reference #4)\" field.");
    theForm.strZIP_Ref4.focus();
    return (false);
  }
    
  if ((theForm.strPhoneArea_Ref4.value == "" && theForm.strPhone_Ref4.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Reference #4)\" field.");
    theForm.strPhoneArea_Ref4.focus();
   	return (false);
  }
  
  if ((theForm.strPhoneArea2_Ref4.value == "" && theForm.strPhone2_Ref4.value == "")) 
  {
  	alert("Please enter a value for the \"Phone (Reference #4)\" field.");
    theForm.strPhoneArea2_Ref4.focus();
   	return (false);
  }
  
  
  
  
    
  if (theForm.strTitle_Agree1.value == "")
  {
    alert("Please enter a value for the \"Title\" field.");
    theForm.strTitle_Agree1.focus();
    return (false);
  }

  
  
  if (theForm.strName_Agree2.value == "")
  {
    alert("Please enter a value for the \"Name of Personal Guarantor\" field.");
    theForm.strName_Agree2.focus();
    return (false);
  }

  if (theForm.strCity_Agree2.value == "")
  {
    alert("Please enter a value for the \"City (Personal Guarantee)\" field.");
    theForm.strCity_Agree2.focus();
    return (false);
  }

  if (theForm.lngStateID_Agree2)
  {
	  if (theForm.lngStateID_Agree2.value == "0")
	  {
	    alert("Please select a State/Province (Personal Guarantee).");
	    theForm.lngStateID_Agree2.focus();
	    return (false);
	  }
  }  

  if (theForm.strZIP_Agree2.value == "")
  {
    alert("Please enter a value for the \"ZIP Code (Personal Guarantee)\" field.");
    theForm.strZIP_Agree2.focus();
    return (false);
  }
  
  if (theForm.strSS_Agree2.value == "")
  {
    alert("Please enter a value for the \"Social Security Number (Personal Guarantee)\" field.");
    theForm.strSS_Agree2.focus();
    return (false);
  }  
  
 
 
 
 
  
  
  if (!(theForm.ckAgree1.checked))
  {
    alert("To submit the form, please check \"Yes\" to agree with the \"Terms of Credit Application.\"");
    theForm.ckAgree1.focus();
    return (false);
  }  
  
  
  if (!(theForm.ckAgree2.checked))
  {
    alert("To submit the form, please check \"Yes\" to agree with the \"Personal Guarantee\" statement.");
    theForm.ckAgree2.focus();
    return (false);
  }


 
  

  
   return (true);  
}
