close all windows from one place

Hello.How can I close all the windows that were open in the application ?I have a "Log Out" button and I have a window that was open (popup) somewhere in the application. How can I close it ?Is there some array of the windows names that I can run on and close them all ?

: var popoups = new Array();: : Then, instead of just window.opening a popup, do: : popups.push(window.open(etc));: : And to close them all: : for (i = 0; i < popups.length; i++): popups[i].close;: : (Lillu posted this trick a while back, I just stole it):

Thanks for the replay.Not all the popups are open from the same frame.Is the popups array is global var ???