function ValidateForm()

{
  var strErr = "";
  if (document.getQuoteForm.type.value == "none"){
    strErr = strErr + "You must select an insurance type.\n";
  }

  if (document.getQuoteForm.zip.value.search(/^\d{5}/) == -1) {
    strErr = strErr + "Zip Code is required and must be in the format 00000.\n";
  }

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

  else{
		if (document.getQuoteForm.type.value == "Life")
		{    document.forms[0].action = '/ia/life/?zipcode='+document.forms[0].zip.value+'&c=qcenterhomepage';  }
		
		if (document.getQuoteForm.type.value == "Home")
		{    document.forms[0].action = '/ia/home/?zipcode='+document.forms[0].zip.value+'&c=qcenterhomepage';  }
		
		if (document.getQuoteForm.type.value == "Health")
		{    document.forms[0].action = '/LRSHealth/healthlead.do?curl=quotecenters.com&from=quotecenters&sid=TE-H-A-WBM-2&zipCode='+document.forms[0].zip.value+'&psv=1&c2=[TrackingID-Here]&c3=[Optional-Tracking-ID-Here]';   }

		if (document.getQuoteForm.type.value == "Auto")
		{    document.forms[0].action = '/auto/quotes?curl=quotecenters.com&from=quotecenters&sid=TE-A-QWBM-1&zipCode='+document.forms[0].zip.value+'&psv=1&c2=[TrackingID-Here]&c3=[Optional-Tracking-ID-Here]';  }
		
    return true;
  }
}
