Look in the Homepage of this site, Library's tools, JSGenerator to get the code for open a window using JS.
Then consider you're using AS3, so getURL doesn't work, you should use:
navegateToUrl(new URLRequest("....js stuff....."))
Another choice is to use ExternalInterface to call a JS script inside an HTML page
Jorge