You cannot change the properties of any layout object while in browse mode, manually or via script.
But you can use three tab controls for what you describe in your example.
Create a tab control for Doctors. Create a Tab Control for Lawyers. Create a third tab control with two panels. Put the tab control for doctors inside one of those panels and the tab control for doctors inside the other.
You can then give each of the two tab panels object names using the Name box inside the Inspector's Position tab.
IF you make the enclosing tab control invisible by selecting the appropriate fill and border properties, you can use a script with go to object to make either the tab control for doctors or the tab control for lawyers visible and the other one invisible.
And a completely different approach is to create two layouts, one for lawyers and one for doctors. Your scripts can then control which layout is selected. If the two layouts are identical except for the tab control this can also create the illusion that you have one layout that customizes itself for either lawyers or doctors.
Here's a thread to a similiar question where DaSaint and S Chamblee came up with a solution for me (with file)
Tab Panels--selecting via script. After I got it to work, I hid the tab labels as Phil described above.
Thanks a lot for the quick and helpful responses!