var R7={H:0,r:1,b:2,D:3,V:4};var CR={V:0,b:1,D:2};function X8(b){this.o=b;this.V=new Array();this.H=true;}function WI(b){return this.V[b];}X8.prototype.D=WI;function RJ(){this.V.length=0;}X8.prototype.h=RJ;function fZ(){return IZ.S(this.V);}X8.prototype.S=fZ;function Xj(){return this.V.length;}X8.prototype.e=Xj;function pk(){return this.o;}X8.prototype.q=pk;function Gb(b){while((this.H)&&(this.V.length>(this.o-1))){this.V.shift();}this.V.push(b);}X8.prototype.l=Gb;function mm(){this.H=false;}X8.prototype.r=mm;function Qm(){this.H=true;while(this.V.length>this.o){this.V.shift();}}X8.prototype.b=Qm;var Fn=new X8(250);var ov=null;var Sj=R7.H;var EP=null;var aB=CR.V;function eq(){if(rD){we(R7.D);BI(CR.V);}else{we(R7.H);BI(CR.V);}}function we(b){Sj=b;}function zq(){return Sj;}function BI(b){aB=b;}function Qq(){return aB;}function hv(b){if(rD){var V=zq();if((V!=R7.H)&&(null==b||(b!=R7.H&&b<=V))){return true;}}return false;}function On(b,V){switch(b){case R7.H:ret="OFF";break;case R7.r:ret="ERROR";break;case R7.b:ret="WARN";break;case R7.D:ret="INFO";break;case R7.V:ret="DEBUG";break;default:if(null==V){ret="INFO";}else{ret=V;}}return ret;}function AZ(b){var V="%s-%s-%s %s:%s:%s,%s";var D=b.getMonth()+1;var r=b.getDate();return V.printf(b.getFullYear(),(D<10)?"0"+D:D,(r<10)?"0"+r:r,b.getHours(),b.getMinutes(),b.getSeconds(),b.getMilliseconds());}function kX(b,V,D){this.D=b;this.V=V;this.r=D;}function Lk(){return this.D;}kX.prototype.h=Lk;function Ol(){return this.V;}kX.prototype.S=Ol;function MP(){return this.r;}kX.prototype.H=MP;function sj(){var V="%s  %s - %s";return V.printf(AZ(this.V),On(this.D),this.r);}kX.prototype.b=sj;function dA(b,V){if(!pd.o){return ;}if(null==V){V=true;}var D=true;var r=new X2.S(nW("remotelog"),V,null,null,null,D);var H=r.D("remoteClientLog",ax);var S=QM.K.createElement("messages");for(var h=0,len=b.length;h<len;h++){var l=b[h];var o=l.b().replace(/\n/g,"; ");var q=QM.h("message",o);q.setAttribute("level",On(l.h()));S.appendChild(q);}H.h(S);r.b.add("no.report.faults",true);r.V.d();}function qQ(b,V){if(V==null){V=R7.D;}if(!hv(V)){return ;}var D=(Qq()==CR.b||Qq()==CR.D);var r=(Qq()==CR.V||Qq()==CR.D);if(D){var H=new kX(V,new Date(),b);dA(new Array(H));if(!r){return ;}}if(!sI(window)){var S=Fm();if(S){S.qQ(b,V);}}else{var H=new kX(V,new Date(),WN(b,false,false,false));Fn.l(H);if(ov==null){return ;}var h;try{if(ov!=null&&ov.closed){return ;}}catch(h){}if(null==EP||H.h()==EP){Tz(ov,H.h(),H.S(),H.H());}}}function Pc(){if(zq()<R7.D){we(R7.D);}Fn.r();if(!sI(window)){var b=Fm();b.Pc();}else{if(ov){var V;try{if(!ov.closed){return ;}}catch(V){}}var D="";D+="<HTML>";D+="  <HEAD>";D+="    <TITLE>Log Console</TITLE>";D+="    <STYLE type=\"text/css\">";D+="BODY { margin:5px; font-family:tahoma, helvetica, arial, sans-serif; font-size:10px; }";D+=".header { font-size:10px; background-color:#EEEEEE; padding:3px; }";D+=".logEntry { font-size:10px; font-size:10px; padding:3px; }";D+="TEXTAREA { font-family:tahoma, helvetica, arial, sans-serif; font-size:10px; }";D+="    </STYLE>";D+="  </HEAD>";D+="  <BODY onload=\"opener."+"zT"+"(window);\" ";D+="  onunload=\"opener."+"We"+"(window);\" ";D+="    <INPUT type=\"button\" value=\"All\" onclick=\"opener."+"zT"+"(window);\">";if(zq()>=R7.r){D+="    <INPUT type=\"button\" value=\"Errors\" onclick=\"opener."+"zT"+"(window, "+R7.r+");\">";}if(zq()>=R7.b){D+="    <INPUT type=\"button\" value=\"Warnings\" onclick=\"opener."+"zT"+"(window, "+R7.b+");\">";}if(zq()>=R7.D){D+="    <INPUT type=\"button\" value=\"Messages\" onclick=\"opener."+"zT"+"(window, "+R7.D+");\">";}if(zq()>=R7.V){D+="    <INPUT type=\"button\" value=\"Debug\" onclick=\"opener."+"zT"+"(window, "+R7.V+");\">";}if(Qq()==CR.V){D+="    <INPUT type=\"button\" value=\"Flush Log to Server\" onclick=\"opener."+"VW"+"(window);\">";}D+="    <INPUT type=\"button\" value=\"Clear Log\" onclick=\"opener."+"uE"+"(window);\">";D+="    <BR><BR>";D+="    <TABLE cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"width:100%;\">";D+="      <TR>";D+="        <TD class=\"header\" style=\"width:62px;\" align=\"center\">Type</TD>";D+="        <TD class=\"header\" style=\"width:140px;\" align=\"center\">Time</TD>";D+="        <TD class=\"header\" align=\"center\">Content</TD>";D+="      </TR>";D+="      <TR>";D+="        <TD colspan=\"3\" valign=\"top\">";D+="          <DIV style=\"overflow:auto;width:100%;height:400px;\">";D+="            <TABLE id=\"logTable\" cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"width:100%;\">";D+="            </TABLE>";D+="          </DIV>";D+="        </TD>";D+="      </TR>";D+="    </TABLE>";D+="  </BODY>";D+="</HTML>";ov=window.open("","_blank","height=500,width=700,location=no,menubar=no,toolbar=no,scrollbars=no,resizable=yes,status=yes");ov.document.open();ov.document.write(D);ov.document.close();}}function VW(b){dA(Fn.S());uE(b);}function uE(b){var V=b.document.getElementById("logTable");while(V.rows.length>0){V.deleteRow(0);}Fn.h();}function We(b){Fn.b();}function Tz(b,V,D,r){var H;var S;var h=b.document.getElementById("logTable");H=h.insertRow(-1);S=H.insertCell(-1);S.style.width="60px";S.className="logEntry";S.align="center";S.innerHTML=On(V);S=H.insertCell(-1);S.style.width="140px";S.className="logEntry";S.align="center";S.innerHTML=AZ(D);S=H.insertCell(-1);S.className="logEntry";S.innerHTML=r;h.scrollIntoView(false);}function zT(b,V){var D=b.document.getElementById("logTable");while(D.rows.length>0){D.deleteRow(0);}for(var r=0;r<Fn.e();r++){var H=Fn.D(r);if(V==null||H.h()==V){Tz(b,H.h(),H.S(),H.H());}}EP=V;}
