window.Modernizr=function(n,t,i){function a(n){c.cssText=n}function vt(n,t){return a(y.join(n+";")+(t||""))}function h(n,t){return typeof n===t}function v(n,t){return!!~(""+n).indexOf(t)}function lt(n,t){var u,r;for(u in n)if(r=n[u],!v(r,"-")&&c[r]!==i)return t=="pfx"?r:!0;return!1}function yt(n,t,r){var f,u;for(f in n)if(u=t[n[f]],u!==i)return r===!1?n[f]:h(u,"function")?u.bind(r||t):u;return!1}function f(n,t,i){var r=n.charAt(0).toUpperCase()+n.slice(1),u=(n+" "+ot.join(r+" ")+r).split(" ");return h(t,"string")||h(t,"undefined")?lt(u,t):(u=(n+" "+st.join(r+" ")+r).split(" "),yt(u,t,i))}function pt(){u.input=function(i){for(var r=0,u=i.length;r<u;r++)w[i[r]]=!!(i[r]in o);return w.list&&(w.list=!!(t.createElement("datalist")&&n.HTMLDataListElement)),w}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));u.inputtypes=function(n){for(var u=0,r,f,e,h=n.length;u<h;u++)o.setAttribute("type",f=n[u]),r=o.type!=="text",r&&(o.value=g,o.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&o.style.WebkitAppearance!==i?(s.appendChild(o),e=t.defaultView,r=e.getComputedStyle&&e.getComputedStyle(o,null).WebkitAppearance!=="textfield"&&o.offsetHeight!==0,s.removeChild(o)):/^(search|tel)$/.test(f)||(r=/^(url|email)$/.test(f)?o.checkValidity&&o.checkValidity()===!1:o.value!=g)),ht[n[u]]=!!r;return ht}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u={},d=!0,s=t.documentElement,e="modernizr",ut=t.createElement(e),c=ut.style,o=t.createElement("input"),g=":)",ft={}.toString,y=" -webkit- -moz- -o- -ms- ".split(" "),et="Webkit Moz O ms",ot=et.split(" "),st=et.toLowerCase().split(" "),p={svg:"http://www.w3.org/2000/svg"},r={},ht={},w={},nt=[],tt=nt.slice,b,l=function(n,i,r,u){var l,a,c,v,f=t.createElement("div"),h=t.body,o=h||t.createElement("body");if(parseInt(r,10))while(r--)c=t.createElement("div"),c.id=u?u[r]:e+(r+1),f.appendChild(c);return l=["&#173;",'<style id="s',e,'">',n,"<\/style>"].join(""),f.id=e,(h?f:o).innerHTML+=l,o.appendChild(f),h||(o.style.background="",o.style.overflow="hidden",v=s.style.overflow,s.style.overflow="hidden",s.appendChild(o)),a=i(f,n),h?f.parentNode.removeChild(f):(o.parentNode.removeChild(o),s.style.overflow=v),!!a},at=function(t){var i=n.matchMedia||n.msMatchMedia,r;return i?i(t).matches:(l("@media "+t+" { #"+e+" { position: absolute; } }",function(t){r=(n.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position=="absolute"}),r)},ct=function(){function r(r,u){u=u||t.createElement(n[r]||"div");r="on"+r;var f=r in u;return f||(u.setAttribute||(u=t.createElement("div")),u.setAttribute&&u.removeAttribute&&(u.setAttribute(r,""),f=h(u[r],"function"),h(u[r],"undefined")||(u[r]=i),u.removeAttribute(r))),u=null,f}var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return r}(),it={}.hasOwnProperty,rt,k;rt=h(it,"undefined")||h(it.call,"undefined")?function(n,t){return t in n&&h(n.constructor.prototype[t],"undefined")}:function(n,t){return it.call(n,t)};Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i,r;if(typeof t!="function")throw new TypeError;return i=tt.call(arguments,1),r=function(){var f,e,u;return this instanceof r?(f=function(){},f.prototype=t.prototype,e=new f,u=t.apply(e,i.concat(tt.call(arguments))),Object(u)===u)?u:e:t.apply(n,i.concat(tt.call(arguments)))},r});r.flexbox=function(){return f("flexWrap")};r.flexboxlegacy=function(){return f("boxDirection")};r.canvas=function(){var n=t.createElement("canvas");return!!(n.getContext&&n.getContext("2d"))};r.canvastext=function(){return!!(u.canvas&&h(t.createElement("canvas").getContext("2d").fillText,"function"))};r.webgl=function(){return!!n.WebGLRenderingContext};r.touch=function(){var i;return"ontouchstart"in n||n.DocumentTouch&&t instanceof DocumentTouch?i=!0:l(["@media (",y.join("touch-enabled),("),e,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(n){i=n.offsetTop===9}),i};r.geolocation=function(){return"geolocation"in navigator};r.postmessage=function(){return!!n.postMessage};r.websqldatabase=function(){return!!n.openDatabase};r.indexedDB=function(){return!!f("indexedDB",n)};r.hashchange=function(){return ct("hashchange",n)&&(t.documentMode===i||t.documentMode>7)};r.history=function(){return!!(n.history&&history.pushState)};r.draganddrop=function(){var n=t.createElement("div");return"draggable"in n||"ondragstart"in n&&"ondrop"in n};r.websockets=function(){return"WebSocket"in n||"MozWebSocket"in n};r.rgba=function(){return a("background-color:rgba(150,255,150,.5)"),v(c.backgroundColor,"rgba")};r.hsla=function(){return a("background-color:hsla(120,40%,100%,.5)"),v(c.backgroundColor,"rgba")||v(c.backgroundColor,"hsla")};r.multiplebgs=function(){return a("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(c.background)};r.backgroundsize=function(){return f("backgroundSize")};r.borderimage=function(){return f("borderImage")};r.borderradius=function(){return f("borderRadius")};r.boxshadow=function(){return f("boxShadow")};r.textshadow=function(){return t.createElement("div").style.textShadow===""};r.opacity=function(){return vt("opacity:.55"),/^0.55$/.test(c.opacity)};r.cssanimations=function(){return f("animationName")};r.csscolumns=function(){return f("columnCount")};r.cssgradients=function(){var n="background-image:";return a((n+"-webkit- ".split(" ").join("gradient(linear,left top,right bottom,from(#9f9),to(white));"+n)+y.join("linear-gradient(left top,#9f9, white);"+n)).slice(0,-n.length)),v(c.backgroundImage,"gradient")};r.cssreflections=function(){return f("boxReflect")};r.csstransforms=function(){return!!f("transform")};r.csstransforms3d=function(){var n=!!f("perspective");return n&&"webkitPerspective"in s.style&&l("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){n=t.offsetLeft===9&&t.offsetHeight===3}),n};r.csstransitions=function(){return f("transition")};r.fontface=function(){var n;return l('@font-face {font-family:"font";src:url("https://")}',function(i,r){var f=t.getElementById("smodernizr"),u=f.sheet||f.styleSheet,e=u?u.cssRules&&u.cssRules[0]?u.cssRules[0].cssText:u.cssText||"":"";n=/src/i.test(e)&&e.indexOf(r.split(" ")[0])===0}),n};r.generatedcontent=function(){var n;return l(["#",e,"{font:0/0 a}#",e,':after{content:"',g,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){n=t.offsetHeight>=3}),n};r.video=function(){var i=t.createElement("video"),n=!1;try{(n=!!i.canPlayType)&&(n=new Boolean(n),n.ogg=i.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=i.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=i.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(r){}return n};r.audio=function(){var i=t.createElement("audio"),n=!1;try{(n=!!i.canPlayType)&&(n=new Boolean(n),n.ogg=i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=i.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=i.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(i.canPlayType("audio/x-m4a;")||i.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(r){}return n};r.localstorage=function(){try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(n){return!1}};r.sessionstorage=function(){try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(n){return!1}};r.webworkers=function(){return!!n.Worker};r.applicationcache=function(){return!!n.applicationCache};r.svg=function(){return!!t.createElementNS&&!!t.createElementNS(p.svg,"svg").createSVGRect};r.inlinesvg=function(){var n=t.createElement("div");return n.innerHTML="<svg/>",(n.firstChild&&n.firstChild.namespaceURI)==p.svg};r.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(ft.call(t.createElementNS(p.svg,"animate")))};r.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(ft.call(t.createElementNS(p.svg,"clipPath")))};for(k in r)rt(r,k)&&(b=k.toLowerCase(),u[b]=r[k](),nt.push((u[b]?"":"no-")+b));return u.input||pt(),u.addTest=function(n,t){if(typeof n=="object")for(var r in n)rt(n,r)&&u.addTest(r,n[r]);else{if(n=n.toLowerCase(),u[n]!==i)return u;t=typeof t=="function"?t():t;typeof d!="undefined"&&d&&(s.className+=" "+(t?"":"no-")+n);u[n]=t}return u},a(""),ut=o=null,function(n,t){function p(n,t){var i=n.createElement("p"),r=n.getElementsByTagName("head")[0]||n.documentElement;return i.innerHTML="x<style>"+t+"<\/style>",r.insertBefore(i.lastChild,r.firstChild)}function c(){var n=r.elements;return typeof n=="string"?n.split(" "):n}function o(n){var t=h[n[s]];return t||(t={},e++,n[s]=e,h[e]=t),t}function l(n,r,u){if(r||(r=t),i)return r.createElement(n);u||(u=o(r));var f;return f=u.cache[n]?u.cache[n].cloneNode():y.test(n)?(u.cache[n]=u.createElem(n)).cloneNode():u.createElem(n),f.canHaveChildren&&!v.test(n)?u.frag.appendChild(f):f}function w(n,r){if(n||(n=t),i)return n.createDocumentFragment();r=r||o(n);for(var f=r.frag.cloneNode(),u=0,e=c(),s=e.length;u<s;u++)f.createElement(e[u]);return f}function b(n,t){t.cache||(t.cache={},t.createElem=n.createElement,t.createFrag=n.createDocumentFragment,t.frag=t.createFrag());n.createElement=function(i){return r.shivMethods?l(i,n,t):t.createElem(i)};n.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+c().join().replace(/\w+/g,function(n){return t.createElem(n),t.frag.createElement(n),'c("'+n+'")'})+");return n}")(r,t.frag)}function a(n){n||(n=t);var u=o(n);return!r.shivCSS||f||u.hasCSS||(u.hasCSS=!!p(n,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),i||b(n,u),n}var u=n.html5||{},v=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,y=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,s="_html5shiv",e=0,h={},i,r;(function(){try{var n=t.createElement("a");n.innerHTML="<xyz><\/xyz>";f="hidden"in n;i=n.childNodes.length==1||function(){t.createElement("a");var n=t.createDocumentFragment();return typeof n.cloneNode=="undefined"||typeof n.createDocumentFragment=="undefined"||typeof n.createElement=="undefined"}()}catch(r){f=!0;i=!0}})();r={elements:u.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:u.shivCSS!==!1,supportsUnknownElements:i,shivMethods:u.shivMethods!==!1,type:"default",shivDocument:a,createElement:l,createDocumentFragment:w};n.html5=r;a(t)}(this,t),u._version="2.6.2",u._prefixes=y,u._domPrefixes=st,u._cssomPrefixes=ot,u.mq=at,u.hasEvent=ct,u.testProp=function(n){return lt([n])},u.testAllProps=f,u.testStyles=l,u.prefixed=function(n,t,i){return t?f(n,t,i):f(n,"pfx")},s.className=s.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(d?" js "+nt.join(" "):""),u}(this,this.document);Array.prototype.push||(Array.prototype.push=function(){for(var n=0,t=arguments.length;n<t;n++)this[this.length]=arguments[n];return this.length});Array.prototype.shift||(Array.prototype.shift=function(){var t,n,i;if(this.length>0){for(t=this[0],n=0,i=this.length-1;n<i;n++)this[n]=this[n+1];return this.length=this.length-1,t}});Array.prototype.splice||(Array.prototype.splice=function(n,t){var f=this.slice(n+t),o=this.slice(n,n+t),r,i,u,e;for(this.length=n,r=[],i=0,u=arguments.length;i<u;i++)r[i]=arguments[i];for(e=r.length>2?f=r.slice(2).concat(f):f,i=0,u=e.length;i<u;i++)this.push(e[i]);return o});var log4javascript=function(){function o(n){return typeof n=="undefined"}function wt(){}function si(){}function c(n){return n&&n.toString?n.toString():String(n)}function dt(n){return n.message?n.message:n.description?n.description:c(n)}function pi(n){var t=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\"));return n.substr(t+1)}function y(n){if(n){var i="Exception: "+dt(n);try{n.lineNumber&&(i+=" on line number "+n.lineNumber);n.fileName&&(i+=" in file "+pi(n.fileName))}catch(r){e.warn("Unable to obtain file and line information for error")}return ti&&n.stack&&(i+=t+"Stack trace:"+t+n.stack),i}return null}function r(n){return Boolean(n)}function ct(n){return n.replace(/^\s+/,"").replace(/\s+$/,"")}function gt(n){var t=n.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.split("\n")}function lt(n,t){for(var r=-1,i=0,u=n.length;i<u;i++)if(n[i]===t){r=i;break}return r>=0?(n.splice(r,1),!0):!1}function k(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]==t)return!0;return!1}function d(n,t){return o(n)?t:r(n)}function l(n,t){return o(n)?t:String(n)}function at(n,t){if(o(n))return t;try{var i=parseInt(n,10);return isNaN(i)?t:i}catch(r){return e.warn("Invalid int param "+n,r),t}}function hi(n,t){return typeof n=="function"?n:t}function bi(n){return n instanceof Error}function ni(n){return"__log4javascript_listeners__"+n}function ki(n,t){return t=t?t:window,n?n:t.event}function i(n,t){e.error(n,t);log4javascript.dispatchEvent("error",{message:n,exception:t})}function ci(t,i){this.name=t;this.level=o(i)?n.INFO:i;this.start=new Date}function a(r){var s,f;this.name=r;this.parent=null;this.children=[];var u=[],v=null,y=this.name===ii,p=this.name===li,l=null,a=!1;this.addChild=function(n){this.children.push(n);n.parent=this;n.invalidateAppenderCache()};s=!0;this.getAdditivity=function(){return s};this.setAdditivity=function(n){var t=s!=n;s=n;t&&this.invalidateAppenderCache()};this.addAppender=function(n){p?i("Logger.addAppender: you may not add an appender to the null logger"):n instanceof log4javascript.Appender?k(u,n)||(u.push(n),n.setAddedToLogger(this),this.invalidateAppenderCache()):i("Logger.addAppender: appender supplied ('"+c(n)+"') is not a subclass of Appender")};this.removeAppender=function(n){lt(u,n);n.setRemovedFromLogger(this);this.invalidateAppenderCache()};this.removeAllAppenders=function(){var t=u.length,n;if(t>0){for(n=0;n<t;n++)u[n].setRemovedFromLogger(this);u.length=0;this.invalidateAppenderCache()}};this.getEffectiveAppenders=function(){if(l===null||a){var n=y||!this.getAdditivity()?[]:this.parent.getEffectiveAppenders();l=n.concat(u);a=!1}return l};this.invalidateAppenderCache=function(){a=!0;for(var n=0,t=this.children.length;n<t;n++)this.children[n].invalidateAppenderCache()};this.log=function(n,t){var e,r,u,f,i,o;if(h&&n.isGreaterOrEqual(this.getEffectiveLevel())){for(r=t.length-1,u=t[r],t.length>1&&bi(u)&&(e=u,r--),f=[],i=0;i<=r;i++)f[i]=t[i];o=new ot(this,new Date,n,f,e);this.callAppenders(o)}};this.callAppenders=function(n){for(var i=this.getEffectiveAppenders(),t=0,r=i.length;t<r;t++)i[t].doAppend(n)};this.setLevel=function(t){y&&t===null?i("Logger.setLevel: you cannot set the level of the root logger to null"):t instanceof n?v=t:i("Logger.setLevel: level supplied to logger "+this.name+" is not an instance of log4javascript.Level")};this.getLevel=function(){return v};this.getEffectiveLevel=function(){for(var t,n=this;n!==null;n=n.parent)if(t=n.getLevel(),t!==null)return t};this.group=function(n,t){var r,i,u;if(h)for(r=this.getEffectiveAppenders(),i=0,u=r.length;i<u;i++)r[i].group(n,t)};this.groupEnd=function(){var t,n,i;if(h)for(t=this.getEffectiveAppenders(),n=0,i=t.length;n<i;n++)t[n].groupEnd()};f={};this.time=function(t,r){h&&(o(t)?i("Logger.time: a name for the timer must be supplied"):!r||r instanceof n?f[t]=new ci(t,r):i("Logger.time: level supplied to timer "+t+" is not an instance of log4javascript.Level"))};this.timeEnd=function(n){if(h)if(o(n))i("Logger.timeEnd: a name for the timer must be supplied");else if(f[n]){var t=f[n],r=t.getElapsedTime();this.log(t.level,["Timer "+c(n)+" completed in "+r+"ms"]);delete f[n]}else e.warn("Logger.timeEnd: no timer found with name "+n)};this.assert=function(i){var r,u,f;if(h&&!i){for(r=[],u=1,f=arguments.length;u<f;u++)r.push(arguments[u]);r=r.length>0?r:["Assertion Failure"];r.push(t);r.push(i);this.log(n.ERROR,r)}};this.toString=function(){return"Logger["+this.name+"]"}}function tt(){this.customFields=[]}function it(){this.customFields=[]}function p(n){this.combineMessages=d(n,!0);this.customFields=[]}function tr(n){return n.replace(/\r\n|\r|\n/g,"\\r\\n")}function w(n,i){this.readable=d(n,!1);this.combineMessages=d(i,!0);this.batchHeader=this.readable?"["+t:"[";this.batchFooter=this.readable?"]"+t:"]";this.batchSeparator=this.readable?","+t:",";this.setKeys();this.colon=this.readable?": ":":";this.tab=this.readable?"\t":"";this.lineBreak=this.readable?t:"";this.customFields=[]}function g(){this.setKeys();this.customFields=[];this.returnsPostData=!0}function vi(n,i,r){function f(n,i,r){function w(n){for(var u=gt(n),i=1,f=u.length;i<f;i++)u[i]=r+u[i];return u.join(t)}var e,p,l,o,s,h,a;if(r||(r=""),n===null)return"null";if(typeof n=="undefined")return"undefined";if(typeof n=="string")return w(n);if(typeof n=="object"&&k(u,n)){try{h=c(n)}catch(v){h="Error formatting property. Details: "+y(v)}return h+" [already expanded]"}if(n instanceof Array&&i>0){for(u.push(n),h="["+t,l=i-1,o=r+"  ",s=[],e=0,p=n.length;e<p;e++)try{a=f(n[e],l,o);s.push(o+a)}catch(v){s.push(o+"Error formatting array member. Details: "+y(v)+"")}return h+=s.join(","+t)+t+r+"]"}if(Object.prototype.toString.call(n)=="[object Date]")return n.toString();if(typeof n=="object"&&i>0){u.push(n);h="{"+t;l=i-1;o=r+"  ";s=[];for(e in n)try{a=f(n[e],l,o);s.push(o+e+": "+a)}catch(v){s.push(o+e+": Error formatting property. Details: "+y(v))}return h+=s.join(","+t)+t+r+"}"}return w(c(n))}var u=[];return f(n,i,r)}function f(n){this.pattern=n?n:f.DEFAULT_CONVERSION_PATTERN;this.customFields=[]}function st(){}function b(){}function ir(n){return o(n.status)||n.status===0||n.status>=200&&n.status<300}function ht(n){function s(n){return ut?(i("AjaxAppender: configuration option '"+n+"' may not be set after the appender has been initialized"),!1):!0}function w(){if(f&&h){it=!0;var n;if(c)o.length>0?(n=o.shift(),ot(et(n),w)):(it=!1,e&&ft());else{while(n=o.shift())ot(et(n));it=!1;e&&ft()}}}function st(){var t=!1,i,r,n;if(f&&h){for(i=u.getLayout().allowBatching()?a:1,n=[];r=p.shift();)n.push(r),p.length>=i&&(o.push(n),n=[]);n.length>0&&o.push(n);t=o.length>0;c=!1;e=!1;w()}return t}function et(n){for(var i=[],r,t="",f;r=n.shift();)f=u.getLayout().format(r),u.getLayout().ignoresThrowable()&&(f+=r.getThrowableStrRep()),i.push(f);return t=n.length==1?i.join(""):u.getLayout().batchHeader+i.join(u.getLayout().batchSeparator)+u.getLayout().batchFooter,t=u.getLayout().returnsPostData?t:nt(g)+"="+nt(t),t.length>0&&(t+="&"),t+"layout="+nt(u.getLayout().toString())}function ft(){window.setTimeout(w,b)}function ht(){var n="AjaxAppender: could not create XMLHttpRequest object. AjaxAppender disabled";i(n);f=!1;t&&t(n)}function ot(r,e){var o,h,a,s,c,l;try{if(o=ui(ht),f){o.overrideMimeType&&o.overrideMimeType(u.getLayout().getContentType());o.onreadystatechange=function(){if(o.readyState==4){if(ir(o))k&&k(o),e&&e(o);else{var r="AjaxAppender.append: XMLHttpRequest request to URL "+n+" returned status code "+o.status;i(r);t&&t(r)}o.onreadystatechange=bt;o=null}};o.open("POST",n,!0);try{for(h=!1,a=0;s=rt[a++];)s.name.toLowerCase()=="content-type"&&(h=!0),o.setRequestHeader(s.name,s.value);h||o.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(p){c="AjaxAppender.append: your browser's XMLHttpRequest implementation does not support setRequestHeader, therefore cannot post data. AjaxAppender disabled";i(c);f=!1;t&&t(c);return}o.send(r)}}catch(v){l="AjaxAppender.append: error sending log message to "+n;i(l,v);f=!1;t&&t(l+". Details: "+y(v))}}function ct(){if(ut=!0,tt){var n=window.onbeforeunload;window.onbeforeunload=function(){return n&&n(),st()?"Sending log messages":void 0}}e&&ft()}var u=this,f=!0;n||(i("AjaxAppender: URL must be specified in constructor"),f=!1);var e=this.defaults.timed,c=this.defaults.waitForResponse,a=this.defaults.batchSize,b=this.defaults.timerInterval,k=this.defaults.requestSuccessCallback,t=this.defaults.failCallback,g=this.defaults.postVarName,tt=this.defaults.sendAllOnUnload,v=null,p=[],o=[],rt=[],it=!1,ut=!1;this.getSessionId=function(){return v};this.setSessionId=function(n){v=l(n,null);this.layout.setCustomField("sessionid",v)};this.setLayout=function(n){s("layout")&&(this.layout=n,v!==null&&this.setSessionId(v))};this.isTimed=function(){return e};this.setTimed=function(n){s("timed")&&(e=r(n))};this.getTimerInterval=function(){return b};this.setTimerInterval=function(n){s("timerInterval")&&(b=at(n,b))};this.isWaitForResponse=function(){return c};this.setWaitForResponse=function(n){s("waitForResponse")&&(c=r(n))};this.getBatchSize=function(){return a};this.setBatchSize=function(n){s("batchSize")&&(a=at(n,a))};this.isSendAllOnUnload=function(){return tt};this.setSendAllOnUnload=function(n){s("sendAllOnUnload")&&(tt=d(n,tt))};this.setRequestSuccessCallback=function(n){k=hi(n,k)};this.setFailCallback=function(n){t=hi(n,t)};this.getPostVarName=function(){return g};this.setPostVarName=function(n){s("postVarName")&&(g=l(n,g))};this.getHeaders=function(){return rt};this.addHeader=function(n,t){rt.push({name:n,value:t})};this.sendAll=w;this.append=function(n){var i,r,t;if(f&&(ut||ct(),p.push(n),i=this.getLayout().allowBatching()?a:1,p.length>=i)){for(t=[];r=p.shift();)t.push(r);o.push(t);e||c&&(!c||it)||w()}}}function rr(n,t,i,r){var f,u;r=r?"; path="+r:"";i?(u=new Date,u.setTime(u.getTime()+i*864e5),f="; expires="+u.toGMTString()):f="";document.cookie=escape(n)+"="+escape(t)+f+r}function ur(n){for(var r=escape(n)+"=",u=document.cookie.split(";"),t,i=0,f=u.length;i<f;i++){for(t=u[i];t.charAt(0)===" ";)t=t.substring(1,t.length);if(t.indexOf(r)===0)return unescape(t.substring(r.length,t.length))}return null}function fr(){for(var t=document.getElementsByTagName("script"),i,n=0,r=t.length;n<r;++n)if(t[n].src.indexOf("log4javascript")!=-1)return i=t[n].src.lastIndexOf("/"),i==-1?"":t[n].src.substr(0,i+1);return null}function ut(n){try{return r(n.loaded)}catch(t){return!1}}function yi(n,t){var r,u,i;if(n.length<t){for(r=[],u=Math.max(0,t-n.length),i=0;i<u;i++)r[i]=" ";n+=r.join("")}return n}var nt,wi,e,h,vt,ti,n,ft,et,ot,v,u,rt,ri,ui,s,fi;wt.prototype={eventTypes:[],eventListeners:{},setEventTypes:function(n){if(n instanceof Array){this.eventTypes=n;this.eventListeners={};for(var t=0,r=this.eventTypes.length;t<r;t++)this.eventListeners[this.eventTypes[t]]=[]}else i("log4javascript.EventSupport ["+this+"]: setEventTypes: eventTypes parameter must be an Array")},addEventListener:function(n,t){typeof t=="function"?(k(this.eventTypes,n)||i("log4javascript.EventSupport ["+this+"]: addEventListener: no event called '"+n+"'"),this.eventListeners[n].push(t)):i("log4javascript.EventSupport ["+this+"]: addEventListener: listener must be a function")},removeEventListener:function(n,t){typeof t=="function"?(k(this.eventTypes,n)||i("log4javascript.EventSupport ["+this+"]: removeEventListener: no event called '"+n+"'"),lt(this.eventListeners[n],t)):i("log4javascript.EventSupport ["+this+"]: removeEventListener: listener must be a function")},dispatchEvent:function(n,t){var u,r,f;if(k(this.eventTypes,n))for(u=this.eventListeners[n],r=0,f=u.length;r<f;r++)u[r](this,n,t);else i("log4javascript.EventSupport ["+this+"]: dispatchEvent: no event called '"+n+"'")}};var ei=new Date,oi="log4javascript_"+ei.getTime()+"_"+Math.floor(Math.random()*1e8),bt=function(){},t="\r\n",kt=!1;si.prototype=new wt;log4javascript=new si;log4javascript.version="1.4.4";log4javascript.edition="log4javascript";nt=typeof window.encodeURIComponent!="undefined"?function(n){return encodeURIComponent(n)}:function(n){return escape(n).replace(/\+/g,"%2B").replace(/"/g,"%22").replace(/'/g,"%27").replace(/\//g,"%2F").replace(/=/g,"%3D")};wi=typeof window.decodeURIComponent!="undefined"?function(n){return decodeURIComponent(n)}:function(n){return unescape(n).replace(/%2B/g,"+").replace(/%22/g,'"').replace(/%27/g,"'").replace(/%2F/g,"/").replace(/%3D/g,"=")};Function.prototype.apply||(Function.prototype.apply=function(obj,args){var methodName="__apply__",argsStrings,i,len,script,returnValue;for(typeof obj[methodName]!="undefined"&&(methodName+=String(Math.random()).substr(2)),obj[methodName]=this,argsStrings=[],i=0,len=args.length;i<len;i++)argsStrings[i]="args["+i+"]";return script="obj."+methodName+"("+argsStrings.join(",")+")",returnValue=eval(script),delete obj[methodName],returnValue});Function.prototype.call||(Function.prototype.call=function(n){for(var i=[],t=1,r=arguments.length;t<r;t++)i[t-1]=arguments[t];return this.apply(n,i)});e={quietMode:!1,debugMessages:[],setQuietMode:function(n){this.quietMode=r(n)},numberOfErrors:0,alertAllErrors:!1,setAlertAllErrors:function(n){this.alertAllErrors=n},debug:function(n){this.debugMessages.push(n)},displayDebug:function(){alert(this.debugMessages.join(t))},warn:function(){},error:function(n,i){if((++this.numberOfErrors==1||this.alertAllErrors)&&!this.quietMode){var r="log4javascript error: "+n;i&&(r+=t+t+"Original error: "+y(i));alert(r)}}};log4javascript.logLog=e;log4javascript.setEventTypes(["load","error"]);log4javascript.handleError=i;h=!(typeof log4javascript_disabled!="undefined"&&log4javascript_disabled);log4javascript.setEnabled=function(n){h=r(n)};log4javascript.isEnabled=function(){return h};vt=!0;log4javascript.setTimeStampsInMilliseconds=function(n){vt=r(n)};log4javascript.isTimeStampsInMilliseconds=function(){return vt};log4javascript.evalInScope=function(expr){return eval(expr)};ti=!1;log4javascript.setShowStackTraces=function(n){ti=r(n)};n=function(n,t){this.level=n;this.name=t};n.prototype={toString:function(){return this.name},equals:function(n){return this.level==n.level},isGreaterOrEqual:function(n){return this.level>=n.level}};n.ALL=new n(Number.MIN_VALUE,"ALL");n.TRACE=new n(1e4,"TRACE");n.DEBUG=new n(2e4,"DEBUG");n.INFO=new n(3e4,"INFO");n.WARN=new n(4e4,"WARN");n.ERROR=new n(5e4,"ERROR");n.FATAL=new n(6e4,"FATAL");n.OFF=new n(Number.MAX_VALUE,"OFF");log4javascript.Level=n;ci.prototype.getElapsedTime=function(){return(new Date).getTime()-this.start.getTime()};var di="[anonymous]",gi="[default]",li="[null]",ii="root";a.prototype={trace:function(){this.log(n.TRACE,arguments)},debug:function(){this.log(n.DEBUG,arguments)},info:function(){this.log(n.INFO,arguments)},warn:function(){this.log(n.WARN,arguments)},error:function(){this.log(n.ERROR,arguments)},fatal:function(){this.log(n.FATAL,arguments)},isEnabledFor:function(n){return n.isGreaterOrEqual(this.getEffectiveLevel())},isTraceEnabled:function(){return this.isEnabledFor(n.TRACE)},isDebugEnabled:function(){return this.isEnabledFor(n.DEBUG)},isInfoEnabled:function(){return this.isEnabledFor(n.INFO)},isWarnEnabled:function(){return this.isEnabledFor(n.WARN)},isErrorEnabled:function(){return this.isEnabledFor(n.ERROR)},isFatalEnabled:function(){return this.isEnabledFor(n.FATAL)}};a.prototype.trace.isEntryPoint=!0;a.prototype.debug.isEntryPoint=!0;a.prototype.info.isEntryPoint=!0;a.prototype.warn.isEntryPoint=!0;a.prototype.error.isEntryPoint=!0;a.prototype.fatal.isEntryPoint=!0;var yt={},nr=[],ai=n.DEBUG,pt=new a(ii);return pt.setLevel(ai),log4javascript.getRootLogger=function(){return pt},log4javascript.getLogger=function(n){var t,r,u,f;return typeof n=="string"||(n=di,e.warn("log4javascript.getLogger: non-string logger name "+c(n)+" supplied, returning anonymous logger")),n==ii&&i("log4javascript.getLogger: root logger may not be obtained by name"),yt[n]||(t=new a(n),yt[n]=t,nr.push(n),r=n.lastIndexOf("."),r>-1?(f=n.substring(0,r),u=log4javascript.getLogger(f)):u=pt,u.addChild(t)),yt[n]},ft=null,log4javascript.getDefaultLogger=function(){if(!ft){ft=log4javascript.getLogger(gi);var n=new log4javascript.PopUpAppender;ft.addAppender(n)}return ft},et=null,log4javascript.getNullLogger=function(){return et||(et=new a(li),et.setLevel(n.OFF)),et},log4javascript.resetConfiguration=function(){pt.setLevel(ai);yt={}},ot=function(n,t,i,r,u){this.logger=n;this.timeStamp=t;this.timeStampInMilliseconds=t.getTime();this.timeStampInSeconds=Math.floor(this.timeStampInMilliseconds/1e3);this.milliseconds=this.timeStamp.getMilliseconds();this.level=i;this.messages=r;this.exception=u},ot.prototype={getThrowableStrRep:function(){return this.exception?y(this.exception):""},getCombinedMessages:function(){return this.messages.length==1?this.messages[0]:this.messages.join(t)},toString:function(){return"LoggingEvent["+this.level+"]"}},log4javascript.LoggingEvent=ot,v=function(){},v.prototype={defaults:{loggerKey:"logger",timeStampKey:"timestamp",millisecondsKey:"milliseconds",levelKey:"level",messageKey:"message",exceptionKey:"exception",urlKey:"url"},loggerKey:"logger",timeStampKey:"timestamp",millisecondsKey:"milliseconds",levelKey:"level",messageKey:"message",exceptionKey:"exception",urlKey:"url",batchHeader:"",batchFooter:"",batchSeparator:"",returnsPostData:!1,overrideTimeStampsSetting:!1,useTimeStampsInMilliseconds:null,format:function(){i("Layout.format: layout supplied has no format() method")},ignoresThrowable:function(){i("Layout.ignoresThrowable: layout supplied has no ignoresThrowable() method")},getContentType:function(){return"text/plain"},allowBatching:function(){return!0},setTimeStampsInMilliseconds:function(n){this.overrideTimeStampsSetting=!0;this.useTimeStampsInMilliseconds=r(n)},isTimeStampsInMilliseconds:function(){return this.overrideTimeStampsSetting?this.useTimeStampsInMilliseconds:vt},getTimeStampValue:function(n){return this.isTimeStampsInMilliseconds()?n.timeStampInMilliseconds:n.timeStampInSeconds},getDataValues:function(n,t){var u=[[this.loggerKey,n.logger.name],[this.timeStampKey,this.getTimeStampValue(n)],[this.levelKey,n.level.name],[this.urlKey,window.location.href],[this.messageKey,t?n.getCombinedMessages():n.messages]],i,f,r;if(this.isTimeStampsInMilliseconds()||u.push([this.millisecondsKey,n.milliseconds]),n.exception&&u.push([this.exceptionKey,y(n.exception)]),this.hasCustomFields())for(i=0,f=this.customFields.length;i<f;i++)r=this.customFields[i].value,typeof r=="function"&&(r=r(this,n)),u.push([this.customFields[i].name,r]);return u},setKeys:function(n,t,i,r,u,f,e){this.loggerKey=l(n,this.defaults.loggerKey);this.timeStampKey=l(t,this.defaults.timeStampKey);this.levelKey=l(i,this.defaults.levelKey);this.messageKey=l(r,this.defaults.messageKey);this.exceptionKey=l(u,this.defaults.exceptionKey);this.urlKey=l(f,this.defaults.urlKey);this.millisecondsKey=l(e,this.defaults.millisecondsKey)},setCustomField:function(n,t){for(var r=!1,i=0,u=this.customFields.length;i<u;i++)this.customFields[i].name===n&&(this.customFields[i].value=t,r=!0);r||this.customFields.push({name:n,value:t})},hasCustomFields:function(){return this.customFields.length>0},toString:function(){i("Layout.toString: all layouts must override this method")}},log4javascript.Layout=v,u=function(){},u.prototype=new wt,u.prototype.layout=new f,u.prototype.threshold=n.ALL,u.prototype.loggers=[],u.prototype.doAppend=function(n){h&&n.level.level>=this.threshold.level&&this.append(n)},u.prototype.append=function(){},u.prototype.setLayout=function(n){n instanceof v?this.layout=n:i("Appender.setLayout: layout supplied to "+this.toString()+" is not a subclass of Layout")},u.prototype.getLayout=function(){return this.layout},u.prototype.setThreshold=function(t){t instanceof n?this.threshold=t:i("Appender.setThreshold: threshold supplied to "+this.toString()+" is not a subclass of Level")},u.prototype.getThreshold=function(){return this.threshold},u.prototype.setAddedToLogger=function(n){this.loggers.push(n)},u.prototype.setRemovedFromLogger=function(n){lt(this.loggers,n)},u.prototype.group=bt,u.prototype.groupEnd=bt,u.prototype.toString=function(){i("Appender.toString: all appenders must override this method")},log4javascript.Appender=u,tt.prototype=new v,tt.prototype.format=function(n){return n.level.name+" - "+n.getCombinedMessages()},tt.prototype.ignoresThrowable=function(){return!0},tt.prototype.toString=function(){return"SimpleLayout"},log4javascript.SimpleLayout=tt,it.prototype=new v,it.prototype.format=function(n){return n.messages},it.prototype.ignoresThrowable=function(){return!0},it.prototype.toString=function(){return"NullLayout"},log4javascript.NullLayout=it,p.prototype=new v,p.prototype.isCombinedMessages=function(){return this.combineMessages},p.prototype.getContentType=function(){return"text/xml"},p.prototype.escapeCdata=function(n){return n.replace(/\]\]>/,"]\]>]]&gt;<![CDATA[")},p.prototype.format=function(n){function f(n){return n=typeof n=="string"?n:c(n),"<log4javascript:message><![CDATA["+e.escapeCdata(n)+"]\]><\/log4javascript:message>"}var e=this,i,u,r='<log4javascript:event logger="'+n.logger.name+'" timestamp="'+this.getTimeStampValue(n)+'"';if(this.isTimeStampsInMilliseconds()||(r+=' milliseconds="'+n.milliseconds+'"'),r+=' level="'+n.level.name+'">'+t,this.combineMessages)r+=f(n.getCombinedMessages());else{for(r+="<log4javascript:messages>"+t,i=0,u=n.messages.length;i<u;i++)r+=f(n.messages[i])+t;r+="<\/log4javascript:messages>"+t}if(this.hasCustomFields())for(i=0,u=this.customFields.length;i<u;i++)r+='<log4javascript:customfield name="'+this.customFields[i].name+'"><![CDATA['+this.customFields[i].value.toString()+"]\]><\/log4javascript:customfield>"+t;return n.exception&&(r+="<log4javascript:exception><![CDATA["+y(n.exception)+"]\]><\/log4javascript:exception>"+t),r+("<\/log4javascript:event>"+t+t)},p.prototype.ignoresThrowable=function(){return!1},p.prototype.toString=function(){return"XmlLayout"},log4javascript.XmlLayout=p,w.prototype=new v,w.prototype.isReadable=function(){return this.readable},w.prototype.isCombinedMessages=function(){return this.combineMessages},w.prototype.format=function(n){function e(n,t,i){var u,s=typeof n,f,h,o;if(n instanceof Date)u=String(n.getTime());else if(i&&n instanceof Array){for(u="["+r.lineBreak,f=0,h=n.length;f<h;f++)o=t+r.tab,u+=o+e(n[f],o,!1),f<n.length-1&&(u+=","),u+=r.lineBreak;u+=t+"]"}else u=s!=="number"&&s!=="boolean"?'"'+tr(c(n).replace(/\"/g,'\\"'))+'"':n;return u}for(var r=this,u=this.getDataValues(n,this.combineMessages),i="{"+this.lineBreak,t=0,f=u.length-1;t<=f;t++)i+=this.tab+'"'+u[t][0]+'"'+this.colon+e(u[t][1],this.tab,!0),t<f&&(i+=","),i+=this.lineBreak;return i+("}"+this.lineBreak)},w.prototype.ignoresThrowable=function(){return!1},w.prototype.toString=function(){return"JsonLayout"},w.prototype.getContentType=function(){return"application/json"},log4javascript.JsonLayout=w,g.prototype=new v,g.prototype.allowBatching=function(){return!1},g.prototype.format=function(n){for(var i=this.getDataValues(n),r=[],f,t=0,u=i.length;t<u;t++)f=i[t][1]instanceof Date?String(i[t][1].getTime()):i[t][1],r.push(nt(i[t][0])+"="+nt(f));return r.join("&")},g.prototype.ignoresThrowable=function(){return!1},g.prototype.toString=function(){return"HttpPostDataLayout"},log4javascript.HttpPostDataLayout=g,function(){var y=/('[^']*')|(G+|y+|M+|w+|W+|D+|d+|F+|E+|a+|H+|k+|K+|h+|m+|s+|S+|Z+)|([a-zA-Z]+)|([^a-zA-Z']+)/,p=["January","February","March","April","May","June","July","August","September","October","November","December"],w=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=0,h=1,n=2,c=3,l=4,a=5,b={G:i,y:c,M:l,w:n,W:n,D:n,d:n,F:n,E:h,a:i,H:n,k:n,K:n,h:n,m:n,s:n,S:n,Z:a},r=864e5,v=7*r,u=1,t=function(n,t,i){var r=new Date(n,t,i,0,0,0);return r.setMilliseconds(0),r};Date.prototype.getDifference=function(n){return this.getTime()-n.getTime()};Date.prototype.isBefore=function(n){return this.getTime()<n.getTime()};Date.prototype.getUTCTime=function(){return Date.UTC(this.getFullYear(),this.getMonth(),this.getDate(),this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())};Date.prototype.getTimeSince=function(n){return this.getUTCTime()-n.getUTCTime()};Date.prototype.getPreviousSunday=function(){var i=new Date(this.getFullYear(),this.getMonth(),this.getDate(),12,0,0),n=new Date(i.getTime()-this.getDay()*r);return t(n.getFullYear(),n.getMonth(),n.getDate())};Date.prototype.getWeekInYear=function(n){o(this.minimalDaysInFirstWeek)&&(n=u);var r=this.getPreviousSunday(),i=t(this.getFullYear(),0,1),e=r.isBefore(i)?0:1+Math.floor(r.getTimeSince(i)/v),s=7-i.getDay(),f=e;return s<n&&f--,f};Date.prototype.getWeekInMonth=function(n){o(this.minimalDaysInFirstWeek)&&(n=u);var r=this.getPreviousSunday(),i=t(this.getFullYear(),this.getMonth(),1),e=r.isBefore(i)?0:1+Math.floor(r.getTimeSince(i)/v),s=7-i.getDay(),f=e;return s>=n&&f++,f};Date.prototype.getDayInYear=function(){var n=t(this.getFullYear(),0,1);return 1+Math.floor(this.getTimeSince(n)/r)};rt=function(n){this.formatString=n};rt.prototype.setMinimalDaysInFirstWeek=function(n){this.minimalDaysInFirstWeek=n};rt.prototype.getMinimalDaysInFirstWeek=function(){return o(this.minimalDaysInFirstWeek)?u:this.minimalDaysInFirstWeek};var f=function(n,t){while(n.length<t)n="0"+n;return n},e=function(n,t,i){return t>=4?n:n.substr(0,Math.max(i,t))},s=function(n,t){var i=""+n;return f(i,t)};rt.prototype.format=function(t){for(var u="",v,g=this.formatString,ut,d;v=y.exec(g);){var k=v[1],nt=v[2],et=v[3],it=v[4];if(k)u+=k=="''"?"'":k.substring(1,k.length-1);else if(!et)if(it)u+=it;else if(nt){var rt=nt.charAt(0),o=nt.length,r="";switch(rt){case"G":r="AD";break;case"y":r=t.getFullYear();break;case"M":r=t.getMonth();break;case"w":r=t.getWeekInYear(this.getMinimalDaysInFirstWeek());break;case"W":r=t.getWeekInMonth(this.getMinimalDaysInFirstWeek());break;case"D":r=t.getDayInYear();break;case"d":r=t.getDate();break;case"F":r=1+Math.floor((t.getDate()-1)/7);break;case"E":r=w[t.getDay()];break;case"a":r=t.getHours()>=12?"PM":"AM";break;case"H":r=t.getHours();break;case"k":r=t.getHours()||24;break;case"K":r=t.getHours()%12;break;case"h":r=t.getHours()%12||12;break;case"m":r=t.getMinutes();break;case"s":r=t.getSeconds();break;case"S":r=t.getMilliseconds();break;case"Z":r=t.getTimezoneOffset()}switch(b[rt]){case i:u+=e(r,o,2);break;case h:u+=e(r,o,3);break;case n:u+=s(r,o);break;case c:o<=3?(ut=""+r,u+=ut.substr(2,2)):u+=s(r,o);break;case l:u+=o>=3?e(p[r],o,o):s(r+1,o);break;case a:var ot=r>0,st=ot?"-":"+",ft=Math.abs(r),tt=""+Math.floor(ft/60);tt=f(tt,2);d=""+ft%60;d=f(d,2);u+=st+tt+d}}g=g.substr(v.index+v[0].length)}return u}}(),log4javascript.SimpleDateFormat=rt,f.TTCC_CONVERSION_PATTERN="%r %p %c - %m%n",f.DEFAULT_CONVERSION_PATTERN="%m%n",f.ISO8601_DATEFORMAT="yyyy-MM-dd HH:mm:ss,SSS",f.DATETIME_DATEFORMAT="dd MMM yyyy HH:mm:ss,SSS",f.ABSOLUTETIME_DATEFORMAT="HH:mm:ss,SSS",f.prototype=new v,f.prototype.format=function(n){for(var b="",e,k=this.pattern,r,c,y,l,ut,g,nt,p,o,s,a,h,w;e=/%(-?[0-9]+)?(\.?[0-9]+)?([acdfmMnpr%])(\{([^\}]+)\})?|([^%]+)/.exec(k);){var ft=e[0],v=e[1],tt=e[2],d=e[3],u=e[5],it=e[6];if(it)b+=""+it;else{r="";switch(d){case"a":case"m":for(c=0,u&&(c=parseInt(u,10),isNaN(c)&&(i("PatternLayout.format: invalid specifier '"+u+"' for conversion character '"+d+"' - should be a number"),c=0)),y=d==="a"?n.messages[0]:n.messages,l=0,ut=y.length;l<ut;l++)l>0&&r.charAt(r.length-1)!==" "&&(r+=" "),r+=c===0?y[l]:vi(y[l],c);break;case"c":g=n.logger.name;u?(nt=parseInt(u,10),p=n.logger.name.split("."),r=nt>=p.length?g:p.slice(p.length-nt).join(".")):r=g;break;case"d":o=f.ISO8601_DATEFORMAT;u&&(o=u,o=="ISO8601"?o=f.ISO8601_DATEFORMAT:o=="ABSOLUTE"?o=f.ABSOLUTETIME_DATEFORMAT:o=="DATE"&&(o=f.DATETIME_DATEFORMAT));r=new rt(o).format(n.timeStamp);break;case"f":this.hasCustomFields()&&(s=0,u&&(s=parseInt(u,10),isNaN(s)?i("PatternLayout.format: invalid specifier '"+u+"' for conversion character 'f' - should be a number"):s===0?i("PatternLayout.format: invalid specifier '"+u+"' for conversion character 'f' - must be greater than zero"):s>this.customFields.length?i("PatternLayout.format: invalid specifier '"+u+"' for conversion character 'f' - there aren't that many custom fields"):s=s-1),a=this.customFields[s].value,typeof a=="function"&&(a=a(this,n)),r=a);break;case"n":r=t;break;case"p":r=n.level.name;break;case"r":r=""+n.timeStamp.getDifference(ei);break;case"%":r="%";break;default:r=ft}if(tt&&(h=parseInt(tt.substr(1),10),w=r.length,h<w&&(r=r.substring(w-h,w))),v)if(v.charAt(0)=="-")for(h=parseInt(v.substr(1),10);r.length<h;)r+=" ";else for(h=parseInt(v,10);r.length<h;)r=" "+r;b+=r}k=k.substr(e.index+e[0].length)}return b},f.prototype.ignoresThrowable=function(){return!0},f.prototype.toString=function(){return"PatternLayout"},log4javascript.PatternLayout=f,st.prototype=new u,st.prototype.layout=new tt,st.prototype.append=function(n){var t=this.getLayout().format(n);this.getLayout().ignoresThrowable()&&(t+=n.getThrowableStrRep());alert(t)},st.prototype.toString=function(){return"AlertAppender"},log4javascript.AlertAppender=st,b.prototype=new log4javascript.Appender,b.prototype.layout=new it,b.prototype.threshold=n.DEBUG,b.prototype.append=function(t){var u=this,r=function(){var n=u.getLayout(),i=n.format(t);return n.ignoresThrowable()&&t.exception&&(i+=t.getThrowableStrRep()),i},i;typeof opera!="undefined"&&opera.postError?opera.postError(r()):window.console&&window.console.log&&(i=r(),window.console.debug&&n.DEBUG.isGreaterOrEqual(t.level)?window.console.debug(i):window.console.info&&n.INFO.equals(t.level)?window.console.info(i):window.console.warn&&n.WARN.equals(t.level)?window.console.warn(i):window.console.error&&t.level.isGreaterOrEqual(n.ERROR)?window.console.error(i):window.console.log(i))},b.prototype.group=function(n){window.console&&window.console.group&&window.console.group(n)},b.prototype.groupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},b.prototype.toString=function(){return"BrowserConsoleAppender"},log4javascript.BrowserConsoleAppender=b,ri=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],ui=function(n){for(var u=null,r,t=0,f=ri.length;t<f;t++){r=ri[t];try{return u=r(),ui=r,u}catch(e){}}n?n():i("getXmlHttp: unable to obtain XMLHttpRequest object")},ht.prototype=new u,ht.prototype.defaults={waitForResponse:!1,timed:!1,timerInterval:1e3,batchSize:1,sendAllOnUnload:!1,requestSuccessCallback:null,failCallback:null,postVarName:"data"},ht.prototype.layout=new g,ht.prototype.toString=function(){return"AjaxAppender"},log4javascript.AjaxAppender=ht,function(){function a(n,t,i,r,u){this.create(!1,null,n,t,i,r,u,this.defaults.focusPopUp)}function c(n,t,i,r,u,f){this.create(!0,n,t,i,r,u,f,!1)}var w=function(){return['<!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">',"<head>","<title>log4javascript<\/title>",'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />',"<!-- Make IE8 behave like IE7, having gone to all the trouble of making IE work -->",'<meta http-equiv="X-UA-Compatible" content="IE=7" />','<script type="text/javascript">var isIe = false, isIePre7 = false;<\/script>','<!--[if IE]><script type="text/javascript">isIe = true<\/script><![endif]-->','<!--[if lt IE 7]><script type="text/javascript">isIePre7 = true<\/script><![endif]-->','<script type="text/javascript">',"//<![CDATA[","var loggingEnabled=true;var logQueuedEventsTimer=null;var logEntries=[];var logEntriesAndSeparators=[];var logItems=[];var renderDelay=100;var unrenderedLogItemsExist=false;var rootGroup,currentGroup=null;var loaded=false;var currentLogItem=null;var logMainContainer;function copyProperties(obj,props){for(var i in props){obj[i]=props[i];}}","function LogItem(){}","LogItem.prototype={mainContainer:null,wrappedContainer:null,unwrappedContainer:null,group:null,appendToLog:function(){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].appendToLog();}","this.group.update();},doRemove:function(doUpdate,removeFromGroup){if(this.rendered){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].remove();}","this.unwrappedElementContainer=null;this.wrappedElementContainer=null;this.mainElementContainer=null;}","if(this.group&&removeFromGroup){this.group.removeChild(this,doUpdate);}","if(this===currentLogItem){currentLogItem=null;}},remove:function(doUpdate,removeFromGroup){this.doRemove(doUpdate,removeFromGroup);},render:function(){},accept:function(visitor){visitor.visit(this);},getUnwrappedDomContainer:function(){return this.group.unwrappedElementContainer.contentDiv;},getWrappedDomContainer:function(){return this.group.wrappedElementContainer.contentDiv;},getMainDomContainer:function(){return this.group.mainElementContainer.contentDiv;}};LogItem.serializedItemKeys={LOG_ENTRY:0,GROUP_START:1,GROUP_END:2};function LogItemContainerElement(){}",'LogItemContainerElement.prototype={appendToLog:function(){var insertBeforeFirst=(newestAtTop&&this.containerDomNode.hasChildNodes());if(insertBeforeFirst){this.containerDomNode.insertBefore(this.mainDiv,this.containerDomNode.firstChild);}else{this.containerDomNode.appendChild(this.mainDiv);}}};function SeparatorElementContainer(containerDomNode){this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.className="separator";this.mainDiv.innerHTML="&nbsp;";}',"SeparatorElementContainer.prototype=new LogItemContainerElement();SeparatorElementContainer.prototype.remove=function(){this.mainDiv.parentNode.removeChild(this.mainDiv);this.mainDiv=null;};function Separator(){this.rendered=false;}","Separator.prototype=new LogItem();copyProperties(Separator.prototype,{render:function(){var containerDomNode=this.group.contentDiv;if(isIe){this.unwrappedElementContainer=new SeparatorElementContainer(this.getUnwrappedDomContainer());this.wrappedElementContainer=new SeparatorElementContainer(this.getWrappedDomContainer());this.elementContainers=[this.unwrappedElementContainer,this.wrappedElementContainer];}else{this.mainElementContainer=new SeparatorElementContainer(this.getMainDomContainer());this.elementContainers=[this.mainElementContainer];}",'this.content=this.formattedMessage;this.rendered=true;}});function GroupElementContainer(group,containerDomNode,isRoot,isWrapped){this.group=group;this.containerDomNode=containerDomNode;this.isRoot=isRoot;this.isWrapped=isWrapped;this.expandable=false;if(this.isRoot){if(isIe){this.contentDiv=logMainContainer.appendChild(document.createElement("div"));this.contentDiv.id=this.isWrapped?"log_wrapped":"log_unwrapped";}else{this.contentDiv=logMainContainer;}}else{var groupElementContainer=this;this.mainDiv=document.createElement("div");this.mainDiv.className="group";this.headingDiv=this.mainDiv.appendChild(document.createElement("div"));this.headingDiv.className="groupheading";this.expander=this.headingDiv.appendChild(document.createElement("span"));this.expander.className="expander unselectable greyedout";this.expander.unselectable=true;var expanderText=this.group.expanded?"-":"+";this.expanderTextNode=this.expander.appendChild(document.createTextNode(expanderText));this.headingDiv.appendChild(document.createTextNode(" "+this.group.name));this.contentDiv=this.mainDiv.appendChild(document.createElement("div"));var contentCssClass=this.group.expanded?"expanded":"collapsed";this.contentDiv.className="groupcontent "+contentCssClass;this.expander.onclick=function(){if(groupElementContainer.group.expandable){groupElementContainer.group.toggleExpanded();}};}}','GroupElementContainer.prototype=new LogItemContainerElement();copyProperties(GroupElementContainer.prototype,{toggleExpanded:function(){if(!this.isRoot){var oldCssClass,newCssClass,expanderText;if(this.group.expanded){newCssClass="expanded";oldCssClass="collapsed";expanderText="-";}else{newCssClass="collapsed";oldCssClass="expanded";expanderText="+";}',"replaceClass(this.contentDiv,newCssClass,oldCssClass);this.expanderTextNode.nodeValue=expanderText;}},remove:function(){if(!this.isRoot){this.headingDiv=null;this.expander.onclick=null;this.expander=null;this.expanderTextNode=null;this.contentDiv=null;this.containerDomNode=null;this.mainDiv.parentNode.removeChild(this.mainDiv);this.mainDiv=null;}},reverseChildren:function(){var node=null;var childDomNodes=[];while((node=this.contentDiv.firstChild)){this.contentDiv.removeChild(node);childDomNodes.push(node);}",'while((node=childDomNodes.pop())){this.contentDiv.appendChild(node);}},update:function(){if(!this.isRoot){if(this.group.expandable){removeClass(this.expander,"greyedout");}else{addClass(this.expander,"greyedout");}}},clear:function(){if(this.isRoot){this.contentDiv.innerHTML="";}}});function Group(name,isRoot,initiallyExpanded){this.name=name;this.group=null;this.isRoot=isRoot;this.initiallyExpanded=initiallyExpanded;this.elementContainers=[];this.children=[];this.expanded=initiallyExpanded;this.rendered=false;this.expandable=false;}',"Group.prototype=new LogItem();copyProperties(Group.prototype,{addChild:function(logItem){this.children.push(logItem);logItem.group=this;},render:function(){if(isIe){var unwrappedDomContainer,wrappedDomContainer;if(this.isRoot){unwrappedDomContainer=logMainContainer;wrappedDomContainer=logMainContainer;}else{unwrappedDomContainer=this.getUnwrappedDomContainer();wrappedDomContainer=this.getWrappedDomContainer();}","this.unwrappedElementContainer=new GroupElementContainer(this,unwrappedDomContainer,this.isRoot,false);this.wrappedElementContainer=new GroupElementContainer(this,wrappedDomContainer,this.isRoot,true);this.elementContainers=[this.unwrappedElementContainer,this.wrappedElementContainer];}else{var mainDomContainer=this.isRoot?logMainContainer:this.getMainDomContainer();this.mainElementContainer=new GroupElementContainer(this,mainDomContainer,this.isRoot,false);this.elementContainers=[this.mainElementContainer];}","this.rendered=true;},toggleExpanded:function(){this.expanded=!this.expanded;for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].toggleExpanded();}},expand:function(){if(!this.expanded){this.toggleExpanded();}},accept:function(visitor){visitor.visitGroup(this);},reverseChildren:function(){if(this.rendered){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].reverseChildren();}}},update:function(){var previouslyExpandable=this.expandable;this.expandable=(this.children.length!==0);if(this.expandable!==previouslyExpandable){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].update();}}},flatten:function(){var visitor=new GroupFlattener();this.accept(visitor);return visitor.logEntriesAndSeparators;},removeChild:function(child,doUpdate){array_remove(this.children,child);child.group=null;if(doUpdate){this.update();}},remove:function(doUpdate,removeFromGroup){for(var i=0,len=this.children.length;i<len;i++){this.children[i].remove(false,false);}","this.children=[];this.update();if(this===currentGroup){currentGroup=this.group;}","this.doRemove(doUpdate,removeFromGroup);},serialize:function(items){items.push([LogItem.serializedItemKeys.GROUP_START,this.name]);for(var i=0,len=this.children.length;i<len;i++){this.children[i].serialize(items);}","if(this!==currentGroup){items.push([LogItem.serializedItemKeys.GROUP_END]);}},clear:function(){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].clear();}}});function LogEntryElementContainer(){}",'LogEntryElementContainer.prototype=new LogItemContainerElement();copyProperties(LogEntryElementContainer.prototype,{remove:function(){this.doRemove();},doRemove:function(){this.mainDiv.parentNode.removeChild(this.mainDiv);this.mainDiv=null;this.contentElement=null;this.containerDomNode=null;},setContent:function(content,wrappedContent){if(content===this.formattedMessage){this.contentElement.innerHTML="";this.contentElement.appendChild(document.createTextNode(this.formattedMessage));}else{this.contentElement.innerHTML=content;}},setSearchMatch:function(isMatch){var oldCssClass=isMatch?"searchnonmatch":"searchmatch";var newCssClass=isMatch?"searchmatch":"searchnonmatch";replaceClass(this.mainDiv,newCssClass,oldCssClass);},clearSearch:function(){removeClass(this.mainDiv,"searchmatch");removeClass(this.mainDiv,"searchnonmatch");}});function LogEntryWrappedElementContainer(logEntry,containerDomNode){this.logEntry=logEntry;this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.appendChild(document.createTextNode(this.logEntry.formattedMessage));this.mainDiv.className="logentry wrapped "+this.logEntry.level;this.contentElement=this.mainDiv;}','LogEntryWrappedElementContainer.prototype=new LogEntryElementContainer();LogEntryWrappedElementContainer.prototype.setContent=function(content,wrappedContent){if(content===this.formattedMessage){this.contentElement.innerHTML="";this.contentElement.appendChild(document.createTextNode(this.formattedMessage));}else{this.contentElement.innerHTML=wrappedContent;}};function LogEntryUnwrappedElementContainer(logEntry,containerDomNode){this.logEntry=logEntry;this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.className="logentry unwrapped "+this.logEntry.level;this.pre=this.mainDiv.appendChild(document.createElement("pre"));this.pre.appendChild(document.createTextNode(this.logEntry.formattedMessage));this.pre.className="unwrapped";this.contentElement=this.pre;}','LogEntryUnwrappedElementContainer.prototype=new LogEntryElementContainer();LogEntryUnwrappedElementContainer.prototype.remove=function(){this.doRemove();this.pre=null;};function LogEntryMainElementContainer(logEntry,containerDomNode){this.logEntry=logEntry;this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.className="logentry nonielogentry "+this.logEntry.level;this.contentElement=this.mainDiv.appendChild(document.createElement("span"));this.contentElement.appendChild(document.createTextNode(this.logEntry.formattedMessage));}',"LogEntryMainElementContainer.prototype=new LogEntryElementContainer();function LogEntry(level,formattedMessage){this.level=level;this.formattedMessage=formattedMessage;this.rendered=false;}",'LogEntry.prototype=new LogItem();copyProperties(LogEntry.prototype,{render:function(){var logEntry=this;var containerDomNode=this.group.contentDiv;if(isIe){this.formattedMessage=this.formattedMessage.replace(/\\r\\n/g,"\\r");this.unwrappedElementContainer=new LogEntryUnwrappedElementContainer(this,this.getUnwrappedDomContainer());this.wrappedElementContainer=new LogEntryWrappedElementContainer(this,this.getWrappedDomContainer());this.elementContainers=[this.unwrappedElementContainer,this.wrappedElementContainer];}else{this.mainElementContainer=new LogEntryMainElementContainer(this,this.getMainDomContainer());this.elementContainers=[this.mainElementContainer];}','this.content=this.formattedMessage;this.rendered=true;},setContent:function(content,wrappedContent){if(content!=this.content){if(isIe&&(content!==this.formattedMessage)){content=content.replace(/\\r\\n/g,"\\r");}',"for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].setContent(content,wrappedContent);}",'this.content=content;}},getSearchMatches:function(){var matches=[];var i,len;if(isIe){var unwrappedEls=getElementsByClass(this.unwrappedElementContainer.mainDiv,"searchterm","span");var wrappedEls=getElementsByClass(this.wrappedElementContainer.mainDiv,"searchterm","span");for(i=0,len=unwrappedEls.length;i<len;i++){matches[i]=new Match(this.level,null,unwrappedEls[i],wrappedEls[i]);}}else{var els=getElementsByClass(this.mainElementContainer.mainDiv,"searchterm","span");for(i=0,len=els.length;i<len;i++){matches[i]=new Match(this.level,els[i]);}}',"return matches;},setSearchMatch:function(isMatch){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].setSearchMatch(isMatch);}},clearSearch:function(){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].clearSearch();}},accept:function(visitor){visitor.visitLogEntry(this);},serialize:function(items){items.push([LogItem.serializedItemKeys.LOG_ENTRY,this.level,this.formattedMessage]);}});function LogItemVisitor(){}","LogItemVisitor.prototype={visit:function(logItem){},visitParent:function(logItem){if(logItem.group){logItem.group.accept(this);}},visitChildren:function(logItem){for(var i=0,len=logItem.children.length;i<len;i++){logItem.children[i].accept(this);}},visitLogEntry:function(logEntry){this.visit(logEntry);},visitSeparator:function(separator){this.visit(separator);},visitGroup:function(group){this.visit(group);}};function GroupFlattener(){this.logEntriesAndSeparators=[];}",'GroupFlattener.prototype=new LogItemVisitor();GroupFlattener.prototype.visitGroup=function(group){this.visitChildren(group);};GroupFlattener.prototype.visitLogEntry=function(logEntry){this.logEntriesAndSeparators.push(logEntry);};GroupFlattener.prototype.visitSeparator=function(separator){this.logEntriesAndSeparators.push(separator);};window.onload=function(){if(location.search){var queryBits=unescape(location.search).substr(1).split("&"),nameValueBits;for(var i=0,len=queryBits.length;i<len;i++){nameValueBits=queryBits[i].split("=");if(nameValueBits[0]=="log4javascript_domain"){document.domain=nameValueBits[1];break;}}}','logMainContainer=$("log");if(isIePre7){addClass(logMainContainer,"oldIe");}','rootGroup=new Group("root",true);rootGroup.render();currentGroup=rootGroup;setCommandInputWidth();setLogContainerHeight();toggleLoggingEnabled();toggleSearchEnabled();toggleSearchFilter();toggleSearchHighlight();applyFilters();checkAllLevels();toggleWrap();toggleNewestAtTop();toggleScrollToLatest();renderQueuedLogItems();loaded=true;$("command").value="";$("command").autocomplete="off";$("command").onkeydown=function(evt){evt=getEvent(evt);if(evt.keyCode==10||evt.keyCode==13){evalCommandLine();stopPropagation(evt);}else if(evt.keyCode==27){this.value="";this.focus();}else if(evt.keyCode==38&&commandHistory.length>0){currentCommandIndex=Math.max(0,currentCommandIndex-1);this.value=commandHistory[currentCommandIndex];moveCaretToEnd(this);}else if(evt.keyCode==40&&commandHistory.length>0){currentCommandIndex=Math.min(commandHistory.length-1,currentCommandIndex+1);this.value=commandHistory[currentCommandIndex];moveCaretToEnd(this);}};$("command").onkeypress=function(evt){evt=getEvent(evt);if(evt.keyCode==38&&commandHistory.length>0&&evt.preventDefault){evt.preventDefault();}};$("command").onkeyup=function(evt){evt=getEvent(evt);if(evt.keyCode==27&&evt.preventDefault){evt.preventDefault();this.focus();}};document.onkeydown=function keyEventHandler(evt){evt=getEvent(evt);switch(evt.keyCode){case 69:if(evt.shiftKey&&(evt.ctrlKey||evt.metaKey)){evalLastCommand();cancelKeyEvent(evt);return false;}',"break;case 75:if(evt.shiftKey&&(evt.ctrlKey||evt.metaKey)){focusSearch();cancelKeyEvent(evt);return false;}","break;case 40:case 76:if(evt.shiftKey&&(evt.ctrlKey||evt.metaKey)){focusCommandLine();cancelKeyEvent(evt);return false;}","break;}};setTimeout(setLogContainerHeight,20);setShowCommandLine(showCommandLine);doSearch();};window.onunload=function(){if(mainWindowExists()){appender.unload();}",'appender=null;};function toggleLoggingEnabled(){setLoggingEnabled($("enableLogging").checked);}',"function setLoggingEnabled(enable){loggingEnabled=enable;}","var appender=null;function setAppender(appenderParam){appender=appenderParam;}",'function setShowCloseButton(showCloseButton){$("closeButton").style.display=showCloseButton?"inline":"none";}','function setShowHideButton(showHideButton){$("hideButton").style.display=showHideButton?"inline":"none";}',"var newestAtTop=false;function LogItemContentReverser(){}","LogItemContentReverser.prototype=new LogItemVisitor();LogItemContentReverser.prototype.visitGroup=function(group){group.reverseChildren();this.visitChildren(group);};function setNewestAtTop(isNewestAtTop){var oldNewestAtTop=newestAtTop;var i,iLen,j,jLen;newestAtTop=Boolean(isNewestAtTop);if(oldNewestAtTop!=newestAtTop){var visitor=new LogItemContentReverser();rootGroup.accept(visitor);if(currentSearch){var currentMatch=currentSearch.matches[currentMatchIndex];var matchIndex=0;var matches=[];var actOnLogEntry=function(logEntry){var logEntryMatches=logEntry.getSearchMatches();for(j=0,jLen=logEntryMatches.length;j<jLen;j++){matches[matchIndex]=logEntryMatches[j];if(currentMatch&&logEntryMatches[j].equals(currentMatch)){currentMatchIndex=matchIndex;}","matchIndex++;}};if(newestAtTop){for(i=logEntries.length-1;i>=0;i--){actOnLogEntry(logEntries[i]);}}else{for(i=0,iLen=logEntries.length;i<iLen;i++){actOnLogEntry(logEntries[i]);}}","currentSearch.matches=matches;if(currentMatch){currentMatch.setCurrent();}}else if(scrollToLatest){doScrollToLatest();}}",'$("newestAtTop").checked=isNewestAtTop;}','function toggleNewestAtTop(){var isNewestAtTop=$("newestAtTop").checked;setNewestAtTop(isNewestAtTop);}',"var scrollToLatest=true;function setScrollToLatest(isScrollToLatest){scrollToLatest=isScrollToLatest;if(scrollToLatest){doScrollToLatest();}",'$("scrollToLatest").checked=isScrollToLatest;}','function toggleScrollToLatest(){var isScrollToLatest=$("scrollToLatest").checked;setScrollToLatest(isScrollToLatest);}','function doScrollToLatest(){var l=logMainContainer;if(typeof l.scrollTop!="undefined"){if(newestAtTop){l.scrollTop=0;}else{var latestLogEntry=l.lastChild;if(latestLogEntry){l.scrollTop=l.scrollHeight;}}}}',"var closeIfOpenerCloses=true;function setCloseIfOpenerCloses(isCloseIfOpenerCloses){closeIfOpenerCloses=isCloseIfOpenerCloses;}","var maxMessages=null;function setMaxMessages(max){maxMessages=max;pruneLogEntries();}",'var showCommandLine=false;function setShowCommandLine(isShowCommandLine){showCommandLine=isShowCommandLine;if(loaded){$("commandLine").style.display=showCommandLine?"block":"none";setCommandInputWidth();setLogContainerHeight();}}','function focusCommandLine(){if(loaded){$("command").focus();}}','function focusSearch(){if(loaded){$("searchBox").focus();}}',"function getLogItems(){var items=[];for(var i=0,len=logItems.length;i<len;i++){logItems[i].serialize(items);}","return items;}","function setLogItems(items){var loggingReallyEnabled=loggingEnabled;loggingEnabled=true;for(var i=0,len=items.length;i<len;i++){switch(items[i][0]){case LogItem.serializedItemKeys.LOG_ENTRY:log(items[i][1],items[i][2]);break;case LogItem.serializedItemKeys.GROUP_START:group(items[i][1]);break;case LogItem.serializedItemKeys.GROUP_END:groupEnd();break;}}","loggingEnabled=loggingReallyEnabled;}","function log(logLevel,formattedMessage){if(loggingEnabled){var logEntry=new LogEntry(logLevel,formattedMessage);logEntries.push(logEntry);logEntriesAndSeparators.push(logEntry);logItems.push(logEntry);currentGroup.addChild(logEntry);if(loaded){if(logQueuedEventsTimer!==null){clearTimeout(logQueuedEventsTimer);}","logQueuedEventsTimer=setTimeout(renderQueuedLogItems,renderDelay);unrenderedLogItemsExist=true;}}}","function renderQueuedLogItems(){logQueuedEventsTimer=null;var pruned=pruneLogEntries();var initiallyHasMatches=currentSearch?currentSearch.hasMatches():false;for(var i=0,len=logItems.length;i<len;i++){if(!logItems[i].rendered){logItems[i].render();logItems[i].appendToLog();if(currentSearch&&(logItems[i]instanceof LogEntry)){currentSearch.applyTo(logItems[i]);}}}","if(currentSearch){if(pruned){if(currentSearch.hasVisibleMatches()){if(currentMatchIndex===null){setCurrentMatchIndex(0);}","displayMatches();}else{displayNoMatches();}}else if(!initiallyHasMatches&&currentSearch.hasVisibleMatches()){setCurrentMatchIndex(0);displayMatches();}}","if(scrollToLatest){doScrollToLatest();}","unrenderedLogItemsExist=false;}","function pruneLogEntries(){if((maxMessages!==null)&&(logEntriesAndSeparators.length>maxMessages)){var numberToDelete=logEntriesAndSeparators.length-maxMessages;var prunedLogEntries=logEntriesAndSeparators.slice(0,numberToDelete);if(currentSearch){currentSearch.removeMatches(prunedLogEntries);}","var group;for(var i=0;i<numberToDelete;i++){group=logEntriesAndSeparators[i].group;array_remove(logItems,logEntriesAndSeparators[i]);array_remove(logEntries,logEntriesAndSeparators[i]);logEntriesAndSeparators[i].remove(true,true);if(group.children.length===0&&group!==currentGroup&&group!==rootGroup){array_remove(logItems,group);group.remove(true,true);}}","logEntriesAndSeparators=array_removeFromStart(logEntriesAndSeparators,numberToDelete);return true;}","return false;}",'function group(name,startExpanded){if(loggingEnabled){initiallyExpanded=(typeof startExpanded==="undefined")?true:Boolean(startExpanded);var newGroup=new Group(name,false,initiallyExpanded);currentGroup.addChild(newGroup);currentGroup=newGroup;logItems.push(newGroup);if(loaded){if(logQueuedEventsTimer!==null){clearTimeout(logQueuedEventsTimer);}',"logQueuedEventsTimer=setTimeout(renderQueuedLogItems,renderDelay);unrenderedLogItemsExist=true;}}}","function groupEnd(){currentGroup=(currentGroup===rootGroup)?rootGroup:currentGroup.group;}","function mainPageReloaded(){currentGroup=rootGroup;var separator=new Separator();logEntriesAndSeparators.push(separator);logItems.push(separator);currentGroup.addChild(separator);}","function closeWindow(){if(appender&&mainWindowExists()){appender.close(true);}else{window.close();}}","function hide(){if(appender&&mainWindowExists()){appender.hide();}}",'var mainWindow=window;var windowId="log4javascriptConsoleWindow_"+new Date().getTime()+"_"+(""+Math.random()).substr(2);function setMainWindow(win){mainWindow=win;mainWindow[windowId]=window;if(opener&&closeIfOpenerCloses){pollOpener();}}',"function pollOpener(){if(closeIfOpenerCloses){if(mainWindowExists()){setTimeout(pollOpener,500);}else{closeWindow();}}}","function mainWindowExists(){try{return(mainWindow&&!mainWindow.closed&&mainWindow[windowId]==window);}catch(ex){}","return false;}",'var logLevels=["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"];function getCheckBox(logLevel){return $("switch_"+logLevel);}','function getIeWrappedLogContainer(){return $("log_wrapped");}','function getIeUnwrappedLogContainer(){return $("log_unwrapped");}',"function applyFilters(){for(var i=0;i<logLevels.length;i++){if(getCheckBox(logLevels[i]).checked){addClass(logMainContainer,logLevels[i]);}else{removeClass(logMainContainer,logLevels[i]);}}","updateSearchFromFilters();}",'function toggleAllLevels(){var turnOn=$("switch_ALL").checked;for(var i=0;i<logLevels.length;i++){getCheckBox(logLevels[i]).checked=turnOn;if(turnOn){addClass(logMainContainer,logLevels[i]);}else{removeClass(logMainContainer,logLevels[i]);}}}','function checkAllLevels(){for(var i=0;i<logLevels.length;i++){if(!getCheckBox(logLevels[i]).checked){getCheckBox("ALL").checked=false;return;}}','getCheckBox("ALL").checked=true;}',"function clearLog(){rootGroup.clear();currentGroup=rootGroup;logEntries=[];logItems=[];logEntriesAndSeparators=[];doSearch();}",'function toggleWrap(){var enable=$("wrap").checked;if(enable){addClass(logMainContainer,"wrap");}else{removeClass(logMainContainer,"wrap");}',"refreshCurrentMatch();}","var searchTimer=null;function scheduleSearch(){try{clearTimeout(searchTimer);}catch(ex){}","searchTimer=setTimeout(doSearch,500);}","function Search(searchTerm,isRegex,searchRegex,isCaseSensitive){this.searchTerm=searchTerm;this.isRegex=isRegex;this.searchRegex=searchRegex;this.isCaseSensitive=isCaseSensitive;this.matches=[];}","Search.prototype={hasMatches:function(){return this.matches.length>0;},hasVisibleMatches:function(){if(this.hasMatches()){for(var i=0;i<this.matches.length;i++){if(this.matches[i].isVisible()){return true;}}}","return false;},match:function(logEntry){var entryText=String(logEntry.formattedMessage);var matchesSearch=false;if(this.isRegex){matchesSearch=this.searchRegex.test(entryText);}else if(this.isCaseSensitive){matchesSearch=(entryText.indexOf(this.searchTerm)>-1);}else{matchesSearch=(entryText.toLowerCase().indexOf(this.searchTerm.toLowerCase())>-1);}","return matchesSearch;},getNextVisibleMatchIndex:function(){for(var i=currentMatchIndex+1;i<this.matches.length;i++){if(this.matches[i].isVisible()){return i;}}","for(i=0;i<=currentMatchIndex;i++){if(this.matches[i].isVisible()){return i;}}","return-1;},getPreviousVisibleMatchIndex:function(){for(var i=currentMatchIndex-1;i>=0;i--){if(this.matches[i].isVisible()){return i;}}","for(var i=this.matches.length-1;i>=currentMatchIndex;i--){if(this.matches[i].isVisible()){return i;}}",'return-1;},applyTo:function(logEntry){var doesMatch=this.match(logEntry);if(doesMatch){logEntry.group.expand();logEntry.setSearchMatch(true);var logEntryContent;var wrappedLogEntryContent;var searchTermReplacementStartTag="<span class=\\"searchterm\\">";var searchTermReplacementEndTag="<"+"/span>";var preTagName=isIe?"pre":"span";var preStartTag="<"+preTagName+" class=\\"pre\\">";var preEndTag="<"+"/"+preTagName+">";var startIndex=0;var searchIndex,matchedText,textBeforeMatch;if(this.isRegex){var flags=this.isCaseSensitive?"g":"gi";var capturingRegex=new RegExp("("+this.searchRegex.source+")",flags);var rnd=(""+Math.random()).substr(2);var startToken="%%s"+rnd+"%%";var endToken="%%e"+rnd+"%%";logEntryContent=logEntry.formattedMessage.replace(capturingRegex,startToken+"$1"+endToken);logEntryContent=escapeHtml(logEntryContent);var result;var searchString=logEntryContent;logEntryContent="";wrappedLogEntryContent="";while((searchIndex=searchString.indexOf(startToken,startIndex))>-1){var endTokenIndex=searchString.indexOf(endToken,searchIndex);matchedText=searchString.substring(searchIndex+startToken.length,endTokenIndex);textBeforeMatch=searchString.substring(startIndex,searchIndex);logEntryContent+=preStartTag+textBeforeMatch+preEndTag;logEntryContent+=searchTermReplacementStartTag+preStartTag+matchedText+',"preEndTag+searchTermReplacementEndTag;if(isIe){wrappedLogEntryContent+=textBeforeMatch+searchTermReplacementStartTag+","matchedText+searchTermReplacementEndTag;}","startIndex=endTokenIndex+endToken.length;}",'logEntryContent+=preStartTag+searchString.substr(startIndex)+preEndTag;if(isIe){wrappedLogEntryContent+=searchString.substr(startIndex);}}else{logEntryContent="";wrappedLogEntryContent="";var searchTermReplacementLength=searchTermReplacementStartTag.length+',"this.searchTerm.length+searchTermReplacementEndTag.length;var searchTermLength=this.searchTerm.length;var searchTermLowerCase=this.searchTerm.toLowerCase();var logTextLowerCase=logEntry.formattedMessage.toLowerCase();while((searchIndex=logTextLowerCase.indexOf(searchTermLowerCase,startIndex))>-1){matchedText=escapeHtml(logEntry.formattedMessage.substr(searchIndex,this.searchTerm.length));textBeforeMatch=escapeHtml(logEntry.formattedMessage.substring(startIndex,searchIndex));var searchTermReplacement=searchTermReplacementStartTag+","preStartTag+matchedText+preEndTag+searchTermReplacementEndTag;logEntryContent+=preStartTag+textBeforeMatch+preEndTag+searchTermReplacement;if(isIe){wrappedLogEntryContent+=textBeforeMatch+searchTermReplacementStartTag+","matchedText+searchTermReplacementEndTag;}","startIndex=searchIndex+searchTermLength;}","var textAfterLastMatch=escapeHtml(logEntry.formattedMessage.substr(startIndex));logEntryContent+=preStartTag+textAfterLastMatch+preEndTag;if(isIe){wrappedLogEntryContent+=textAfterLastMatch;}}","logEntry.setContent(logEntryContent,wrappedLogEntryContent);var logEntryMatches=logEntry.getSearchMatches();this.matches=this.matches.concat(logEntryMatches);}else{logEntry.setSearchMatch(false);logEntry.setContent(logEntry.formattedMessage,logEntry.formattedMessage);}","return doesMatch;},removeMatches:function(logEntries){var matchesToRemoveCount=0;var currentMatchRemoved=false;var matchesToRemove=[];var i,iLen,j,jLen;for(i=0,iLen=this.matches.length;i<iLen;i++){for(j=0,jLen=logEntries.length;j<jLen;j++){if(this.matches[i].belongsTo(logEntries[j])){matchesToRemove.push(this.matches[i]);if(i===currentMatchIndex){currentMatchRemoved=true;}}}}","var newMatch=currentMatchRemoved?null:this.matches[currentMatchIndex];if(currentMatchRemoved){for(i=currentMatchIndex,iLen=this.matches.length;i<iLen;i++){if(this.matches[i].isVisible()&&!array_contains(matchesToRemove,this.matches[i])){newMatch=this.matches[i];break;}}}","for(i=0,iLen=matchesToRemove.length;i<iLen;i++){array_remove(this.matches,matchesToRemove[i]);matchesToRemove[i].remove();}","if(this.hasVisibleMatches()){if(newMatch===null){setCurrentMatchIndex(0);}else{var newMatchIndex=0;for(i=0,iLen=this.matches.length;i<iLen;i++){if(newMatch===this.matches[i]){newMatchIndex=i;break;}}","setCurrentMatchIndex(newMatchIndex);}}else{currentMatchIndex=null;displayNoMatches();}}};function getPageOffsetTop(el,container){var currentEl=el;var y=0;while(currentEl&&currentEl!=container){y+=currentEl.offsetTop;currentEl=currentEl.offsetParent;}","return y;}",'function scrollIntoView(el){var logContainer=logMainContainer;if(!$("wrap").checked){var logContainerLeft=logContainer.scrollLeft;var logContainerRight=logContainerLeft+logContainer.offsetWidth;var elLeft=el.offsetLeft;var elRight=elLeft+el.offsetWidth;if(elLeft<logContainerLeft||elRight>logContainerRight){logContainer.scrollLeft=elLeft-(logContainer.offsetWidth-el.offsetWidth)/2;}}',"var logContainerTop=logContainer.scrollTop;var logContainerBottom=logContainerTop+logContainer.offsetHeight;var elTop=getPageOffsetTop(el)-getToolBarsHeight();var elBottom=elTop+el.offsetHeight;if(elTop<logContainerTop||elBottom>logContainerBottom){logContainer.scrollTop=elTop-(logContainer.offsetHeight-el.offsetHeight)/2;}}","function Match(logEntryLevel,spanInMainDiv,spanInUnwrappedPre,spanInWrappedDiv){this.logEntryLevel=logEntryLevel;this.spanInMainDiv=spanInMainDiv;if(isIe){this.spanInUnwrappedPre=spanInUnwrappedPre;this.spanInWrappedDiv=spanInWrappedDiv;}","this.mainSpan=isIe?spanInUnwrappedPre:spanInMainDiv;}",'Match.prototype={equals:function(match){return this.mainSpan===match.mainSpan;},setCurrent:function(){if(isIe){addClass(this.spanInUnwrappedPre,"currentmatch");addClass(this.spanInWrappedDiv,"currentmatch");var elementToScroll=$("wrap").checked?this.spanInWrappedDiv:this.spanInUnwrappedPre;scrollIntoView(elementToScroll);}else{addClass(this.spanInMainDiv,"currentmatch");scrollIntoView(this.spanInMainDiv);}},belongsTo:function(logEntry){if(isIe){return isDescendant(this.spanInUnwrappedPre,logEntry.unwrappedPre);}else{return isDescendant(this.spanInMainDiv,logEntry.mainDiv);}},setNotCurrent:function(){if(isIe){removeClass(this.spanInUnwrappedPre,"currentmatch");removeClass(this.spanInWrappedDiv,"currentmatch");}else{removeClass(this.spanInMainDiv,"currentmatch");}},isOrphan:function(){return isOrphan(this.mainSpan);},isVisible:function(){return getCheckBox(this.logEntryLevel).checked;},remove:function(){if(isIe){this.spanInUnwrappedPre=null;this.spanInWrappedDiv=null;}else{this.spanInMainDiv=null;}}};var currentSearch=null;var currentMatchIndex=null;function doSearch(){var searchBox=$("searchBox");var searchTerm=searchBox.value;var isRegex=$("searchRegex").checked;var isCaseSensitive=$("searchCaseSensitive").checked;var i;if(searchTerm===""){$("searchReset").disabled=true;$("searchNav").style.display="none";removeClass(document.body,"searching");removeClass(searchBox,"hasmatches");removeClass(searchBox,"nomatches");for(i=0;i<logEntries.length;i++){logEntries[i].clearSearch();logEntries[i].setContent(logEntries[i].formattedMessage,logEntries[i].formattedMessage);}','currentSearch=null;setLogContainerHeight();}else{$("searchReset").disabled=false;$("searchNav").style.display="block";var searchRegex;var regexValid;if(isRegex){try{searchRegex=isCaseSensitive?new RegExp(searchTerm,"g"):new RegExp(searchTerm,"gi");regexValid=true;replaceClass(searchBox,"validregex","invalidregex");searchBox.title="Valid regex";}catch(ex){regexValid=false;replaceClass(searchBox,"invalidregex","validregex");searchBox.title="Invalid regex: "+(ex.message?ex.message:(ex.description?ex.description:"unknown error"));return;}}else{searchBox.title="";removeClass(searchBox,"validregex");removeClass(searchBox,"invalidregex");}','addClass(document.body,"searching");currentSearch=new Search(searchTerm,isRegex,searchRegex,isCaseSensitive);for(i=0;i<logEntries.length;i++){currentSearch.applyTo(logEntries[i]);}',"setLogContainerHeight();if(currentSearch.hasVisibleMatches()){setCurrentMatchIndex(0);displayMatches();}else{displayNoMatches();}}}","function updateSearchFromFilters(){if(currentSearch){if(currentSearch.hasMatches()){if(currentMatchIndex===null){currentMatchIndex=0;}","var currentMatch=currentSearch.matches[currentMatchIndex];if(currentMatch.isVisible()){displayMatches();setCurrentMatchIndex(currentMatchIndex);}else{currentMatch.setNotCurrent();var nextVisibleMatchIndex=currentSearch.getNextVisibleMatchIndex();if(nextVisibleMatchIndex>-1){setCurrentMatchIndex(nextVisibleMatchIndex);displayMatches();}else{displayNoMatches();}}}else{displayNoMatches();}}}","function refreshCurrentMatch(){if(currentSearch&&currentSearch.hasVisibleMatches()){setCurrentMatchIndex(currentMatchIndex);}}",'function displayMatches(){replaceClass($("searchBox"),"hasmatches","nomatches");$("searchBox").title=""+currentSearch.matches.length+" matches found";$("searchNav").style.display="block";setLogContainerHeight();}','function displayNoMatches(){replaceClass($("searchBox"),"nomatches","hasmatches");$("searchBox").title="No matches found";$("searchNav").style.display="none";setLogContainerHeight();}','function toggleSearchEnabled(enable){enable=(typeof enable=="undefined")?!$("searchDisable").checked:enable;$("searchBox").disabled=!enable;$("searchReset").disabled=!enable;$("searchRegex").disabled=!enable;$("searchNext").disabled=!enable;$("searchPrevious").disabled=!enable;$("searchCaseSensitive").disabled=!enable;$("searchNav").style.display=(enable&&($("searchBox").value!=="")&&currentSearch&&currentSearch.hasVisibleMatches())?"block":"none";if(enable){removeClass($("search"),"greyedout");addClass(document.body,"searching");if($("searchHighlight").checked){addClass(logMainContainer,"searchhighlight");}else{removeClass(logMainContainer,"searchhighlight");}','if($("searchFilter").checked){addClass(logMainContainer,"searchfilter");}else{removeClass(logMainContainer,"searchfilter");}','$("searchDisable").checked=!enable;}else{addClass($("search"),"greyedout");removeClass(document.body,"searching");removeClass(logMainContainer,"searchhighlight");removeClass(logMainContainer,"searchfilter");}',"setLogContainerHeight();}",'function toggleSearchFilter(){var enable=$("searchFilter").checked;if(enable){addClass(logMainContainer,"searchfilter");}else{removeClass(logMainContainer,"searchfilter");}',"refreshCurrentMatch();}",'function toggleSearchHighlight(){var enable=$("searchHighlight").checked;if(enable){addClass(logMainContainer,"searchhighlight");}else{removeClass(logMainContainer,"searchhighlight");}}','function clearSearch(){$("searchBox").value="";doSearch();}','function searchNext(){if(currentSearch!==null&&currentMatchIndex!==null){currentSearch.matches[currentMatchIndex].setNotCurrent();var nextMatchIndex=currentSearch.getNextVisibleMatchIndex();if(nextMatchIndex>currentMatchIndex||confirm("Reached the end of the page. Start from the top?")){setCurrentMatchIndex(nextMatchIndex);}}}','function searchPrevious(){if(currentSearch!==null&&currentMatchIndex!==null){currentSearch.matches[currentMatchIndex].setNotCurrent();var previousMatchIndex=currentSearch.getPreviousVisibleMatchIndex();if(previousMatchIndex<currentMatchIndex||confirm("Reached the start of the page. Continue from the bottom?")){setCurrentMatchIndex(previousMatchIndex);}}}',"function setCurrentMatchIndex(index){currentMatchIndex=index;currentSearch.matches[currentMatchIndex].setCurrent();}",'function addClass(el,cssClass){if(!hasClass(el,cssClass)){if(el.className){el.className+=" "+cssClass;}else{el.className=cssClass;}}}','function hasClass(el,cssClass){if(el.className){var classNames=el.className.split(" ");return array_contains(classNames,cssClass);}',"return false;}",'function removeClass(el,cssClass){if(hasClass(el,cssClass)){var existingClasses=el.className.split(" ");var newClasses=[];for(var i=0,len=existingClasses.length;i<len;i++){if(existingClasses[i]!=cssClass){newClasses[newClasses.length]=existingClasses[i];}}','el.className=newClasses.join(" ");}}',"function replaceClass(el,newCssClass,oldCssClass){removeClass(el,oldCssClass);addClass(el,newCssClass);}","function getElementsByClass(el,cssClass,tagName){var elements=el.getElementsByTagName(tagName);var matches=[];for(var i=0,len=elements.length;i<len;i++){if(hasClass(elements[i],cssClass)){matches.push(elements[i]);}}","return matches;}","function $(id){return document.getElementById(id);}","function isDescendant(node,ancestorNode){while(node!=null){if(node===ancestorNode){return true;}","node=node.parentNode;}","return false;}","function isOrphan(node){var currentNode=node;while(currentNode){if(currentNode==document.body){return false;}","currentNode=currentNode.parentNode;}","return true;}",'function escapeHtml(str){return str.replace(/&/g,"&amp;").replace(/[<]/g,"&lt;").replace(/>/g,"&gt;");}',"function getWindowWidth(){if(window.innerWidth){return window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientWidth;}else if(document.body){return document.body.clientWidth;}","return 0;}","function getWindowHeight(){if(window.innerHeight){return window.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight;}else if(document.body){return document.body.clientHeight;}","return 0;}",'function getToolBarsHeight(){return $("switches").offsetHeight;}','function getChromeHeight(){var height=getToolBarsHeight();if(showCommandLine){height+=$("commandLine").offsetHeight;}',"return height;}",'function setLogContainerHeight(){if(logMainContainer){var windowHeight=getWindowHeight();$("body").style.height=getWindowHeight()+"px";logMainContainer.style.height=""+','Math.max(0,windowHeight-getChromeHeight())+"px";}}','function setCommandInputWidth(){if(showCommandLine){$("command").style.width=""+Math.max(0,$("commandLineContainer").offsetWidth-','($("evaluateButton").offsetWidth+13))+"px";}}',"window.onresize=function(){setCommandInputWidth();setLogContainerHeight();};if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0,len=arguments.length;i<len;i++){this[this.length]=arguments[i];}","return this.length;};}","if(!Array.prototype.pop){Array.prototype.pop=function(){if(this.length>0){var val=this[this.length-1];this.length=this.length-1;return val;}};}","if(!Array.prototype.shift){Array.prototype.shift=function(){if(this.length>0){var firstItem=this[0];for(var i=0,len=this.length-1;i<len;i++){this[i]=this[i+1];}","this.length=this.length-1;return firstItem;}};}","if(!Array.prototype.splice){Array.prototype.splice=function(startIndex,deleteCount){var itemsAfterDeleted=this.slice(startIndex+deleteCount);var itemsDeleted=this.slice(startIndex,startIndex+deleteCount);this.length=startIndex;var argumentsArray=[];for(var i=0,len=arguments.length;i<len;i++){argumentsArray[i]=arguments[i];}","var itemsToAppend=(argumentsArray.length>2)?itemsAfterDeleted=argumentsArray.slice(2).concat(itemsAfterDeleted):itemsAfterDeleted;for(i=0,len=itemsToAppend.length;i<len;i++){this.push(itemsToAppend[i]);}","return itemsDeleted;};}","function array_remove(arr,val){var index=-1;for(var i=0,len=arr.length;i<len;i++){if(arr[i]===val){index=i;break;}}","if(index>=0){arr.splice(index,1);return index;}else{return false;}}","function array_removeFromStart(array,numberToRemove){if(Array.prototype.splice){array.splice(0,numberToRemove);}else{for(var i=numberToRemove,len=array.length;i<len;i++){array[i-numberToRemove]=array[i];}","array.length=array.length-numberToRemove;}","return array;}","function array_contains(arr,val){for(var i=0,len=arr.length;i<len;i++){if(arr[i]==val){return true;}}","return false;}","function getErrorMessage(ex){if(ex.message){return ex.message;}else if(ex.description){return ex.description;}",'return""+ex;}',"function moveCaretToEnd(input){if(input.setSelectionRange){input.focus();var length=input.value.length;input.setSelectionRange(length,length);}else if(input.createTextRange){var range=input.createTextRange();range.collapse(false);range.select();}","input.focus();}",'function stopPropagation(evt){if(evt.stopPropagation){evt.stopPropagation();}else if(typeof evt.cancelBubble!="undefined"){evt.cancelBubble=true;}}',"function getEvent(evt){return evt?evt:event;}","function getTarget(evt){return evt.target?evt.target:evt.srcElement;}",'function getRelatedTarget(evt){if(evt.relatedTarget){return evt.relatedTarget;}else if(evt.srcElement){switch(evt.type){case"mouseover":return evt.fromElement;case"mouseout":return evt.toElement;default:return evt.srcElement;}}}',"function cancelKeyEvent(evt){evt.returnValue=false;stopPropagation(evt);}",'function evalCommandLine(){var expr=$("command").value;evalCommand(expr);$("command").value="";}',"function evalLastCommand(){if(lastCommand!=null){evalCommand(lastCommand);}}",'var lastCommand=null;var commandHistory=[];var currentCommandIndex=0;function evalCommand(expr){if(appender){appender.evalCommandAndAppend(expr);}else{var prefix=">>> "+expr+"\\r\\n";try{log("INFO",prefix+eval(expr));}catch(ex){log("ERROR",prefix+"Error: "+getErrorMessage(ex));}}',"if(expr!=commandHistory[commandHistory.length-1]){commandHistory.push(expr);if(appender){appender.storeCommandHistory(commandHistory);}}","currentCommandIndex=(expr==commandHistory[currentCommandIndex])?currentCommandIndex+1:commandHistory.length;lastCommand=expr;}","//]\]>","<\/script>",'<style type="text/css">',"body{background-color:white;color:black;padding:0;margin:0;font-family:tahoma,verdana,arial,helvetica,sans-serif;overflow:hidden}div#switchesContainer input{margin-bottom:0}div.toolbar{border-top:solid #ffffff 1px;border-bottom:solid #aca899 1px;background-color:#f1efe7;padding:3px 5px;font-size:68.75%}div.toolbar,div#search input{font-family:tahoma,verdana,arial,helvetica,sans-serif}div.toolbar input.button{padding:0 5px;font-size:100%}div.toolbar input.hidden{display:none}div#switches input#clearButton{margin-left:20px}div#levels label{font-weight:bold}div#levels label,div#options label{margin-right:5px}div#levels label#wrapLabel{font-weight:normal}div#search label{margin-right:10px}div#search label.searchboxlabel{margin-right:0}div#search input{font-size:100%}div#search input.validregex{color:green}div#search input.invalidregex{color:red}div#search input.nomatches{color:white;background-color:#ff6666}div#search input.nomatches{color:white;background-color:#ff6666}div#searchNav{display:none}div#commandLine{display:none}div#commandLine input#command{font-size:100%;font-family:Courier New,Courier}div#commandLine input#evaluateButton{}*.greyedout{color:gray !important;border-color:gray !important}*.greyedout *.alwaysenabled{color:black}*.unselectable{-khtml-user-select:none;-moz-user-select:none;user-select:none}div#log{font-family:Courier New,Courier;font-size:75%;width:100%;overflow:auto;clear:both;position:relative}div.group{border-color:#cccccc;border-style:solid;border-width:1px 0 1px 1px;overflow:visible}div.oldIe div.group,div.oldIe div.group *,div.oldIe *.logentry{height:1%}div.group div.groupheading span.expander{border:solid black 1px;font-family:Courier New,Courier;font-size:0.833em;background-color:#eeeeee;position:relative;top:-1px;color:black;padding:0 2px;cursor:pointer;cursor:hand;height:1%}div.group div.groupcontent{margin-left:10px;padding-bottom:2px;overflow:visible}div.group div.expanded{display:block}div.group div.collapsed{display:none}*.logentry{overflow:visible;display:none;white-space:pre}span.pre{white-space:pre}pre.unwrapped{display:inline !important}pre.unwrapped pre.pre,div.wrapped pre.pre{display:inline}div.wrapped pre.pre{white-space:normal}div.wrapped{display:none}body.searching *.logentry span.currentmatch{color:white !important;background-color:green !important}body.searching div.searchhighlight *.logentry span.searchterm{color:black;background-color:yellow}div.wrap *.logentry{white-space:normal !important;border-width:0 0 1px 0;border-color:#dddddd;border-style:dotted}div.wrap #log_wrapped,#log_unwrapped{display:block}div.wrap #log_unwrapped,#log_wrapped{display:none}div.wrap *.logentry span.pre{overflow:visible;white-space:normal}div.wrap *.logentry pre.unwrapped{display:none}div.wrap *.logentry span.wrapped{display:inline}div.searchfilter *.searchnonmatch{display:none !important}div#log *.TRACE,label#label_TRACE{color:#666666}div#log *.DEBUG,label#label_DEBUG{color:green}div#log *.INFO,label#label_INFO{color:#000099}div#log *.WARN,label#label_WARN{color:#999900}div#log *.ERROR,label#label_ERROR{color:red}div#log *.FATAL,label#label_FATAL{color:#660066}div.TRACE#log *.TRACE,div.DEBUG#log *.DEBUG,div.INFO#log *.INFO,div.WARN#log *.WARN,div.ERROR#log *.ERROR,div.FATAL#log *.FATAL{display:block}div#log div.separator{background-color:#cccccc;margin:5px 0;line-height:1px}","<\/style>","<\/head>",'<body id="body">','<div id="switchesContainer">','<div id="switches">','<div id="levels" class="toolbar">',"Filters:",'<input type="checkbox" id="switch_TRACE" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide trace messages" /><label for="switch_TRACE" id="label_TRACE">trace<\/label>','<input type="checkbox" id="switch_DEBUG" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide debug messages" /><label for="switch_DEBUG" id="label_DEBUG">debug<\/label>','<input type="checkbox" id="switch_INFO" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide info messages" /><label for="switch_INFO" id="label_INFO">info<\/label>','<input type="checkbox" id="switch_WARN" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide warn messages" /><label for="switch_WARN" id="label_WARN">warn<\/label>','<input type="checkbox" id="switch_ERROR" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide error messages" /><label for="switch_ERROR" id="label_ERROR">error<\/label>','<input type="checkbox" id="switch_FATAL" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide fatal messages" /><label for="switch_FATAL" id="label_FATAL">fatal<\/label>','<input type="checkbox" id="switch_ALL" onclick="toggleAllLevels(); applyFilters()" checked="checked" title="Show/hide all messages" /><label for="switch_ALL" id="label_ALL">all<\/label>',"<\/div>",'<div id="search" class="toolbar">','<label for="searchBox" class="searchboxlabel">Search:<\/label> <input type="text" id="searchBox" onclick="toggleSearchEnabled(true)" onkeyup="scheduleSearch()" size="20" />','<input type="button" id="searchReset" disabled="disabled" value="Reset" onclick="clearSearch()" class="button" title="Reset the search" />','<input type="checkbox" id="searchRegex" onclick="doSearch()" title="If checked, search is treated as a regular expression" /><label for="searchRegex">Regex<\/label>','<input type="checkbox" id="searchCaseSensitive" onclick="doSearch()" title="If checked, search is case sensitive" /><label for="searchCaseSensitive">Match case<\/label>','<input type="checkbox" id="searchDisable" onclick="toggleSearchEnabled()" title="Enable/disable search" /><label for="searchDisable" class="alwaysenabled">Disable<\/label>','<div id="searchNav">','<input type="button" id="searchNext" disabled="disabled" value="Next" onclick="searchNext()" class="button" title="Go to the next matching log entry" />','<input type="button" id="searchPrevious" disabled="disabled" value="Previous" onclick="searchPrevious()" class="button" title="Go to the previous matching log entry" />','<input type="checkbox" id="searchFilter" onclick="toggleSearchFilter()" title="If checked, non-matching log entries are filtered out" /><label for="searchFilter">Filter<\/label>','<input type="checkbox" id="searchHighlight" onclick="toggleSearchHighlight()" title="Highlight matched search terms" /><label for="searchHighlight" class="alwaysenabled">Highlight all<\/label>',"<\/div>","<\/div>",'<div id="options" class="toolbar">',"Options:",'<input type="checkbox" id="enableLogging" onclick="toggleLoggingEnabled()" checked="checked" title="Enable/disable logging" /><label for="enableLogging" id="enableLoggingLabel">Log<\/label>','<input type="checkbox" id="wrap" onclick="toggleWrap()" title="Enable / disable word wrap" /><label for="wrap" id="wrapLabel">Wrap<\/label>','<input type="checkbox" id="newestAtTop" onclick="toggleNewestAtTop()" title="If checked, causes newest messages to appear at the top" /><label for="newestAtTop" id="newestAtTopLabel">Newest at the top<\/label>','<input type="checkbox" id="scrollToLatest" onclick="toggleScrollToLatest()" checked="checked" title="If checked, window automatically scrolls to a new message when it is added" /><label for="scrollToLatest" id="scrollToLatestLabel">Scroll to latest<\/label>','<input type="button" id="clearButton" value="Clear" onclick="clearLog()" class="button" title="Clear all log messages"  />','<input type="button" id="hideButton" value="Hide" onclick="hide()" class="hidden button" title="Hide the console" />','<input type="button" id="closeButton" value="Close" onclick="closeWindow()" class="hidden button" title="Close the window" />',"<\/div>","<\/div>","<\/div>",'<div id="log" class="TRACE DEBUG INFO WARN ERROR FATAL"><\/div>','<div id="commandLine" class="toolbar">','<div id="commandLineContainer">','<input type="text" id="command" title="Enter a JavaScript command here and hit return or press \'Evaluate\'" />','<input type="button" id="evaluateButton" value="Evaluate" class="button" title="Evaluate the command" onclick="evalCommandLine()" />',"<\/div>","<\/div>","<\/body>","<\/html>",""]},v=[],p;s=function(){};p=1;s.prototype=new u;s.prototype.create=function(u,s,c,a,b,k,g,nt){function cr(n,t){this.loggingEvent=n;this.levelName=n.level.name;this.formattedMessage=t}function lr(n,t){this.name=n;this.initiallyExpanded=t}function ar(){}var ft=this,ti=!1,yt=!1,ht=!1,rt=!1,dt=[],ct=!0,hr=p++,ii,ri,ni,wi,bi,it,ki,bt,gi,nr,tr,si,ir,lt,hi,er,vt,di,st;a=d(a,this.defaults.initiallyMinimized);c=d(c,this.defaults.lazyInit);b=d(b,this.defaults.useDocumentWrite);ii=this.defaults.newestMessageAtTop;ri=this.defaults.scrollToLatestMessage;k=k?k:this.defaults.width;g=g?g:this.defaults.height;var ui=this.defaults.maxMessages,fi=this.defaults.showCommandLine,li=this.defaults.commandLineObjectExpansionDepth,ai=this.defaults.showHideButton,yi=this.defaults.showCloseButton,yr=this.defaults.showLogEntryDeleteButtons;this.setLayout(this.defaults.layout);var pi,gt,ei,tt,pt,vr=u?"InPageAppender":"PopUpAppender",wt=function(n){return yt?(i(vr+": configuration option '"+n+"' may not be set after the appender has been initialized"),!1):!0},et=function(){return ht&&ct&&!rt};if(this.isNewestMessageAtTop=function(){return ii},this.setNewestMessageAtTop=function(n){ii=r(n);et()&&tt().setNewestAtTop(ii)},this.isScrollToLatestMessage=function(){return ri},this.setScrollToLatestMessage=function(n){ri=r(n);et()&&tt().setScrollToLatest(ri)},this.getWidth=function(){return k},this.setWidth=function(n){wt("width")&&(k=l(n,k))},this.getHeight=function(){return g},this.setHeight=function(n){wt("height")&&(g=l(n,g))},this.getMaxMessages=function(){return ui},this.setMaxMessages=function(n){ui=at(n,ui);et()&&tt().setMaxMessages(ui)},this.isShowCommandLine=function(){return fi},this.setShowCommandLine=function(n){fi=r(n);et()&&tt().setShowCommandLine(fi)},this.isShowHideButton=function(){return ai},this.setShowHideButton=function(n){ai=r(n);et()&&tt().setShowHideButton(ai)},this.isShowCloseButton=function(){return yi},this.setShowCloseButton=function(n){yi=r(n);et()&&tt().setShowCloseButton(yi)},this.getCommandLineObjectExpansionDepth=function(){return li},this.setCommandLineObjectExpansionDepth=function(n){li=at(n,li)},ni=a,this.isInitiallyMinimized=function(){return a},this.setInitiallyMinimized=function(n){wt("initiallyMinimized")&&(a=r(n),ni=a)},this.isUseDocumentWrite=function(){return b},this.setUseDocumentWrite=function(n){wt("useDocumentWrite")&&(b=r(n))},cr.prototype.append=function(){tt().log(this.levelName,this.formattedMessage)},lr.prototype.append=function(){tt().group(this.name,this.initiallyExpanded)},ar.prototype.append=function(){tt().groupEnd()},wi=function(){ei();ti?rt&&sr&&gt():pi();ei()&&bi()},this.append=function(n){if(ct){var t=ft.getLayout().format(n);this.getLayout().ignoresThrowable()&&(t+=n.getThrowableStrRep());dt.push(new cr(n,t));wi()}},this.group=function(n,t){ct&&(dt.push(new lr(n,t)),wi())},this.groupEnd=function(){ct&&(dt.push(new ar),wi())},bi=function(){for(;dt.length>0;)dt.shift().append();nt&&tt().focus()},this.setAddedToLogger=function(n){this.loggers.push(n);h&&!c&&pi()},this.clear=function(){et()&&tt().clearLog();dt.length=0},this.focus=function(){et()&&tt().focus()},this.focusCommandLine=function(){et()&&tt().focusCommandLine()},this.focusSearch=function(){et()&&tt().focusSearch()},it=window,this.getCommandWindow=function(){return it},this.setCommandWindow=function(n){it=n},this.executeLastCommand=function(){et()&&tt().evalLastCommand()},ki=new f("%m"),this.getCommandLayout=function(){return ki},this.setCommandLayout=function(n){ki=n},this.evalCommandAndAppend=function(i){var f={appendResult:!0,isError:!1},h="",e,r,c,s,u,a,l;try{for(!it.eval&&it.execScript&&it.execScript("null"),c={},r=0,len=bt.length;r<len;r++)c[bt[r][0]]=bt[r][1];for(s=[],u=function(n){s.push([n,it[n]])},u("appender"),it.appender=ft,u("commandReturnValue"),it.commandReturnValue=f,u("commandLineFunctionsHash"),it.commandLineFunctionsHash=c,a=function(n){u(n);it[n]=function(){return this.commandLineFunctionsHash[n](ft,arguments,f)}},r=0,len=bt.length;r<len;r++)a(bt[r][0]);for(it===window&&it.execScript?(u("evalExpr"),u("result"),window.evalExpr=i,it.execScript("window.result=eval(window.evalExpr);"),e=window.result):e=it.eval(i),h=o(e)?e:vi(e,li),r=0,len=s.length;r<len;r++)it[s[r][0]]=s[r][1]}catch(v){h="Error evaluating command: "+y(v);f.isError=!0}if(f.appendResult){l=">>> "+i;o(h)||(l+=t+h);var p=f.isError?n.ERROR:n.INFO,w=new ot(null,new Date,p,[l],null),b=this.getLayout();this.setLayout(ki);this.append(w);this.setLayout(b)}},bt=v.concat([]),this.addCommandLineFunction=function(n,t){bt.push([n,t])},gi="log4javascriptCommandHistory",this.storeCommandHistory=function(n){rr(gi,n.join(","))},nr=function(n){var i=w(),t,r;for(n.open(),t=0,r=i.length;t<r;t++)n.writeln(i[t]);n.close()},this.setEventTypes(["load","unload"]),tr=function(){var n=tt(),t;n.setAppender(ft);n.setNewestAtTop(ii);n.setScrollToLatest(ri);n.setMaxMessages(ui);n.setShowCommandLine(fi);n.setShowHideButton(ai);n.setShowCloseButton(yi);n.setMainWindow(window);t=ur(gi);t&&(n.commandHistory=t.split(","),n.currentCommandIndex=n.commandHistory.length);ft.dispatchEvent("load",{win:n})},this.unload=function(){e.debug("unload "+this+", caller: "+this.unload.caller);rt||(e.debug("really doing unload "+this),rt=!0,ht=!1,yt=!1,ft.dispatchEvent("unload",{}))},si=function(n,t,r,u){function e(){try{rt&&clearInterval(f);n(tt())&&(clearInterval(f),r())}catch(t){clearInterval(f);ct=!1;i(u,t)}}var f=setInterval(e,t)},ir=function(){var n=document.domain!=location.hostname;return b?"":fr()+"console.html"+(n?"?log4javascript_domain="+escape(document.domain):"")},u)lt=null,hi=[],this.addCssProperty=function(n,t){wt("cssProperties")&&hi.push([n,t])},er=!1,di=oi+"_InPageAppender_"+hr,this.hide=function(){ti&&yt&&(et()&&tt().$("command").blur(),vt.style.display="none",ni=!0)},this.show=function(){ti&&(yt?(vt.style.display="block",this.setShowCommandLine(fi),ni=!1):er||gt(!0))},this.isVisible=function(){return!ni&&!rt},this.close=function(n){rt||n&&!confirm("This will permanently remove the console from the page. No more messages will be logged. Do you wish to continue?")||(vt.parentNode.removeChild(vt),this.unload())},pt=function(){function f(){try{a||ft.show();tr();ht=!0;bi()}catch(n){ct=!1;i(t,n)}}function e(){try{var n=function(n){return ut(n)};b&&nr(tt().document);n(tt())?f():si(n,100,f,t)}catch(r){ct=!1;i(t,r)}}var t="InPageAppender.open: unable to create console iframe",n,o,s,u;for(ni=!1,vt=lt.appendChild(document.createElement("div")),vt.style.width=k,vt.style.height=g,vt.style.border="solid gray 1px",n=0,o=hi.length;n<o;n++)vt.style[hi[n][0]]=hi[n][1];s=b?"":" src='"+ir()+"'";vt.innerHTML="<iframe id='"+di+"' name='"+di+"' width='100%' height='100%' frameborder='0'"+s+" scrolling='no'><\/iframe>";rt=!1;u=function(n){try{return r(n)&&r(n.document)}catch(t){return!1}};u(tt())?e():si(u,100,e,t);yt=!0},gt=function(n){if(n||!a){var t=function(){if(s)try{var n=document.getElementById(s);n.nodeType==1&&(lt=n);pt()}catch(t){i("InPageAppender.init: invalid container element '"+s+"' supplied",t)}else lt=document.createElement("div"),lt.style.position="fixed",lt.style.left="0",lt.style.right="0",lt.style.bottom="0",document.body.appendChild(lt),ft.addCssProperty("borderWidth","1px 0 0 0"),ft.addCssProperty("zIndex",1e6),pt()};kt&&s&&s.appendChild?(lt=s,pt()):kt?t():log4javascript.addEventListener("load",t);er=!0}},pi=function(){gt();ti=!0},tt=function(){var n=window.frames[di];if(n)return n},ei=function(){return ct&&!rt?(yt&&!ht&&tt()&&ut(tt())&&(ht=!0),ht):!1};else{var ci=ft.defaults.useOldPopUp,or=ft.defaults.complainAboutPopUpBlocking,sr=this.defaults.reopenWhenClosed;this.isUseOldPopUp=function(){return ci};this.setUseOldPopUp=function(n){wt("useOldPopUp")&&(ci=r(n))};this.isComplainAboutPopUpBlocking=function(){return or};this.setComplainAboutPopUpBlocking=function(n){wt("complainAboutPopUpBlocking")&&(or=r(n))};this.isFocusPopUp=function(){return nt};this.setFocusPopUp=function(n){nt=r(n)};this.isReopenWhenClosed=function(){return sr};this.setReopenWhenClosed=function(n){sr=r(n)};this.close=function(){e.debug("close "+this);try{st.close();this.unload()}catch(n){}};this.hide=function(){e.debug("hide "+this);et()&&this.close()};this.show=function(){e.debug("show "+this);yt||pt()};this.isVisible=function(){return ei()};pt=function(){function f(){tt().setCloseIfOpenerCloses(!ci||!b);tr();ht=!0;bi();si(o,500,s,"PopUpAppender.checkPopUpClosed: error checking pop-up window")}var c="width="+k+",height="+g+",status,resizable",u="",n,t,o,s,h;try{n=window.frameElement;n&&(u="_"+n.tagName+"_"+(n.name||n.id||""))}catch(a){u="_inaccessibleParentFrame"}t="PopUp_"+location.host.replace(/[^a-z0-9]/gi,"_")+"_"+hr+u;ci&&b||(t=t+"_"+oi);o=function(n){if(rt)return!0;try{return r(n)&&n.closed}catch(t){}return!1};s=function(){rt||ft.unload()};try{st=window.open(ir(),t,c);rt=!1;yt=!0;st&&st.document?b&&ci&&ut(st)?(st.mainPageReloaded(),f()):(b&&nr(st.document),h=function(n){return r(n)&&ut(n)},ut(st)?f():si(h,100,f,"PopUpAppender.init: unable to create console window")):(ct=!1,e.warn("PopUpAppender.init: pop-ups blocked, please unblock to use PopUpAppender"),or&&i("log4javascript: pop-up windows appear to be blocked. Please unblock them to use pop-up logging."))}catch(l){i("PopUpAppender.init: error creating pop-up",l)}};gt=function(){a||pt()};pi=function(){gt();ti=!0};tt=function(){return st};ei=function(){if(ct&&!o(st)&&!rt){if(st.closed||ht&&o(st.closed))return ft.unload(),e.debug("PopUpAppender: pop-up closed"),!1;!ht&&ut(st)&&(ht=!0)}return ct&&ht&&!rt}}this.getConsoleWindow=tt};s.addGlobalCommandLineFunction=function(n,t){v.push([n,t])};a.prototype=new s;a.prototype.defaults={layout:new f("%d{HH:mm:ss} %-5p - %m{1}%n"),initiallyMinimized:!1,focusPopUp:!1,lazyInit:!0,useOldPopUp:!0,complainAboutPopUpBlocking:!0,newestMessageAtTop:!1,scrollToLatestMessage:!0,width:"600",height:"400",reopenWhenClosed:!1,maxMessages:null,showCommandLine:!0,commandLineObjectExpansionDepth:1,showHideButton:!1,showCloseButton:!0,showLogEntryDeleteButtons:!0,useDocumentWrite:!0};a.prototype.toString=function(){return"PopUpAppender"};log4javascript.PopUpAppender=a;c.prototype=new s;c.prototype.defaults={layout:new f("%d{HH:mm:ss} %-5p - %m{1}%n"),initiallyMinimized:!1,lazyInit:!0,newestMessageAtTop:!1,scrollToLatestMessage:!0,width:"100%",height:"220px",maxMessages:null,showCommandLine:!0,commandLineObjectExpansionDepth:1,showHideButton:!1,showCloseButton:!1,showLogEntryDeleteButtons:!0,useDocumentWrite:!0};c.prototype.toString=function(){return"InPageAppender"};log4javascript.InPageAppender=c;log4javascript.InlineAppender=c}(),function(){function u(n){var r=0,i,u,e,f;for(i in n)r=Math.max(c(i).length,r);u=[];for(i in n){e="  "+yi(c(i),r+2);try{f=gt(c(n[i])).join(yi(t,r+6))}catch(o){f="[Error obtaining property. Details: "+dt(o)+"]"}u.push(e+f)}return u.join(t)}function i(u,e,s,h,c){function ot(t){return t.nodeType==n.TEXT_NODE&&/^[ \t\r\n]*$/.test(t.nodeValue)}function st(n){return n.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}function ut(n){for(var u=n.style.cssText.split(";"),f="",i,r,t=0,e=u.length;t<e;t++)i=u[t].split(":"),r=[],/^\s*$/.test(i[0])||r.push(ct(i[0]).toLowerCase()+":"+ct(i[1])),f=r.join(";");return f}function ht(n){if(n.prefix)return n.prefix;if(n.outerHTML){var t=new RegExp("<([^:]+):"+n.tagName+"[^>]*>","i");if(t.test(n.outerHTML))return RegExp.$1.toLowerCase()}return""}var l,b,w,p,d,g,y,ft,nt,et,tt,it,rt,a,v;if(e=typeof e=="undefined"?!0:!!e,typeof s!="string"&&(s=""),h=!!h,c=!!c,b="<",w=">",e&&u.nodeType!=n.DOCUMENT_FRAGMENT_NODE)switch(u.nodeType){case n.ELEMENT_NODE:for(p=u.tagName.toLowerCase(),l=h?t+s:"",l+=b,d=ht(u),g=!!d,g&&(l+=d+":"),l+=p,a=0,v=u.attributes.length;a<v;a++)(y=u.attributes[a],y.specified&&y.nodeValue!==null&&y.nodeName.toLowerCase()!=="style"&&typeof y.nodeValue=="string"&&y.nodeName.indexOf("_moz")!==0)&&(l+=" "+y.nodeName.toLowerCase()+'="',l+=st(y.nodeValue),l+='"');if(u.style.cssText&&(ft=ut(u),ft!==""&&(l+=' style="'+ut(u)+'"')),k(o,p)||g&&!u.hasChildNodes())l+="/"+w;else{for(l+=w,nt=!(u.childNodes.length===1&&u.childNodes[0].nodeType===n.TEXT_NODE),et=k(f,p),a=0,v=u.childNodes.length;a<v;a++)l+=i(u.childNodes[a],!0,s+r,nt,et);tt=b+"/"+p+w;l+=nt?t+s+tt:tt}return l;case n.TEXT_NODE:if(ot(u))l="";else{if(c)l=u.nodeValue;else{for(it=gt(ct(u.nodeValue)),rt=[],a=0,v=it.length;a<v;a++)rt[a]=ct(it[a]);l=rt.join(t+s)}h&&(l=t+s+l)}return l;case n.CDATA_SECTION_NODE:return"<![CDATA["+u.nodeValue+"]\]>"+t;case n.DOCUMENT_NODE:for(l="",a=0,v=u.childNodes.length;a<v;a++)l+=i(u.childNodes[a],!0,s);return l;default:return""}else{for(l="",a=0,v=u.childNodes.length;a<v;a++)l+=i(u.childNodes[a],!0,s+r);return l}}function h(){s.addGlobalCommandLineFunction("$",function(n,t){return document.getElementById(t[0])});s.addGlobalCommandLineFunction("dir",function(n,i){for(var f=[],r=0,e=i.length;r<e;r++)f[r]=u(i[r]);return f.join(t+t)});s.addGlobalCommandLineFunction("dirxml",function(n,r){for(var f=[],o,u=0,e=r.length;u<e;u++)o=n.getCommandWindow(),f[u]=i(r[u]);return f.join(t+t)});s.addGlobalCommandLineFunction("cd",function(n,t,i){var r,u;return t.length===0||t[0]===""?(r=window,u="Command line set to run in main window"):t[0].window==t[0]?(r=t[0],u="Command line set to run in frame '"+t[0].name+"'"):(r=window.frames[t[0]],r?u="Command line set to run in frame '"+t[0]+"'":(i.isError=!0,u="Frame '"+t[0]+"' does not exist",r=n.getCommandWindow())),n.setCommandWindow(r),u});s.addGlobalCommandLineFunction("clear",function(n,t,i){i.appendResult=!1;n.clear()});s.addGlobalCommandLineFunction("keys",function(n,t){var i=[],r;for(r in t[0])i.push(r);return i});s.addGlobalCommandLineFunction("values",function(n,t){var r=[],i;for(i in t[0])try{r.push(t[0][i])}catch(u){e.warn("values(): Unable to obtain value for key "+i+". Details: "+dt(u))}return r});s.addGlobalCommandLineFunction("expansionDepth",function(n,t,i){var r=parseInt(t[0],10);return isNaN(r)||r<0?(i.isError=!0,""+t[0]+" is not a valid expansion depth"):(n.setCommandLineObjectExpansionDepth(r),"Object expansion depth set to "+r)})}function l(){h()}var n={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},f=["script","pre"],o=["br","img","hr","param","link","area","input","col","base","meta"],r="  ";l()}(),log4javascript.setDocumentReady=function(){kt=!0;log4javascript.dispatchEvent("load",{})},window.addEventListener?window.addEventListener("load",log4javascript.setDocumentReady,!1):window.attachEvent?window.attachEvent("onload",log4javascript.setDocumentReady):(fi=window.onload,window.onload=typeof window.onload!="function"?log4javascript.setDocumentReady:function(n){fi&&fi(n);log4javascript.setDocumentReady()}),window.log4javascript=log4javascript,log4javascript}()