function glbvalidate()
{	
	if (!validVisitorAge(document.globalminiform))  return;
 	if (!validSpouseAge(document.globalminiform)) return;
	
 	//added another check to ensure atleast a valid number of months or days are entered
	
	document.globalminiform.quote.disabled=true;
	document.globalminiform.submit();

}

//This function takes the user to the Compare.asp page when the 'More Options' button is clicked.
function glbgomain()
{
		document.globalminiform.P.value=document.globalminiform.Age.value;
		document.globalminiform.S.value=document.globalminiform.spouseAge.value;
		document.globalminiform.PG.value=document.globalminiform.pgender.value;
		document.globalminiform.SG.value=document.globalminiform.sgender.value;
		document.globalminiform.d.value=document.globalminiform.Deductible.value;
		document.globalminiform.cv.value=document.globalminiform.CountryforCoverage.value;
		document.globalminiform.us.value=document.globalminiform.CountryofCitizenship[0].checked==true?document.globalminiform.CountryofCitizenship[0].value:document.globalminiform.CountryofCitizenship[1].value;
		document.globalminiform.action='/results/globalmoreoptions/';		
		document.globalminiform.submit();
}

function FixGender(g,w)
{
	if(w=='p')
	{document.globalminiform.sgender.value=g=="F"?"M":"F";}
	if(w=='s')
	{document.globalminiform.pgender.value=g=="F"?"M":"F";}
}