I did something similar on my guild's site, only I went the route of manually deciding when to show or hide the menu, then give users the ability to show or hide it.
It sounds to me more like you'll have to set cookies for the state of the div/table for that user, and check against that. If the cookie doesn't exist, you make it and set everything to visible (or not visible) initially.
That way, the cookie remembers that user's setting for whatever you're showing or hiding.
Now, if you want to go the route of showing or hiding certain items based on what page is showing (that's what I did on my site) then you'll have to find some way to check the page you're on, then hide/show the element as needed.
--
. : KeelaDesigner of www.renewal-guild.com