function showBusyLayer(){}
function dle_ajax(j){this.AjaxFailedAlert="AJAX not supported.\n";this.requestFile=j;this.method="POST";this.URLString="";this.encodeURIString=true;this.effect=this.add_html=this.execute=false;this.loading_fired=0;this.centerdiv=null;this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.onShow=function(b){if(!this.loading_fired){this.loading_fired=1;b&&$("#loading-layer-text").html(b);b=($(window).width()-$("#loading-layer").width())/
2;var a=($(window).height()-$("#loading-layer").height())/2;$("#loading-layer").css({left:b+"px",top:a+"px",position:"fixed",zIndex:"99"});$("#loading-layer").fadeTo("slow",0.6)}};this.onHide=function(){$("#loading-layer").fadeOut("slow");this.loading_fired=0};this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){this.xmlhttp=null}}if(!this.xmlhttp&&typeof XMLHttpRequest!="undefined")this.xmlhttp=new XMLHttpRequest;
if(!this.xmlhttp)this.failed=true};this.setVar=function(b,a){if(this.URLString.length<3)this.URLString=b+"="+a;else this.URLString+="&"+b+"="+a};this.encVar=function(b,a){return encodeURIComponent(b)+"="+encodeURIComponent(a)};this.encodeURLString=function(b){varArray=b.split("&");for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(urlVars[0].indexOf("amp;")!=-1)urlVars[0]=urlVars[0].substring(4);varArray[i]=this.encVar(urlVars[0],urlVars[1])}return varArray.join("&")};this.encodeVAR=
function(b){b=b.toString();b=b.replace(/\+/g,"%2B");b=b.replace(/\=/g,"%3D");b=b.replace(/\?/g,"%3F");return b=b.replace(/\&/g,"%26")};this.runResponse=function(){var b=new Date,a=false;b=b.getTime();var d=/<script.*?>(.|[\r\n])*?<\/script>/ig,c=d.exec(this.response);if(c!=null){var f=new Array(c.shift());for(a=true;c;){c=d.exec(this.response);c!=null&&f.push(c.shift())}for(d=0;d<f.length;d++)this.response=this.response.replace(f[d],'<span id="'+b+d+'" style="display:none;"></span>')}if(this.add_html)this.elementObj.innerHTML+=
this.response;else this.elementObj.innerHTML=this.response;if(a){a=/<script.*?>((.|[\r\n])*?)<\/script>/ig;for(d=0;d<f.length;d++){var e=document.getElementById(b+""+d);c=e.parentNode;c.removeChild(e);a.lastIndex=0;e=a.exec(f[d]);c=c.appendChild(document.createElement("script"));c.text=e[1];e=f[d].substring(f[d].indexOf(" ",0),f[d].indexOf(">",0)).split(" ");if(e.length>1)for(var h=0;h<e.length;h++)if(e[h].length>0){var g=e[h].split("=");g[1]=g[1].substr(1,g[1].length-2);c.setAttribute(g[0],g[1])}}}};
this.sendAJAX=function(b){this.responseStatus=new Array(2);if(this.failed&&this.AjaxFailedAlert)alert(this.AjaxFailedAlert);else{if(b)this.URLString=this.URLString.length?this.URLString+"&"+b:b;if(this.encodeURIString){b=(new Date).getTime();this.URLString=this.encodeURLString(this.URLString);this.setVar("rndval",b)}if(this.element)this.elementObj=document.getElementById(this.element);if(this.xmlhttp){var a=this;this.method=="GET"?this.xmlhttp.open(this.method,this.requestFile+"?"+this.URLString,
true):this.xmlhttp.open(this.method,this.requestFile,true);if(this.method=="POST")try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(d){}this.xmlhttp.send(this.URLString);this.xmlhttp.onreadystatechange=function(){switch(a.xmlhttp.readyState){case 1:a.onLoading();break;case 2:a.onLoaded();break;case 3:a.onInteractive();break;case 4:a.response=a.xmlhttp.responseText;a.responseXML=a.xmlhttp.responseXML;a.responseStatus[0]=a.xmlhttp.status;a.responseStatus[1]=
a.xmlhttp.statusText;a.onHide();a.onCompletion(a.response);if(a.elementObj){var c=a.elementObj.nodeName;c=c.toLowerCase();if(c=="input"||c=="select"||c=="option"||c=="textarea")if(a.response=="error")DLEalert("This action can not be completed. Access denied.","info");else if(a.add_html)a.elementObj.value+=a.response;else a.elementObj.value=a.response;else if(a.response=="error")DLEalert("This action can not be completed. Access denied.","info");else if(a.execute)a.runResponse();else if(a.add_html)a.elementObj.innerHTML+=
a.response;else if(a.effect=="left")$("#"+a.element).hide("slide",{direction:"left"},500).html(a.response).show("slide",{direction:"right"},500);else if(a.effect=="right")$("#"+a.element).hide("slide",{direction:"right"},500).html(a.response).show("slide",{direction:"left"},500);else if(a.effect=="fade")$("#"+a.element).fadeOut(500,function(){$(this).html(a.response);$(this).fadeIn(500)});else a.elementObj.innerHTML=a.response;if(a.effect=="blind"&&a.response!="error"&&document.getElementById("blind-animation")){$("html"+
(!$.browser.opera?",body":"")).animate({scrollTop:$("#"+a.element).position().top-70},1100);setTimeout(function(){$("#blind-animation").show("blind",{},1500,function(){document.getElementById("dle-captcha")&&reload()})},1100)}}a.URLString="";break}}}}};this.createAJAX()};
