function ViewImage(ifile,ix,iy,ititle) {
var iix = ix + 40;
var iiy = iy + 100;
var win;
var sWidth;
var sHeight;
//var NS = (document.layers) ? 1 : 0;
win = window.open("","viewer","width="+iix+",height="+iiy+",menubar=no,toolbar=no,left=0px,top=0px");
//if (NS) {
sWidth = win.innerWidth;
sHeight = win.innerHeight;
iWidth = iix - win.innerWidth;
iHeight = iiy - win.innerHeight;
//} else {
//sWidth = win.document.body.clientWidth;
//sHeight = win.document.body.clientHeight;
//iWidth = iix - win.document.body.clientWidth;
//iHeight = iiy - win.document.body.clientHeight;
//}
if(sWidth!=iix || sHeight!=iiy) {
win.resizeBy(iWidth, iHeight);
}
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title></head><body style='background:url(i/copy.gif) #fff  no-repeat bottom right;'><script type='text/javascript'>self.focus();</script><div style='position:absolute;left:0px;top:0px;padding:20px'><img src='"+ifile+"' title='"+ititle+"' alt=''/></div></body></html>");
win.document.close();
}

