connid = 0; function flashchat_DoFSCommand() { } function setFocus() { window.focus(); var chatui = document.getElementById('flashchat'); if(chatui && chatui.focus) chatui.focus(); } function doLogout() { if(connid == 0) return; width = 220; height = 30; wleft = (screen.width - width) / 2; wtop = (screen.height - height) / 2 - 20; window.open("dologout.php?id=" + connid, "logout", "width=" + width + ",height=" + height + ",left=" + wleft + ",top=" + wtop + ",location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no"); } function setConnid(newconnid) { connid = newconnid; } window.onload = setFocus; window.onunload = doLogout;