AjaxRequest = function(){
	// RESPONSE - TYPICALY WILL BE A FUNCTION NAME OR AN INLINE FUNCTION
	this.r = arguments[0].r;
	// FILE/URL (INCLUDE QUERY STRING FOR GET)
	this.f = arguments[0].f;
	// ARGUMENNTS (FORM ARGUMENTS FOR POST ONLY)
	this.a = arguments[0].a || null;
	// METHOD - DEFAULTS TO POST BECAUSE THIS CLASS WAS ORIGINALLY WRITTEN WITH ONLY POST SUPPORT
	this.m = arguments[0].m || "post";
	// TYPE - XML OR JSON DATA BEIGN RETURNED. DEFAULTS TO XML BECAUSE THE ORIGINAL VERSION ASSUMED XML
	this.t = arguments[0].t || "xml"
	this.init();
};
AjaxRequest.prototype.init = function(){
	// DUPLICATE THE THIS VARIABLE TO A LOCAL VARIABLE TO MAKE THE VALUES AVAILABLE IN THE ONREADYSTATECHANGE FUNCTION
	var delegate = this;
	var req = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
	req.open(this.m, this.f, true);
	req.onreadystatechange = function(){
		if(req.readyState == 4){
			if(req.status == 200){
				if (delegate.t == "json") {
					delegate.r(req.responseText);
				} else { // IF THE TYPE ISN'T JSON, ASSUME XML
					delegate.r(req.responseXML);
				}
						
			}else{
				alert("STATUS CODE: " + req.status);
						
			}
			
		}
	
	};
	// CHANGE THE CONTENT-TYPE FOR A POST REQUEST
	if (this.m == "post") {
		req.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	}
	req.send(this.a);

};