function closewindownow() { top.window.focus(); self.close(); } function closewindow(timeout) { if (timeout > 0) { var timer = null; timer = setTimeout('closewindownow()',timeout * 1500); } else { closewindownow(); } }