function showhide(divid, state) {
if (state == 'visible') {
	state = 'hidden';
	}
else {
	state = 'visible';
	}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
	eval( "document.all." + divid + ".style.visibility = state");
	}
if (document.layers) { //IS NETSCAPE 4 or below
	document.layers[divid].visibility = state;
	document.layers[divid].display = 'block';
	}
if (document.getElementById && !document.all) {
	chuck = document.getElementById(divid);
	chuck.style.visibility = state;
	//chuck.style.display = 'block';
	}
}

function GetCities(cityname){

	// SAVE THE ROUND TRIP IF THE NAME IS BLANK
	if(String(cityname).length > 1){
	
			var oXMLHttp = zXmlHttp.createRequest();
			var url = "/directory/cities.asp?cities=" + cityname;
			
			oXMLHttp.open("GET", url + '&rnd=' + Math.random(), true);
			oXMLHttp.onreadystatechange = function() {

				if(oXMLHttp.readyState == 4) {
					if(oXMLHttp.status == 200){
						var Response = oXMLHttp.responseText;
						if(Response == ''){
							document.getElementById('tblCommonCities').innerHTML = ""
							
							}else{
							document.getElementById('tblCommonCities').innerHTML = Response
						}
						/*HandleResponse(Response)*/
					} else alert("There was an error while processing this screen.  The document was not ready to process. (Code: " + oXMLHttp.status + ")  Please try again.");
				}
			};
			oXMLHttp.send(null);
	}else{
	document.getElementById('tblCommonCities').innerHTML = ""
	}
}

function SelectFromDropDown(DropDownId, ValToSel) {
	VID = document.getElementById(DropDownId)
	for (var i=0;i<VID.length;i++) {
		if(VID.options[i].value == ValToSel) { 
			VID.options[i].selected = true;
			break;
		}
	}
}