try this with two files:

file1 (I called test1.htm)
<HTML>
<HEAD>
</HEAD>
<BODY>
</BODY>
</HTML>
<SCRIPT LANGUAGE=javascript>
<!--
function window.onload(){
//formatted window
window.open("test2.htm",null, "width=500;height=500");
}
//-->
</SCRIPT>

File2 (I called "test2.htm")
<HTML>
<HEAD>
</HEAD>
<BODY>
popup.

</BODY>
</HTML>
<SCRIPT LANGUAGE=javascript>
<!--
function window.onload(){
window.opener.close()
}
//-->
</SCRIPT>

By navigating to test1, a formatted window will miraculously appear on it's own, without any messagesboxes asking you if your sure you want to close any windows.

Remember kids, Code Good, Code RIGHT !