How do I use the window.close() java function without that confirm pompt box coming up?

What I want is: as soon as the user gets to my start page, a popup window is launched (using the window.open() command) and the start page is automatically closed down.

When my start page is loaded, I use a java function I wrote that contains the window.open() command to launch the pop-up. That line of code is followed by wiindow.close(). That works with the pop-up launching but before the main page closes itself, it first presents the user with a kind of "Are you sure?" promt and asks to press "Yes" or "No" to confirm before closing that window. I don't want that promt to come up at all, I just want the main browser window to close unconditionally as soon as the pop-up launches.

Thanks.