Simple menu system in JavaScript