var Options = { imeBox : null, inputElm : "widgetServerAddr", jqInputElm : "#widgetServerAddr", cursor : "_", cursorPos : 0, isCreated : false }; Options.init = function() { if (this.isCreated == true) return; this.isCreated = true; document.getElementById(Options.inputElm).value = Config.serverAddrDefault; Options.cursorPos = Config.serverAddrDefault.length; Options.createKeypad (); $("#optionsScreen").hide(); document.getElementById(Options.inputElm).style.color="black"; }; Options.show = function() { // document.getElementById("optionsScreen").style.display="block"; $("#optionsScreen").show(); if (Config.firstLaunch == true) document.getElementById(Options.inputElm).value = Config.serverAddrDefault ; else document.getElementById(Options.inputElm).value = Config.serverAddr; Options.cursorPos = document.getElementById(Options.inputElm).value.length; $(this.jqInputElm).focus(); // document.getElementById(Options.inputElm).focus(); Helpbar.init(); Helpbar.show(); }; Options.hide = function() { $("#optionsScreen").hide(); // document.getElementById("optionsScreen").style.display="none"; Helpbar.hide(); Main.enableKeys(); }; Options.createKeypad = function () { var sheet = $("