var Debug=window.Debug={_level:1,run:false,start:function(_1){
this.run=true;
this._level=_1;
this.Tracer.open();
},stop:function(){
this.run=false;
},now:function(){
if(this.run){
return eval("debugger");
}
}};
Debug.Tracer={buffer:[],logFrame:null,_add:function(_2,_3,_4,_5){
try{
if(_4==null){
_4=0;
}
if(_5==null){
_5="";
}
if(_4>Debug._level){
return;
}
if(this.logFrame&&this.logFrame.addLine){
this.logFrame.addLine(_2,_3,_5);
}else{
try{
this.buffer[this.buffer.length]={label:_2,descr:_3,style:_5};
}
catch(e){
this.buffer=[];
this.buffer[this.buffer.length]={label:_2,descr:_3,style:_5};
}
}
try{
if(PGHost!=null){
var re=/<.*?>/g;
PGHost.trace(" SCOWRAPPER : "+_2.replace(re,"")+" : "+_3.replace(re,""));
}
}
catch(e){
}
}
catch(e){
}
},displayCache:function(){
if(!this.buffer.length){
return;
}
if(this.logFrame&&this.logFrame.addLine){
var b=this.buffer;
for(var i=0;i<b.length;i++){
if(b[i]){
this.logFrame.addLine(b[i].label,b[i].descr,b[i].style);
}
}
this.buffer=[];
}
},error:function(_9,_a,_b){
this._add(_9,_a,_b,"error");
},warn:function(_c,_d,_e){
this._add(_c,_d,_e,"warning");
},log:function(_f,_10,_11,_12){
this._add(_f,_10,_11,_12);
},success:function(_13,_14,_15){
this._add(_13,_14,_15,"success");
},open:function(url){
if(url==null){
url=WApplication.baseUrl+"pages/log.htm";
}
var _17="status=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no";
var _18=screen.availWidth,_19=300;
var _1a=(screen.availHeight-_19),_1b=0;
_17+=",width="+_18;
_17+=",height="+_19;
_17+=",left="+_1b;
_17+=",top="+_1a;
var _1c=window.open("","",_17);
_1c.location=url;
_1c.focus();
_1c.moveTo(_1b,_1a);
_1c.resizeTo(_18,_19);
},setLogFrame:function(o){
this.logFrame=o;
this.displayCache();
},getLogFrame:function(){
return this.logFrame;
}};
window.onerror=function onerror(_1e,url,_20){
Debug.Tracer.warn("error at line "+_20+":"+_1e+" in "+url);
};
Debug.ChronoWatch=function(id,_22){
this.id=id;
this.label=_22;
};
Debug.ChronoWatch.prototype={elapsedTime:0,startAt:null,running:false,start:function(){
this.startAt=new Date();
this.running=true;
},stop:function(){
if(this.running){
this.elapsedTime+=new Date()-this.startAt;
}
this.running=false;
},toString:function(){
return this.label+" : <b>"+this.elapsedTime+" ms</b>";
}};
Debug.Chronos={watches:[],add:function(id,_24){
var cw=new Debug.ChronoWatch(id,_24);
this.watches[id]=cw;
cw.start();
},resume:function(id){
var cw=this.watches[id];
if(cw){
cw.start();
}
},stop:function(id){
var cw=this.watches[id];
if(cw){
cw.stop();
Debug.Tracer.log("<b>log duration</b>",cw.toString(),1,"duration");
}
},display:function(){
}};

