Why dynamic? We could have hard-coded our layer contents by directly adding the necessary elements to the DIV blocks.But then you would have to add numerous lines of code (twenty or so) each time you need an additional page or sub-menu. So the principle we opt for is to use the data stored in the arrays - easy to change and to create - to generate in real time the HTML code required to display our menu components.
The code used to dynamically generate the pages is a general one and can simply be called up when changes to our menu are needed.
