CustomEvent=Class.create() CustomEvent.prototype={initialize:function(){this.listeners=[]},addListener:function(method){this.listeners.push(method)},removeListener:function(method){var foundIndexes=this._findListenerIndexes(method) for(var i=0;i0)&&!this.get(name)){Logger.error("Cookie ("+name+") was not set correctly... The value was "+value.toString().length+" charachters long (This may be over the cookie limit)");}},get:function(name){var pattern="(^|;)\\s*"+escape(name)+"=([^;]+)" var m=document.cookie.match(pattern) if(m&&m[2]){return unescape(m[2])} else return null},getAll:function(){var cookies=document.cookie.split(';') var cookieArray=[] for(var i=0;i=this.outputElement.scrollHeight this.outputCount++ style=(style?style+=';':'') style+='padding:1px;margin:0 0 5px 0' if(this.outputCount%2==0)style+=";background-color:#101010" message=message||"undefined" message=message.toString().escapeHTML() this.outputElement.innerHTML+="
"+message+"
" if(shouldScroll){this.outputElement.scrollTop=this.outputElement.scrollHeight}},updateTags:function(){var pattern=this.tagFilterElement.value if(this.tagPattern==pattern)return try{new RegExp(pattern)} catch(e){return} this.tagPattern=pattern Cookie.set('tagPattern',this.tagPattern) this.outputElement.innerHTML="" this.outputCount=0;for(var i=0;i",e) break} Logger.log(consoleOutput) break} if(this.inputElement.value!=""&&this.inputElement.value!=this.commandHistory[0]){this.commandHistory.unshift(this.inputElement.value)} this.commandIndex=0 this.inputElement.value=""} else if(e.keyCode==Event.KEY_UP&&this.commandHistory.length>0){this.inputElement.value=this.commandHistory[this.commandIndex] if(this.commandIndex0){if(this.commandIndex>0){this.commandIndex-=1} this.inputElement.value=this.commandHistory[this.commandIndex]} else{this.commandIndex=0}}} var logConsole;Event.OnLoad(function(){logConsole=new LogConsole()});function inspect(o) {var objtype=typeof(o);if(objtype=="undefined"){return"undefined";}else if(objtype=="number"||objtype=="boolean"){return o+"";}else if(o===null){return"null";} try{var ostring=(o+"");}catch(e){return"["+typeof(o)+"]";} if(typeof(o)=="function") {o=ostring.replace(/^\s+/,"");var idx=o.indexOf("{");if(idx!=-1){o=o.substr(0,idx)+"{...}";} return o;} var reprString=function(o) {return('"'+o.replace(/(["\\])/g,'\\$1')+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};if(objtype=="string"){return reprString(o);} var me=arguments.callee;var newObj;if(typeof(o.__json__)=="function"){newObj=o.__json__();if(o!==newObj){return me(newObj);}} if(typeof(o.json)=="function"){newObj=o.json();if(o!==newObj){return me(newObj);}} if(objtype!="function"&&typeof(o.length)=="number"){var res=[];for(var i=0;i/g,">");return str;},parseJS:function(obj){var name;if(typeof obj=="string"){name=obj;obj=eval(obj);} win=typeof obj=='undefined'?window:obj;this.displaying=name?name:win.toString();for(js in win){try{if(win[js]&&js.toString().indexOf("Inspector")==-1&&(win[js]+"").indexOf("[native code]")==-1){t=typeof(win[js]);if(!this.objs[t.toString()]){this.types[this.types.length]=t;this.objs[t]={};this.nameList[t]=new Array();} this.nameList[t].push(js);this.objs[t][js]=this.format(win[js]+"");}}catch(err){}} for(i=0;i-1){this.d.getElementById(spanID).innerHTML="[-]";}else{this.d.getElementById(spanID).innerHTML="[+]";}},buildInspectionLevel:function() {var display=this.displaying;var list=display.split(".");var links=["[object Window]"];var name='';if(display.indexOf("[object ")>=0)return links.join(".");for(var i=0;i"+list[i]+"";} return links.join(".");},buildTree:function(){mHTML="
Inspecting "+this.buildInspectionLevel()+"
";mHTML+="
    ";this.types.sort();var so_objIndex=0;for(i=0;i[+]"+this.types[i]+" ("+this.nameList[this.types[i]].length+")
      ";this.hidden["ul"+i]=0;for(e=0;e=0&&/^[a-zA-Z_]/.test(prop)) {if(this.displaying.indexOf("[object ")<0) more=" more";else if(this.displaying.indexOf("[object Window]")>=0) more=" more";} mHTML+="
    • [+]"+prop+"
      • "+value+more+"
      ";this.hidden["mul"+so_objIndex]=0;so_objIndex++;} mHTML+="
    ";} mHTML+="
";this.d.getElementById("so_mContainer").innerHTML=mHTML;},handleKeyEvent:function(e){keyCode=document.all?window.event.keyCode:e.keyCode;if(keyCode==27){this.cleanUp();}},cleanUp:function() {if(this.d.getElementById("so_mContainer")) {this.d.body.removeChild(this.d.getElementById("so_mContainer"));this.d.body.removeChild(this.d.getElementById("so_mStyle"));if(typeof Event!="undefined") Event.stopObserving(this.d,"keydown",this.dKeyDownEvent);this.types=new Array();this.objs=new Array();this.hidden=new Array();}},disabled:document.all&&!this.opera,inspect:function(obj) {if(this.disabled)return alert("Sorry, this only works in Mozilla and Firefox currently.");this.cleanUp();mObj=this.d.body.appendChild(this.d.createElement("div"));mObj.id="so_mContainer";sObj=this.d.body.appendChild(this.d.createElement("style"));sObj.id="so_mStyle";sObj.type="text/css";sObj.innerHTML=this.style;this.dKeyDownEvent=this.handleKeyEvent.bind(this);if(typeof Event!="undefined") Event.observe(this.d,"keydown",this.dKeyDownEvent);this.parseJS(obj);this.buildTree();cObj=mObj.appendChild(this.d.createElement("div"));cObj.className="credits";cObj.innerHTML="[esc] to close
Javascript Object Tree V2.0.";window.scrollTo(0,0);},style:"#so_mContainer { position:absolute; top:5px; left:5px; background-color:#E3EBED; text-align:left; font:9pt verdana; width:85%; border:2px solid #000; padding:5px; z-index:1000; color:#000; } "+"#so_mContainer ul { padding-left:20px; } "+"#so_mContainer ul li { display:block; list-style-type:none; list-style-image:url(); line-height:2em; -moz-border-radius:.75em; font:10px verdana; padding:0; margin:2px; color:#000; } "+"#so_mContainer li:hover { background-color:#E3EBED; } "+"#so_mContainer ul li span { position:relative; width:15px; height:15px; margin-right:4px; } "+"#so_mContainer pre { background-color:#F9FAFB; border:1px solid #638DA1; height:auto; padding:5px; font:9px verdana; color:#000; } "+"#so_mContainer .topLevel { margin:0; padding:0; } "+"#so_mContainer .credits { float:left; width:200px; font:6.5pt verdana; color:#000; padding:2px; margin-left:5px; text-align:left; border-top:1px solid #000; margin-top:15px; width:75%; } "+"#so_mContainer .credits a { font:9px verdana; font-weight:bold; color:#004465; text-decoration:none; background-color:transparent; }"} function var_dump(obj) {Prado.Inspector.inspect(obj);} var print_r=inspect;