// JavaScript Document
var xmlHttp;
var div;

function indexcountryimage(str)
{ 

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  



if(str==1)//US
{
	var url="./indexcountryimage_us.php";
}

if(str==2)//UK
{
	var url="./indexcountryimage_uk.php";	
}
if(str==3)//CANADA
{
	var url="./indexcountryimage_canada.php";	
}
if(str==4)//AUSTRALIA
{
	var url="./indexcountryimage_aus.php";	
}

url=url+"?q="+str;
url=url+"&sid="+Math.random();
//alert(url);

xmlHttp.onreadystatechange=Showmap;

xmlHttp.open("GET",url,true);

xmlHttp.send(null);
}



function Showmap() 
{ //alert(xmlHttp.readyState);

if(xmlHttp.readyState == 1)
{ //alert("dfg");
	document.getElementById("imagecountry").innerHTML=	 "<img src='../templates/default/images/ajax-loader_new.gif' widht='32' hight='32'>";
}
if (xmlHttp.readyState==4)
{
	//alert(xmlHttp.responseText);
	
		document.getElementById("imagecountry").innerHTML=xmlHttp.responseText;
	
}
}

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;
}

