
function numeric(x)
{
   var ValidChars = "0123456789-";
   var numeric=true;
   var Char; 
   for (i = 0; i < x.length && numeric == true; i++) 
   { 
     Char = x.charAt(i); 
     if (ValidChars.indexOf(Char) == -1)	 
		 	numeric = false;		 
		}
   return numeric;   
}

function validateForm() {

	if (document.findalocationForm.zipcode.value == '') {

		alert('You must enter an Zip Code!');
		
	} else if (!numeric(document.findalocationForm.zipcode.value)) {

		alert('The zip code you have entered is not a number!');

	} else {

	 	document.findalocationForm.submit();

	}
	
}