<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>

<!--InsureMe Script-->
<SCRIPT LANGUAGE="JavaScript">
<!--



function ValidateForm()
{
	var strErr = "";

	if (document.getQuoteForm.InsuranceType.value == 'none') {
		strErr = strErr + "You must select an insurance type.\n";
		SetErrorImage("InsuranceType", true);
	}
	else {
		SetErrorImage("InsuranceType", false);
	}
	
	if (document.getQuoteForm.ZipCode.value.search(/^\d{5}(-?\d{4})?$/) == -1) {
		strErr = strErr + "Zip Code is required and must be in the format 00000 or 00000-0000.\n";
		SetErrorImage("ZipCode", true);
	}
	else {
		SetErrorImage("ZipCode", false);
	}

	if (strErr != "") {
		alert(strErr);
		return false;
	}
	return true;
}

function SetErrorImage(strFieldName, blnIsError)
{
	if (blnIsError) {
		eval("document.getQuoteForm."+strFieldName+"_ErrImg.src = \"/images/alert.gif\"");
	}
	else {
		eval("document.getQuoteForm."+strFieldName+"_ErrImg.src = \"/images/trans.gif\"");
	}
}
//-->
</SCRIPT>

