Problem wit pop up

i know that this has been answered in here somewhere b4 but i cant find it and i need to know.

I have a menu in my movie with different buttons that u click, each of which spawn a pop up window. My problem is this, everytime a pop up opens, i must close it before i can open another.

Heres the code i use.

This is on an actions frame in the main movie

[AS]
Movieclip.prototype.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable)
{
getURL(“java script: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);");
};
[/AS]

And this is on the buttons

[AS]
on (release) {
// customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = “slbdeadbeat.html”;
target_winName = “slb”;
width = 544;
height = 394;
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);
}
[/AS]

just so u know, each button has a different name

thanks in advance

not sure, but i think the problem is with the first code on the actions layer. I dont know any js so im pretty much stuck

MovieClip.prototype.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
        getURL("java****script: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+"))+'"+"'); void(0);");
};

yep, thats the one

someone suggested that the problem was with this part of the first script (the last part)

myWin.focus();
};
void(0);
};