Pop-up window...WAIT! there's more

I followed Senocular’s XML portfolio tutorial and everything is working fine, except I want for each thumbnail when you click, for it to open the larger pic in a javascript window.

I got it working, almost, the strange thing it’s opening the same large pic no matter which thumb I click on. It seems to be loading the same javascript window also, with the adress being the html file where the swf file is.

The code in the html file is this:
function newWin(pic,winName,w,h,scrollb,resize) {
var win=null;
centerWidth = (screen.width) ? (screen.width-w)/2 : 0;
centerHeight = (screen.height) ? (screen.height-h)/2 : 0;
config =

win = window.open(’’,winName,config);

win.document.write("<img src=’"+pic+"’ /><br /><br />");
win.document.write("<a href=’’ onclick=‘window.close()’>Close</a>");

In the swf I have this:

function loadem(){
imagesTag = this.firstChild;
count = imagesTag.childNodes.length;

for (child = 0; child &lt; count; child++){
	currentPicture = imagesTag.childNodes[child];
	currentThumb = mcPics.createEmptyMovieClip("thumbnail"+child,child);
	currentThumb._x = child * 120;
	scrollerwidth += 85;

	image = currentThumb.createEmptyMovieClip("thumbnail_image",0);
	currentThumb.fullsize = currentPicture.attributes.fullsize;
	currentThumb.desc = currentPicture.attributes.desc;
	currentThumb._alpha = 85;
	currentThumb.onRollOver = currentThumb.onDragOver = function(){
			this._alpha = 100;
	currentThumb.onRollOut = currentThumb.onDragOut = function(){
		this._alpha = 85;
	currentThumb.onRelease = function(){



So my idea here is that I would pass the image url to the pic param in the javascript contained in the html file. And also have a unique pop-up window name provided by the currentThumb.desc

I don’t know why the javascript code is opening the same window for all thumbs I click, and that window contains the same fullsize pic…

Something wrong here…seems the word j.a.v.a.s.c.r.i.p.t gets printed out as about…So the getURL above should read("havascript:newWin…with j instead of h (-: