function ViewImage(file,x,y,title) { 
var win;
var sWidth;
var sHeight;
var NS = (document.layers) ? 1 : 0;
win = window.open("","imageviewer","width="+x+",height="+y+",menubar=no,toolbar=no");
if (NS) {
sWidth = win.innerWidth;
sHeight = win.innerHeight;
} else {
sWidth = win.document.body.clientWidth;
sHeight = win.document.body.clientHeight;
}
win.document.open();
win.document.write("<html><head><title>"+title+"</title>");
win.document.write("</head><body>");
win.document.write('<div style="position:absolute;width:'+x+'px;height:'+y+'px;left:0px;top:0px">');
win.document.write("<a href='javascript:self.close()'><img src="+file+"></a></div></body></html>");
win.document.close();
}
