Alrighty--Assume the following:
you build the page....including the JS menu
User makes something happen (form submit, whatever)--and you process it. You then relaod the original page. Is this all correct? If so, all you need to do is use a cookie, store a varibale...control that state status however you please (hidden form field may work), and make sure that every time you load the JS menu (use PHP to echo the proper JS if need be), you check for the current state. Does that make sense?