Need to add JavaScript enabled textbox to XML driven portfolio

So that I can get a full size jpg to open in a new, custom browser window.

I’ve gotten this far but it doesn’t seem to want to work. Anybody done this? Thanks all!

[JavaScript for HTML page]

<script language=“javascript”>
function openNewWin( url ){
window.open(‘url’,‘mywindow’,‘width=400,height=200,toolbar=yes,
location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,
resizable=yes’)
};
</script>

url is the string passed to the javascipt function from Flash.

[Actionscript]
[This is an example of the function that is being called]

function processNews(hypro_xml)
{

var d = hypro_xml.firstChild.childNodes;
var l = d.length;

output = “”;
for(var c = 0; c < l; c++) {
output += “<p><a href=“javascript.openNewWin(” + d[c].attributes.url + “)” target=”_blank">" + d[c].firstChild.nodeValue + “</a></p>”;
}

[XML]

<window url=“http://www.anylink.com”>Text</window>

Everything works if I just try to open the link using HTML and no javascript. That last line looks like this instead:

output += “<p><a href=”" + d[c].attributes.url + “” target="_blank">" + d[c].firstChild.nodeValue + “</a></p>”;