Layers, javascript, and actionscript

Greetings!

Trying to get the last frame of my javascript to replace the layer my flash is in with a static html layer on the page.

Here’s the layers:

 
<style>
#flashopen {
 position:relative;
 width:906px;
 height:471px;
 z-index:1000;
 left: 0px;
 top: 0px;
 visibility: visible;
}
#Layer2 {
 position:absolute;
 width:906px;
 height:471px;
 z-index:1000;
 left: 0px;
 top: 0px;
 visibility:hidden;
}
</style>

Here’s the actionscript:

getURL("javascript:flashopen.style.visibility=none;"); 
getURL("javascript:Layer2.style.visibility=visible;");
stop();

As to the error, Firefox says flashopen and Layer2 are not defined. IE says ‘visible’ is undefined.

I’m confused, and need another few sets of eyes on this. Any help or comments would be appreciated.