function CreateXMLHttpRequest()
{
	try{return new XMLHttpRequest();}catch(err){}
	try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(err){}
	try{return new ActiveXObject("Microsoft.XMLHTTP"); }catch(err){}
}
function SendRequest(METHOD,URL,PARAMS,OBJ)
{
	LoadDataPleaseWait(OBJ)
	var xmlHttp = CreateXMLHttpRequest()
	if(!xmlHttp) {
		alert("Cannot create XMLHTTP instance");
	}	
	if(METHOD == "POST") {
		xmlHttp.open(""+METHOD+"", URL , true);
		xmlHttp.setRequestHeader("Cache-Control", "no-cache, must-revalidate");
		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=tis-620");
		xmlHttp.onreadystatechange = function handleStateChange() {	
			if(xmlHttp.readyState == 4)
			{
				if(xmlHttp.status == 200)
				{
					document.getElementById(""+OBJ+"").innerHTML = xmlHttp.responseText;
				}
			}
		}
		xmlHttp.send(PARAMS);
	}else if(METHOD == "GET") {
		xmlHttp.open(""+METHOD+"", URL + PARAMS , true);
		xmlHttp.onreadystatechange = function handleStateChange() {	
			if(xmlHttp.readyState == 4)
			{
				if(xmlHttp.status == 200)
				{
					document.getElementById(""+OBJ+"").innerHTML = xmlHttp.responseText;
				}
			}
		}
		xmlHttp.send(null);	
	}
}

