var at="@";
var dot=".";
function validateauto()
{
var lat=document.auto.email.value.indexOf(at);
var lstr=document.auto.email.value.length;
var ldot=document.auto.email.value.indexOf(dot);
if (document.auto.name.value == "")
{
alert('Step 1: Please Enter Your Name.');
return false;
}
if (document.auto.email.value == "")
{
alert('Step 1: Please Enter Your EmailId.');
return false;
}
else if (document.auto.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.auto.email.value.indexOf(at)==-1 || document.auto.email.value.indexOf(at)==0 || document.auto.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.auto.email.value.indexOf(dot)==-1 || document.auto.email.value.indexOf(dot)==0 || document.auto.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.auto.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.auto.email.value.substring(lat-1,lat)==dot || document.auto.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.auto.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.auto.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if (document.auto.fielda1f94c0fab48733.value == "")
{
alert('Step 1: Please Enter Your Address.');
return false;
}
if (document.auto.field1838e4b0d4b018b.value == "")
{
alert('Step 1: Please Enter Your City.');
return false;
}
if (document.auto.field083dcb0e9ff072c.value == "") 
{
alert('Step 1: Please Enter a valid Home Phone.');
return false;
}
if (document.auto.fieldf44c44b9ee86dc9.value == "")
{
alert('Step 1: Please Enter Your Current Insurance Scheme.');
return false;
}
if (document.auto.field7543ec295ff6fea.value == "")
{
alert('Step 1: Please Enter Expiration of Your Current Insurance Scheme.');
return false;
}
if (document.auto.fieldd39910edfa90e46(0).value == "")
{
alert('Step 2: Please Enter Drivers Licence No.');
return false;
}
if (document.auto.field5f0ddc4531749aa(0).value == "")
{
alert('Step 2: Please Enter Validity Period for Driving Licence No.');
return false;
}
if (document.auto.field1923ad361d69d5c(0).value == "")
{
alert('Step 2: Please Enter The Date of Birth of Driver.');
return false;
}
if (document.auto.field1dc06c6fa22a935(0).value == "")
{
alert('Step 2: Please Enter the List of all accidents in past three years.');
return false;
}
if ((document.auto.field11446db24db7d5f(0).value == "") || (isNaN(document.auto.field11446db24db7d5f(0).value)))
{
alert('Step 3: Please Enter the year of vehicle.');
return false;
}
if ((document.auto.field2c452ffe3b7d081(0).value == "") || (isNaN(document.auto.field2c452ffe3b7d081(0).value)))
{
alert('Step 3: Please Enter the make of vehicle.');
return false;
}
if (document.auto.fieldab2195d452c558c(0).value == "")
{
alert('Step 3: Please Enter the model of vehicle.');
return false;
}
}
function validatehome()
{
var lat=document.home.email.value.indexOf(at);
var lstr=document.home.email.value.length;
var ldot=document.home.email.value.indexOf(dot);
if (document.home.name.value == "")
{
alert('Step 1: Please Enter Your Name.');
return false;
}
if (document.home.email.value == "")
{
alert('Step 1: Please Enter Your EmailId.');
return false;
}
else if (document.home.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.home.email.value.indexOf(at)==-1 || document.home.email.value.indexOf(at)==0 || document.home.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.home.email.value.indexOf(dot)==-1 || document.home.email.value.indexOf(dot)==0 || document.home.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.home.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.home.email.value.substring(lat-1,lat)==dot || document.home.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.home.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.home.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if (document.home.field85f5c801782c9b8.value == "")
{
alert('Step 1: Please Enter Address for property to insure.');
return false;
}
if (document.home.fieldb1e4a6bd500de71.value == "")
{
alert('Step 1: Please Enter Your City.');
return false;
}
if (document.home.field499a35afab53836.value == "")
{
alert('Step 1: Please Enter a Valid Home Phone.');
return false;
}
if (document.home.field8ba529946b8c8d2.value == "")
{
alert('Step 1: Please Enter Your Current Insurance Scheme.');
return false;
}
if (document.home.fielde3dcd39e6e58785.value == "")
{
alert('Step 1: Please Enter Expiration of Your Current Insurance Scheme.');
return false;
}
if ((document.home.field37b1aca79a08493.value == "") || (isNaN(document.home.field37b1aca79a08493.value)))
{
alert('Step 2: Please Enter the year when the home was built.');
return false;
}
if ((document.home.field7f7dbedcfce598f.value == "") || (isNaN(document.home.field7f7dbedcfce598f.value)))
{
alert('Step 2: Please Enter the number of storeys of the house.');
return false;
}
if ((document.home.fieldb5ebfb118c724e1.value == "") || (isNaN(document.home.fieldb5ebfb118c724e1.value)))
{
alert('Step 2: Please Enter The age of roof.');
return false;
}
if ((document.home.field0caabf1f1956d8e.value == "") || (isNaN(document.home.field0caabf1f1956d8e.value)))
{
alert('Step 2: Please Enter the number of rooms.');
return false;
}
if ((document.home.field975cc6dda742241.value == "") || (isNaN(document.home.field975cc6dda742241.value)))
{
alert('Step 2: Please Enter the no of bathrooms.');
return false;
}
if ((document.home.field4ef551c7acdf06f.value == "") || (isNaN(document.home.field4ef551c7acdf06f.value)))
{
alert('Step 2: Please Enter the total square fts of the house.');
return false;
}
}
function validatelife()
{
var lat=document.life.email.value.indexOf(at);
var lstr=document.life.email.value.length;
var ldot=document.life.email.value.indexOf(dot);
if ((document.life.dobMM.value == "-1") || (document.life.dobDD.value == "-1") || (document.life.dobYYYY.value == "-1"))
{
alert('Please Enter a valid Date of Birth.');
return false;
}
if (document.life.gender.value == "-1")
{
alert('Please Select Your Gender.');
return false;
}
if (isNaN(document.life.weight.value))
{
alert('Please Enter the valid weight.');
return false;
}
if (document.life.tobaccoUse.value == "-1")
{
alert('Please Select the time for Nicotine use.');
return false;
}
if (document.life.firstName.value == "")
{
alert('Please Enter Your First Name.');
return false;
}
if ((document.life.homePhone1.value == "")|| (isNaN(document.life.homePhone1.value)) || (document.life.homePhone2.value == "") || (isNaN(document.life.homePhone2.value)) ||(document.life.homePhone3.value == "") || (isNaN(document.life.homePhone3.value)))
{
alert('Please Enter a valid Primary Phone.');
return false;
}
if ((isNaN(document.life.workPhone1.value)) || (isNaN(document.life.workPhone2.value)) || (isNaN(document.life.workPhone3.value)))
{
alert('Please Enter a valid Secondary Phone.');
return false;
}
if (document.life.email.value == "")
{
alert('Please Enter Your Email.');
return false;
}
else if (document.life.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.life.email.value.indexOf(at)==-1 || document.life.email.value.indexOf(at)==0 || document.life.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.life.email.value.indexOf(dot)==-1 || document.life.email.value.indexOf(dot)==0 || document.life.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.life.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.life.email.value.substring(lat-1,lat)==dot || document.life.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.life.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.life.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if (document.life.emailConfirm.value == "")
{
alert('Please Confirm Your Email.');
return false;
}
if (document.life.email.value != document.life.emailConfirm.value)
{
alert('Email and confirm Email addresses are different.');
return false;
}
if (document.life.address1.value == "")
{
alert('Please Enter your address.');
return false;
}
if (document.life.city.value == "")
{
alert('Please Enter your City.');
return false;
}
if (document.life.zipCode.value == "")
{
alert('Please Enter your ZipCode.');
return false;
}
}
function validatehealth()
{
var lat=document.health.email.value.indexOf(at);
var lstr=document.health.email.value.length;
var ldot=document.health.email.value.indexOf(dot);
if (document.health.name.value == "")
{
alert('Step 1: Please Enter Your Name.');
return false;
}
if (document.health.email.value == "")
{
alert('Step 1: Please Enter Your EmailId.');
return false;
}
else if (document.health.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.health.email.value.indexOf(at)==-1 || document.health.email.value.indexOf(at)==0 || document.health.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.health.email.value.indexOf(dot)==-1 || document.health.email.value.indexOf(dot)==0 || document.health.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.health.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.health.email.value.substring(lat-1,lat)==dot || document.health.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.health.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.health.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if (document.health.fieldAddress.value == "")
{
alert('Step 1: Please Enter Your Address.');
return false;
}
if (document.health.City.value == "")
{
alert('Step 1: Please Enter Your City.');
return false;
}
if (document.health.HomePhone.value == "")
{
alert('Step 1: Please Enter Your Home Phone.');
return false;
}
if (document.health.CurrentInsurance.value == "")
{
alert('Step 1: Please Enter Your Current Insurance Scheme.');
return false;
}
if (document.health.ExpirationDate.value == "")
{
alert('Step 1: Please Enter Expiration of Your Current Insurance Scheme.');
return false;
}
if (document.health.Applicant(0).value=="-1")
{
alert('Step 2: Please Enter the gender of the Applicant.');
return false;
}
if ((document.health.Applicant(1).value=="") || (isNaN(document.health.Applicant(1).value)))
{
alert('Step 2: Please Enter the age of the Applicant.');
return false;
}
if ((document.health.Spouse(0).value!="-1") && ((document.health.Spouse(1).value=="") || (isNaN(document.health.Spouse(1).value))))
{
alert('Step 2: Please Enter the age of the Spouse.');
return false;
}
if ((document.health.Child1(0).value!="-1") && ((document.health.Child1(1).value=="") || (isNaN(document.health.Child1(1).value))))
{
alert('Step 2: Please Enter the age of the Child1.');
return false;
}
if ((document.health.Child2(0).value!="-1") && ((document.health.Child2(1).value=="") || (isNaN(document.health.Child2(1).value))))
{
alert('Step 2: Please Enter the age of the Child12.');
return false;
}
if ((document.health.Child3(0).value!="-1") && ((document.health.Child3(1).value=="") || (isNaN(document.health.Child3(1).value))))
{
alert('Step 2: Please Enter the age of the Child3.');
return false;
}
if ((document.health.Child4(0).value!="-1") && ((document.health.Child4(1).value=="") || (isNaN(document.health.Child4(1).value))))
{
alert('Step 2: Please Enter the age of the Child4.');
return false;
}
if ((document.health.Child5(0).value!="-1") && ((document.health.Child5(1).value=="") || (isNaN(document.health.Child5(1).value))))
{
alert('Step 2: Please Enter the age of the Child5.');
return false;
}
}
function validatemedicare()
{
var lat=document.medicare.email.value.indexOf(at);
var lstr=document.medicare.email.value.length;
var ldot=document.medicare.email.value.indexOf(dot);
if (document.medicare.name.value == "")
{
alert('Step 1: Please Enter Your Name.');
return false;
}
if (document.medicare.email.value == "")
{
alert('Step 1: Please Enter Your EmailId.');
return false;
}
else if (document.medicare.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.medicare.email.value.indexOf(at)==-1 || document.medicare.email.value.indexOf(at)==0 || document.medicare.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.medicare.email.value.indexOf(dot)==-1 || document.medicare.email.value.indexOf(dot)==0 || document.medicare.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.medicare.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.medicare.email.value.substring(lat-1,lat)==dot || document.medicare.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.medicare.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.medicare.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if (document.medicare.fieldAddress.value == "")
{
alert('Step 1: Please Enter Your Address.');
return false;
}
if (document.medicare.City.value == "")
{
alert('Step 1: Please Enter Your City.');
return false;
}
if (document.medicare.HomePhone.value == "")
{
alert('Step 1: Please Enter Your Home Phone.');
return false;
}
if (document.medicare.CurrentInsurance.value == "")
{
alert('Step 1: Please Enter Your Current Insurance Scheme.');
return false;
}
if (document.medicare.ExpirationDate.value == "")
{
alert('Step 1: Please Enter Expiration of Your Current Insurance Scheme.');
return false;
}
if (document.medicare.Applicant(0).value=="-1")
{
alert('Step 2: Please Enter the gender of the Applicant.');
return false;
}
if ((document.medicare.Applicant(1).value=="") || (isNaN(document.medicare.Applicant(1).value)))
{
alert('Step 2: Please Enter the age of the Applicant.');
return false;
}
if ((document.medicare.Spouse(0).value!="-1") && ((document.medicare.Spouse(1).value=="") || (isNaN(document.medicare.Spouse(1).value))))
{
alert('Step 2: Please Enter the age of the Spouse.');
return false;
}
}
function validateautochange()
{
var lat=document.autochange.email.value.indexOf(at);
var lstr=document.autochange.email.value.length;
var ldot=document.autochange.email.value.indexOf(dot);
if (document.autochange.Disclaimer_Accept.checked == false)
{
alert('Step 1: Please Accept the disclaimer.');
return false;
}

if (document.autochange.name.value == "")
{
alert('Step 1: Please Enter Your Name.');
return false;
}
if (document.autochange.Phone.value == "") 
{
alert('Step 1: Please Enter a valid Phone number.');
return false;
}
if (document.autochange.email.value == "")
{
alert('Step 1: Please Enter Your EmailId.');
return false;
}
else if (document.autochange.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autochange.email.value.indexOf(at)==-1 || document.autochange.email.value.indexOf(at)==0 || document.autochange.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autochange.email.value.indexOf(dot)==-1 || document.autochange.email.value.indexOf(dot)==0 || document.autochange.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autochange.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autochange.email.value.substring(lat-1,lat)==dot || document.autochange.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autochange.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autochange.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if (document.autochange.Policy_Number.value == "")
{
alert('Step 1: Please Enter Your Policy Number.');
return false;
}
if (document.autochange.Effective_Date_of_Change.value == "")
{
alert('Step 1: Please Enter Effective Date of Change.');
return false;
}
}
function validateautoproperty()
{
var lat=document.autoproperty.email.value.indexOf(at);
var lstr=document.autoproperty.email.value.length;
var ldot=document.autoproperty.email.value.indexOf(dot);
if (document.autoproperty.Disclaimer_Accept.checked == false)
{
alert('Please Accept the disclaimer.');
return false;
}

if (document.autoproperty.name.value == "")
{
alert('Please Enter Your Name.');
return false;
}
if (document.autoproperty.Address.value == "") 
{
alert('Step 1: Please Enter your address.');
return false;
}
if (document.autoproperty.City.value == "") 
{
alert('Please Enter your City.');
return false;
}
if (document.autoproperty.Home_Phone.value == "") 
{
alert('Please Enter a valid Home Phone number.');
return false;
}
if (document.autoproperty.email.value == "")
{
alert('Please Enter Your EmailId.');
return false;
}
else if (document.autoproperty.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autoproperty.email.value.indexOf(at)==-1 || document.autoproperty.email.value.indexOf(at)==0 || document.autoproperty.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autoproperty.email.value.indexOf(dot)==-1 || document.autoproperty.email.value.indexOf(dot)==0 || document.autoproperty.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autoproperty.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autoproperty.email.value.substring(lat-1,lat)==dot || document.autoproperty.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autoproperty.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autoproperty.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if ((document.autoproperty.Time.value == "")|| (isNaN(document.autoproperty.Time.value)))
{
alert('Please Enter a valid time of loss.');
return false;
}
if (document.autoproperty.Date.value == "")
{
alert('Please Enter the date of loss.');
return false;
}
if (document.autoproperty.Location_of_Property.value == "")
{
alert('Please Enter Location of Property.');
return false;
}
}
function validateautocard()
{
var lat=document.autocard.email.value.indexOf(at);
var lstr=document.autocard.email.value.length;
var ldot=document.autocard.email.value.indexOf(dot);
if (document.autocard.name.value == "")
{
alert('Please Enter Your Name.');
return false;
}
if (document.autocard.email.value == "")
{
alert('Please Enter Your EmailId.');
return false;
}
else if (document.autocard.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autocard.email.value.indexOf(at)==-1 || document.autocard.email.value.indexOf(at)==0 || document.autocard.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autocard.email.value.indexOf(dot)==-1 || document.autocard.email.value.indexOf(dot)==0 || document.autocard.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autocard.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autocard.email.value.substring(lat-1,lat)==dot || document.autocard.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autocard.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autocard.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if (document.autocard.Address.value == "") 
{
alert('Please Enter your address.');
return false;
}
if (document.autocard.City.value == "") 
{
alert('Please Enter your City.');
return false;
}
if (document.autocard.Home_Phone.value == "") 
{
alert('Please Enter a valid Home Phone number.');
return false;
}
if (document.autocard.Policy_Number.value == "")
{
alert('Please Enter Your Policy Number.');
return false;
}
if ((document.autocard.Year.value == "") || (isNaN(document.autocard.Year.value)))
{
alert('Please Enter the year of vehicle.');
return false;
}
if ((document.autocard.Make.value == "") || (isNaN(document.autocard.Make.value)))
{
alert('Please Enter the make of vehicle.');
return false;
}
if (document.autocard.Model.value == "")
{
alert('Please Enter the model of vehicle.');
return false;
}
if (document.autocard.Vehicle_ID.value == "")
{
alert('Please Enter the vehicle ID Number.');
return false;
}
}
function validateautoloss()
{
var lat=document.autoloss.email.value.indexOf(at);
var lstr=document.autoloss.email.value.length;
var ldot=document.autoloss.email.value.indexOf(dot);
if (document.autoloss.Disclaimer_Accept.checked == false)
{
alert('Please Accept the disclaimer.');
return false;
}

if (document.autoloss.name.value == "")
{
alert('Step 1: Please Enter Your Name.');
return false;
}
if (document.autoloss.Address.value == "") 
{
alert('Step 1: Please Enter your address.');
return false;
}
if (document.autoloss.City.value == "") 
{
alert('Step 1: Please Enter your City.');
return false;
}
if (document.autoloss.Home_Phone.value == "") 
{
alert('Step 1: Please Enter a valid Home Phone number.');
return false;
}
if (document.autoloss.email.value == "")
{
alert('Step 1: Please Enter Your EmailId.');
return false;
}
else if (document.autoloss.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autoloss.email.value.indexOf(at)==-1 || document.autoloss.email.value.indexOf(at)==0 || document.autoloss.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autoloss.email.value.indexOf(dot)==-1 || document.autoloss.email.value.indexOf(dot)==0 || document.autoloss.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autoloss.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autoloss.email.value.substring(lat-1,lat)==dot || document.autoloss.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autoloss.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autoloss.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if ((document.autoloss.Time.value == "")|| (isNaN(document.autoloss.Time.value)))
{
alert('Step 2: Please Enter a valid time of Accident.');
return false;
}
if (document.autoloss.Date.value == "")
{
alert('Step 2: Please Enter the date of Accident.');
return false;
}
if (document.autoloss.Location_of_Accident.value == "")
{
alert('Step 2: Please Enter Location of Accident.');
return false;
}
if (document.autoloss.Where_Can_Vehicle_Be_Seen.value == "")
{
alert('Step 3: Please Enter Where The Vehicle Can Be Seen.');
return false;
}
if ((document.autoloss.Vehicle_Year.value == "") || (isNaN(document.autoloss.Vehicle_Year.value)))
{
alert('Step 3: Please Enter the year of vehicle.');
return false;
}
if ((document.autoloss.Make.value == "") || (isNaN(document.autoloss.Make.value)))
{
alert('Step 3: Please Enter the make of vehicle.');
return false;
}
if (document.autoloss.Model.value == "")
{
alert('Step 3: Please Enter the model of vehicle.');
return false;
}
if (document.autoloss.License_Plate_Number.value == "")
{
alert('Step 3: Please Enter the License Plate Number.');
return false;
}
if (document.autoloss.Drivers_License.value == "")
{
alert('Step 4: Please Enter the Driver License Number.');
return false;
}
if (document.autoloss.DriverLicense_Plate_Number.value == "")
{
alert('Step 4: Please Enter the Driver License Plate Number.');
return false;
}
if (document.autoloss.Insurance_Company.value == "")
{
alert('Step 4: Please Enter the Insurance Company.');
return false;
}
}
function validateautorenew()
{
var lat=document.autorenew.email.value.indexOf(at);
var lstr=document.autorenew.email.value.length;
var ldot=document.autorenew.email.value.indexOf(dot);
if (document.autorenew.name.value == "")
{
alert('Step 1: Please Enter Your Name.');
return false;
}
if (document.autorenew.Address.value == "") 
{
alert('Step 1: Please Enter your address.');
return false;
}
if (document.autorenew.City.value == "") 
{
alert('Step 1: Please Enter your City.');
return false;
}
if (document.autorenew.Phone.value == "") 
{
alert('Step 1: Please Enter a valid Phone number.');
return false;
}
if (document.autorenew.email.value == "")
{
alert('Step 1: Please Enter Your EmailId.');
return false;
}
else if (document.autorenew.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autorenew.email.value.indexOf(at)==-1 || document.autorenew.email.value.indexOf(at)==0 || document.autorenew.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.autorenew.email.value.indexOf(dot)==-1 || document.autorenew.email.value.indexOf(dot)==0 || document.autorenew.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autorenew.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autorenew.email.value.substring(lat-1,lat)==dot || document.autorenew.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autorenew.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.autorenew.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if (document.autorenew.Renewal_Date.value == "")
{
alert('Step 2: Please Enter the date of Renewal of Policy.');
return false;
}
}
function validaterequest()
{
var lat=document.servicerequest.email.value.indexOf(at);
var lstr=document.servicerequest.email.value.length;
var ldot=document.servicerequest.email.value.indexOf(dot);
if (document.servicerequest.name.value == "")
{
alert('Step 1: Please Enter Your Name.');
return false;
}
if (document.servicerequest.Address.value == "") 
{
alert('Step 1: Please Enter your address.');
return false;
}
if (document.servicerequest.City.value == "") 
{
alert('Step 1: Please Enter your City.');
return false;
}
if (document.servicerequest.Home_Phone.value == "") 
{
alert('Step 1: Please Enter a valid Home Phone number.');
return false;
}
if (document.servicerequest.email.value == "")
{
alert('Step 1: Please Enter Your EmailId.');
return false;
}
else if (document.servicerequest.email.value.indexOf(at)==-1)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.servicerequest.email.value.indexOf(at)==-1 || document.servicerequest.email.value.indexOf(at)==0 || document.servicerequest.email.value.indexOf(at)==lstr)
{
       alert("Invalid E-mail ID");
	   return false;
}
else if (document.servicerequest.email.value.indexOf(dot)==-1 || document.servicerequest.email.value.indexOf(dot)==0 || document.servicerequest.email.value.indexOf(dot)==lstr)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.servicerequest.email.value.indexOf(at,(lat+1))!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.servicerequest.email.value.substring(lat-1,lat)==dot || document.servicerequest.email.value.substring(lat+1,lat+2)==dot)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.servicerequest.email.value.indexOf(dot,(lat+2))==-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
else if (document.servicerequest.email.value.indexOf(" ")!=-1)
{
	    alert("Invalid E-mail ID");
	    return false;
}
if (document.servicerequest.Policy_Number.value == "")
{
alert('Step 1: Please Enter the Policy Number.');
return false;
}
if (document.servicerequest.Effective_Date.value == "")
{
alert('Step 1: Please Enter the Policy Effective ChangeDate.');
return false;
}
}
function gotoapp2(zipvalue,page)
{
if (parseInt(zipvalue)<10000 || isNaN(zipvalue) || zipvalue=="")
{
alert('Please Enter a valid Zip Code');
}
else
{
window.location.href="Ins_" + page + ".asp?zip=" + zipvalue;
}
}
function changestyle(styleicon)
{
if (styleicon == "1")
{
if (document.common.Zip.value=="Zip Code")
{
document.common.Zip.value = "";
document.common.Zip.color = "black";
}
}
if (styleicon == "2")
{
if (document.common.Zip.value=="")
{
document.common.Zip.value = "Zip Code";
document.common.Zip.color = "gray";
}
}
if (styleicon == "3")
{
if (document.common.Zip1.value=="Zip Code")
{
document.common.Zip1.value = "";
document.common.Zip1.color = "black";
}
}
if (styleicon == "4")
{
if (document.common.Zip1.value=="")
{
document.common.Zip1.value = "Zip Code";
document.common.Zip1.color = "gray";
}
}

}