Improve JavaScript menus