I have a page where a user clicks an image and a window pops up with an enlarged version of that image. The problem I am hving is that if the user clicks multiple images then multiple windows pop up. How can I make it so that for each time an image is clicked, instead of a new window popping up everytime, the content is just changed if the window is already open, and pops up if the window is not open. Here is the code I am currently using
[code]
var pic = window.open('ViewPic.aspx?Name='+image);
pic.moveTo(0,0);
pic.resizeTo( 650, 650 );
[/code]


