NS4 = (document.layers); IE4 = (document.all); function myNewWindow(wizardType, ExtraVars) { // Get the correct screen and window position from IE and Netcape if (IE4) { wPosX = window.screenLeft + 60; wPosY = window.screenTop + 20; xMax = document.body.clientWidth; yMax = document.body.clientHeight; } else { if (NS4) { wPosX = window.screenX + 60; wPosY = window.screenY + 80; xMax = window.innerWidth; yMax = window.innerHeight; } else { wPosX = window.screenX + 60; wPosY = window.screenY + 80; xPos = 50; yPos = 100; xMax = 640; yMax = 480; } } // Check that the sizes are correct // Is the window too small? if (xMax <= 580) { wWidth = 580; } else { wWidth = xMax * 0.85; } if (yMax <= 390) { wHeight = 390; wPosY = wPosY - 120; // If user is running in 640 x 480 this will make sure his window // is not displayed ofscreen } else { wHeight = yMax * 0.9; } // Or is it too big? (We can leave wHeight alone) if (wWidth > 750) { wWidth = 750; } myWindow = window.open( '/wizards/dialog.php?type='+wizardType+'&'+ExtraVars, 'newWindow', 'width='+wWidth+',height='+wHeight+',screenX='+wPosX+',screenY='+wPosY+',top='+wPosY+',left='+wPosX+',scrollbars=no,alwaysRaised=1'); window.name='main'; }