function showstate(cid,divid)
{
	params = {parent_id: cid};
	var req = new JsHttpRequest();	

	req.onreadystatechange = function()
	{
		if(req.readyState == 4)
		{
			$(divid).innerHTML = req.responseJS.html;
		}
	}
	req.caching = false;
	req.open('POST', ajax_prefix + '?rm=ajax_get_states', true);
	req.send(params);

	/*
    var url = "";
	url = "dispstates.php?cid="+cid+"&currctry="+curctry;
    var xmlHttp = false;
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
		alert ("Browser does not support HTTP Request");
	else
	{
		xmlHttp.onreadystatechange=
			function ()
				{
				if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
				    {  					  
						document.getElementById(divid).innerHTML=xmlHttp.responseText; 
						if(curctry != cid)
						 curctry = cid;
						else
						 curctry = 	"";
					}
					};
		xmlHttp.open("GET",url,true);
		//window.open(url);
		xmlHttp.send(null);
	}
	*/
}

function showcity(stid,divid)
{
	params = {parent_id: stid};
	var req = new JsHttpRequest();	

	req.onreadystatechange = function()
	{
		if(req.readyState == 4)
		{
			$(divid).innerHTML = req.responseJS.html;
		}
	}
	req.caching = false;
	req.open('POST', ajax_prefix + '?rm=ajax_get_cities', true);
	req.send(params);
	
	/*
    var url = "";
	url = "dispcities.php?stid="+stid+"&curstate="+curstate;
    var xmlHttp = false;
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
		alert ("Browser does not support HTTP Request");
	else
	{
		xmlHttp.onreadystatechange=
			function ()
				{
				if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
				    {  					  
						document.getElementById(divid).innerHTML=xmlHttp.responseText; 
						if(curstate != stid)
						 curstate = stid;
						else
						 curstate = 	"";
					}
				};
		xmlHttp.open("GET",url,true);
		//window.open(url);
		xmlHttp.send(null);
	}
	*/
}
/*
function GetXmlHttpObject()
{
	if (window.XMLHttpRequest)
		return (new XMLHttpRequest());
	else if (window.ActiveXObject)
		return (new ActiveXObject("Microsoft.XMLHTTP"));
}
*/
