Need some help finding code

Hi there, I’m a Flash CS4 beginner and I need help finding some actionscript 3 for some interactivity. I have 3 panels that are on top of each other. (panel1, panel2, panel3) I’ve attached an image of what my flash looks like and an example of what I want it to do.
I need them to slide over to the right (being revealed) when clicked on and then retract when another has been chosen.
Is there anyone that can point me in the right direction?
Please help!
Thanks!