function OpenViewer(image)
{
   var windowWidth = 640
   var windowHeight = 640
   var centerWidth = (window.screen.width - windowWidth) / 2;
   var centerHeight = (window.screen.height - windowHeight) / 2;

   html = "<html><head><title>Image</title>" + "</head><body style='margin: 0px 0; text-align:center; '>" + "<IMG src=" + image + " BORDER=0 NAME=image " + "onload='window.resizeTo(document.image.width,(document.image.height))'>" + "</body></html>";
   properties = 'resizable=0,width=' + windowWidth + ',height=' + windowHeight + ',left=' + centerWidth + ',top=' + centerHeight + 'toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=1';
   newWindow = window.open(image, 'ImageViewer', properties);
    newWindow.document.open();
    newWindow.document.write(html);
    newWindow.document.close();

}
