function AjaxObject() {
	this.createRequestObject = function() {
		var ro = null;
		// Firefox, Safari, Opera, et al.
		if ( window.XMLHttpRequest ) {
			ro = new XMLHttpRequest();
			if (ro.overrideMimeType) {
				ro.overrideMimeType('text/xml');
			}
		//IE
		} else if (window.ActiveXObject) {
			try {
				ro = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					ro = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {}
			}
		}
		if (ro == null) {
			alert('Cannot create XMLHTTP instance');
			return false;
		}
		return ro;
	}
	this.request = function(url, data,_funcCallback) {
		if(_funcCallback != null) me.funcCallback = _funcCallback;
		this.http.open("GET",url, true);
		this.http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		this.http.onreadystatechange = this.handleResponse;
		this.http.send(data);
	}
	this.handleResponse = function() {
		
		if ( me.http.readyState == 4) {
			
			if ( me.http.status == 200 ) {
				
				//For Debugging
				//alert(me.http.responseText);
				
				if (window.ActiveXObject)
				{
					var doc=new ActiveXObject("Microsoft.XMLDOM");
					doc.async="false";
					doc.loadXML(me.http.responseText);
				}
				// Firefox, Safari, Opera, et al.
				else
				{
					//var parser=new DOMParser();
					var doc=me.http.responseXML;//parser.parseFromString(me.http.responseText,"text/xml");
				}
				var xmlNode=doc.documentElement;
				if(typeof me.funcCallback=='function')
					me.funcCallback(xmlNode);
				else
					return xmlNode;
			}
		}
		if ((me.http.readyState == 1) && (typeof me.funcFail == 'function')) { 
				me.funcFail(); 
		}
	}

	var me = this;
	this.http = this.createRequestObject();
	var funcCallback = null;
	var funcFail = null;
}
