I am building a web page at the moment and have run into a little speed bump (I can continue on without the fix, but it would be nice) I have a section with thumbnails of photos I have taken. I use Javascript to open a new window sized specifically for the pictures. After the window is open, when you click on a different thumbnail, the new picture will load in the same window. The problem I have is that the new window is now behind the main page window. I know window.focus() can be used to bring the window to the forground, but I do not know how to pass it to the new window

Here is the code I am using (with everything but the javascript and link cut out)
Code: Select all
<html>
<head>
<SCRIPT LANGUAGE="Javascript">
<!--
function openpicturewindow()
{
picturewindow = window.open("","picturewindow", "toolbar=no, location=no, copyhistory=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=640, height=480, top=0, left=0");
}
//-->
</SCRIPT>
</head>
<body>
<A HREF="picture001.jpg" onClick="openpicturewindow()" TARGET="picturewindow"> <img src="thumbnail001.jpg" width=80 height=80 border="0" hspace=0 vspace=0></A>
</body>
</html>