Problems with javascript

Hi,
I am trying to launch a small popup window in flash with javascript functions. Here’s the code i’m using.


import flash.external.*;

goTo = function() {
    getURL('javascript:window.open("popup.html","","height=200,width=200,left=0,top=0")');
    trace("working");
    ExternalInterface.call("newPost");
}

originally i had the window.open function inside another function, and this function also had an alert window that would pop up, so i knew it was called. However whenever goTo was activated, it did not call the function because the alert box never popped up. So i replaced the function with this window.open function. It works fine when testing it in Flash and when i have the .swf movie loaded by itself into the browser, however whenever it is embedded into a page, the window does not pop up.

anyone know why this could be happening? If it would be helpful, i can attach the swf and fla files along with the page it is embedded in.

thanks in advance,
ravi