Pop-up windows

Hello all. Got a situation I can’t figure out. If I open photos.htm by typing the direct path, when I click on the "download image button in the Flash movie, I get a pop-up window the siaze of the photo and it works fine.

When you click on the photos button in the html page, it opens up photos.htm in a pop-up window. When I click on the “dowload image” button now, it opens in the same window. Can anyone give me a hand with this one? Thanks.

This is the code on the first button in the html page

on (release) {
getURL("javascript:NewWindow=window.open('http://www.arraweb.com/photos.htm','newWin','width=689,height=690,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}

This is on the “download image” button in the Flash movie in the first pop-up:

on (release) {
getURL ("javascript:NewWindow=window.open('popup.php?img=Gigs/" + folder + "/pics/" + _root.picNum + "','newWin','width=" + _root.containerMC._width + ",height=" + _root.containerMC._height + ",left=0,top=0,toolbar=0,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}

This is the popup.php:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Downloadable Image</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?
list($width, $height, $type, $attr) = getimagesize($_GET['img']);
echo '<img src="'.$_GET['img'].'" NAME="galleryImage" $attr>';
?> 
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
</body>
</html>