How to set a menu item active ?
Their is a lot of ways. I list here only things compatible with D7 and eventually on D6.

Use a modules


https://drupal.org/project/menu_position (need rules, watch http://vimeo.com/27074705)
https://drupal.org/project/menu_trail_by_path
https://drupal.org/project/context


Code your stuff

Their is now a native API menu_tree_set_path to set the path you want to use to calculate the menu active trail.

You can also work in theme_links but but I recommend to use menu_tree_set_path so other module know what is your active link. The advantage is you can use this function in your theme without creating a module.

Keep in mind, menu_position has an API to create your custom rules.

So what should I use???

It's depend of your need. if you have simple rules like: for this node type/views/taxonomy i want this active menu, context is good.

If you have a good url structure (autopath) than follow your menu structure, menu_trail_by_path will just works without any effort.

I never used menu_position... so I can very tell.

If you need some special logic, coding your things is certainly faster than creating 40 context or rules...