Object.extend(Event,{observe:function(D,C,B,A){D=$(D);A=A||false;if((C=="keypress")&&(Prototype.Browser.WebKit||D.attachEvent)){C="keydown"}if((C=="load")&&D.screen){this._observeLoad(D,C,B,A)}else{this._observeAndCache(D,C,B,A)}},_observeLoad:function(F,E,D,B){if(this._ready){this._ready.push(D);return }this._ready=[];var A=this._onloadWindow.bind(this);if($("__ie_onload")){A()}else{if(Prototype.Browser.WebKit){this._observeAndCache(F,E,A,B)}else{if(document.addEventListener){this._useaEL=true;this._observeAndCache(document,"DOMContentLoaded",A,false)}else{if(Prototype.Browser.IE){document.write('<script id="__ie_onload" defer="true" src="//:"><\/script>');var C=$("__ie_onload");this._observeAndCache(C,"readystatechange",function(){if(this.readyState=="complete"){Element.remove("__ie_onload");A()}}.bind(C),false)}else{this._observeAndCache(F,E,A,B)}}}}},_onloadWindow:function(){if(arguments.callee.done){return }arguments.callee.done=true;this._ready.each(function(A){try{A()}catch(B){}});this._ready=null;if(this._useaEL){document.removeEventListener("DOMContentLoaded",Event._onloadWindow,false)}}});