var WebthitethLoggingJs = function() {};;
WebthitethLoggingJs.__logLevel__ = false;;
WebthitethLoggingJs.__logWindow__ = false;;
WebthitethLoggingJs.__logWindowHolder__ = false;;
WebthitethLoggingJs.setupLogging = function () {
if ((! (WebthitethLoggingJs.__logWindow__ !== false)) !== false) {
WebthitethLoggingJs.__logWindow__ = function () {
 return function() {
var newElem = document.createElement ("DIV");
newElem.style.width = "480px";

newElem.style.height = "580px";

newElem.style.overflow = "auto";

newElem.style.backgroundColor = "black";

newElem.style.opacity = ".2";

newElem.style.padding = "10px";

newElem.zIndex = 20;

newElem.style.filter = "alpha(opacity=20)";

WebthitethJs.appendChild (newElem,function () {
 return function() {
var newElem = document.createElement ("IMG");
newElem.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wDFhMVLffwoy8AAAEeSURBVDjLrZPNisJAEIQny0K86ov4hr5BjkECufoKJnjwbsCgBELAoAbmGKKHOYyG8dvTSnaT7A+xjzVMdXdVtQUghtQQAoC3JhBF0a9kYRjSOUGaphhjyLKsl8RxHADquub5t7lCkiQopcjzvEUym80A0Frzpfl3Dc7nM1VVsdlsnrjneQCcTida03eJKKUEIIoigiCgLEuUUnQa0OdCHMcAVFWFMYY/udCs4/EohBBiPB6L7Xb7vxz4vs/9fkdKSZqmALTs61thsVigtaaJHw4Hbrcby+XyZxFd1wXger22uhVFQV3XrFarbhvn8zlaay6XS2+Q9vs9AOv1+hmk98/HyWQibNsWo9HI6iOYTqfWbrfj8Xi87pisoef8AZQ9LI483XZRAAAAAElFTkSuQmCC";

newElem.style.top = "4px";

newElem.style.right = "4px";

newElem.style.position = "absolute";

newElem.style.cursor = "pointer";

newElem.onclick = function () {
 return WebthitethJs.hide (WebthitethLoggingJs.__logWindowHolder__);
};

 return newElem;}();
} ());

 return newElem;}();
} ();
WebthitethJs.addEvent (WebthitethLoggingJs.__logWindow__,"mouseover",function () {
WebthitethLoggingJs.__logWindow__.style.filter = "alpha(opacity=100)";

 return WebthitethLoggingJs.__logWindow__.style.opacity = "1.0";
});
WebthitethJs.addEvent (WebthitethLoggingJs.__logWindow__,"mouseout",function () {
WebthitethLoggingJs.__logWindow__.style.filter = "alpha(opacity=20)";

 return WebthitethLoggingJs.__logWindow__.style.opacity = "0.2";
});
WebthitethLoggingJs.__logWindowHolder__ = function () {
 return function() {
var newElem = document.createElement ("DIV");
newElem.style.position = "fixed";

newElem.style.right = "10px";

newElem.style.top = "10px";

newElem.style.zIndex = 20;

newElem.style.width = "500px";

newElem.style.height = "600px";

newElem.style.border = "2px solid black";

WebthitethJs.appendChild (newElem,WebthitethLoggingJs.__logWindow__);

 return newElem;}();
} ();
document.body.appendChild (WebthitethLoggingJs.__logWindowHolder__);
;
} ;

 return WebthitethJs.show (WebthitethLoggingJs.__logWindowHolder__);
};
;
WebthitethLoggingJs.logMsg = function (msg,level,color,levelTxt) {
 return function() {if ((WebthitethLoggingJs.__logLevel__ !== false && (WebthitethLoggingJs.__logLevel__ <= level) !== false) !== false) {
 return function() {
var now = new Date();
var msgTxt = document.createTextNode (msg);
WebthitethLoggingJs.setupLogging ();

if ((300 < (WebthitethLoggingJs.__logWindow__.childNodes || []).length) !== false) {
WebthitethLoggingJs.__logWindow__.removeChild (function(lst){return lst && lst.length > 0 && lst[0];}(WebthitethLoggingJs.__logWindow__.childNodes));
;
} ;

WebthitethLoggingJs.__logWindow__.appendChild (function () {
 return function() {
var newElem = document.createElement ("DIV");
newElem.style.width = "480px";

WebthitethJs.appendChild (newElem,function () {
 return function() {
var newElem = document.createElement ("SPAN");
newElem.style.color = "white";

WebthitethJs.appendChild (newElem,"[");

WebthitethJs.appendChild (newElem,now.getFullYear ());

WebthitethJs.appendChild (newElem,now.getMonth ());

WebthitethJs.appendChild (newElem,now.getDate ());

WebthitethJs.appendChild (newElem,"-");

WebthitethJs.appendChild (newElem,now.getHours ());

WebthitethJs.appendChild (newElem,":");

WebthitethJs.appendChild (newElem,now.getMinutes ());

WebthitethJs.appendChild (newElem,":");

WebthitethJs.appendChild (newElem,now.getSeconds ());

WebthitethJs.appendChild (newElem,"] ");

 return newElem;}();
} ());

WebthitethJs.appendChild (newElem,function () {
 return function() {
var newElem = document.createElement ("SPAN");
newElem.style.color = color;

WebthitethJs.appendChild (newElem,levelTxt);

 return newElem;}();
} ());

WebthitethJs.appendChild (newElem,function () {
 return function() {
var newElem = document.createElement ("SPAN");
newElem.style.color = "white";

WebthitethJs.appendChild (newElem," - ");

WebthitethJs.appendChild (newElem,msgTxt);

 return newElem;}();
} ());

 return newElem;}();
} ());

 return WebthitethLoggingJs.__logWindow__.scrollTop = 40000;}();;
}  else { return false; }}();
};
;
WebthitethLoggingJs.logDebug = function (msg) {
 return WebthitethLoggingJs.logMsg (msg,0,"#BBBBBB","Debug");
};
;
WebthitethLoggingJs.logInfo = function (msg) {
 return WebthitethLoggingJs.logMsg (msg,1,"white","Info");
};
;
WebthitethLoggingJs.logError = function (msg) {
 return WebthitethLoggingJs.logMsg (msg,2,"red","ERROR");
};
;
WebthitethLoggingJs.__errorCallback__ = false;;
WebthitethLoggingJs.setLogLevel = function (level) {
window.onerror = function (m,u,l) {
if (WebthitethLoggingJs.__errorCallback__ !== false) {
WebthitethLoggingJs.__errorCallback__ (m,u,l);
;
} ;

WebthitethLoggingJs.logError ((m + " (" + u + ":" + l + ")"));

 return true;
};

 return WebthitethLoggingJs.__logLevel__ = function() {if ((level === "debug") !== false) {
 return 0;;
}  else if ((level === "info") !== false) {
 return 1;;
}  else if ((level === "error") !== false) {
 return 2;;
}  else { return false; }}();
};
;
