5.x
Adding an "active" class to menu links
This method works on all menus that are displayed as blocks i.e. not primary or secondary links. These sorts of menus are created using the theme_menu_tree() function. The process here is a bit more complicated than for primary links, but all you have to do is paste in the code below (I have done all the heavy lifting for you).
Put this in template.php somewhere:
Adding an "active" class to primary links - Option 1
Because primary links use theme_links to generate their output, we could override that theme and add in our own code to get an "active" class on the <li> element. Drupal 6 made some improvements to 5's theme_links function, so I used that version and added in some code to check for the front page too.
Adding an "active" class to primary links - Option 2
There are quite a few posts about setting the active trail properly with primary & secondary links. In Drupal 5.x, its actually handled pretty well if you use the following code to print your primary & secondary links in page.tpl.php
<?php
print theme('links', $primary_links);
print theme('links', $secondary_links);
?>