var xmlHttp
function stateChanged()
{
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("divResult").innerHTML=xmlHttp.responseText
	}
}

function GetXmlHttpObject()
{
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}


function showDataByAjax(url)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged1()
{
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("divRegion").innerHTML=xmlHttp.responseText
	}
}
function showRegionByAjax(url)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	xmlHttp.onreadystatechange=stateChanged1
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged2()
{
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		document.getElementById("divCountry").innerHTML=xmlHttp.responseText
	}
}
function showCountryByAjax(url)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	xmlHttp.onreadystatechange=stateChanged2
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function deleteDataByAjax(url)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return;
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null);
}
function stateChanged3()
{
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var xx = document.getElementById("updateddiv").innerHTML
            document.getElementById(xx).innerHTML=xmlHttp.responseText
	}
}
function showCarrierHistory(url)
{
      xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	xmlHttp.onreadystatechange=stateChanged3
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
