Menu area's to stay expanded when you rollout the red area?

I am stuck here.

I want the different menu area’s to stay expanded when you rollout the red area (see attached file: red line).

I think I need to use a flag variable, but I am stuck.

Any advice, suggestions??