var xmlHttp

function show_state(vir_lib,country_code)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/web/default/lib/get_state.php";
url=url+"?country_code="+country_code;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=get_state;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function get_state() 
{ 
if (xmlHttp.readyState==4)
{ 
	//alert(xmlHttp.responseText);
	document.getElementById("state").innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  	xmlHttp=new XMLHttpRequest();
		if (!xmlHttp) {
	    alert('Cannot create XMLHTTP instance');
	    return false;
	  }
	  
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}