Javascript/Flash Help

Hello,

I am working on a site that, so far, works like this:

When you go to the site a new window is opened. This main window is the site. The first window stays open behind the main window.

What I would like to happen is load a SWF in the first window but not play it until the user closes the main window.

I have poked around enough to realize that Javascript might be the way to go here. Unfortunately my knowledge of Javascript is limited to cutting and pasting. Any help would be much appreciated.