     var Login = Class.create()Login.prototype = {     initialize: function(name, title, nurl, succ) {     var w=350     var h=150     var wh = centerObject(window,w,h)     var win = new Window(          name, {          className: "alphacube",          title: title,          width: w,          height: h,          top: wh[1],          left: wh[0],          resizable: false,          minimizable: false,          maximizable: false,          closeable: true,          draggable: false,          destroyOnClose: true,          url: nurl          }     )     var closeable = function() {          return (true)          }     win.setDestroyOnClose()     win.show(true)     win.setCloseCallback(closeable)     this.win = win     this.name = name     this.success = succ     },     close: function() {          Windows.close(this.name)     },     success: function() {          this.success()     }}function loginDo() {     var url = location.protocol + "//" + location.hostname + "/cgi/olpos3?"     var acct = $("acctno").value     var pwd = $("acctpwd").value     if ((acct == "") || (pwd == "")) {          alert("Both Account# and Password are required")          return(false)     }     query = "action=LOGIN&fred=greg"     query = query + "&acctno=" + acct     query = query + "&acctpwd=" + pwd     new Ajax.Request(url,          {method: "post",          parameters: query,          onComplete: loginDoHandler          }     )}function loginDoHandler(resp) {     if (resp) {          var xml = resp.responseXML.getElementsByTagName("response")          var respcode = getTagValue(xml[0], "respcode")          var resptext = getTagValue(xml[0], "resptext")          alert(resptext)          if (respcode == "0")               top.login1.success()     }     else          alert("Communication problem, please try again")}
