function openMap(url, name) {
var temp	= "";
url			= '' + url;
splitstring	= url.split(" ");
for(i = 0; i < splitstring.length; i++) {
	if (i > 0) { temp = temp + '_' + splitstring[i]; }
	else { temp = splitstring[i]; }
}
url = temp;
window.open(url, name, 'scrollbars=1,resizable=no,width=800,height=800,status=0,menubar=0');
}
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600');");
}
function setCities() {
	stateSel		= document.getElementById('state');
	state			= stateSel.value.toLowerCase();
	window.location	= "states/" + state + "/";
}
function setResults() {
	stateSel		= document.getElementById('state');
	state			= stateSel.value.toLowerCase();
	citySel			= document.getElementById('city');
	city			= citySel.value.toLowerCase();
	window.location	= "states/" + state + "/" + city;
}
function doClear(theText) {
	if (theText.value == theText.defaultValue) { theText.value = ""; }
}
function validate() {
	if (document.search.method[0].checked) {
		var valid	= "0123456789"
		var ok		= "yes";
		var temp;
		for (var i = 0; i < document.search.zipcode.value.length; i++) {
			temp = "" + document.search.zipcode.value.substring(i, i + 1);
			if (valid.indexOf(temp) == "-1") ok = "no";
		}
		if (ok == "no") {
			alert("Invalid ZIP Code - only numbers allowed");
			document.search.zipcode.focus();
			document.search.zipcode.select();
			return false;
		}
	}
	return true;
}

