Just tried some code, noticed it does not work clean, want adjust a little, not sure does code required doctype <!DOCTYPE html PUBLIC...? also, what the sense use backslash in html tags?
Code:
function goImgWin(myImage,myWidth,myHeight,origLeft,origTop,capt) {
var mh = myHeight + 44;
var mw = myWidth + 24;
TheImgWin = window.open('','image','height=' + mh + ',width=' + mw + ',toolbar=no,directories=no,status=no,' + 'menubar=no,scrollbars=no,resizable=no');
TheImgWin.resizeTo(mw+2,mh+30);
TheImgWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html[/URL] xmlns="http:\/\/[URL unfurl="true"]www.w3.org\/1999\/xhtml">');[/URL]
TheImgWin.document.write('<head><title>Popup<\/title><\/head>');
TheImgWin.document.write('<body style="overflow:hidden" bgcolor="#ffffff" onclick="self.close()">');
TheImgWin.document.write('<img src="'+myImage+'" width="'+myWidth+'" height="'+myHeight+'" ');
TheImgWin.document.write('border="0" alt="'+capt+'"\/><p align="center">'+capt+'<\/p>');
TheImgWin.document.write('<\/p><\/body><\/html>');
TheImgWin.moveTo(origLeft,origTop);
TheImgWin.focus();
}