function HL(webdealform) {

var ErrorFHOG="Are You entitled to First Home Owner Grant?";
var ErrorLoanAmount="Please Enter Loan Amount";
var ErrorValueSecurityProperties="Please Enter Purchase Price / Value Of \nSecurity Properties";
var ErrorLoanPurpose="Please Select The Loan Purpose";
var ErrorDeposit="Please Enter The Deposit Amount excluding ( FHOG )";
var ErrorNumberProperties="Please Enter Number Of All Real Estate\nAssets For All Borrowers";
var ErrorValueProperties="Please Enter Value Of All Properties";
var ErrorOutstandingMortgages="Please Enter The Amount Of Outstanding Mortgages";
var ErrorOtherDebts="Please Enter The Amount Of Other Debts";
var ErrorAnnualIncome="Please Enter Total Income For All Borrowers";
var ErrorFinancials="Do All Borrowers Have Full Financials For Last 2 Years ? ";
var ErrorDependants="Please Select How Many Dependents Do All Borrowers Have ?  ";
var ErrorFirstName="Please Enter Your First Name";
var ErrorLastName="Please Enter Your Last Name";
var ErrorHomePhoneArea="Please Check Area Code - Home Phone";
var ErrorHomePhone="Please Check Home Phone No";
var ErrorWorkPhoneArea="Please Check Area Code - Work Phone";
var ErrorWorkPhone="Please Check Work Phone No ";
var ErrorPhones="Please Provide At Least\n2 Contact Numbers";
var ErrorEmail="Please Enter Email Address";
var ErrorEmailValid="Please Type a Valid Email Address";
var ErrorPreferedTime ="Please Enter Preferred Contact Time";
var ErrorPreferedDay ="Please Enter Preferred Contact Day";
var ErrorState="Please Select State";
var ErrorD="Do You Have Late Payments / Defaults / Arrears?";
var ErrorDD="You selected ' YES ' - Please Provide\nMore Information?";


var control1 = webdealform.loan_amount;
var control2 = webdealform.value_of_sec_prop;
var control3 = webdealform.loan_purpose;

var control5 = webdealform.number_of_properties;
var control6 = webdealform.value_of_properties;
var control7 = webdealform.outstanding_mortgages;
var control8 = webdealform.other_debts;
var control9 = webdealform.number_of_borrowers;
var control10 = webdealform.annual_income_all_borrowers;
var control11 = webdealform.financials;
var control12 = webdealform.dependants;
var control13 = webdealform.firstname;
var control14 = webdealform.lastname;
var control15 = webdealform.home_area_code;
var control16 = webdealform.work_area_code;
var control17 = webdealform.home_phone;
var control18 = webdealform.work_phone;
var control19 = webdealform.mobile;
var control20 = webdealform.email;
var control11c = webdealform.state;
var control21 = webdealform.contactTime;
var control22 = webdealform.ContactDay;
var control23 = webdealform.fhog;
var control24 = webdealform.defaults;
var control25 = webdealform.defaults_descr;
var control26 = webdealform.deposit;


if(control1.value=="") { 
alert (ErrorLoanAmount);
control1.focus();
return false;
 }
if (control23.options[control23.selectedIndex].value=="9999"){
alert (ErrorFHOG);
control23.focus();
return false;
}

if ((control23.options[control23.selectedIndex].value=="Yes")&&(control26.value=="")){
alert (ErrorDeposit);
control26.focus();
return false;
}



if(control2.value=="") { 
alert (ErrorValueSecurityProperties);
control2.focus();
return false;
 }

if (control3.options[control3.selectedIndex].value=="0") {
alert (ErrorLoanPurpose);
control3.focus();
return false;
}

if (control5.options[control5.selectedIndex].value=="9999"){
alert (ErrorNumberProperties);
control5.focus();
return false;
}
if (!( control5.options[control5.selectedIndex].value=="0") && (control6.value=="")) {
alert (ErrorValueProperties);
control6.focus();
return false;
}
 
if(control7.value=="") { 
alert (ErrorOutstandingMortgages);
control7.focus();
return false;
 }
if(control8.value=="") { 
alert (ErrorOtherDebts);
control8.focus();
return false;
 }



if (control24.options[control24.selectedIndex].value=="0"){
alert (ErrorD);
control24.focus();
return false;
}

if ((control24.options[control24.selectedIndex].value=="Y")&&(control25.value=="")){
alert (ErrorDD);
control25.focus();
return false;
}



if(control10.value=="") { 
alert (ErrorAnnualIncome);
control10.focus();
return false;
 }
if (control11.options[control11.selectedIndex].value=="0") {
alert (ErrorFinancials);
control11.focus();
return false;
}
if (control12.options[control12.selectedIndex].value=="99999") {
alert (ErrorDependants);
control12.focus();
return false;
}
if(control13.value=="") { 
alert (ErrorFirstName);
control13.focus();
return false;
 }
if(control14.value=="") { 
alert (ErrorLastName);
control14.focus();
return false;
 }


var areacodehp=control15;
var areacodewp=control16;
var homephone=control17;
var workphone=control18;
var mobile=control19;
var email = control20;
var CTime=control21;
var CDay= control22;


if (((areacodehp.value=="") && (homephone.value==""))  &&  ((areacodewp.value=="") && (workphone.value=="")) && (mobile.value=="")){
alert (ErrorPhones);
areacodehp.focus();
return false;
}
if (areacodehp.value.length==1){
alert (ErrorHomePhoneArea); 
areacodehp.focus();
return false;
}
if ((areacodehp.value.length==2) && (homephone.value=="")){
alert (ErrorHomePhone); 
homephone.focus();
return false;
}
if (((!areacodehp.value=="") && (!homephone.value==""))  &&  ((areacodewp.value=="") && (workphone.value=="")) && (mobile.value=="")){
alert (ErrorPhones);
areacodewp.focus();
return false;
}
if (areacodewp.value.length==1){
alert (ErrorWorkPhoneArea); 
areacodewp.focus();
return false;
}
if ((areacodewp.value.length==2) && (workphone.value=="")){
alert (ErrorWorkPhone); 
workphone.focus();
return false;
}
if(email.value=="") {
alert (ErrorEmail);
email.focus();
return false;
}
if(email){
var mail=email.value
}
   if (( mail.indexOf("@") == -1)||(mail.indexOf(".") == -1))
    {
        alert (ErrorEmailValid);
        email.focus() ;
        return false;
    }

var state=control11c;

if (state.options[state.selectedIndex].value=="0"){
alert (ErrorState);
state.focus();
return false;
}

if (control21.options[control21.selectedIndex].value=="0") {
alert (ErrorPreferedTime);
control21.focus();
return false;
}
if (control22.options[control22.selectedIndex].value=="0") {
alert (ErrorPreferedDay);
control22.focus();
return false;
}
return true;
}
