function ViewImage(ifile,ix,iy,ititle) { 
var win;

if (win) {
	win.close();
}

win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");

strtext = "<html><head><title>"+ititle+"</title>";
strtext += "</head><body onBlur='javascript:window.close()'>";
strtext += "<div style='position:absolute;width:"+ix+"px;height:"+iy+"px;left:0px;top:0px'>";
strtext += "<img src="+ifile+"></div></body></html>"

win.document.open();
win.document.write(strtext);
win.document.close();
win.focus();
}