var Buttons = { created: false, btnSelected : 0, btnMax : 1 }; /* * First: do just the buttons for play / resume */ Buttons.init = function (){ if (this.created == false) { Buttons.createButtons(); $("#pr-popup").hide(); this.created = true; } }; Buttons.show = function () { Main.log("Buttons.show()"); $("#pr-popup").show(); $("#pr-popup-anchor").focus(); Buttons.reset (); }; Buttons.hide = function () { $("#pr-popup").hide(); $("#pr-popup-anchor").blur(); Main.enableKeys(); }; Buttons.createButtons= function () { var p_width = $("body").outerWidth(); var p_height = $("body").outerHeight(); var sheet = $("