
function fillState(theCountry){
	//clear out the cities if not the United States.
	if(theCountry.value != 'United States'){
		document.getElementById("showCities").style.display = 'none';
		document.getElementById("citiesDiv").style.display = 'none';
	} else {
		document.getElementById("showCities").style.display = 'block';
		document.getElementById("citiesDiv").style.display = 'inline';
	}
	
	getdata('includes/functions.php?r=1&v1='+escape(theCountry.value),'statesDiv');
}

function fillCities(theState){
	if(theState.value != ''){
		getdata('includes/functions.php?r=2&v1='+escape(theState.value),'citiesDiv');
	}
}

function listCountryWifis(theCountry){
	getdata('includes/functions.php?r=3&v1='+escape(theCountry),'countryResults');
	return false;
}

function CreateBookmarkLink() { 
	title = "Free Wifi Hotspot Directory";   
	url = "http://localwifisearch.com";  
	if (window.sidebar) { // Mozilla Firefox Bookmark		
		window.sidebar.addPanel(title, url,"");	
	} else if( window.external ) { // IE Favorite		
		window.external.AddFavorite( url, title); 
	} 
} 
