function XmlLoader(dataURL) {
	this.dataURL = dataURL;
	this.data = "";
	this.load();
}

XmlLoader.prototype.load = function(){
	this.request = this.getXMLHTTPRequest();
	var _this = this;
	this.request.onreadystatechange = function(){_this.onData()};
	this.request.open("POST", this.dataURL, true);
	//this.request.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	this.request.send(''); // parameter must be null with a GET & '' with a POST method in the this.request.open
}

XmlLoader.prototype.onData = function(){
	if(this.request.readyState == "4" && this.request.status == "200"){
		this.xmlData = this.request.responseXML;
		this.textData = this.request.responseText;
		this.onLoaded(); // Best to use instance methods here
	}else{
		this.onLoading(); // Best to use instance methods here
	}
}

XmlLoader.prototype.onLoading = function(){}
XmlLoader.prototype.onLoaded = function(){}

XmlLoader.prototype.getXMLHTTPRequest = function(){
	var xmlHttp;
	try{
		xmlHttp = new ActiveXObject("Msxml2.XMLHttp");
	}catch(e){
		try{
			xmlHttp = new ActiveXObject("Microsoft.XMLHttp");
		}catch(e2){
		}
	}
	if(xmlHttp == undefined && (typeof XMLHttpRequest != 'undefined')){
		xmlHttp = new XMLHttpRequest();
	}
	return xmlHttp;
}