default or chosen tab and browser history

Current attempt to maintain the state of a chosen subtab when navigating away and back again.
Also trying to avoid the parent tab being placed in browser history when not chosen but activated by linking into a subpanel.