How to make the existing window to be closed and open up a new one?

recently i’m thinking of this way of the nagivation to put in my flash site. When the user clicks for a new link, the existing draggable window will be closed and open up a new one for the 2nd link. How to write the scripts for it?


Try. External swfs?
Or Different parts of a Movieclip.

I know how to open up a new draggable window, but the thing is how to make it to detect if there’s any existing window and send command to close it off first before a new window is coming?