/*
Title:      
Author:		
Updated:    
*/

// Dropdown force browser script
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);



function nozip(field) {
	if(field.value == "Enter Zip Code" || field.value == "") {
		document.zipcode.findInput.value = "Enter Zip Code";
		return false;
	}

	var valid = "0123456789-";
	
	var hyphencount = 0;
	
	if (field.length!=5 && field.length!=10) {
		document.zipcode.findInput.value = "Enter Zip Code";
		return false;
	}
	
	for (var i=0; i < field.length; i++) {
		
		temp = "" + field.substring(i, i+1);
		
		if (temp == "-") hyphencount++;
		
		if (valid.indexOf(temp) == "-1") {
			document.zipcode.findInput.value = "Enter Zip Code";
			return false;
		}
		
		if ((hyphencount > 1) || ((field.length==10) && ""+field.charAt(5)!="-")) {
			document.zipcode.findInput.value = "Enter Zip Code";
			return false;
		}
	}
	
	return true;
}