something like
Code:
function pictureWindow(imgSrc,imgW,imgH,imgName) {
var picWin = open('','picWin','width='+(imgW+20)+',height='+(imgH+20)+',scrolling=no,status=yes,toolbars=no,menubar=no');
var htm='';
htm+='<html><head><title>'+imgName+'</title></head>';
htm+='<body bgcolor="pink"><img src="'+imgSrc+'" width="'+imgW+'" height="'+imgH+'" alt="'+imgName+'"></body></html>';
picWin.document.write(htm);
}
Then you call it like
<a href="javascript
:pictureWindow("image.jpg",200,250,"My Picture")>Click her to open this picture</a>