// JavaScript Document
var xmlHttp

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

function showCountries(continent, continent_name)
{ 
document.getElementById("default_country").style.display="none";
document.getElementById("continent_country").style.display="";
document.getElementById("show_country").innerHTML="Loading...";
document.getElementById("show_lightbox_city").style.display="none";

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="getCountries.php";
url=url+"?continent="+continent
url=url+"&continent_name="+continent_name
url=url+"&c="+Math.random()
xmlHttp.onreadystatechange=countryChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
//user defined
function countryChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("show_country").innerHTML = xmlHttp.responseText;
	}
}

function showCities(country, country_name)
{ 
document.getElementById('light').style.display='block';
document.getElementById('fade').style.display='block';
document.getElementById("show_lightbox_city").innerHTML="Loading...";
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="getCities.php";
url=url+"?country="+country
url=url+"&country_name="+country_name
url=url+"&c="+Math.random()
xmlHttp.onreadystatechange=cityChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
//user defined
function cityChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("show_lightbox_city").innerHTML = xmlHttp.responseText;
	}
}