I had a discussion with Francis along these lines months ago. Here's the deal: Even though you can show(), hide(), and toggle() containers, they aren't guiobjects, and thus cannot use .isVisible, nor is there an onShowContainer nor onHideContainer, nor onToggle (although you can .toggle() it.).
What you can do, however, is get the total number of containers ( getNumContainers() ), then use a for loop to walk through them . Inside the for loop, do enumContainer(i), to get each container one at a time. Once you have the container in a temp object, you do tempcontainer.getNumLayouts, and start another for loop. Inside the second loop, you check each layout of the temp container to determine if it is visible or not.
If the container you're looking for exists, and if any layout of the container is visible, set an int to 1, and then you can exit the loops, check if the int is 1, and do your stuff. Not exactly easy, is it? In speaking to Francis about it, he explained that a container isn't a guiobject, and thus can't be seen, so I asked Francis: If I can show, hide, and toggle a container, then why can't I check it visibility, or use onShowContainer, etc? It just makes sense to be able to access that information in a simple way. I don't care if it's my shade mode, or main mode showing, I just want to know if the container is open or not, right?
 If you're having trouble following my ramble, the code for it is already in QuarkAmp...I *think* the code for that should still be correct for the latest builds.[/edit]
I was away for a while.
But I'm feeling much better now.