var JSLog={Version:"0.1",active:true,name:"JSLog",popupHref:"logger/logger.htm",activateConsole:true,activateRegisterBean:false};function CW_logger(){}CW_logger.prototype={LEVEL_ERROR:"error",LEVEL_JSLOG:"JSLog",LEVEL_COMWEB_AJAX:"ComwebAjax",LEVEL_WARNING:"Warning",LEVEL_NOTICE:"NOTICE",LEVEL_INFORMATION:"Information",logTime:function(A){},log:function(B,A){},showPopup:function(){},changeLevelLog:function(B,A){},initDivConsole:function(){},setDivConsole:function(A){},registerComwebBean:function(B,C,A){},getVersion:function(){},getLevelLog:function(){}};function Logger_Activ(){this.initialize()}Logger_Activ.prototype={popup:null,levelLog:null,divConsole:null,divTime:null,waitedMsg:new Array(),waitedComwebBean:new Array(),initialize:function(){this.levelLog=new Array();this.levelLog.push(new jsLog_level(this.LEVEL_ERROR,1,true));this.levelLog.push(new jsLog_level(this.LEVEL_JSLOG,2,true));this.levelLog.push(new jsLog_level(this.LEVEL_COMWEB_AJAX,3,true));this.levelLog.push(new jsLog_level(this.LEVEL_WARNING,4,true));this.levelLog.push(new jsLog_level(this.LEVEL_NOTICE,5,true));this.levelLog.push(new jsLog_level(this.LEVEL_INFORMATION,5,true))},logTime:function(A){if(this.divTime!=null){this.divTime.innerHTML+="<div id='row'>"+A+"</div>"}},log:function(C,A){if(JSLog.activateConsole){this.initDivConsole();if(!this.divConsole){this.waitedMsg.push("<div id='row'><div id='JSLog"+C+"Txt'>"+C+":&nbsp;&nbsp;</div>"+A+"<div id='hrEnd'> </div></div>")}else{this.divConsole.innerHTML=this.divConsole.innerHTML+"<div id='row'><div id='JSLog"+C+"Txt'>"+C+":&nbsp;&nbsp;</div>"+A+"<div id='hrEnd'> </div></div>";try{this.divConsole.scrollTop=this.divConsole.scrollHeight-25}catch(B){}}}},showPopup:function(){if(this.popup==null){this.popup=window.open(JSLog.popupHref,JSLog.name,"width=450,height=420,dependent=yes,resizable=yes,scrollbars=yes")}},changeLevelLog:function(B,A){for(i=0;i<this.levelLog.length;i++){var C=this.levelLog[i];if(C.name==B){C.activ=A;this.log("JSLog","change log "+B+" active:"+A)}}},initDivConsole:function(){if(this.divConsole==null){this.divConsole=document.getElementById("Console_Content")}},setDivConsole:function(D){this.divConsole=D;this.log("JSLog","Welcome to the JS-Log Logger");if(this.waitedMsg.length>0){this.waitedMsg.reverse();var C="";while(this.waitedMsg.length>0){C=C+this.waitedMsg.pop()}this.divConsole.innerHTML=this.divConsole.innerHTML+C;try{this.divConsole.scrollTop=this.divConsole.scrollHeight-25}catch(B){}}if(this.waitedComwebBean.length>0){while(this.waitedComwebBean.length>0){var A=this.waitedComwebBean.shift();this.popup.registerComwebBean(A.comwebBean,A.callback,A.url)}}},setDivTime:function(A){this.divTime=A},registerComwebBean:function(B,D,A){if(JSLog.activateRegisterBean){if(this.popup!=null){try{this.popup.registerComwebBean(B,D,A)}catch(C){this.waitedComwebBean.push(new tmpRegisterComwebBean(B,D,A));this.log("JSLog","waited comwebBean: "+D+" - "+A+" ||e:"+C)}}}},getVersion:function(){return JSLog.Version},getLevelLog:function(){return this.levelLog}};Logger_Activ.prototype=Object.extend(new CW_logger(),Logger_Activ.prototype);var CW_logger=new CW_logger();function jsLog_level(A,B,C){this.name=A;this.level=B;this.activ=C}function tmpRegisterComwebBean(C,B,A){this.comwebBean=C;this.url=B;this.callback=A};