The hide function does what it's supposed to, and works great. But there is something called SWFObject:
http://blog.deconcept.com/swfobject/
This javascript allows you to insert your flash file so it conforms to w3c standards, doesn't have that stupid "click to activate" in ie, and hides behind the shelf when it's opened.
This is how I inserted my flash file:
<script></script>
<div>
Javascript is not enabled for your browser.
</div>
<script>
var so = new SWFObject("mainflash2006.swf", "myflash", "700", "242", "7", "#ffffff");
so.addParam("wmode", "transparent");
so.write("flashcontent");
</script>