var AccessKeys={macos:navigator.userAgent.indexOf("Mac")>-1,elements:[],replace:function(){$$("*[accesskey]").each(function(a){this.elements[a.readAttribute("accesskey").toUpperCase()]=a},this);document.observe("keydown",this.keydownHandler.bind(this))},keydownHandler:function(b){if((this.macos&&b.ctrlKey)||(!this.macos&&b.altKey&&!b.ctrlKey)){var a=String.fromCharCode(b.keyCode||b.charCode).toUpperCase();if(this.elements[a]){this.execute(this.elements[a],b);b.stop()}}},execute:function(b,c){if(!b){return}switch(b.tagName){case"A":b.focus();if(b.onclick){if(b.onclick()){window.location.href=b.href}}else{window.location.href=b.href}return;case"INPUT":case"SELECT":case"TEXTAREA":b.focus();switch(b.type.toUpperCase()){case"BUTTON":case"RESET":case"SUBMIT":b.click();break}return;case"LABEL":this.execute($(b.htmlFor));return}if(typeof $(b)._prototypeEventID=="undefined"){return}var a=$H(Event.cache[$(b)._prototypeEventID.first()]);if(a.get("click")){a.get("click").each(function(d){d(c)})}}};Event.observe(window,"load",AccessKeys.replace.bind(AccessKeys));