// JavaScript Document
function isInteger(s){
var i;
for (i = 0; i < s.length; i++){ 
// Check that current character is a number or not.
var c = s.charAt(i);
if (((c < "0") || (c > "9"))) return false;
}
// All characters are numbers.
return true;
}

function vaildateZip()
{
	
	 if (document.getquote.zipCode.value=='') 
      {
		  alert("Please enter Zip Code.");
		  document.getquote.zipCode.focus();
		  return false;
      } 
	  else if(document.getquote.zipCode.value.length != 5 )
      {
      	alert("Zip Code should be of 5 Digits !");
		document.getquote.zipCode.focus();
		 return false;
      }
	  else
		{
		var zipc=document.getElementById('zipCode');
		if (isInteger(zipc.value)==false){
		alert("Please Enter numeric Zip Code !")
		document.getquote.zipCode.focus();
		return false;
		}
		//return true;
		}
	 
	  if(document.getElementById('select_insur').value=='' )
      {
      	alert("Please select Your Insurance Type !");
		document.getElementById('select_insur').focus();
		 return false;
      }
		 return true;
	 /*else
	 {
	  var selecttype=document.getElementById('select_insur');
	  if(selecttype.value=='1')
	  {
	  	alert("you 1");
	  	//window.location='individual&family.php';
		
		window.location.href = "http://localhost/milberinsurance/individual&family.php";
		//window.location = "http://localhost/milberinsurance/goingtofinal.php";
	  }
	  else if(selecttype.value=='2')
	  {
	  	window.location='magz_content.php'
	  	alert("you 2");
	  }
	  else if(selecttype.value=='3')
	  {
	  	window.location='magz_content.php'
	  	alert("you 3");
	  }
	  else
	  {
	  	alert("Invalid Selection");
		return false;
	  }
	  } */
	  //document.write(document.getquote.zipcoad.value);
		
}

function numbersOnly(hello)
   {
   hello.value = hello.value.replace(/[^0-9]/, "");
   }

