Javascript Popup Function in Flash

I"m trying to write a fucntion in flash to launch a javascript popup window but can’t seem to get the variables in right. Here is the code.

Button Code
[AS]on (release) {
_root.popup(pic1,436,356);
}[/AS]

Function in the first frame of the root
[AS]function popup(number,picwidth,pichieght){
getURL(“javascript:var mypopup = window.open(‘gallery/’+number+’.htm’,‘mySite’,‘toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=‘picwidth’,height=‘pichieght’,top=’+eval((screen.availHeight - ‘pichieght’) / 3)+’,left=’+eval((screen.availWidth - ‘picwidth’) / 2));mypopup.focus();”);
}[/AS]

Any ideas?