Programatically controlling collapsible Sections ?

Is it possible to control whether a section is collapsed or not dependent on an input ?
For instance I have a form that is displaying some summary data that is view able to all. I have two groups of data, one for users and one for managers that are presented in a section each.
I'd like to on loading the form, only have the relevant section open .. i.e if a manager views it, the user data is collapsed and the manager data open.
I'm guessing the alternative is to just use some radio buttons on the form and display the fields dependent on the value of the button, but that means I lose all the section goodness :(

OriginalPostID-263361

  Discussion posts and replies are publicly visible