<!--
function PreQualificationForm_Validator(theForm)
{

//EMAILADDRESS:
  var str=theForm.REQ_Email.value
  var filter=/^(\w+(?:\.\w+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
    if (filter.test(str))
    testresults=true
    else{
    alert("Please input a valid email address!")
    return (false);
    }

//LOAN AMOUNT REQUESTED:
  if (theForm.REQ_Loan_Amount.value == "")
  {
    alert("Please enter a value for the \"Loan Amt. Requested\" field.");
    theForm.REQ_Loan_Amount.focus();
    return (false);
  }

 //NUMERIC CHARACTERS ONLY?
  var checkOK = "$0123456789.,";
  var checkStr = theForm.REQ_Loan_Amount.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Loan Amt. Requested\" field.");
    theForm.REQ_Loan_Amount.focus();
  }

//Name of current owner for property:
  if (theForm.REQ_Property_Owner.value == "")
  {
    alert("Please enter a value for the \"Name of current owner for property\" field.");
    theForm.REQ_Property_Owner.focus();
    return (false);
  }

//Property Owner is...:
  if (theForm.REQ_Property_Owner_Status.value == "")
  {
    alert("Please select a value for the \"Property Owner is/are ...\" field.");
    theForm.REQ_Property_Owner_Status.focus();
    return (false);
  }

//First Name:
  if (theForm.REQ_Borrower_1_Name.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.REQ_Borrower_1_Name.focus();
    return (false);
  }

//Last Name:
  if (theForm.REQ_Borrower_1_LastName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.REQ_Borrower_1_LastName.focus();
    return (false);
  }

//Home Phone:
//  if (theForm.REQ_Borrower_1_Home_Phone.value == "")
//  {
//    alert("Please enter a value for the \"Home Phone\" field.");
//    theForm.REQ_Borrower_1_Home_Phone.focus();
//    return (false);
//  }

//Street address:
  if (theForm.REQ_Borrower_1_StreetAddress.value == "")
  {
    alert("Please enter a value for the \"Street address\" field.");
    theForm.REQ_Borrower_1_StreetAddress.focus();
    return (false);
  }

//City:
  if (theForm.REQ_Borrower_1_City.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.REQ_Borrower_1_City.focus();
    return (false);
  }

//State:
  if (theForm.REQ_Borrower_1_State.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.REQ_Borrower_1_State.focus();
    return (false);
  }

//Zip code:
  if (theForm.REQ_Borrower_1_Zip.value == "")
  {
    alert("Please enter a value for the \"Zip code\" field.");
    theForm.REQ_Borrower_1_Zip.focus();
    return (false);
  }

//Social Security number:
//  if (theForm.REQ_Borrower_1_Social_Security_Number.value == "")
//  {
//    alert("Please enter a value for the \"Social Security number\" field.");
//    theForm.REQ_Borrower_1_Social_Security_Number.focus();
//    return (false);
//  }

//DESCRIBE YOUR CREDIT HISTORY:
//  if (theForm.REQ_Borrower_1_Credit_History.value == "")
//  {
//    alert("Please enter a value for the \"Describe your credit history\" field.");
//    theForm.REQ_Borrower_1_Credit_History.focus();
//    return (false);
//  }

//  //TEST FOR MAXIMUM CHARACTERS:
//  if (theForm.REQ_Borrower_1_Credit_History.value.length > 1024)
//  {
//    alert("Please enter at most 1024 characters in the \"Describe your credit history\" field.");
//    theForm.REQ_Borrower_1_Credit_History.focus();
//    return (false);
//  }

//REQ_Property_Address:
  if (theForm.REQ_Property_Address.value == "")
  {
    alert("Please enter a value for the \"Property_Address\" field.");
    theForm.REQ_Property_Address.focus();
    return (false);
  }

//REQ_Property_City:
  if (theForm.REQ_Property_City.value == "")
  {
    alert("Please enter a value for the \"Property_City\" field.");
    theForm.REQ_Property_City.focus();
    return (false);
  }

//REQ_Property_State:
//  if (theForm.REQ_Property_State.value == "")
//  {
//    alert("Please enter a value for the \"Property State\" field.");
//    theForm.REQ_Property_State.focus();
//    return (false);
//  }

//REQ_Property_Zip:
  if (theForm.REQ_Property_Zip.value == "")
  {
    alert("Please enter a value for the \"Zip code\" field.");
    theForm.REQ_Property_Zip.focus();
    return (false);
  }

//REQ_Property_Type:
//  if (theForm.REQ_Property_Type.value == "")
//  {
//    alert("Please enter a value for the \"Property type\" field.");
//    theForm.REQ_Property_Type.focus();
//    return (false);
//  }

//REQ_Property_Value:
//  if (theForm.REQ_Property_Value.value == "")
//  {
//    alert("Please enter a value for the \"Property Market Value\" field.");
//    theForm.REQ_Property_Value.focus();
//    return (false);
//  }

//Accept Terms?
  if (theForm.AcceptTerms.checked == false)
  {
    alert("You must accept the terms and conditions before proceeding.");
    theForm.AcceptTerms.focus();
    return (false);
  }

//SCRIPT END
  return (true);
}
//-->