Trouble with swap depths

i have a series of tabs that slide out when clicked (all seperate movie clips) my problem is that since each tab is on a seperate layer, when you expand one, it will cover up the others. I wanna know how to set up the script so that when you click one tab and expand it, it swaps depth to the background behind all of the other tab layers, then goes back to its orig layer upon clicking it again to collapse the tab. I’ve been having a lot of trouble finding help on this matter…