var Options = { imeBox : null, inputElm : "widgetServerAddr", jqInputElm : "#widgetServerAddr", cursor : "_", cursorPos : 0, isCreated : false, selectedLine : 0, maxSelect : -1, state : 0, sEnter : 0, sSelect : 1 }; 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() { Main.log("Options.show"); $("#optionsScreen").show(); this.selectedLine = 0; 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; // document.getElementById(Options.inputElm).focus(); Options.drawServerList(); Helpbar.init(); Helpbar.show(); }; Options.hide = function() { $("#optionsScreen").hide(); // document.getElementById("optionsScreen").style.display="none"; Helpbar.hide(); // Helpbar.hideSrv(); Main.enableKeys(); }; Options.drawServerList = function () { //delete all childs below optionsList $("#optionsList").children().remove(); for (var i = 0; i < Config.vdrServers.serverUrlList.length; i++) { var line = $("