Well, I guess you'd have to somewhat define a framework (like how many windows) etc..
I don't have any other recommendations for you. I would look into JavaScript a little (by the way, you can always refer to all the windows that are open and close them on request), if that is what you want to use. If you have any additional questions, feel free to ask.
Till