// storelocator.js
function trim(inword) {
	   word = inword.toString();
	   var i=0;
	   var j=word.length-1;
	   while(word.charAt(i) == " ") i++;
	   while(word.charAt(j) == " ") j--;
	   if (i > j) 
		{
			return word.substring(i,i);
		} else 
		{
			return word.substring(i,j+1);
		}
	}
// newFunction
function validateZip(form) {

if(trim(document.getElementById("zip").value) == "" || trim(document.getElementById("zip").value).length !=5){
			document.getElementById("zip").value = trim(document.getElementById("zip").value);
			alert("Zip Code must be five numeric characters.");
			document.getElementById("zip").focus();
			return false;
}

}