text: if(!window.DEXT5Solution){window.DEXT5Solution=function(){Array.prototype.shift||(Array.prototype.shift=function(){if(0<this.length){for(var d=this[0],c=0,f=this.length-1;c<f;c++)this[c]=this[c+1];this.length--;return d}});var h={log4javascript:null,logType:"console",consoleLog:null,initConsoleLog:function(){this.consoleLog=window.console||{log:function(){}}},writeLog:function(d,c,f,h){c=c.toLowerCase();null!=h&&0<h.length?f+=", param: "+Array.prototype.slice.call(h,0).join(", "):null==h&&(f+=", param: null");
  switch(c){case "info":dext5SolutionLog.info(d+" "+f);break;case "trace":dext5SolutionLog.trace(d+" "+f);break;case "debug":dext5SolutionLog.debug(d+" "+f);break;case "warn":dext5SolutionLog.warn(d+" "+f);break;case "error":dext5SolutionLog.error(d+" "+f);break;case "fatal":dext5SolutionLog.fatal(d+" "+f)}},InitializationLog:function(){function d(){function a(g){try{return Boolean(g.loaded)}catch(b){return!1}}function f(){var d=setInterval(function(){k?clearInterval(d):Boolean(e)&&a(e)&&(clearInterval(d),
  k=!0,b())},100)}function c(){try{if("console"==h.logType)return!0;if(!d){if(e.closed)return d=!0,!1;!k&&e.loaded&&(k=!0)}return k&&!d}catch(a){return d=!0,!1}}function q(a,g){for(var b=""+a;b.length<g;)b="0"+b;return b}function b(){if(c())for(;0<l.length;){for(var a=l.shift(),g=a.timeStamp,g=q(g.getHours(),2)+":"+q(g.getMinutes(),2)+":"+q(g.getSeconds(),2)+" ",b=a.level.name;5>b.length;)b+=" ";g=g+b+" - "+a.getCombinedMessages();(b=a.getThrowableStrRep())&&(g+="\r\n"+b);-1<g.indexOf("#separator#")&&
  (g=g.replace("#separator#",""));"html"==h.logType?e.log(a.level,g):h.consoleLog&&h.consoleLog.log(g)}}var e=null,d=!1,k=!1,m=!1,l=[];this.append=function(q){if(!m)if("html"==h.logType){var p="log4javascriptLitePopUp"+location.host.replace(/[^a-z0-9]/gi,"_");e=window.open("",p,"width=600,height=400,status,resizable");d=!1;if(e)if(a(e))e.mainPageReloaded(),k=!0,b();else{var p=e.document,n=['<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
  '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">',"\t<head>","\t\t<title>DEXT5 Solution Log</title>",'\t\t<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />',"\t\t\x3c!-- Make IE8 behave like IE7, having gone to all the trouble of making IE work --\x3e",'\t\t<meta http-equiv="X-UA-Compatible" content="IE=7" />','\t\t<script type="text/javascript">',"\t\t\t//<![CDATA[","\t\t\tvar loggingEnabled = true;","\t\t\tvar messagesBeforeDocLoaded = [];","","\t\t\tfunction toggleLoggingEnabled() {",
  '\t\t\t\tsetLoggingEnabled($("enableLogging").checked);',"\t\t\t}","","\t\t\tfunction setLoggingEnabled(enable) {","\t\t\t\tloggingEnabled = enable;","\t\t\t}","","\t\t\tfunction scrollToLatestEntry() {","\t\t\t\tvar l = getLogContainer();",'\t\t\t\tif (typeof l.scrollTop != "undefined") {',"\t\t\t\t\tvar latestLogEntry = l.lastChild;","\t\t\t\t\tif (latestLogEntry) {","\t\t\t\t\t\tl.scrollTop = l.scrollHeight;","\t\t\t\t\t}","\t\t\t\t}","\t\t\t}","","\t\t\tfunction log(logLevel, formattedMessage) {",
  "\t\t\t\tif (loggingEnabled) {","\t\t\t\t\tif (loaded) {","\t\t\t\t\t\tdoLog(logLevel, formattedMessage);","\t\t\t\t\t} else {","\t\t\t\t\t\tmessagesBeforeDocLoaded.push([logLevel, formattedMessage]);","\t\t\t\t\t}","\t\t\t\t}","\t\t\t}","","\t\t\tfunction doLog(logLevel, formattedMessage) {",'\t\t\t\tvar logEntry = document.createElement("div");',"\t\t\t\tlogEntry.appendChild(document.createTextNode(formattedMessage));",'\t\t\t\tlogEntry.className = "logentry " + logLevel.name;',"\t\t\t\tgetLogContainer().appendChild(logEntry);",
  "\t\t\t\tscrollToLatestEntry();","\t\t\t}","","\t\t\tfunction mainPageReloaded() {",'\t\t\t\tvar separator = document.createElement("div");','\t\t\t\tseparator.className = "separator";','\t\t\t\tseparator.innerHTML = "&nbsp;";',"\t\t\t\tgetLogContainer().appendChild(separator);","\t\t\t}","","\t\t\tvar loaded = false;",'\t\t\tvar logLevels = ["DEBUG", "INFO", "WARN", "ERROR", "FATAL"];',"","\t\t\twindow.onload = function() {","\t\t\t\tsetLogContainerHeight();","\t\t\t\ttoggleLoggingEnabled();","\t\t\t\tfor (var i = 0; i < messagesBeforeDocLoaded.length; i++) {",
  "\t\t\t\t\tdoLog(messagesBeforeDocLoaded[i][0], messagesBeforeDocLoaded[i][1]);","\t\t\t\t}","\t\t\t\tmessagesBeforeDocLoaded = [];","\t\t\t\tloaded = true;","","\t\t\t\t// Workaround to make sure log div starts at the correct size","\t\t\t\tsetTimeout(setLogContainerHeight, 20);","\t\t\t};","","\t\t\tfunction getLogContainer() {",'\t\t\t\treturn $("log");',"\t\t\t}","","\t\t\tfunction clearLog() {",'\t\t\t\tgetLogContainer().innerHTML = "";',"\t\t\t}","","\t\t\t/* ------------------------------------------------------------------------- */",
  "","\t\t\t// Other utility functions","","\t\t\t// Syntax borrowed from Prototype library","\t\t\tfunction $(id) {","\t\t\t\treturn document.getElementById(id);","\t\t\t}","","\t\t\tfunction getWindowHeight() {","\t\t\t\tif (window.innerHeight) {","\t\t\t\t\treturn window.innerHeight;","\t\t\t\t} else if (document.documentElement && document.documentElement.clientHeight) {","\t\t\t\t\treturn document.documentElement.clientHeight;","\t\t\t\t} else if (document.body) {","\t\t\t\t\treturn document.body.clientHeight;",
  "\t\t\t\t}","\t\t\t\treturn 0;","\t\t\t}","","\t\t\tfunction getChromeHeight() {",'\t\t\t\treturn $("toolbar").offsetHeight;',"\t\t\t}","","\t\t\tfunction setLogContainerHeight() {","\t\t\t\tvar windowHeight = getWindowHeight();",'\t\t\t\t$("body").style.height = getWindowHeight() + "px";','\t\t\t\tgetLogContainer().style.height = "" +','\t\t\t\t\tMath.max(0, windowHeight - getChromeHeight()) + "px";',"\t\t\t}","","\t\t\twindow.onresize = function() {","\t\t\t\tsetLogContainerHeight();","\t\t\t};",
  "","\t\t\t//]]\x3e","\t\t\x3c/script>",'\t\t<style type="text/css">',"\t\t\tbody {","\t\t\t\tbackground-color: white;","\t\t\t\tcolor: black;","\t\t\t\tpadding: 0;","\t\t\t\tmargin: 0;","\t\t\t\tfont-family: tahoma, verdana, arial, helvetica, sans-serif;","\t\t\t\toverflow: hidden;","\t\t\t}","","\t\t\tdiv#toolbar {","\t\t\t\tborder-top: solid #ffffff 1px;","\t\t\t\tborder-bottom: solid #aca899 1px;","\t\t\t\tbackground-color: #f1efe7;","\t\t\t\tpadding: 3px 5px;","\t\t\t\tfont-size: 68.75%;","\t\t\t}",
  "","\t\t\tdiv#toolbar input.button {","\t\t\t\tpadding: 0 5px;","\t\t\t\tfont-size: 100%;","\t\t\t}","","\t\t\tdiv#log {","\t\t\t\tfont-family: Courier New, Courier;","\t\t\t\tfont-size: 75%;","\t\t\t\twidth: 100%;","\t\t\t\toverflow: auto;","\t\t\t\tclear: both;","\t\t\t}","","\t\t\t*.logentry {","\t\t\t\toverflow: visible;","\t\t\t\twhite-space: pre;","\t\t\t}","","\t\t\t*.TRACE {","\t\t\t\tcolor: #666666;","\t\t\t}","","\t\t\t*.DEBUG {","\t\t\t\tcolor: green;","\t\t\t}","","\t\t\t*.INFO {","\t\t\t\tcolor: #000099;",
  "\t\t\t}","","\t\t\t*.WARN {","\t\t\t\tcolor: #999900;","\t\t\t}","","\t\t\t*.ERROR {","\t\t\t\tcolor: red;","\t\t\t}","","\t\t\t*.FATAL {","\t\t\t\tcolor: #660066;","\t\t\t}","","\t\t\tdiv#log div.separator {","\t\t\t\tbackground-color: #cccccc;","\t\t\t\tmargin: 5px 0;","\t\t\t\tline-height: 1px;","\t\t\t}","\t\t</style>","\t</head>","",'\t<body id="body">','\t\t<div id="toolbar">',"\t\t\tOptions:",'\t\t\t<input type="checkbox" id="enableLogging" onclick="toggleLoggingEnabled()" class="stateful" checked="checked" title="Enable/disable logging" /><label for="enableLogging" id="enableLoggingLabel">Enable logging</label>',
  '\t\t\t<input type="button" id="clearButton" value="Clear" onclick="clearLog()" class="stateful button" title="Clear all log messages"  />','\t\t\t<input type="button" id="closeButton" value="Close" onclick="window.close()" class="stateful button" title="Close the window" />',"\t\t</div>",'\t\t<div id="log" class="TRACE DEBUG INFO WARN ERROR FATAL"></div>',"\t</body>","</html>"];p.open();for(var t=0,r=n.length;t<r;t++)p.writeln(n[t]);p.close();a(e)?(k=!0,b()):f()}else alert("log4javascript: pop-up windows appear to be blocked. Please unblock them to use pop-up logging.");
  m=!0}else h.initConsoleLog();l.push(q);c()&&b()}}function c(){var g=new d,c=a.ALL;this.log=function(d,c){var b=this.getLevel();if(0<c.length){var b=c[0],e="all";-1<b.toLowerCase().indexOf("[dext5 editor]")?e=DEXT5.logLevel.toLowerCase():-1<b.toLowerCase().indexOf("[dext5 upload]")?e=DEXT5UPLOAD.logLevel.toLowerCase():-1<b.toLowerCase().indexOf("[dext5 photo]")&&(e=DEXT5PHOTO.logLevel.toLowerCase());switch(e){case "all":b=a.ALL;break;case "trace":b=a.TRACE;break;case "debug":b=a.DEBUG;break;case "info":b=
  a.INFO;break;case "warn":b=a.WARN;break;case "error":b=a.ERROR;break;case "fatal":b=a.FATAL;break;default:b=a.DEBUG}}if(f&&d.isGreaterOrEqual(b)){var h,b=c.length-1,e=c[c.length-1];1<c.length&&e instanceof Error&&(h=e,b--);for(var e=[],k=0;k<=b;k++)e[k]=c[k];h=new l(this,new Date,d,e,h);g.append(h)}};this.setLevel=function(a){c=a};this.getLevel=function(){return c}}this.log4javascript=new function(){};this.log4javascript.version="1.4.13";this.log4javascript.edition="log4javascript_lite";var f="undefined"!=
  typeof log4javascript_disabled&&log4javascript_disabled?!1:!0;this.log4javascript.setEnabled=function(a){f=Boolean(a)};this.log4javascript.isEnabled=function(){return f};var r=!1;this.log4javascript.setShowStackTraces=function(a){r=Boolean(a)};var a=function(a,c){this.level=a;this.name=c};a.prototype={toString:function(){return this.name},equals:function(a){return this.level==a.level},isGreaterOrEqual:function(a){return this.level>=a.level}};a.ALL=new a(Number.MIN_VALUE,"ALL");a.TRACE=new a(1E4,"TRACE");
  a.DEBUG=new a(2E4,"DEBUG");a.INFO=new a(3E4,"INFO");a.WARN=new a(4E4,"WARN");a.ERROR=new a(5E4,"ERROR");a.FATAL=new a(6E4,"FATAL");a.OFF=new a(Number.MAX_VALUE,"OFF");this.log4javascript.Level=a;this.log4javascript.Appender=d;c.prototype={trace:function(){this.log(a.TRACE,arguments)},debug:function(){this.log(a.DEBUG,arguments)},info:function(){this.log(a.INFO,arguments)},warn:function(){this.log(a.WARN,arguments)},error:function(){this.log(a.ERROR,arguments)},fatal:function(){this.log(a.FATAL,arguments)},
  isEnabledFor:function(a){return a.isGreaterOrEqual(this.getLevel())},isTraceEnabled:function(){return this.isEnabledFor(a.TRACE)},isDebugEnabled:function(){return this.isEnabledFor(a.DEBUG)},isInfoEnabled:function(){return this.isEnabledFor(a.INFO)},isWarnEnabled:function(){return this.isEnabledFor(a.WARN)},isErrorEnabled:function(){return this.isEnabledFor(a.ERROR)},isFatalEnabled:function(){return this.isEnabledFor(a.FATAL)}};var n=null;this.log4javascript.getDefaultLogger=function(){n||(n=new c);
  return n};this.log4javascript.getLogger=this.log4javascript.getDefaultLogger;var m=null;this.log4javascript.getNullLogger=function(){m||(m=new c,m.setLevel(a.OFF));return m};var l=function(a,c,d,f,b){this.logger=a;this.timeStamp=c;this.level=d;this.messages=f;this.exception=b};l.prototype={getThrowableStrRep:function(){var a;if(this.exception)if(a=this.exception){var c="Exception: "+(a.message?a.message:a.description?a.description:String(a));try{if(a.lineNumber&&(c+=" on line number "+a.lineNumber),
  a.fileName){var d=c,f,b=a.fileName,e=Math.max(b.lastIndexOf("/"),b.lastIndexOf("\\"));f=b.substr(e+1);c=d+(" in file "+f)}}catch(h){}r&&a.stack&&(c+="\r\nStack trace:\r\n"+a.stack);a=c}else a=null;else a="";return a},getCombinedMessages:function(){return 1===this.messages.length?this.messages[0]:this.messages.join("\r\n")}};this.log4javascript.LoggingEvent=l}};return h}();if("undefined"==typeof dext5SolutionLog){"undefined"!=typeof DEXT5LogType&&(DEXT5Solution.logType=DEXT5LogType.toLowerCase());
  DEXT5Solution.InitializationLog();var dext5SolutionLog=DEXT5Solution.log4javascript.getDefaultLogger()}("undefined"!=typeof DEXT5EditorLogMode&&DEXT5EditorLogMode||"undefined"!=typeof DEXT5UploadLogMode&&DEXT5UploadLogMode||"undefined"!=typeof DEXT5PhotoLogMode&&DEXT5PhotoLogMode)&&dext5SolutionLog.info("DEXT5Solution Log Initialization.")};
  