function LogDebug(a){getTopAppWindow().log&&getTopAppWindow().log.append(a)}function Log(a){this.enabled=a;this.log="";this.clearButton=this.textArea=this.window=null;this.windowHeight=this.windowWidth=400}Log.prototype.append=function(a){this.enabled&&(this.log+=a+"\n",null!=this.window&&(this.textArea.value=this.log))}; Log.prototype.show=function(){if(this.enabled){this.window=window.open();this.textArea=this.window.document.createElement("textarea");this.textArea.value=this.log;this.textArea.style.width="100%";this.textArea.style.height="369px";this.clearButton=this.window.document.createElement("button");var a=this.window.document.createElement("div");a.appendChild(this.textArea);this.window.document.body.appendChild(a);a=this.window.document.createElement("div");a.appendChild(this.clearButton);this.window.document.body.appendChild(a); this.clearButton.value="Clear";var b=this;this.clearButton.onclick=function(){b.clear()};this.window.document.body.onclose=function(){b.window=null;alert("alertums")}}};Log.prototype.hide=function(){this.window.close();this.window=null};Log.prototype.clear=function(){this.enabled&&(this.log="",null!=this.window&&(this.textArea.value=this.log))};