added a cookie to remember the main menu open/close state when loading a new page