// BranchLocatorJavaScript.js

var digits = "0123456789";
var validZipCodeChars = digits + "-";

function isValidZip(s) {
 	var i;
 	for (i = 0; i < s.length; i++) {
  		var c = s.charAt(i);
  		if (validZipCodeChars.indexOf(c) == -1) return false;
 	}
 	return true;
}

// newFunction
function setSearchType(searchTypeValue) {
		document.forms[0].searchType.value = searchTypeValue;//value could be 'revise' or 'new'
		document.forms[0].submit();
        return; // true
    }
    
    function setDetailRequestType(detailRequestType) {
    	//detailRequestType could be 'panNorth' or 'panSouth', panEast, panWest, zoomLevel1, zoomLevel2...zoomLevel8
		document.forms[0].detailRequestType.value = detailRequestType;
		document.forms[0].submit();
        return; // true
    }
    function setLocationOrder(locationOrderValue) {
		document.forms[0].locationOrder.value = locationOrderValue;
		document.forms[0].submit();
        return; // true
    }
	