Javascript unloading swf

hey guys,

just a thought but can javascript unload an swf?

Basically i have a main.html and embedded is a main.swf, the main .swf once a button is click externally loads a pop_up.swf into a container; all is well so far.
In that pop_up.swf there is a button that once is clicked opens in a new browser main2.html, would it be possible to put some javascript in main2.html to unload pop_up.swf?

any help or advice is much appreciated

Bigbalroo :}