var xmlHttp;
var xmlHttp2;
var xmlHttp3;
var xmlHttp4;
var xmlHttp5;
var xmlHttp6;
var xmlHttp7;

function showCitiesInnerA(country,city,langID,cat,typeID)
{ 
  	var url="ajax/showCitiesA.asp?country=" + country + "&city="+ city +"&tp=1&la=" + langID + "&typeID="+ typeID +"&cat="+ cat +"&r=" + Math.random();
  	xmlHttp7=GetXmlHttpObject(stateChanged7)
   	xmlHttp7.open("GET", url , true)
   	xmlHttp7.send(null)
}

function stateChanged7() 
{ 
	if (xmlHttp7.readyState==4 && xmlHttp7.status==200)
   	{ 
  	 	document.getElementById("ajaxCitiesInner").innerHTML=xmlHttp7.responseText;
   	} 
} 

function showCountriesA(cat,typeID,country,city,langID)
{ 
  	var url="ajax/showCountriesA.asp?country=" + country + "&typeID="+ typeID +"&city="+ city +"&cat="+ cat +"&la=" + langID + "&r=" + Math.random();
  	xmlHttp6=GetXmlHttpObject(stateChanged6)
   	xmlHttp6.open("GET", url , true)
   	xmlHttp6.send(null)
}

function stateChanged6() 
{ 
	if (xmlHttp6.readyState==4 && xmlHttp6.status==200)
   	{ 
  	 	document.getElementById("ajaxCountriesInner").innerHTML=xmlHttp6.responseText;
   	} 
} 

function showCountries(cat,country,city,langID)
{ 
  	var url="ajax/showCountries.asp?country=" + country + "&city="+ city +"&cat="+ cat +"&la=" + langID + "&r=" + Math.random();
  	xmlHttp4=GetXmlHttpObject(stateChanged4)
   	xmlHttp4.open("GET", url , true)
   	xmlHttp4.send(null)
}

function stateChanged4() 
{ 
	if (xmlHttp4.readyState==4 && xmlHttp4.status==200)
   	{ 
  	 	document.getElementById("ajaxCountriesInner").innerHTML=xmlHttp4.responseText;
   	} 
} 
function showCities(country,city,langID)
{ 
  	var url="ajax/showCities.asp?country=" + country + "&city="+ city +"&tp=1&la=" + langID + "&r=" + Math.random();
  	xmlHttp2=GetXmlHttpObject(stateChanged2)
   	xmlHttp2.open("GET", url , true)
   	xmlHttp2.send(null)
}

function stateChanged2() 
{ 
	if (xmlHttp2.readyState==4 && xmlHttp2.status==200)
   	{ 
  	 	document.getElementById("ajaxCities").innerHTML=xmlHttp2.responseText;
   	} 
} 

function showCitiesInner(country,city,langID)
{ 
  	var url="ajax/showCities.asp?country=" + country + "&city="+ city +"&la=" + langID + "&r=" + Math.random();
  	xmlHttp3=GetXmlHttpObject(stateChanged3)
   	xmlHttp3.open("GET", url , true)
   	xmlHttp3.send(null)
}

function stateChanged3() 
{ 
	if (xmlHttp3.readyState==4 && xmlHttp3.status==200)
   	{ 
  	 	document.getElementById("ajaxCitiesInner").innerHTML=xmlHttp3.responseText;
   	} 
} 

function showAlbum(recID,langID,min)
{ 
  	var url="ajax/showAlbum.asp?newsID=" + recID + "&la=" + langID + "&min="+ min +"&r=" + Math.random();
  	xmlHttp=GetXmlHttpObject(stateChanged)
   	xmlHttp.open("GET", url , true)
   	xmlHttp.send(null)
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 && xmlHttp.status==200)
   	{ 
  	 	document.getElementById("ajaxHTML").innerHTML=xmlHttp.responseText;
  	 	initLightbox();
   	} 
} 

function showCountriesType(type,country,city,langID)
{ 
  	var url="ajax/showCountriesType.asp?country=" + country + "&city="+ city +"&typeID="+ type +"&la=" + langID + "&r=" + Math.random();
  	xmlHttp5=GetXmlHttpObject(stateChanged5)
   	xmlHttp5.open("GET", url , true)
   	xmlHttp5.send(null)
}

function stateChanged5() 
{ 
	if (xmlHttp5.readyState==4 && xmlHttp5.status==200)
   	{ 
  	 	document.getElementById("ajaxCountriesSide").innerHTML=xmlHttp5.responseText;
   	} 
} 

function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null

// if (navigator.userAgent.indexOf("Opera")>=0)
//    {
//     alert("This example doesn't work in Opera") 
//     return  
//    }
if (navigator.userAgent.indexOf("MSIE")>=0)
   { 
   var strName="Msxml2.XMLHTTP"
   if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
      {
      strName="Microsoft.XMLHTTP"
      } 
   try
      { 
      objXmlHttp=new ActiveXObject(strName)
      objXmlHttp.onreadystatechange=handler 
      return objXmlHttp
      } 
   catch(e)
      { 
      alert("Error. Scripting for ActiveX might be disabled") 
      return 
      } 
    } 
if (navigator.userAgent.indexOf("Mozilla")>=0 || navigator.userAgent.indexOf("Opera")>=0)
   {
   objXmlHttp=new XMLHttpRequest()
   objXmlHttp.onload=handler
   objXmlHttp.onerror=handler 
   return objXmlHttp
   }
} 
