var xhreq;
var READY_STATE_COMPLETED;
var ResponseData;

READY_STATE_COMPLETED = 4
ResponseData = "";

function sendRequest(HTTPMethod, URL, params)
{
	xhreq = initXMLHTTPRequest();
	if (xhreq)
	{
		xhreq.onreadystatechange = function() {onReadyState();}
		xhreq.open(HTTPMethod, URL, true);
		xhreq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xhreq.send(params);
	}
}

function initXMLHTTPRequest()
{
	var xRequest = null;
	if (window.XMLHttpRequest)
		xRequest = new XMLHttpRequest();
	else if (window.ActiveXObject)
		xRequest = new ActiveXObject("Msxml2.XmlHttp");
	return xRequest;
}

function onReadyState()
{
	if (xhreq.readyState == READY_STATE_COMPLETED)
	{
		ResponseData = xhreq.responseText;
		xhreq = null;
		parseData();
	}
}

function parseData()
{
//	alert(ResponseData);
	return;
}
