Javascript like drop down sub, where previous sub reverts?

Hi all, I am after some urgent help regarding a navigation set-up I require.
I have a structure, where we have the main description area, so when a user clicks on that, a dropdown of the sub should appear, however I am unsure how to achieve this, so when you click on the diffent title, that sub drops down but the other sub reverts back if that makes any sense, I know a similar effect can be achieved some how with advanced javascript, think of it like a windows directory tree, where you click the plus to expand its subs, except if you click on another main, the previus sub reverts back to its original setting as the second sub drops down.

Hope this makes sense, any diirection, example, tutorials greatly appreciated at this time :slight_smile:

Trev