You need to look at GetLayoutObjectAttribute()
That lets you do stuff like:
If [ GetLayoutObjectAttribute ( "myFirstTab", "isFrontTabPanel" ) ]
# do stuff for the first tab
Else If [ GetLayoutObjectAttribute ( "mySecondTab", "isFrontTabPanel" ) ]
# do stuff for the second tab
Six fried rice has a great article on controlling tabs:
Seeing as though a lot of your interface is driven by tab controls and not separate layouts, I would highly suggest reading through the above and practicing the techniques listed in there, applying them to your file.
You posted this question twice, check your other post.
I know. This is my first experience navigating this site so I saw that scripting and calculations seemed to be a better fit after I had already posted in the general discussion. Sorry.