Help for getURL with a JavaScript

Could someone tell me how to incorporate a variable into a getURL like so -

getURL (“javascript:NewWindow=window.open([color=red]'I want to insert a variable HERE[/color]’,’’,‘width=600,height=500,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No’); NewWindow.focus(); void(0); return false;”);
}

I want to be able to generate a new window that just loads into it an image that’s in the sites directory. I know it can be done in javascript, cause this code works in a html page

<a href="" " onclick="window.open(’[color=seagreen]#fullSiteTextImage#/#uploadTextImageDirectory#/large_#strTextImageImage#[/color]’,’’, ‘width=600,height=500,noscrollbars’); return false;>

The green bit is a CFM variable, which contains something like flash/flash_images/image.jpg

So how can I do this from flash? I KNOW it can be done. It must be possible, someone please help me. The thing that seems to stuff it up to me is the fact that I have to enclose the getURLs URL parameter in quotes, so flash doesnt evaluate the variable.

If that is the problem, how can I get around it. Also, I dont know javascript very well, so if theres anything wrong with my java, please tell me!

Help!