Can Javascript get information on any window?
<p>A little bit ago I asked <a href="http://stackoverflow.com/questions/4785399/how-to-tell-if-a-window-exists-in-javascript">this question</a> about if a child can get information on its parent. But now I realize that I have a followup question that belongs on its own, rather than in comments: Can Javascript find out if <em>any</em> window is open?</p>

<p>I have a window A which can either be called from window B or window C. However, when I close A, I want certain things in the <code>onUnload</code> only to happen if window C is closed. Now, A <em>may not have been opened</em> by C, so I can't rely on <code>window.opener</code>. Is there any way I can find out information on arbitrary windows? I thought about checking <code>window.opener.location</code> but that still requires that C have been the opener, which it may not have been. The names of all the windows are known, so if I could search by those, I'd be golden.</p>

<p>(as for the why: A is a chat console, B is the main menu, C is the queue monitor. When someone is in the queue monitor, they're marked as available for chat. But to actually chat, they have to load up the chat console to do so. Normally, when you close the chat console, an <code>onUnload</code> tries to mark you unavailable, but I don't want to that to happen if the queue monitor is still open.)</p>
