function tab1()
{

  if(document.frm.hp1.value.length==3)
   {
	document.frm.hp2.focus()
	return
    }
}

function tab2()
{

  if(document.frm.hp2.value.length==3)
   {
	document.frm.hp3.focus()
	return
    }
}

function tab3()
{
   if(document.frm.wp1.value.length==3)
   {
	document.frm.wp2.focus()
	return
    }
}
function tab4()
{
    if(document.frm.wp2.value.length==3)
   {
	document.frm.wp3.focus()
	return
    }

}
function Validate()
{
 //   i="";k="";
	var i, k,z;
  if (document.frm.InsuranceType.selectedIndex=="")
	{
		alert("Please select the type of Insurance");
		document.frm.InsuranceType.focus();
		return;
	}
	
    if(document.frm.SubCategories.selectedIndex=="")
    {
	alert("Please select SubCategories Type");
	document.frm.SubCategories.focus();
	return;
    }
   
	

 if (document.frm.InsuranceType.value == "Long Term Care Insurance"||"Health Insurance"||"Home Insurance"||"Auto Insurance"||"Life Insurance")
{
if(document.frm.FName.value=="")
	{
		alert("Please enter your First Name ");
		//SetErrorImage("FName", true);
		document.frm.FName.select();
		document.frm.FName.focus();
		return;
	}
	if(!(isNaN(document.frm.FName.value)))
	  {
	  	alert("Please enter a Vaild First Name ");
		document.frm.FName.select();
		document.frm.FName.focus();
		return;
	  }
	else
    	{
	}

	if(document.frm.LName.value=="")
	{
		alert("Please enter your Last Name ");
		document.frm.LName.select();
		document.frm.LName.focus();
		return;
	}
	if(!(isNaN(document.frm.LName.value)))
	  {
	  	alert("Please enter a Vaild Last Name ");
		document.frm.LName.select();
		document.frm.LName.focus();
		return;
	  }
	else
    {
	}

	if(document.frm.month.value=="")
	{
		alert("Please enter Month in your Date of Birth ");
		document.frm.month.focus();
		return;
	}
	if(document.frm.day.value=="")
	{
		alert("Please enter date in your Date of Birth ");
		document.frm.day.focus();
		return;
	}
	if(document.frm.year.value=="")
	{
		alert("Please enter year in your Date of Birth ");
		document.frm.year.focus();
		return;
	}
	if (isNaN(document.frm.year.value))
	{
		alert("Please enter Valid Numeric  year in your Date of Birth ");
		document.frm.year.select();
		document.frm.year.focus();
		return;
	}
	
	if (document.frm.year.value.length != 4)
	{
		alert("Please enter  valid Four digit year in your Date of Birth ");
		document.frm.year.select();
		document.frm.year.focus();
		return;
	}

	if(document.frm.Email.value=="")
	{
   		alert("Please enter your Email ID");
		document.frm.Email.select();
		document.frm.Email.focus();
		return;
	}

	else
	{
	  var evalue=document.frm.Email.value;
      var emailPat = /^(\".*\"|\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
	  
	  var matchArray = evalue.match(emailPat);

		if(!emailPat.test(evalue))
		{
			alert("Your email address is invalid.  Please try again !!");
			document.frm.Email.select();
			document.frm.Email.focus();
  			return;
		}
		else
       {
	   }
	}
		if (document.frm.hp1.value=="" )
	{
		alert("Please enter your home phone number");
		document.frm.hp1.select();
		document.frm.hp1.focus();
		return;
	}
	else
    {
	}
	  	if (document.frm.hp1.value=="" )
	{
		alert("Please enter your home phone number");
		document.frm.hp1.select();
		document.frm.hp1.focus();
		return;
	}
   else
    {
	}
	  if(isNaN(document.frm.hp1.value))
	  {
	  	alert("Home phone number should be Numeric value");
		document.frm.hp1.select();
		document.frm.hp1.focus();
		return;
	  }
	  else
    {
	}
	if(document.frm.hp2.value=="")
	{
		alert("Please enter your home phone number");
		document.frm.hp2.select();
		document.frm.hp2.focus();
		return;
	}
	else
    {
	}
	  if(isNaN(document.frm.hp2.value))
	  {
	  	alert("Home phone number should be Numeric value");
		document.frm.hp2.select();
		document.frm.hp2.focus();
		return;
	  }
	else
    {
	}

	if(document.frm.hp3.value=="")
	{
		alert("Please enter your home phone number");
		document.frm.hp3.select();
		document.frm.hp3.focus();
		return;
	}
	else
    {
	}
	  if(isNaN(document.frm.hp3.value))
	  {
	  	alert("Home phone number should be Numeric value");
		document.frm.hp3.select();
		document.frm.hp3.focus();
		return;
	  }
	  else
    {
    	//SetErrorImage("hp3", false);
	}

	 if(document.frm.Street.value=="")
	{
   		alert("Please enter Street name");
		document.frm.Street.select();
		document.frm.Street.focus();
		return;
	}
	if(!(isNaN(document.frm.Street.value)))
		{
			alert("Please enter Valid Street name");
			document.frm.Street.select();
			document.frm.Street.focus();
			return;
		}
	else
    {
    	//SetErrorImage("Street", false);
	}
      if(document.frm.City.value=="")
	  {
	  	alert("Please enter city name");
		document.frm.City.select();
		document.frm.City.focus();
		return;
	  }
	  if(!(isNaN(document.frm.City.value)))
		{
			alert("Please enter Valid city name");
			document.frm.City.select();
			document.frm.City.focus();
			return;
		}
	  else
    {
	}
      if(document.frm.State.value=="")
	  {
	  	alert("Please select your state");
	    document.frm.State.focus();
		return;
	  }
	  else
    {
	}
	if (document.frm.Zip.value=="")
	{
		alert("Please enter Zipcode");
		document.frm.Zip.select();
		document.frm.Zip.focus();
		return;
	}
	else
    {
    	//SetErrorImage("Zip", false);
	}

		if(isNaN(document.frm.Zip.value))
		{
			alert("Zip code should be Numeric value");
			document.frm.Zip.select();
			document.frm.Zip.focus();
			return;
		}
		else
    {
    	//SetErrorImage("Zip", false);
	}
  
	if (document.frm.InsuranceType.value == "Auto Insurance")
	{
 if (document.frm.hasins.value=="")
	{
		alert("Please select \' Are you currently insured '\ ");
		document.frm.hasins.focus();
		return;
	}
     
if (document.frm.hasins.value=="1") 
{	 
 if (document.frm.insco.value == "n/a")
	{
		alert("Please select \' Name of your insurance company '\ ");
		document.frm.insco.focus();
		return;
	}

if (document.frm.timewith.selectedIndex=="")
	{
		alert("Please select \' How long have you had auto insurance with this company '\ ");
		document.frm.timewith.focus();
		return;
	}
if (document.frm.policy_renew_mnt.selectedIndex=="")
	{
		alert("Please select \' your policy renew Month '\ ");
		document.frm.policy_renew_mnt.focus();
		return;
	}

if (document.frm.policy_renew_day.selectedIndex=="")
	{
		alert("Please select \' your policy renew Day '\ ");
		document.frm.policy_renew_day.focus();
		return;
	}

if (document.frm.policy_renew_year.selectedIndex=="")
	{
		alert("Please select \' your policy renew Year '\ ");
		document.frm.policy_renew_year.focus();
		return;
	}
if (document.frm.curre_pay_2_ins.value=="")
	{
		alert("Please select \' How much do you currently pay for your insurance '\ ");
		document.frm.curre_pay_2_ins.select();
		document.frm.curre_pay_2_ins.focus();
		return;
	}

if(isNaN(document.frm.curre_pay_2_ins.value))
	{
		alert(" Please Enter the Valid numeric Value ");
		document.frm.curre_pay_2_ins.select();
		document.frm.curre_pay_2_ins.focus();
		return;
	}  
if (document.frm.howoften.selectedIndex=="")
	{
		alert("Please select \' How often do you pay that premium? '\ ");
		document.frm.howoften.focus();
		return;
	}
if (document.frm.currentliab.value=="")
	{
		alert("Please select \' what is your current liability limit? '\ ");
		document.frm.currentliab.focus();
		return;
	}
}
if (document.frm.timenolapse.selectedIndex=="")
	{
		alert("Please select \' How long have you continuously had auto insurance  '\ ");
		document.frm.timenolapse.focus();
		return;
	}

//liabbility form
if (document.frm.income.value == "not given")
	{
		alert("Please select \' What is your approximate household income?  '\ ");
		document.frm.income.focus();
		return;
	}

if (document.frm.housing.selectedIndex=="")
	{
		alert("Please select \' Do your own your own home?  '\ ");
		document.frm.housing.focus();
		return;
	}

if (document.frm.timeat.selectedIndex=="")
	{
		alert("Please select \' How long have you been at your current address  '\ ");
		document.frm.timeat.focus();
		return;
	}
	
if (document.frm.credit[0].value=="")
	{
		alert("Please select \' How would you describe your credit history?  '\ ");
		document.frm.credit[0].focus();
		return;
	}

if (document.frm.prefliab.value=="")
	{
		alert("Please select \' How much liability coverage would you like to have?  '\ ");
		document.frm.prefliab.focus();
		return;
	}
//end of liability
//start of drivers information

if (document.frm.driver_Fname.value=="")
	{
		alert("Please Enter \' Driver's First Name?  '\ ");
		document.frm.driver_Fname.select();
		document.frm.driver_Fname.focus();
		return;
	}
	if(!(isNaN(document.frm.driver_Fname.value)))
		{
			alert("Please Enter Valid \' Driver's First Name?  '\ ");
			document.frm.driver_Fname.select();
			document.frm.driver_Fname.focus();
			return;
		}

if (document.frm.driver_Lname.value=="")
	{
		alert("Please Enter \' Driver's Last Name?  '\ ");
		document.frm.driver_Lname.select();
		document.frm.driver_Lname.focus();
		return;
	}
	if(!(isNaN(document.frm.driver_Lname.value)))
		{
			alert("Please Enter Valid \' Driver's Last Name?  '\ ");
			document.frm.driver_Lname.select();
			document.frm.driver_Lname.focus();
			return;
		}
if (document.frm.statelic_1.selectedIndex=="")
	{
		alert("Please select \' What State is this license for?  '\ ");
		document.frm.statelic_1.focus();
		return;
	}

if (document.frm.licensestatus_1.selectedIndex=="")
	{
		alert("Please select \' License Status  '\ ");
		document.frm.licensestatus_1.focus();
		return;
	}
if(document.frm.driver_dobm.value=="")
	{
		alert("Please enter Month in your Date of Birth ");
		document.frm.driver_dobm.focus();
		return;
	}
	if(document.frm.driver_dobd.value=="")
	{
		alert("Please enter date in your Date of Birth ");
		document.frm.driver_dobd.focus();
		return;
	}
	if(document.frm.driver_doby.value=="")
	{
		alert("Please enter year in your Date of Birth ");
		document.frm.driver_doby.select();
		document.frm.driver_doby.focus();
		return;
	}
if(isNaN(document.frm.driver_doby.value))
	{
		alert(" Please Enter the Valid numeric Value ");
		document.frm.driver_doby.select();
		document.frm.driver_doby.focus();
		return;
	} 
if(document.frm.driver_doby.value.length != 4 )
	{
		alert("Please enter four digit  year in your Date of Birth ");
		document.frm.driver_doby.select();
		document.frm.driver_doby.focus();
		return;
	}

if (document.frm.agelic_1.selectedIndex=="")
	{
		alert("Please select \' How long has this driver been licensed in the U.S. or Canada?  '\ ");
		document.frm.agelic_1.focus();
		return;
	}

if (document.frm.Marital_1.value=="not given")
	{
		alert("Please select \' Marital Status  '\ ");
		document.frm.Marital_1.focus();
		return;
	}
if(document.frm.driver_Occupation.value=="")
	{
		alert("Please enter Driver Occupation ");
		document.frm.driver_Occupation.focus();
		return;
	}

if ((document.frm.driver_Occupation.value == "Student") && (document.frm.driver_stud_gpa.value=="") )
	{
		alert("what is his/her GPA");
		document.frm.driver_stud_gpa.focus();
		return;
	}


if (document.frm.education_1.value=="not given")
	{
		alert("Please select \' Education Level  '\ ");
		document.frm.education_1.focus();
		return;
	}


if(document.frm.violations_dobm.value=="")
	{
		alert("Please Select violation-month ");
		document.frm.violations_dobm.focus();
		return;
	}
	if(document.frm.violations_doby.value=="")
	{
		alert("Please Select violation-Year ");
		document.frm.violations_doby.focus();
		return;
	}
	if(document.frm.violationtype_1.value=="")
	{
		alert("Please Select violation-Type ");
		document.frm.violationtype_1.focus();
		return;
	}

//end of Driving Record

// start of Auto Information 


if(document.frm.vehicle_year.value=="")
	{
		alert("Please enter Vehicle Year ");
		document.frm.vehicle_year.focus();
		return;
	}
if(document.getElementById("automake_1").value=="")
	{
		alert("Please select \' Vehicle Make  '\ ");
		document.getElementById("automake_1").focus();
		return;
	}

if(document.getElementById("vehicle_modal").value=="")
	{
		alert("Please enter vehicle modal ");
		document.getElementById("vehicle_modal").focus();
		return;
	}
	if(document.getElementById("vehicle_tri").value=="")
	{
		alert("Please enter vehicle Trim ");
		document.getElementById("vehicle_tri").focus();
		return;
	}
if(document.getElementById("autofuel_1").value=="none")
	{
		alert("Please select \' Type of fuel  '\ ");
		document.getElementById("autofuel_1").focus();
		return;
	}
if(document.getElementById("annualusage_1").value=="")
	{
		alert("Please enter Estimated Annual Usage (in miles) ");
		document.getElementById("annualusage_1").select();;
		document.getElementById("annualusage_1").focus();
		return;
	}
if(isNaN(document.getElementById("annualusage_1").value))
		{
			alert("Estimated Annual Usage should be Numeric value");
			document.getElementById("annualusage_1").select();;
			document.getElementById("annualusage_1").focus();
			return;
		}
if(document.getElementById("autocompded_1").value=="")
	{
		alert("Please select \' Desired Comprehensive Deductible  '\ ");
		document.getElementById("autocompded_1").focus();
		return;
	}
if(document.getElementById("autocollded_1").value=="none")
	{
		alert("Please select \' Desired Collision Deductible  '\ ");
		document.getElementById("autocollded_1").focus();
		return;
	}

if(document.frm.autolease.value=="none")
	{
		alert("Please select  Is this car Leased or Owned?  ");
		document.frm.autolease.focus();
		return;
	}
	if(document.frm.bst_time[0].value=="")
	{
		alert("Please select \' Best Time to Contact You '\ ");
		document.frm.bst_time[0].focus();
		return;
	}
    
	 }

 if (document.frm.InsuranceType.value == "Health Insurance")
	{
if(document.frm.currentins.value=="")
	{
		alert("Please select \' Do you currently have a life insurance? '\ ");
		document.frm.currentins.focus();
		return;
	}
if((document.frm.currentins.value=="Yes") && ( document.frm.currentco[1].value == "" ) )
	{
		alert("Please select \' If so, with what company? '\ ");
		//SetErrorImage("LName", true);
		document.frm.currentco[1].focus();
		return;
	}
if((document.frm.currentins.value=="Yes") && ( document.frm.currentplantype.value =="") )
		{		alert("Please Select \' Current Plan Type '\ ");
		document.frm.currentplantype.focus();
		return;
	}
if((document.frm.currentins.value=="Yes") && (document.frm.timewithco.value =="") )
		{
alert("Please Select \' How long have you been with this company? '\ ");
		document.frm.timewithco.focus();
		return;
	}
if((document.frm.currentins.value=="Yes") && (document.frm.xpiremon.value =="") )
		{		alert("Please Select \' Expire - Month '\ ");
		document.frm.xpiremon.focus();
		return;
	}
if((document.frm.currentins.value=="Yes") && (document.frm.xpireday.value =="") )
		{
		alert("Please Select \' Expire - Date '\ ");
		document.frm.xpireday.focus();
		return;
	}
if((document.frm.currentins.value=="Yes") && (document.frm.xpireyr.value =="") )
		{		alert("Please Select \' Expire - Year '\ ");
		document.frm.xpireyr.focus();
		return;
	}

if (document.frm.cobra.value =="")
	{
		alert("Please Select \' Are you currently paying for COBRA? '\ ");
		document.frm.cobra.focus();
		return;
	}

if (document.frm.selfemployed.value =="")
	{
		alert("Please Select \' Are you self-employed? '\ ");
		document.frm.selfemployed.focus();
		return;
	}

if (document.frm.smoker[1].value =="")
	{
		alert("Please Select \' Are you a smoker? '\ ");
		document.frm.smoker[1].focus();
		return;
	}
if ( ( document.frm.ratedordeclined[0].checked == false )
    && ( document.frm.ratedordeclined[1].checked == false ) )
    {
        alert ( "Please Check \' Have you been rated or declined for health or life insurance in the last 5 years?'\ " );
		document.frm.ratedordeclined[0].select();
		document.frm.ratedordeclined[0].focus();
		return;
    }

if ( ( document.frm.hospitalized[0].checked == false )
    && ( document.frm.hospitalized[1].checked == false ) )
    {
        alert ( "Please Check \' Have you been hospitalized in the last 5 years?'\ " );
		document.frm.hospitalized[0].select();
		document.frm.hospitalized[0].focus();
		return;
    }


if ( ( document.frm.dui[1].checked == false )
    && ( document.frm.dui[2].checked == false ) )
    {
        alert ( "Please Check \' Have you had a DUI/DWI in the last 5 years? '\ " );
		document.frm.dui[1].select();
		document.frm.dui[1].focus();
		return;
    }

if ( ( document.frm.resident[1].checked == false )
    && ( document.frm.resident[2].checked == false ) )
    {
        alert ( "Please Check \' Have you been a resident of the U.S. or Canada for the last 12 months? '\ " );
		document.frm.resident[1].select();
		document.frm.resident[1].focus();
		return;
    }


if (document.frm.expectant.value =="")
	{
		alert("Please Select \' Are you an expectant mother or father? '\ ");
		document.frm.expectant.focus();
		return;
	}

if (document.frm.maternity.value =="")
	{
		alert("Please Select \' Are you in need of maternity coverage? '\ ");
		////SetErrorImage("InsuranceType", true);

		//document.frm.smoker.focus();
		document.frm.maternity.focus();
		return;
	}
if ( ( document.frm.meds[0].checked == false )
    && ( document.frm.meds[1].checked == false ) )
    {
        alert ( "Please Check \' Do you currently take prescription medications? '\ " );
		document.frm.meds[1].select();
		document.frm.meds[1].focus();
		return;
    }
if ( ( document.frm.meds[0].checked == true )
    && ( document.frm.medsdes[1].value == "" ) )
    {
        alert ( "Please Enter \' If yes, please list medication names and dosages: '\ " );
				document.frm.medsdes[1].focus();
		document.frm.medsdes[1].select();
		return;
    }
	if(document.getElementsByName("numberofppl")[0].value==""){
			//alert("bbbbbbbbbbbbbb");
			 alert("How many people are you insuring?");
             document.getElementsByName("numberofppl")[0].focus();
			 return ;
        }
	 var optval =  document.getElementById("numberofppl").value;
gnder="";
rship="";
bmon="";
bdat="";
by="";
feet="";
inch="";
	weight="";
	mary="";

	var gnder,rship,bmon,by,bdat,feet,inch,weight,mary;

if(!(document.getElementsByName("numberofppl")[0].value=="")){

			for(i=1;i<=optval;i++){
          
		    if(document.getElementById("gender2"+i).value==""){
				  alert("Enter Gender of person"+i);
				  document.getElementById("gender2"+i).focus();
				  return ;
			}
			if(document.getElementById("relationship2"+i).value==""){
				  alert("Please Select Relation ship of person"+i);
				  document.getElementById("relationship2"+i).focus();
				  return ;
			}
			if(document.getElementById("Birthmonth2"+i).value==""){
				  alert("Please Select Birthmonth of person"+i);
				  document.getElementById("Birthmonth2"+i).focus();
				  return ;
			}
			if(document.getElementById("Birthdate2"+i).value==""){
				  alert("Please Select Birthdate of person"+i);
				  document.getElementById("Birthdate2"+i).focus();
				  return ;
			}
			if(document.getElementById("Birthyear2"+i).value==""){
				  alert("Please Select Birthyear of person"+i);
				  document.getElementById("Birthyear2"+i).focus();
				  return ;
			}
			if(document.getElementById("heightfeet2"+i).value==""){
				  alert("Please Select Feet of person"+i);
				  document.getElementById("heightfeet2"+i).focus();
				  return ;
			}
			if(document.getElementById("heightinches2"+i).value==""){
				  alert("Please Select Inches of person"+i);
				  document.getElementById("heightinches2"+i).focus();
				  return ;
			}
			if(document.getElementById("weight2"+i).value==""){
				  alert("Please Select weight of person"+i);
				  document.getElementById("weight2"+i).focus();
				  return ;
			}
			if(document.getElementById("maritalstatus"+i).value==""){
				  alert("Please Select Marital Status of person"+i);
				  document.getElementById("maritalstatus"+i).focus();
				  return ;
			}
	   if(i!=optval)
		gnder+="gender"+i+"="+document.getElementById("gender2"+i).value+"&";
	   else
	     gnder+="gender"+i+"="+document.getElementById("gender2"+i).value;
	   
	   
 if(i!=optval)
	   rship+="relationship2"+i+"="+document.getElementById("relationship2"+i).value+"&";
	   else
	     rship+="relationship2"+i+"="+document.getElementById("relationship2"+i).value;

	   if(i!=optval)
	   bmon+="Birthmonth2"+i+"="+document.getElementById("Birthmonth2"+i).value+"&";
	   else
	     bmon+="Birthmonth2"+i+"="+document.getElementById("Birthmonth2"+i).value;

	    if(i!=optval)
	   bdat+="Birthdate2"+i+"="+document.getElementById("Birthdate2"+i).value+"&";
	   else
	     bdat+="Birthdate2"+i+"="+document.getElementById("Birthdate2"+i).value;
	   
     if(i!=optval)
	   by+="Birthyear2"+i+"="+document.getElementById("Birthyear2"+i).value+"&";
	   else
	     by+="Birthyear2"+i+"="+document.getElementById("Birthyear2"+i).value;


	    if(i!=optval)
	   feet+="heightfeet2"+i+"="+document.getElementById("heightfeet2"+i).value+"&";
	   else
	     feet+="heightfeet2"+i+"="+document.getElementById("heightfeet2"+i).value;

	   if(i!=optval)
	   inch+="heightinches2"+i+"="+document.getElementById("heightinches2"+i).value+"&";
	   else
	     inch+="heightinches2"+i+"="+document.getElementById("heightinches2"+i).value;

	   if(i!=optval)
	   weight+="weight2"+i+"="+document.getElementById("weight2"+i).value+"&";
	   else
	     weight+="weight2"+i+"="+document.getElementById("weight2"+i).value;

	    if(i!=optval)
	   mary+="maritalstatus"+i+"="+document.getElementById("maritalstatus"+i).value+"&";
	   else
	     mary+="maritalstatus"+i+"="+document.getElementById("maritalstatus"+i).value;
	 }
	
   document.getElementsByName("gen")[0].value=gnder;
   document.getElementsByName("rel")[0].value=rship;
   document.getElementsByName("dobmonth")[0].value=bmon;
    document.getElementsByName("dobdate")[0].value=bdat;
   document.getElementsByName("dobyear")[0].value=by;
	 document.getElementsByName("higfeet")[0].value=feet;
	  document.getElementsByName("higinches")[0].value=inch;
	  document.getElementsByName("weig")[0].value=weight;
	   document.getElementsByName("marystatus")[0].value=mary;
  // alert(document.getElementsByName("dobyear")[0].value);
			
 

			
		}

if (document.frm.copay.value =="")
	{
		alert("Please Select \' What is your desired Co-Pay?'\ ");
		document.frm.copay.focus();
		return;
	}

if (document.frm.deductible.value =="")
	{
		alert("Please Select \' What is your desired Deductible? '\ ");
		document.frm.deductible.focus();
		return;
	}

if ((document.frm.pos.checked||document.frm.ppo.checked||document.frm.hsa.checked || document.frm.medicare.checked ||document.frm.hmo.checked) == false)
		{
alert("Please Select \' What type of health insurance coverage are you interested in? '\ ");
		document.frm.pos.focus();
		return;

		}
if (document.getElementsByName("contacttime1")[0].value=="")
	{
		alert("Please Select  Best Time to Contact You ");
		 document.getElementsByName("contacttime1")[0].focus();
		return ;
	}

if (document.frm.soonPolicy.value =="")
	{
		alert("Please Select \' How soon do you need this policy? '\ ");
		document.frm.soonPolicy.focus();
		return;
	}

}
//end of health validat

//validation For Annuities Insurance


//var a=document.frm.SubCategories.selectedIndex;
if((document.frm.InsuranceType.value == "Home Insurance") && (document.frm.SubCategories.selectedIndex=='1'))
	{
if(document.frm.Zip2.value=="")
	{
		alert("Please Enter \' What is the 5-digit Zip code  for the home location '\ ");
		//SetErrorImage("LName", true);
		document.frm.Zip2.select();
		document.frm.Zip2.focus();
		return;
	}

	if(isNaN(document.frm.Zip2.value))
	{
		alert(" Please Enter the Valid numeric Value ");
		document.frm.Zip2.select();
		document.frm.Zip2.focus();
		return;
	} 
if(document.frm.Currentlyinsured.value=="None")
	{
		alert("Please Select \' Are you currently insured or have been insured  during the past 30 days? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Currentlyinsured.focus();
		return;
	}

if((document.frm.Currentlyinsured.value=="1" ) && (document.frm.inscoo.value==""))
	{
	alert("If so, what is the name of your insurance company? ");
	document.frm.inscoo.focus();
	return;
	}

  if(document.frm.howLong.value=="")
	{
		alert("Please Select \' How Long Have You Been At Your Current Residence '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.howLong.focus();
		return;
	}
if((document.frm.Currentlyinsured.value=="1" ) && (document.frm.expMonth.value==""))
	{
		alert("Please Select \' When does your policy expire - Month? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.expMonth.focus();
		return;
	}

if((document.frm.Currentlyinsured.value=="1" ) && (document.frm.expDate.value==""))
	{
		alert("Please Select \' When does your policy expire - Date? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.expDate.focus();
		return;
	}

if((document.frm.Currentlyinsured.value=="1" ) && (document.frm.expYear.value==""))
	{
		alert("Please Select \' When does your policy expire - Year '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.expYear.focus();
		return;
	}

		//end of currentlyInsured
	

if(isNaN(document.frm.expYear.value))
	{
		alert(" Please Enter the Valid numeric Value ");
		document.frm.expYear.select();
		document.frm.expYear.focus();
		return;
	} 


if((document.frm.Currentlyinsured.value=="1" ) && (document.frm.continuouslyinsured.value==""))
	{
		alert("Please Select \' How long has this home been continuously insured '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.continuouslyinsured.focus();
		return;
	}

if((document.frm.Currentlyinsured.value=="1" ) && (document.frm.Timewithcompany.value==""))
	{
		alert("Please Select \' How long have you been with this company? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Timewithcompany.focus();
		return;
	}

if((document.frm.Currentlyinsured.value=="1" ) && (document.frm.Premium.value==""))
	{
		alert("Please Select \' How much is your current premium? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Premium.focus();
		return;
	}

if((document.frm.Currentlyinsured.value=="1" ) && (document.frm.frequencyofpayment.value==""))
	{
		alert("Please Select \' How often do you pay this premium? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.frequencyofpayment.focus();
		return;
	}
	//end of currentlyInsured
	

if(document.frm.typeneeded.value=="")
	{
		alert("Please Select \' What Type of Dwelling are you Insuring? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.typeneeded.focus();
		return;
	}

if(document.frm.occupancyStatus.value=="")
	{
		alert("Please Select \' What is the Occupancy Status of this Dwelling? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.occupancyStatus.focus();
		return;
	}

if(document.frm.Addressinsr.value=="")
	{	
	alert("Please Enter \' Address to be insured '\ ");
	document.frm.Addressinsr.focus();
	return;
	}

if(document.frm.Cityins.value=="")
	{
		alert("Please Enter \' City '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Cityins.focus();
		return;
	}

if(document.frm.State2.value=="")
	{
		alert("Please Select \' State '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.State2.focus();
		return;
	}

if(document.frm.zip4.value=="")
	{
		alert("Please Enter \' Zip '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.zip4.focus();
		return;
	}
if(isNaN(document.frm.zip4.value))
	{
		alert(" Please Enter the Valid numeric Value ");
		document.frm.zip4.select();
		document.frm.zip4.focus();
		return;
	} 
	if(document.frm.county.value=="")
	{
		alert("Please Enter \'County'\ ");
		//SetErrorImage("LName", true);
		
		document.frm.county.focus();
		return;
	}

if(document.frm.yearbuilt.value=="")
	{
		alert("Please Enter \' What year was the dwelling built? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.yearbuilt.focus();
		return;
	}

	if(isNaN(document.frm.yearbuilt.value))
	{
		alert(" Please Enter the Valid Year numeric Value ");
				document.frm.yearbuilt.focus();
				document.frm.yearbuilt.select();
		return;
	} 
if(document.frm.dogType.value=="")
	{
		alert("Please Select \' What type of dogs do you have, if any? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.dogType.focus();
		return;
	}
if(document.frm.sqfeet.value=="")
	{
		alert("Please Enter \' What is the total square footage of the dwelling? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.sqfeet.focus();
		return;
	}

if(isNaN(document.frm.sqfeet.value))
	{
		alert(" Please Enter the Valid numeric Value ");
		document.frm.sqfeet.select();
		document.frm.sqfeet.focus();
		return;
	} 

if(document.frm.Stories.value=="")
	{
		alert("Please Select \' How many stories (excluding basement) are there? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Stories.focus();
		return;
	}

if(document.frm.Bedrooms.value=="")
	{
		alert("Please Select \' How many bedrooms do you have? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Bedrooms.focus();
		return;
	}

if(document.frm.Bathrooms.value=="")
	{
		alert("Please Select \' How many bathrooms do you have? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Bathrooms.focus();
		return;
	}

if(document.frm.Heatsource.value=="")
	{
		alert("Please Select \' What type of heat source do you use? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Heatsource.focus();
		return;
	}

if(document.frm.fireplaces.value=="")
	{
		alert("Please Select \' How many fireplaces do you have? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.fireplaces.focus();
		return;
	}

if(document.frm.garage3.value=="")
	{
		alert("Please Select \' What type of garage do you have? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.garage3.focus();
		return;
	}



if(document.frm.Siding.value=="")
	{
		alert("Please Select \' How is your dwelling sided? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Siding.focus();
		return;
	}


if(document.frm.foundationType.value=="")
	{
		alert("Please Select \' What type of foundation do you have? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.foundationType.focus();
		return;
	}

if(document.frm.firestation.value=="")
	{
		alert("Please Select \' How far away from a fire station is your dwelling? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.firestation.focus();
		return;
	}

if(document.frm.firehydrant.value=="")
	{
		alert("Please Select \' How far away from a fire hydrant is your dwelling? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.firehydrant.focus();
		return;
	}
if(document.frm.homeUpgrades.value=="Yes")
	{
if(document.frm.upgradetype.value=="")
		{
	alert("If,Yes Enter the Upgrades Done");
document.frm.upgradetype.focus();
document.frm.upgradetype.select();
	}
	}

if ((document.frm.Burglaralarm.checked||document.frm.Deadbolts.checked||document.frm.Firealarm.checked || document.frm.Fireextenguishers.checked ||document.frm.Manned.checked||document.frm.Monitored.checked|| document.frm.Smokedetectors.checked ||document.frm.Sprinkler.checked ||document.frm.centralHeating.checked || document.frm.cathedralCeilings.checked ||document.frm.hardwoodFloors.checked ||document.frm.enclosedPatio.checked|| document.frm.unfencedPool.checked || document.frm.fencedInPool.checked ||document.frm.hotTub.checked|| document.frm.indoorSprinklers.checked) == false)
	{
	alert("Please check any of the following features that you have at your dwelling  ");
		//SetErrorImage("LName", true);
		document.frm.Burglaralarm.select();
		document.frm.Burglaralarm.focus();
		return;
	}
//alert(document.frm.Coverageneedhouse.value);
if(document.frm.Coverageneedhouse.value=="")
	{
		alert("Please Enter \' How much coverage is needed on the dwelling?  '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Coverageneedhouse.focus();
		return;
	}
if(document.frm.Coverageneedcontents.value=="")
	{
		alert("Please Enter \' How much coverage is needed on the contents?  '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Coverageneedcontents.focus();
		return;
	}
if(document.frm.Requestedliability.value=="")
	{
		alert("Please Enter \' Requested amount of liability  '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.Requestedliability.focus();
		return;
	}
if(document.frm.claimsno.value=="")
	{
		alert("Please Select \' How many homeowners or renters claims have you had in the last 5 years? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.claimsno.focus();
		return;
	}

/*if(!(document.frm.claimsno.value==0))
	{
var z=document.frm.claimsno.value;
	
		for(i=0;i<z;i++)
		{
			alert(document.getElementsByName("claimMonth"+i).value);
			alert(document.frm.claimMonth+i.value);
			if(document.getElementsByName("claimMonth"+i).value=="none")
	{
		alert("Please Select \' Claim  Approximate  - Month? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.claimMonth+i.focus();
		return;
	}

if(document.frm.claimYear+i.value=="")
	{
		alert("Please Select \' Claim  Approximate  - Year? '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.claimYear+i.focus();
		return;
	}

if(document.frm.ClaimType+i.value=="")
	{
		alert("Please Select \' Claim  Type'\ ");
		//SetErrorImage("LName", true);
		
		document.frm.ClaimType+i.focus();
		return;
	}
	
	
	}
	if(document.frm.contacttimeo.value=="none")
	{
		alert("Please select \' Best Time to Contact You '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.contacttimeo.focus();
		return;
	}

	}*/
	
if(document.frm.contacttimeo.value=="none")
	{
		alert("Please select \' Best Time to Contact You '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.contacttimeo.focus();
		return;
	}
		
	}





 //end     

//start life insurance
if (document.frm.InsuranceType.value == "Life Insurance")
{

	if(document.frm.weight.value=="")
	{
		alert("Please Enter \' weight '\ ");
		//SetErrorImage("LName", true);
		document.frm.weight.select();
		document.frm.weight.focus();
		
		return;
	}

	if(document.frm.Occupation.value=="")
	{
		alert("Please Select \' Occupation '\ ");
		//SetErrorImage("LName", true);
		//document.frm.Occupation.select();
		document.frm.Occupation.focus();
		
		return;
	}

if(document.getElementsByName("smokerl")[0].value=="")
	{
		alert("Please select  Is Any Applicant A Smoker  ");
				document.getElementsByName("smokerl")[0].focus();
		return ;
	}


  if ( ( document.frm.ratedordeclinedl[0].checked == false )
    && ( document.frm.ratedordeclinedl[1].checked == false ) )
    {
        alert ( "Please Check \' Have you been rated or declined for health or life insurance in the last 5 years?'\ " );
		document.frm.ratedordeclinedl[0].select();
		document.frm.ratedordeclinedl[0].focus();
		return;
    }

if ( ( document.frm.hospitalizedl[0].checked == false )
    && ( document.frm.hospitalizedl[1].checked == false ) )
    {
        alert ( "Please Check \' Have you been hospitalized in the last 5 years?'\ " );
		document.frm.hospitalizedl[0].select();
		document.frm.hospitalizedl[0].focus();
		return;
    }

if ( ( document.frm.duil[0].checked == false )
    && ( document.frm.duil[1].checked == false ) )
    {
        alert ( "Please Check \' Have you had a DUI/DWI in the last 5 years? '\ " );
		document.frm.duil[0].select();
		document.frm.duil[0].focus();
		return;
    }

if ( ( document.frm.residentl[0].checked == false )
    && ( document.frm.residentl[1].checked == false ) )
    {
        alert ( "Please Check \' Have you been a resident of the U.S. or Canada for the last 12 months? '\ " );
		document.frm.residentl[0].select();
		document.frm.residentl[0].focus();
		return;
    }

if ( ( document.frm.medsl[0].checked == false )
    && ( document.frm.medsl[1].checked == false ) )
    {
        alert ( "Please Check \' Do you currently take prescription medications? '\ " );
		document.frm.medsl[0].select();
		document.frm.medsl[0].focus();
		return;
    }
if ( ( document.frm.medsl[0].checked == true )
    && ( document.frm.medsdesl.value == "" ) )
    {
        alert ( "Please Enter \' If yes, please list medication names and dosages: '\ " );
				document.frm.medsdesl.focus();
		document.frm.medsdesl.select();
		return;
    }

if(document.frm.insnow.value=="")
	{
		alert("Please select \' Do you currently have a life insurance? '\ ");
		//SetErrorImage("LName", true);
		document.frm.insnow.focus();
		return;
	}
if((document.frm.insnow.value=="Yes") && ( document.frm.currentco[0].value == "" ) )
	{
		alert("Please select \' If so, with what company? '\ ");
		//SetErrorImage("LName", true);
		document.frm.currentco[0].focus();
		return;
	}

if(document.frm.spouse.value=="")
	{
		alert("Please select \' Do you want coverage for your spouse? '\ ");
		//SetErrorImage("LName", true);
		document.frm.spouse.focus();
		return;
	}

if(document.frm.children.value=="")
	{
		alert("Please select \' Do you want coverage for your children? '\ ");
		//SetErrorImage("LName", true);
		document.frm.children.focus();
		return;
	}

if ( ( document.frm.instype[0].checked == false )
    && ( document.frm.instype[1].checked == false ) && ( document.frm.instype[2].checked == false )  )
    {
        alert ( "Please Check \' What type of life insurance coverage are you interested in? '\ " );
		document.frm.instype[0].select();
		document.frm.instype[0].focus();
		return;
    }

if ( ( document.frm.instype[0].checked == true ) )
	{

if(document.frm.coverage1.value=="")
	{
		alert("Please select \' Term Coverage '\ ");
		//SetErrorImage("LName", true);
		document.frm.coverage1.focus();
		return;
	}

if(document.frm.option1.value=="")
	{
		alert("Please select \' Term Option '\ ");
		//SetErrorImage("LName", true);
		document.frm.option1.focus();
		return;
	}
	}

if ( ( document.frm.instype[1].checked == true ) )
	{

if(document.frm.coverage2.value=="")
	{
		alert("Please select \' Permanent Coverage '\ ");
		//SetErrorImage("LName", true);
		document.frm.coverage2.focus();
		return;
	}

if(document.frm.option2.value=="")
	{
		alert("Please select \' Permanent Option '\ ");
		//SetErrorImage("LName", true);
		document.frm.option2.focus();
		return;
	}


	}


if ( ( document.frm.instype[2].checked == true ) )
	{

if(document.frm.coverage3.value=="")
	{
		alert("Please select \' Other / Not Sure -  Coverage '\ ");
		//SetErrorImage("LName", true);
		document.frm.coverage3.focus();
		return;
	}
	}


if(document.frm.contacttime[0].value =="")
	{
		alert("Please select \' Best Time to Contact You '\ ");
		//SetErrorImage("LName", true);
		document.frm.contacttime[0].focus();
		return;
	}

if(document.frm.soonPolicyl.value =="")
	{
		alert("Please select \' How soon do you need this policy? '\ ");
		//SetErrorImage("LName", true);
		document.frm.soonPolicyl.focus();
		return;
	}

	}
if((document.frm.InsuranceType.value == "Home Insurance") && (document.frm.SubCategories.selectedIndex=='2'))

//if ( (document.frm.InsuranceType.value=="Home Insurance") && (document.frm.forval.value=="Home Renters Insurance"))
	{
	
	if (document.frm.hasinsr.value=="")
	{
		alert("Please select \' Are you currently insured '\ ");
		////SetErrorImage("InsuranceType", true);
		document.frm.hasinsr.focus();
		return;
	}
if (document.frm.hasinsr.value=="1") 
{	 //start
 if (document.frm.inscor.value == "")
	{
		alert("Please select \' Name of your insurance company '\ ");
		////SetErrorImage("InsuranceType", true);
		document.frm.inscor.focus();
		return;
	}
}
	if(document.frm.zcode.value=="")
	{
		alert("Please Enter \' What is the zip code of the property to be insured? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.zcode.focus();
		return;
	}

	if(isNaN(document.frm.zcode.value))
	{
		alert(" Please Enter the Valid numeric Value ");
		document.frm.zcode.select();
		document.frm.zcode.focus();
		return;
	} 

	if(document.getElementById("Addressins").value=="")
	{
		alert("Please Enter \' Address to be insured '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.getElementById("Addressins").focus();
		return;
	}

	if(document.frm.Cityinsr.value=="")
	{
		alert("Please Enter \' City '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.Cityinsr.focus();
		return;
	}


if(document.frm.stateins.value=="")
	{
		alert("Please Enter \' State '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.stateins.focus();
		return;
	}

if(document.frm.zipins.value=="")
	{
		alert("Please Enter \' Zip code'\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.zipins.focus();
		return;
	}

if(isNaN(document.frm.zipins.value))
	{
		alert(" Please Enter the Valid numeric Value ");
		document.frm.zipins.select();
		document.frm.zipins.focus();
		return;
	} 


if(document.frm.typedwelling.value=="")
	{
		alert("Please Select \' What Type of Dwelling are you Insuring? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.typedwelling.focus();
		return;
	}

if(document.frm.typedwelling.value=="")
	{
		alert("Please Select \' What Type of Dwelling are you Insuring? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.typedwelling.focus();
		return;
	}

if(document.frm.sqfeetr.value=="")
	{
		alert("Please Enter \' What is the total square footage of the dwelling? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.sqfeetr.focus();
		return;
	}
if(!(document.frm.sqfeetr.value==""))
	{
		
		if(isNaN(document.frm.sqfeetr.value))
		{
			alert("Please Enter Valid square footage of the dwelling? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.sqfeetr.focus();
		return;
	}
	}

if(document.frm.stories.value=="")
	{
		alert("Please Select \' How many stories are in your building? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.stories.focus();
		return;
	}
if(document.frm.bed.value=="")
	{
		alert("Please Select \' How many bedrooms do you have? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.bed.focus();
		return;
	}

if(document.frm.bath.value=="")
	{
		alert("Please Select \' How many bathrooms do you have '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.bath.focus();
		return;
	}

if(document.frm.heat.value=="")
	{
		alert("Please Select \' What type of heat source do you use? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.heat.focus();
		return;
	}

if(document.frm.siding.value=="")
	{
		alert("Please Select \' How is your building sided? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.siding.focus();
		return;
	}

if(document.frm.distfirest.value=="")
	{
		alert("Please Select \' How far away from a fire station is your dwelling? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.distfirest.focus();
		return;
	}

if(document.frm.distfirehy.value=="")
	{
		alert("Please Select \' How far away from a fire station is your dwelling? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.distfirehy.focus();
		return;
	}

if ((document.frm.burgal.checked||document.frm.deadbt2.checked||document.frm.firealrm.checked || document.frm.fireex.checked ||document.frm.mansecst.checked||document.frm.monburgal.checked|| document.frm.smdet.checked ||document.frm.sprink.checked ) == false)
	{
	alert("Please check any of the following features that you have at your dwelling  ");
		//SetErrorImage("LName", true);
		document.frm.burgal.select();
		document.frm.burgal.focus();
		return;
	}

if(document.frm.insoncont.value=="")
	{
		alert("Please Enter \' How much insurance is needed on the contents (personal property) of your dwelling? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.insoncont.focus();
		return;
	}

if(isNaN(document.frm.insoncont.value))
	{
		alert(" Please Enter the Valid numeric Value ");
		document.frm.insoncont.select();
		document.frm.insoncont.focus();
		return;
	} 

	if(document.frm.reqliab.value=="")
	{
		alert("Please Select \' Requested amount of liability '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.reqliab.focus();
		return;
	}

if(document.frm.reqded.value=="")
	{
		alert("Please Select \' Requested Deductible '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.reqded.focus();
		return;
	}

if(document.frm.credit.value=="")
	{
		alert("Please Select \' Many companies use credit scores for rates and discounts. How would you honestly rate your credit history? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.credit.focus();
		return;
	}

if(document.frm.claims.value=="")
	{
		alert("Please Select \' How many homeowners or renters claims have you had in the last 5 years? '\ ");
		//SetErrorImage("LName", true);
		//document.frm.hasins.select();
		document.frm.claims.focus();
		return;
	}

if(document.frm.bst_time1.value=="none")
	{
		alert("Please select \' Best Time to Contact You '\ ");
		//SetErrorImage("LName", true);
		
		document.frm.bst_time1.focus();
		return;
	}



}
 //end of  life insurance validation part


	var mail=document.frm.Email.value;
	if(confirm(""+mail+"\n Confirm Your email address!!")==false)
	{
	  //SetErrorImage("Email", true);
	  document.frm.Email.select();
	  document.frm.Email.focus();
	  return;
	}
	else
    {
    	//SetErrorImage("Email", false);
	}
	
	

	document.frm.method="post";
	if(!(document.frm.claimsno.value==0))
	{
for( k=0;k<document.frm.claimsno.value;k++)
	{
document.frm.action="InsuranceQuoteInsert.php?automake_1="+document.getElementById("automake_1").value+"&vehicle_modal="+document.getElementById("vehicle_modal").value+"&vehicle_tri="+document.getElementById("vehicle_tri").value+"&claimmonth"+k+"="+document.frm.claimMonth1+k.value+"&claimYear"+k+"="+document.frm.claimYear1+k.value+"&claimno="+document.frm.claimsno.value+"&climtype"+k+"="+document.frm.ClaimType1+k.value
	}
	}
	else if(document.frm.claimsno.value==0)
	{
		document.frm.action="InsuranceQuoteInsert.php?automake_1="+document.getElementById("automake_1").value+"&vehicle_modal="+document.getElementById("vehicle_modal").value+"&vehicle_tri="+document.getElementById("vehicle_tri").value+"&claimno="+document.frm.claimsno.value

	}
	document.frm.submit();
}
}
function vai()
{
	var j=0;var s;
	 s=document.frm.claimsno.value;
	//alert(document.frm.claimsno.value);
	//alert(s);
	var q="";
	if(s==0)
	{document.getElementById("clai").innerHTML='none';

	}else{
		for(j=0;j<s;j++)
		{
		 q+="<select id='FormsComboBox132"+j+"' name='claimMonth1"+j+"' >"
		      q+="<option value='01' >Jan</option>"
					 q+="<option value='02'>Feb</option><option value='03'>Mar</option>"
					q+="<option value='04'>Apr</option>"
                   q+="	<option value='05'>May</option>"
         		q+="	 <option value='06'>Jun</option>"
				q+="	 <option value='07'>Jul</option>"
				q+=" <option value='08'>Aug</option>"
				 q+="<option value='09'>Sep</option>"
              q+=" <option value='10'>Oct</option>"
		q+="				 <option value='11'>Nov</option>"
				q+="		 <option value='12'>Dec</option>"
						q+=" </select>"
						 
         q+="	 <select id='FormsComboBox134"+j+"' name='claimYear1"+j+"'>"
   var dt=new Date().getFullYear();
  // document.write(dt);
		q+="    <option value="+dt+">"+dt+"</option>"
		   q+="<option value="+(dt-1)+">"+(dt-1)+"</option>"
            q+="		  <option value="+(dt-2)+">"+(dt-2)+"</option>"
		q+="				    <option value="+(dt-3)+">"+(dt-3)+"</option>"
				q+="		     <option value="+(dt-4)+">"+(dt-4)+"</option>"
						q+="    <option value="+(dt-5)+">"+(dt-5)+"</option>"
                    q+="		    </select>"
						 
				q+="	 <select name=ClaimType1"+j+" id=ClaimType1"+j+">"
					q+="	 <option value='Fire'>Fire</option>"
					q+="	 <option value='Hail'>Hail</option>"
					q+="	 <option value='Liability'>Liability</option>"
					q+="	 <option value='Lightning'>Lightning</option>"
					q+="	 <option value='Medical'>Medical</option>"
					q+="	 <option value='Theft'>Theft</option>"
					q+="	 <option value='Water'>Water</option>"
					q+="	 <option value='Wind'>Wind</option><option value='Other'>Other</option>"
			 
					q+="	 </select>";
		    	q+="	<br>";
		
	}
	}
document.getElementById("clai").innerHTML=q;


}