var OverlayMenu = { menu : [], scrollDur : 300, scrollFlip : 100 }; OverlayMenu.init = function () { // initiate the overlay menu OverlayMenu.createStyleSheet(); this.elmName = "#olm-"; this.masterElm = "#overlayMenu"; this.inputElm = "#overlayMenu-anchor"; this.btnSelected = 0; this.scrolling = false; var elem = document.getElementById('overlayMenu-anchor'); elem.setAttribute('onkeydown', 'OverlayMenu.onInput();'); $("#overlayMenu").hide(); }; OverlayMenu.show = function() { Main.log("***** OverlayMenu.show *****"); this.scrolling = false; OverlayMenu.createMenu(); // this.menuHandler.show(); Main.log("OverlayMenu.show(): masterElm= " +this.masterElm + " inputElm= " + this.inputElm); $(this.masterElm).show(); OverlayMenu.tuneMenu(); $(this.inputElm).focus(); this.reset (); }; OverlayMenu.hide = function() { Main.log("OverlayMenu.hide(): masterElm= " +this.masterElm + " inputElm= " + this.inputElm); $(this.masterElm).hide(); $(this.inputElm).blur(); $("#ovlTable").remove(); Main.enableKeys(); }; OverlayMenu.createStyleSheet = function () { var sheet = $("