You can have it open the image file directly
<image src="blah.jpg" onclick="widow.open(this.src)">
You can have it write it to the new window.
The third way to to build a template and pass the image in a query
string. You then have the script fill retrive the image from the querystring and set thesource. I do not have time to write up that code.
Eric
Note: I did not test the code above, I wrote it on the fly, it should work!