jx={http:false,format:"text",callback:function(a){},handler:false,error:false,opt:new Object(),getHTTPObject:function(){var a=false;if(typeof ActiveXObject!="undefined"){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){a=false}}}else{if(XMLHttpRequest){try{a=new XMLHttpRequest()}catch(c){a=false}}}return a},load:function(url,callback,format,method){this.init();if(!this.http||!url){return}if(this.http.overrideMimeType){this.http.overrideMimeType("text/xml")}this.callback=callback;if(!method){var method="GET"}if(!format){var format="text"}this.format=format.toLowerCase();method=method.toUpperCase();var ths=this;var now="uid="+new Date().getTime();url+=(url.indexOf("?")+1)?"&":"?";url+=now;var parameters=null;if(method=="POST"){var parts=url.split("?");url=parts[0];parameters=parts[1]}this.http.open(method,url,true);if(method=="POST"){this.http.setRequestHeader("Content-type","application/x-www-form-urlencoded")}if(this.handler){this.http.onreadystatechange=this.handler}else{this.http.onreadystatechange=function(){if(!ths){return}var http=ths.http;if(http.readyState==4){if(http.status==200){var result="";if(http.responseText){result=http.responseText}if(ths.format.charAt(0)=="j"){result=result.replace(/[\n\r]/g,"");result=eval("("+result+")")}else{if(ths.format.charAt(0)=="x"){result=http.responseXML}}if(ths.callback){ths.callback(result)}}else{if(ths.opt.loadingIndicator){document.getElementsByTagName("body")[0].removeChild(ths.opt.loadingIndicator)}if(ths.opt.loading){document.getElementById(ths.opt.loading).style.display="none"}if(ths.error){ths.error(http.status)}}}}}this.http.send(parameters)},bind:function(a){var c={url:"",onSuccess:false,onError:false,format:"text",method:"GET",update:"",loading:"",loadingIndicator:""};for(var b in c){if(a[b]){c[b]=a[b]}}this.opt=c;if(!c.url){return}if(c.onError){this.error=c.onError}var d=false;if(c.loadingIndicator){d=document.createElement("div");d.setAttribute("style","position:absolute;top:0px;left:0px;");d.setAttribute("class","loading-indicator");d.innerHTML=c.loadingIndicator;document.getElementsByTagName("body")[0].appendChild(d);this.opt.loadingIndicator=d}if(c.loading){document.getElementById(c.loading).style.display="block"}this.load(c.url,function(e){if(c.onSuccess){c.onSuccess(e)}if(c.update){document.getElementById(c.update).innerHTML=e}if(d){document.getElementsByTagName("body")[0].removeChild(d)}if(c.loading){document.getElementById(c.loading).style.display="none"}},c.format,c.method)},init:function(){this.http=this.getHTTPObject()}};