function validate_insurance_type()
{
  var isok = "";
  if (document.getQuoteForm.ZipCode.value.search(/^\d{5}/) == -1) {
    isok = isok + "Please enter a valid ZIP code in 12345 format.\n";
  }
  
  if (isok != "") {
    alert(isok);
    return false;
  }
  else{
	   if (document.getQuoteForm.ins_type.value == "ho")
		  { document.forms[0].action = 'http://www.insureme.com/home-insurance-quotes.html?Refby=678701'; }
		    else{
	   if (document.getQuoteForm.ins_type.value == "ht")
		  { document.forms[0].action = 'http://www.insureme.com/health-insurance-quotes.html?Refby=678702'; }
			else{
	   if (document.getQuoteForm.ins_type.value == "lf")
		  { document.forms[0].action = 'http://www.insureme.com/life-insurance-quotes.html?Refby=678703'; }
		  	else{
	   if (document.getQuoteForm.ins_type.value == "am")
		  { document.forms[0].action = 'http://www.insureme.com/auto-insurance-quotes.html?Refby=678700'; }
			}}}
  return true;
  }
}

function green()
{
	var submit_me = document.getElementById("submit_me");
	submit_me.style.backgroundPosition="bottom left";
}
function blue()
{
	var submit_me = document.getElementById("submit_me");
	submit_me.style.backgroundPosition="top left";
}

function autoinsurance() {
	var showdiv = document.getElementById("auto_ins");
	if (document.getQuoteForm.ins_type.value == "am") 
	{ showdiv.style.visibility = "visible"; }
	else { showdiv.style.visibility = "hidden"; }
}