function MyHttpRequest() {
	try {
		this.httpReq = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			this.httpReq = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(sc) {
			this.httpReq = null;
		}
	}

	if (!this.httpReq && typeof XMLHttpRequest!="undefined") {
		this.httpReq = new XMLHttpRequest();
	}
	this.procFunc = null;
}

MyHttpRequest.prototype.setProcessorFunc = function(funcName) {
	this.procFunc = funcName;
}

MyHttpRequest.prototype.convert = function (s) {
	if(encodeURIComponent) return encodeURIComponent(s);
	if(escape) return escape(s);
}

MyHttpRequest.prototype.deconvert = function (s) {
	if(decodeURIComponent) return decodeURIComponent(s);
	if(unescape) return unescape(s);
}

MyHttpRequest.prototype.sendRequest = function(url) {
	if(this.httpReq&&this.httpReq.readyState!=0) {
		this.httpReq.abort();
	}

	if(this.httpReq) {
		var meReq = this.httpReq;
		var me = this;

		url += "&ts="+new Date().getTime().toString();
		this.httpReq.open("GET",url,true);
		this.httpReq.onreadystatechange=function() {
			if (meReq.readyState==4&&me.procFunc) {
				// eval(me.procFunc + "('" + me.convert(meReq.responseText) + "')");
				me.procFunc(meReq.responseText);
			}
		};
		this.httpReq.send(null);
	}
}
