var newWindow; function displayPopup(pageName, pageWidth, pageHeight) { if (newWindow != null) { if (!newWindow.closed) { newWindow.close(); } } availableHeight = screen.availHeight; availableWidth = screen.availWidth; midHeight = availableHeight / 2; midWidth = availableWidth / 2 windowX = Math.floor(midWidth - (pageWidth / 2)); windowY = Math.floor(midHeight - (pageHeight / 2)); browserType = navigator.appName.toLowerCase(); if (browserType.indexOf("netscape") >= 0) { XPosString = "screenX=" + windowX + ","; YPosString = "screenY=" + windowY + ","; } else if (browserType.indexOf("microsoft") >= 0) { XPosString = "left=" + windowX + ","; YPosString = "top=" + windowY + ","; } else { XPosString = ""; YPosString = ""; } eval("newWindow = window.open(pageName,'information','location=no,menubar=no,resizable=yes," + XPosString + YPosString + "scrollbars=yes,status=no,toolbar=no,width=" + pageWidth + ",height=" + pageHeight + "')"); newWindow.focus(); return false; }