I'm hoping there are some Javascript types here who can help solve a problem.

I have a page and used Dreamweavers Spry 1.3 framework to insert multiple instances of the Collapsible Panel (the Accordion Widget won't work as I am embedding iframes and it chokes on them). It handles expanding and collapsing a div.

In order to collapse the other panels when I open a new one I can use a simple onclick event and name all the other panels to close ie

Code:
<div id="Panel2" onclick="Panel1.close(); Panel3.close();">



but since there are lots of panels I would rather have a function that I could list all the panels in and with the onclick event just send the name of the current panel to close everything but the currently opened one.

Something like ...
Code:
onclick=CloseAllPanelsExcept(this);



If anyone can help I would appreciate it.


Find me at: |Stormvisions| Twitter|