function Ajax() {
	this.xmlhttp = null;

	this.reset = function() {
		this.onCompletion = function() { };
		this.requestURI = "";
  	this.busy = false;
  	this.response = "";
	};

	this.start = function() {
		this.xmlhttp = this.createXMLHttp();
	}

	this.run = function() {
		if (this.xmlhttp && !this.busy) {
			this.busy = true;
			var self = this;
		  this.xmlhttp.open("GET",this.requestURI,true);

	  	this.xmlhttp.onreadystatechange = function() {
				if (self.xmlhttp.readyState == 4) {
					self.response = self.xmlhttp.responseText;
					if (self.xmlhttp.status == "200") {
						self.onCompletion();
						self.busy = false;
					}
				}
			}
			this.xmlhttp.send(this.requestURI);
		}
	}

	this.createXMLHttp = function() {
		if (typeof XMLHttpRequest != 'undefined')
			return new XMLHttpRequest();
		else if (window.ActiveXObject) {
			var avers = ["Microsoft.XmlHttp", "MSXML2.XmlHttp",
				"MSXML2.XmlHttp.3.0", "MSXML2.XmlHttp.4.0",
				"MSXML2.XmlHttp.5.0"];
			for (var i = avers.length -1; i >= 0; i--) {
				try {
	         httpObj = new ActiveXObject(avers[i]);
	         return httpObj;
	       } catch(e) {}
	  	 }
		}
		throw new Error('XMLHttp (AJAX) not supported');
	}

	this.reset();
	this.start();


}