Erik,
You can accomplish what you want by using the navigationPath attribute of the application layout control.
If you set in on every page you open, you can determine what menu item/ tab to highlight by using the selection attribute of every treenode in a navigation control. The selection attribute is a regular expression.
You might want to have a look at the Extension Library sample database for an example.
Mark