var _keyMap=[];document.onkeyup=keyHandler;function setKeybinding(A,B){if(typeof _keyMap[A]=="undefined"){_keyMap[A]=[]}if(typeof B=="function"){_keyMap[A].push(B)}else{_keyMap[A].push(new Function("e","key",B+"(e, key);"))}}function keyHandler(C){C=C||window.event;var B;if(C.keyCode){B=C.keyCode}else{if(C.which){B=C.which}}if(_keyMap[B]){for(var A=0;A<_keyMap[B].length;++A){if(_keyMap[B][A](C,B)){C.returnValue=false;if(typeof C.preventDefault=="function"){C.preventDefault()}else{C.returnValue=true}break}}}};