I have three pieces of advice for you,
First and foremost: This is a Java forum, not a JavaScript forum.
Java vs. JavaScript
Second, there are a lot of people like me, who won't download a zip file from a forum. I think it is a bad Idea.... So, it is best to simply place your code in the "code boxes" (Much like I have bellow). That makes it easier on the people who want to help you, which is a good thing.
Third, so as not to sound like a mean and bitter old man, you use this code to collapse a <div> tag in javascript
:
document.getElementById(id).style.display = "none";
Where "id" is the id of the div tag you'd like to collapse. It simply tells the browser to hid the div tag, thus it disappears...
You can initiate this with the onclick command.
onclick="SomeFunction(id)"
Where "SomeFunction" calls the function that will collapse the div tag and "id" is the id of the div tag you'd like to collapse.
The function might look something like this:
function SomeFunction(id)
{
document.getElementById(id).style.display = "none";
}
Each id must be unique!