<!-- Start of Compare code in Head section -->
//window.onerror=consume;
//function consume(){	var x='Some Error has ocured on the document';	return true;	}
function validate()
{	var flag,a,s,cm,cd;
	flag=true;
	a=document.form1.Age.value;
	s=document.form1.spouseAge.value;
	cm=parseInt(document.form1.monthsOfCoverage.value,10);
	cd=parseInt(document.form1.daysOfCoverage.value,10);
	flag=true;
	if(a==''||isNaN(a)||a<1||a>99)
		{alert('Visitor\'s Age is mandatory and it should be in numeric format in the range 1-99.');
		document.form1.Age.focus();
		flag=false;
		return false;
		}
	if(s!=''&&(isNaN(s)||s<18||s>99))
		{alert('Spouse Age should be in numeric format in the range 18-99.');
		document.form1.spouseAge.focus();
		flag=false;
		return false;
		}
	if((cm>=12&&cd>0)||(cm==11&&cd>30))
	{alert('Coverage period can not be more than one year(12 months).'); document.form1.monthsOfCoverage.focus();flag=false; return;}
	if(flag==true)
	{document.form1.quote.disabled='true';
	document.form1.submit();
		}
}
function numbersonly(e)
{
	var unicode=document.all? e.keyCode : e.which;
	 if (unicode > 31 && (unicode < 48 || unicode > 57))
			return false; //disable key press
}

function goMain()
{
	document.form1.action='/compare.asp';
	document.form1.submit();	
}
