Customized window help

I am trying to customize the windows I open from flash using javascript inside flash. I’ve done it sucessfully in another site, the only difference being the buttons on the successful one were in the root level of the site and this one is nested inside 2 mc’s.

This is the code I’m using:

this is in the “actions” layer:

this.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) { 
getURL ("javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open('" + url + "','" + winName + "','" + "width=" + w + ",height=" + h + ",toolbar=" + toolbar + ",location=" + location + ",directories=" + directories + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",top='+((screen.height/2)-(" + h/2 + "))+',left='+((screen.width/2)-(" + w/2 + "))+'" + "')}else{myWin.focus();};void(0);"); 
} 
stop();

this is on the button itself:

on (release) { 
// 0 equals NO. 
// 1 equals YES. 
address = "[http://www.norwoodandhoehne.com/simcoeblackgallery.html](http://www.norwoodandhoehne.com/simcoeblackgallery.html)"; 
target_winName = "black drawings"; 
width = 820; 
height = 650; 
toolbar = 0; 
location = 0; 
directories = 0; 
status = 0; 
menubar = 0; 
scrollbars = 0; 
resizable = 0; 
//sends data back to the function 
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable); 
} 

the only difference in the code on the one that worked and the on that didn’t was that it said “_root.openWinCentre = function” instead of "this.openWinCentre = function "

Any help would be hugely appreciated.