function countyChange() {
	countyIndex = document.getElementById("countySelector").options.selectedIndex;

	var cityOptions = document.getElementById("citySelector");
	cityOptions.options.length = 1;

	for (counter=1; counter<cities[countyIndex].length; counter++) {
		cityOptions.options[cityOptions.options.length] = new Option(cities[countyIndex][counter], cities[countyIndex][counter]);
	}
}

function branchChange() {
	if (document.getElementById("citySelector").options.selectedIndex == 0) {
		return;
	} else {
		document.getElementById("locatorForm").submit();
	}
}


function detectFirefox(){
	var userAgent = new String(navigator.userAgent);
	var platform = navigator.platform;

	if (userAgent.search("Firefox")>-1 && platform.search("Mac")>-1) {
		return true;
	} else {
		return false;
	}
}


function detectFirefoxSafari(){
	var userAgent = new String(navigator.userAgent);
	var platform = navigator.platform;

	if ((userAgent.search("Firefox")>-1 && platform.search("Mac")>-1) || (userAgent.search("Safari")>-1)) {
		return true;
	} else {
		return false;
	}
}


function pop(href) {
	window.open(href, '_blank');
	return false;
}


function homeHide() {
	document.getElementById("homeflash").className = "hide";
}
	