function goToUrl(myForm){

      var zip=myForm.zip.value;
     
      if(zip.length!=5 | isNumeric(zip)==false){               
          window.alert("Please Enter 5 Digit ZipCode");
      }

              else{
window.location = "http://www.illinoisautoinsurance.com/quotes/compare.htm?zip=" + zip;
}
}
function goToUrl1(myForm){

      var zip1=myForm.zip1.value;
     
      if(zip1.length!=5 | isNumeric(zip1)==false){               
          window.alert("Please Enter 5 Digit ZipCode");
      }

              else{
window.location = "https://www.insuranceleadz.com/form/auto?a=19374&t=345&c=autoinsmarketing&zip=" + zip1;
}
}
                     
function valButton(btn) {
    var cnt = -1;
    for (var i=btn.length-1; i > -1; i--) {
        if (btn[i].checked) {cnt = i; i = -1;}
    }
    if (cnt > -1) return btn[cnt].value;
    else return null;
}

function isNumeric(strString)
    {
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
}




 
