// JavaScript Document
function PartialPostBack() {
	this.objHttp = null;
	this.strUrl = '';
	this.strRequestType = "GET";
	this.strResponse = '';
	this.isResponse = false;
	this.setXmlUrl = setXmlUrl;
	this.setXmlRequestType = setXmlRequestType;
	this.isResponseReady = isResponseReady;
	this.sendXmlRequest = sendXmlRequest;
	this.getXmlResponse = getXmlResponse;
	function initializeXmlHttp() {
		if(document.all) {
			objHttp = new ActiveXObject("MSXML2.XMLHTTP");
			if(objHttp == null) {
				objHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		else {
			objHttp = new XMLHttpRequest();
		}
	}
	function recieveResponse() {
		if (objHttp.readyState==4) {
			if(objHttp.status==200) {
				strResponse = objHttp.responseText;
			}
			else {
				strResponse = "error";
			}
			isResponse = true;
		}
	}
	function setXmlUrl(str) {
		strUrl = str;
	}
	function setXmlRequestType(str) {
		strRequestType = str;
	}
	function isResponseReady() {
		return isResponse;
	}
	function sendXmlRequest(req) {
		initializeXmlHttp();
		isResponse = false;
		objHttp.onreadystatechange = recieveResponse;
		objHttp.open(strRequestType, strUrl, true);
		if(strRequestType.toLowerCase()=="post") {
			objHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
		}
		objHttp.send(req);
	}
	function getXmlResponse() {
		var str=strResponse;
		strResponse = '';
		isResponse = false;
		return str;
	}
}