	function OpenNewForm(theForm)
	{
		var myRef;
		var strURL = "";
		var strInsChecked = "";
		var strInsChecked = "&noinsurance=no";
		strURL = "http://insurance-quotes-washington.com/Common/Landing.php";
		strURL = strURL + "?zip=" + theForm.ZipCode.value;
		if (document.getElementById('rblInsurance').checked)
		{
			strInsChecked = "&noinsurance=yes";
		}
		strURL = strURL + strInsChecked;
		strURL = strURL + "&refby=0";
		strURL = strURL + "&type=" + theForm.InsuranceType.value;
		window.open(strURL,null,"fullscreen=yes, toolbars=yes, scrollbars=yes, menubar=yes, location=yes");
	}
	function redirect(theForm)
	{
		var strErr = "";
			
		if(theForm.ZipCode.value=="")
		{
			strErr = strErr + "Please enter zip code.\n";
			theForm.ZipCode.focus();
		}
		if (!document.getElementById('rblInsurance').checked && !document.getElementById('rblNoInsurance').checked) 
		{
		strErr = strErr + "Please indicate if you currently have Auto Insurance.\n";
		}
		if (strErr != "")
		{
			alert(strErr);
			return false;
		}
		else
		{
			
			if(theForm.InsuranceType.value =="Auto")
        	{
			    window.location="auto_results.html?zipcode=" + theForm.ZipCode.value;
	        }
		if(theForm.InsuranceType.value =="Health")
        	{
			    window.location="health_results.html?zipcode=" + theForm.ZipCode.value;
	        }
		if(theForm.InsuranceType.value =="Home")
        	{
			    window.location="home_results.html?zipcode=" + theForm.ZipCode.value;
			}
		if(theForm.InsuranceType.value =="Life")
        	{
			    window.location="life_results.html?zipcode=" + theForm.ZipCode.value;
            }	
		}
	}
	function ValidateForm(theForm)
	{
		var strErr = "";
		if(theForm.InsuranceType.value=="0")
		{
			strErr = strErr + "Please select quote type.\n";
			theForm.InsuranceType.focus();
		}
		if((theForm.ZipCode.value=="") && (theForm.ZipCode.value=="Enter Zip Code..."))
		{
			strErr = strErr + "Please enter zip code.\n";
			theForm.ZipCode.focus();
		}
		else
		{
		if(theForm.ZipCode.value.length!=5)
			{
				strErr = strErr + "Please enter valid zip code.\n";
				theForm.ZipCode.focus();
			}
		}
		if (strErr != "")
		{
		alert(strErr);
		return false;
	}
	}	
	function getcurrYear()
	{
		var dteNow = new Date();
		document.write(dteNow.getFullYear());
	}
     
