var newWindow; function GlossaryWnd(h) { var url = '/network/glossary.shtml#' + h; var width = 600; var height = 400; var left = parseInt(screen.availWidth/2 - width/2); var top = parseInt(screen.availHeight/2 - height/2); var wndFeatures = "width="+width+",height="+height+",scrollbars=yes,left="+left+",top="+top+",screenX="+left+",screenY="+top; if (!newWindow || newWindow.closed) { newWindow = window.open(url, "glosswind", wndFeatures); } else { newWindow.focus(); newWindow.location.hash = h; } } window.onunload = function(){ //alert('close win!'); if (newWindow && !newWindow.closed) { newWindow.close(); } }