// <script type="text/javascript" src="js/openimg.js"></script>
// 20090709: add full webpage to document writes
function OpenImg(strImg,iW,iH)
   {
   // add space for margins
   iW +=40;
   iH +=50;
   
   // define window attributes & open new window
   var vImage = "<img src=" +strImg+ " alt=Example onclick='window.close(); return true'>";
   var vOptions= "toolbar=no,menubar=no,statusbar=no,scrollbars=yes,hotkeys=no,dependent=yes";
   vOptions +=",Width=" +iW+ ",Height=" +iH;
   var newWin= window.open('','newImg',vOptions);

// write the page header
   newWin.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">');
   newWin.document.writeln('<html><head><title>Large Image</title>');
   newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
   newWin.document.writeln('</head><body>');
   
   // add image
   var vImage = "<img src=" +strImg+ " alt=LargeImage valign=top align=center onclick=window.close(); return true>";
   newWin.document.writeln(vImage);
   
   // complete page
//   newWin.document.writeln('<br>(click on pic to close)');
   newWin.document.writeln('<br>');
   newWin.document.writeln('<input type=BUTTON value="CLOSE" onclick="window.close()">');
   newWin.document.writeln('</body></html>');
   newWin.document.close();
   newWin.focus();
   }

