Script.aculo.us and Cookies?

Hi,

I am trying to understand JavaScript and this is what I need help on.

Here is what we have:

I am using Script.aculo.us to have our navigation drop down with the “toggle” method. And we are using a for SEO and accessibility reasons.

Here is what we need:

We need to add some JavaScript to the page that will set a cookie and keep the navigation at the state the user left it from page to page. I also need it to add a class to the link to give it a current state so the user can see the page they are on.

So what we have is a link from this site:
http://www.exit404.com/2005/57/unobtrusive-persistant-scriptaculous-effects

It kind of what we need, but not working. Since the page is in toggle mode you have to set a <div> in the page and give it an ID to show it what you want to toggle. If you want it to start closed then you need to add style to the <div> do “display:none;” so rather than setting the BounceUp or Down we just need it to either add or remove the “display:none” based on what the user has clicked during there interaction.

I have virtually no experience with JavaScript other than what I can find on the web. I know what it needs to do in theory, but I don’t know the way to code it. Any help would be much appreciated.

Thanks,
Seth