the first IF statment is for the home link. There should be a link back to the
home page from all secondary pages.
The menu itself is a simple definition list. I have demonstrated two ways of
producing the 'class="active" effect. All primary navigation is set by the $level1
variable (this also assigns the header for that section). This is simple
enough, if youre in that section show the whole link with the class assigned to
it. The second option shows a subnav. The $level2 variable is responsible for
the on state of this link. The last two primary navigation items are there for
simplicity. In each case, there is no subnav, so I can technically accomplish
the same thing in one line than i had previously in five lines.