function clXmlHttp(){
	this.mXmlHttp = null;
	this.onReady = null;
	this.tag = null;
		
	try {
		// Firefox, Opera 8.0+, Safari
		this.mXmlHttp = new XMLHttpRequest();
	}
	catch (e) {
		// Internet Explorer
		// vanwege verschillende xml implementaties van microsoft
		ProgIds = new Array();
		ProgIds[0] = 'Msxml2.XMLHTTP.6.0';
		ProgIds[1] = 'Msxml2.XMLHTTP.5.0';
		ProgIds[2] = 'Msxml2.XMLHTTP.4.0';
		ProgIds[3] = 'Msxml2.XMLHTTP.3.0';
		ProgIds[4] = 'Microsoft.XMLHTTP';

		for(var i = 0; i < ProgIds.length; i++) {
			try {
				this.mXmlHttp = new ActiveXObject(ProgIds[i]);
				break;
			}
			catch(e) {}
		}
	}

	clXmlHttp.prototype.makeGETRequestOld = function (onready, url, async) {
		this.mXmlHttp.onreadystatechange = onready;

		this.mXmlHttp.open('GET', url, async);
		this.mXmlHttp.send(null);
	};

	clXmlHttp.prototype.makePOSTRequestOld = function (onready, url, async, postdata) {
		this.mXmlHttp.onreadystatechange = onready;

		this.mXmlHttp.open('POST', url, async);
		this.mXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		this.mXmlHttp.setRequestHeader("Content-length", postdata.length);
		this.mXmlHttp.setRequestHeader("Connection", "close");
    	this.mXmlHttp.send(postdata);
	};

	clXmlHttp.prototype.makeGETRequest = function (url, async) {
		this.mXmlHttp.onreadystatechange = this.__onready;
		this.mXmlHttp.self = this;

		this.mXmlHttp.open('GET', url, async);
		this.mXmlHttp.send(null);
	};

	clXmlHttp.prototype.makePOSTRequest = function (url, async, postdata) {
		this.mXmlHttp.onreadystatechange = this.__onready;
		this.mXmlHttp.self = this;

		this.mXmlHttp.open('POST', url, async);
		this.mXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		this.mXmlHttp.setRequestHeader("Content-length", postdata.length);
		this.mXmlHttp.setRequestHeader("Connection", "close");
    	this.mXmlHttp.send(postdata);
	};

	clXmlHttp.prototype.readyState = function () {
		return this.mXmlHttp.readyState;
	};

	clXmlHttp.prototype.responseText = function () {
		return this.mXmlHttp.responseText;
	};

	clXmlHttp.prototype.responseXML = function () {
		return this.mXmlHttp.responseXML;
	};

	clXmlHttp.prototype.__onready = function () {
		try {
			
			if(this.self.readyState() == 4) {								
				this.self.onReady(this.self);				
			}
		}
		catch(e) { }
	};


}


