function AJAXObject(url){this.q=new Array();this.go=false;this.prev=null;this.xh=this.getX();this.url=url;this.handler=(typeof arguments[1]=='undefined')?this.handler:arguments[1];var that=this;this._st=_st;function _st(){try{if(that.xh.readyState==4){that.handler(that.xh.status,that.xh.responseText);if(that.q.length>0){that._send(that.q.shift())}else{that.go=false}}}catch(e){}}}
AJAXObject.prototype.send=function(s){if((this.xh==null)||(typeof this.url=='undefined'))return false;this.q.push(s);if(this.go==false)this._send(this.q.shift())}
AJAXObject.prototype._send=function(s){this.go=true;this.xh.open("POST", this.url, true);this.xh.setRequestHeader("Content-type", "application/x-www-form-urlencoded");this.xh.onreadystatechange=this._st;this.xh.send(s);this.prev=s}
AJAXObject.prototype.getX=function(){var x=null;if(window.XMLHttpRequest){x=new XMLHttpRequest()}else if(window.ActiveXObject){var a=new Array('Msxml2.XMLHTTP.6.0','Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP');for(var i=0;i<a.length;i++){try{x=new ActiveXObject(a[i]);break}catch(e){}}}else{alert("Could not create XMLHTTP object.")}return x}