var config_enabled=false;if(EC==null||typeof(EC)!="object"){var EC=new Object()}if(EC.F==null||typeof(EC.F)!="object"){EC.F=new Object()}if(EC.F.setCookie==null){EC.F.setCookie=function(c,b){var a=c+"="+escape(b);document.cookie=a;return null};EC.F.getCookie=function(d){var c=d+"=";var b=document.cookie;var a=null;if(b.length>0){offset=b.indexOf(c);if(offset!=-1){offset+=c.length;end=b.indexOf(";",offset);if(end==-1){end=b.length}a=unescape(b.substring(offset,end))}}return a}}var jslog=new function(){bPersistState=true;var c="ec_debug_logging";var b="jslog";var h=c+"_"+b;var g=config_enabled;if(g==false&&location.href.match(/enablejslog/)){g=true}var e=false;var d=0;function f(u){return document.getElementById(u)}function m(u){n("DEBUG",u)}function s(u){n("INFO",u)}function p(u){n("WARN",u)}function q(u){n("ERROR",u)}function r(){var u=f(h+"_body");if(u.style.display=="none"){u.style.display="block"}else{u.style.display="none"}if(bPersistState){EC.F.setCookie(b+"_visibility",u.style.display)}}function i(){f(h+"_logDisplay").innerHTML="";d=0;f(h+"_handle").innerHTML=d}function k(){if(!e){o()}}function l(u){f(h+"_textArea").value=u}function a(){var v=f(h+"_idToInspect").value;if(v==""){p("Provide a non-blank id")}else{try{var u=f(h+"_textArea").value=f(v).innerHTML;s(v+" innerHTML is now in the text box below!")}catch(w){q("Could not get innerHTML of id="+v+": "+w.message)}EC.F.setCookie(b+"_idToInspect",v)}}this.debug=m;this.info=s;this.warning=p;this.error=q;this.toggleDisplay=r;this.clearLog=i;this.text=l;this.enable=k;this.getHTML=a;function n(v,w){if(g){d+=1;f(h+"_handle").innerHTML=d;var u=f(h+"_logDisplay");if(u.childNodes.length==0){u.appendChild(j(v,w))}else{u.insertBefore(j(v,w),u.childNodes[0])}}}function j(A,z){if(document.all){var y="styleFloat"}else{var y="cssFloat"}var x=document.createElement("div");if(d/2==Math.floor(d/2)){x.style.backgroundColor="#FFF"}else{x.style.backgroundColor="#F6F6F6"}x.style.borderBottom="1px solid #AAA";x.style.verticalAlign="top";var w=document.createElement("div");w.style.width="40px";w.style.paddingLeft="3px";w.style[y]="left";if(A=="DEBUG"){w.style.backgroundColor="#1515FF"}else{if(A=="INFO"){w.style.backgroundColor="#10FF10"}else{if(A=="WARN"){w.style.backgroundColor="yellow"}else{if(A=="ERROR"){w.style.backgroundColor="#FF7070"}}}}w.appendChild(document.createTextNode(A));x.appendChild(w);var u=document.createElement("span");u.style.paddingLeft="3px";u.style.paddingRight="8px";w.style[y]="left";u.appendChild(document.createTextNode(t()));x.appendChild(u);x.appendChild(document.createTextNode(z));var v=document.createElement("div");v.style.clear="both";x.appendChild(v);return x}function t(){var u=new Date();var y=u.getHours();var x=u.getMinutes();var w=u.getSeconds();var v=""+((y>12)?y-12:y);if(v=="0"){v=12}v+=((x<10)?":0":":")+x;v+=((w<10)?":0":":")+w;v+=(y>=12)?" PM":" AM";return v}if(g){o()}function o(){if(!e){try{var z=2;var x=2;var v="none";if(bPersistState){try{var u=EC.F.getCookie(b+"_position");if(u!=null){var A=u.split("|");if(!isNaN(parseInt(A[0]))){x=A[0]}if(!isNaN(parseInt(A[1]))){z=A[1]}}if(EC.F.getCookie(b+"_visibility")=="block"){v="block"}}catch(B){}}var y=EC.F.getCookie(b+"_idToInspect");y=y==null?"":y;document.write('<div id="'+h+'_container" style="font-family:arial; color:black; font-size:9px; line-height:normal; letter-spacing: normal; position:absolute; z-index:10000;top:'+z+"px; left:"+x+'px; "><div id="'+h+'_handle" style="cursor:move; position: absolute; background-color:#FFFFCC; border:1px solid #FF0400; color:black; padding:2px;" ondblclick="'+b+'.toggleDisplay()">0</div><div id="'+h+'_body" style="text-align:left; border:1px solid #FF0400; width:300px; position: absolute; top:20px; left:0px; background-color:white; display:'+v+'"><div id="'+h+'_header" style="height:10px; padding:2px; border-bottom:1px solid black; background-color:#FFFFCC;"><span id="'+h+'_clear" style="color: blue;" onclick="'+b+'.clearLog()">clear</span></div><div id="'+h+'_logDisplay" style="height:240px; overflow:auto;"></div><div id="'+h+'_footer" style="padding-left:2px; border-top:1px solid black; background-color:#FFFFCC;">get html:<input id="'+h+'_idToInspect" style="font-size:9px; height:18px;" value="'+y+'" size=42/> <span id="'+h+'_go" style="color: blue;" onclick="'+b+'.getHTML()">go</span><textarea id="'+h+'_textArea" style="width:99%; font-size:9px;"></textarea></div></div></div></div>');f(h+"_clear").style.cursor="pointer";f(h+"_go").style.cursor="pointer";if(window.Draggable!=null){new Draggable(h+"_container",{handle:h+"_handle",revert:false,starteffect:false,endeffect:false});if(bPersistState){var w=new function(){this.onStart=function(){};this.onEnd=function(C,D){if(D.element.id==h+"_container"){var E=Position.cumulativeOffset(D.element);EC.F.setCookie(b+"_position",+E[0]+"|"+E[1])}}};Draggables.addObserver(w)}}else{f(h+"_handle").style.cursor="pointer"}e=true}catch(B){alert("Code-level error initializing jslog: "+B.description)}}}};debug=jslog.debug;
