//Created by Sean Kane (http://celtickane.com/labs/feather-ajax/)
//Feather Ajax v1.0.2

function AjaxObject101() {
	this.createRequestObject = function() {
		try {
			var ro = new XMLHttpRequest();
		}
		catch (e) {
			var ro = new ActiveXObject("Microsoft.XMLHTTP");
		}
		return ro;
	}
	this.sndReq = function(action, url, data) {
		if (action.toUpperCase() == "POST") {
			this.http.open(action,url,true);
			this.http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
			try {this.http.onreadystatechange = this.handleResponse;}
			catch(ex) {
				this.http.onload = this.handleResponse;
			}
			this.http.send(data);
		}
		else {
			this.http.open(action,url + '?' + data,true);
			try {this.http.onreadystatechange = this.handleResponse;}
			catch(ex) {
				this.http.onload = this.handleResponse;
			}
			this.http.send(null);
		}
	}
	this.handleResponse = function() {
	    if (me.http.readyState == 4) {
	        if (typeof me.funcDone == 'function') { me.funcDone(); }
	        if (typeof me.funcResponse == 'function') { me.funcResponse(me.http.responseText); }

	        //Note that this has been modified from Feather Ajax 1.0.2 to fit a different purpose...
	        /*
	        var rawdata = me.http.responseText.split("|");
	        for ( var i = 0; i < rawdata.length; i++ ) {
	        var item = (rawdata[i]).split("=>");
	        if (item[0] != "") {
	        if (item[1].substr(0,3) == "%V%" ) {
	        document.getElementById(item[0]).value = item[1].substring(3);
	        }
	        else {
	        document.getElementById(item[0]).innerHTML = item[1];
	        }
	        }
	        }
	        */
	    }
	    if ((me.http.readyState == 1) && (typeof me.funcWait == 'function')) { me.funcWait(); }
	}
	var me = this;
	this.http = this.createRequestObject();
	
	var funcWait = null;
	var funcDone = null;
	var funcResponse = null;
}