function chec_zip()
{
	var zip=document.getElementById('zip').value;
	b=AjaxRequest.get(
		{
		'url':'/ajax/index.php',
		'parameters':{ 'act':'validateZip', 'zip':zip },
		'onSuccess':chec_zip2
		}
	);
}

function chec_zip2(req)
{
	var status;
	var form=document.getElementById('form-get-auto-quote');

	if(!status)
	{
		var zip=document.getElementById('zip').value;
		zip=parseInt(zip.substring(0,1),10);
		//if(zip != 9) {window.location="/program/autoinsurance/non_california"; return false;}
		if(zip != 9) {window.location="http://www.insurance.com/quotes/auto.aspx?cp=1714"; return false;}
	}
	if (req.responseXML && req.responseXML.documentElement && !status)
	{
		var response = POXunserialize(req.responseXML.documentElement);
		if(response.valid=="200") {}
		else
		{
			alert('Please enter 5 digits ZIP Code');
			status=1;
		}
	}
	if(!status)	if(!validator(form)) status=1;

	if(!status) form.submit();
}



function chec_zipb()
{
	var zip=document.getElementById('zipb').value;
	b=AjaxRequest.get(
		{
		'url':'/ajax/index.php',
		'parameters':{ 'act':'validateZip', 'zip':zip },
		'onSuccess':chec_zipb2
		}
	);
}

function chec_zipb2(req)
{
	var status;
	var form=document.getElementById('form-get-business-quote');

	if(!status)
	{
		var zip=document.getElementById('zipb').value;
		zip=parseInt(zip.substring(0,1),10);
		if(zip != 9) {window.location="/program/autoinsurance/non_california"; return false;}
		//if(zip != 9) {window.location="http://www.insurance.com/quotes/auto.aspx?cp=1714"; return false;}
	}
	if (req.responseXML && req.responseXML.documentElement && !status)
	{
		var response = POXunserialize(req.responseXML.documentElement);
		if(response.valid=="200") {}
		else
		{
			alert('Please enter 5 digits ZIP Code');
			status=1;
		}
	}
	if(!status)	if(!validator(form)) status=1;

	if(!status) form.submit();
}