<script type="text/javascript">
function openWindow() {
var screenWidth=screen.width
var screenHeight=screen.height
var windowWidth=400
var windowHeight=200
var leftPos=Math.round((screenWidth/2)-(windowWidth/2))
var topPos=Math.round((screenHeight/2)-(windowHeight/2))
window.open("/blank.htm","win","left=" + leftPos + ",
top=" + topPos + ", width=" + windowWidth + ",height=" + windowHeight)
}
</script>
<form>
<input type="button" value="Open New Window" onclick="openWindow()"/>
</form>
|