(function(){window.JSL={"_getUserArgs":function(arguments){var user_args=[];for(var i=1;i=2){var C=arguments[1]}else{do{if(D in this.array){C=this.array[D++];break}if(++D>=B){throw new TypeError()}}while(true)}for(;DL&&K");if(K+1&&!(K>L&&K");var n=X[0];var J=X[1];var S=R(D,n);D=[];for(var b=0,g=S.length;fnd=S[b],bL&&KL&&K0||B.indexOf(".")+1||B.indexOf(" ")+1||B.indexOf(",")+1||B.indexOf("[")+1||B.indexOf("*")+1||B.indexOf("+")+1||B.indexOf(">")+1){return"css"}else{if(JSL.array(this.valid_tags).indexOf(B)+1){return"tag"}else{return"id"}}}else{return"node"}}};window.JSL["dom"]=function(){var B=new A(arguments);if(B.return_null){return null}return B}})();(function(){function A(B){this.event=B||window.event;return this}A.prototype={"add":function(F,D,E,C){function B(H){var G=JSL.event(H).getTarget()||document;E.call(G,H)}C=C||true;if(F.attachEvent){return F.attachEvent("on"+D,B)}else{if(F.addEventListener){F.addEventListener(D,B,C);return true}else{F["on"+D]=B}}},"stop":function(){var B=this.event;B.cancelBubble=true;B.returnValue=false;if(B.stopPropagation){B.stopPropagation()}if(B.preventDefault){B.preventDefault()}return false},"getTarget":function(){var B;var C=this.event;if(C.target){B=C.target}else{if(C.srcElement){B=C.srcElement}}if(B&&B.nodeType==3){B=B.parentNode}return B}};window.JSL["event"]=function(B){return new A(B)}})();(function(){function A(B){this.number=B;return this}A.prototype={"times":function(B){var B=JSL._makeFunc(B,"i");return this._call(B,0,this.number-1)},"upto":function(B,C){var C=JSL._makeFunc(C,"i");return this._call(C,this.number,B)},"round":function(E){if(!E){return Math.round(this.number)}if(this.number==0){var B="";for(var D=0;DB){var C=D;D=B;B=C}return Math.floor(Math.random()*(B-D+1))+D},"_call":function(C,F,E){var D=[];if(F=E;B--){D.push(C.call(this,B))}}return JSL.array(D)}};window.JSL["number"]=function(B){return new A(B)}})();(function(){function _ajax_init(url){this.url=url;this._init();if(!url){return false}return this}_ajax_init.prototype={"http":false,"format":"text","callback":false,"error":false,"_getHTTPObject":function(){var http=false;if(typeof ActiveXObject!="undefined"){try{http=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{http=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){http=false}}}else{if(XMLHttpRequest){try{http=new XMLHttpRequest()}catch(e){http=false}}}return http},"load":function(callback,format,method,opt){var http=this._init();var url=this.url;if(!http||!url){return }this.callback=callback;method=method||"GET";format=format||"text";this.format=format.toLowerCase();method=method.toUpperCase();var ths=this;if(format=="xml"&&http.overrideMimeType){http.overrideMimeType("text/xml")}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]}http.open(method,url,true);if(method=="POST"){http.setRequestHeader("Content-type","application/x-www-form-urlencoded");http.setRequestHeader("Content-length",parameters.length);http.setRequestHeader("Connection","close")}if(opt&&opt.handler){http.onreadystatechange=opt.handler}else{http.onreadystatechange=function(){if(!ths){return }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(opt.loading_text){document.getElementsByTagName("body")[0].removeChild(opt.loading_text)}if(opt.loading_indicator&&document.getElementById(opt.loading_indicator)){document.getElementById(opt.loading_indicator).style.display="none"}if(ths.error){ths.error(http.status)}}}}}http.send(parameters)},"bind":function(user_options){var opt={"onSuccess":false,"onError":false,"format":"text","method":"GET","update":"","loading_indicator":"","loading_text":""};for(var key in opt){if(user_options[key]){opt[key]=user_options[key]}}opt.url=this.url;if(opt.onError){this.error=opt.onError}var div=false;if(opt.loading_text){if(opt.loading_indicator){div=document.getElementById(opt.loading_indicator)}else{div=document.createElement("div");div.setAttribute("style","position:absolute;top:0px;left:0px;");div.setAttribute("class","loading-indicator");document.getElementsByTagName("body")[0].appendChild(div)}div.innerHTML=opt.loading_text;opt.loading_text=div}if(opt.loading_indicator){document.getElementById(opt.loading_indicator).style.display="block"}this.load(function(data){if(opt.update){document.getElementById(opt.update).innerHTML=data}if(div&&!opt.loading_indicator){document.getElementsByTagName("body")[0].removeChild(div)}if(opt.loading_indicator){document.getElementById(opt.loading_indicator).style.display="none"}if(opt.onSuccess){opt.onSuccess(data)}},opt.format,opt.method,opt)},"_init":function(){return this._getHTTPObject()}};window.JSL["ajax"]=function(url){return new _ajax_init(url)}})()