
function mapTooltip(county, cities) {
	
	var output = "";
	
	output += "<table cellpadding='0' cellspacing='0' width='100%'>";
		output += "<tr>";
			output += "<td class='map_county_header'>";
				output += county + " County";
			output += "</td>";
		output += "<tr>";
		output += "</tr>";
			output += "<td class='map_city_list'>";
				for (i = 0; i < cities.length; i++) {
					output += "<li />" + cities[i];
				}
			output += "</td>";
		output += "</tr>";
	output += "</table>";
	
	return output;
}

function helpToolTip() {
	
	var output = "";
	
	output += "<b>To select multiple counties</b>: Select as many counties from the map as you";
	output += "wish to search, or hold the 'Ctrl' key on your keyboard and select the counties from";
	output += "the list to the right of the map. <br /><br /><b>To deselect a county</b>: simply click the county";
	output += "you wish to deselect on the map again, or hold the 'Ctrl' key on your keyboard and ";
	output += "select the counties from the list to the right of the map.";
	
	return output;
	
}

//counties = new Array();
function selectCounty(county){
/*
 for (i=0; (counties[i]!=county && i<=counties.length); ++i){}
 if (i>=counties.length){
  counties.push(' '+county);
  county_select.options[i].selected = true;
 }
 else{
  counties.splice(i, 1);
  county_select.options[i].selected = false;
 }
*/
 county_select = document.forms.frmSearch.elements['lstCounties[]'];
 for (i = 0; i < county_select.options.length; i++){
  if (county_select.options[i].value == county){
   if (county_select.options[i].selected == true){
    county_select.options[i].selected = false;
   }
   else county_select.options[i].selected = true;
  }
 }
 if (document.forms.frmSearch.elements['lstCities[]']) populateCities();
 if (document.forms.frmSearch.elements['lstAreas[]']) populateAreas();
}

function clearCountyList() {
	
	county_select = document.forms.frmSearch.elements['lstCounties[]'];
	
	for (i = 0; i < county_select.options.length; i++) {
		county_select.options[i].selected = false;
	}
	
}