Closing window

Hello,
I am a newbie to flash and want to compliment you on this great site it has been a big help to me. Now I have a question that I can’t find an answer to on this site.

I am working on a website that is part flash and part html only no flash.

I have an entry page where the user can choose flash or html. The entry page’s window is “main2”.

When the user clicks on the flash entrance a borderless window named “main” is opened where all the flash pages go…there are 5 pages to view.

I also have text links on the bottom where the user can go to the html part of the site that loads in the initial window “main2”.

1st question is how can I change the focus of the windows so if the user clicks a page that loads in the “main2” window it is on top of the borderless window.

2nd question is how would I code it so once my last flash page is viewed the user can close that window by clicking a button…instead of the X in the top corner being the only way to close it.

WHeh…any help would be much appreciated.
Thanks
Aflasher

1st: add in <body tag : onLoad =focus (or self.focus ?..)
2nd: on (flash?) button javascript: self.close…
this is not the exact syntax, i don’t remember my javascript right now, do a search on google for javascript and search the sites for the scripts you need, but it’s quite simple; post back if you don’t find anything.

Illegal javascript event tags or url parameters detected.