I haven't looked at the code in question, but presumably one could examine the links and the URL of the current document. Exactly how one would relate to the other depends on the site structure, but assuming there's a pattern, you could use that to determine where to highlight.
Originally Posted by jscheuer1
Consider this section of a hypothetical menu, and the associated links for each item:
If the URL for the current document contained "http://www.example.com/products/", you could highlight the "Products" top-level item.
+-- Accessories http://www.example.com/products/accessories
+-- Monitors http://www.example.com/products/monitors
+-- Processors http://www.example.com/products/processors
+-- Storage http://www.example.com/products/storage
Just some food for thought.