Close window from flash

anyone care to post the code used in flash and the one needed in the document to close the window.
can be done with javascript and fscommand or what ever its called right?

Thanks

//VoS