It looks like a single menu, but this excerpt contains 7 discrete menus; the original navigation menu contains 14 discrete menus. Despite this, the Grow'Em page loads very quickly.
That's just good design.
Anticipate your users, give them what they need ...
The menuAction function is a simple one: take the user from one web page to the next. It needs to match the menu selection to the appropriate URL, then execute. Because most of the URL is identical for all pages, we begin by retrieving the unique part of the URL.
This could, of course, be accomplished through a switch statement and a series of case statements, i.e.
case "Seed - General":
URL = "see0"
case "Chipping Seed":
URL = "see1"
"Soaking and Pricking":
URL = "see2"
But this is cumbersome, and I don't like clumsy code.
Sure, this is busy, but I can set up the associative array in some 18 lines (or 37 lines if I want 1 declaration per line) where the same functionality using case and switch statements would take 112 lines.
After declaring the array, I declare the function: