As for the scripting, I'd do it like this:
For each clip (or menu) have a script that sets a value in a GPRM, or rely on the internal values of the components. Every time you go to a new element (such as a new track or menu) have a script that updates the item value.
Now create a script that looks at the last value on the GPRM and jumps to a component according to the value it finds. Point the title button to this last script.
You can simplify this if you use the internal values for components and the 'get last item' value in the script. For example, the first menu on your disc has a value of 32, and subsequent menus increment in jumps of 32 (the second menu therefore has a value of 64, and so on). Tracks have a totally different range of values, starting at 49280 and incrementing in jumps of 128.
Thus a script that reads the GPRM will be able to tell if you were on a track or a menu (totally different ranges). Off the top of my head:
mov GPRM0, Last Item
Jump Indirect, GPRM0
That seems a bit simplistic - basically, put the value of the last item (track or a menu) into a GPRM, then jump to whatever item has got that value. If you were on menu 3 then the GPRM would hold a value of 96. The script would then take you to that menu. If you were watching track 4 the GPRM would hold a value of 49280 + 384 (track 1 plus three increments) so you'd go to track 4.
If you manually set the values, and ignore tracks (i.e. you only ever want to go to menus) then when you move between menus go via a script which changes the value in GPRM0 - you can either use your own values (so menu 1 sets GPRM 0 to be '1', Menu 2 sets it to '2' and so on) or try to work out something cute with the internal values.
If you use your own values (1, 2, 3, etc):
Mul GPRM0, 32
Jump Indirect GPRM0
If you manage to set the internal menu values directly into GPRM0:
Jump Indirect GPRM0