var PicWindow = null;

function ShowPicture(PictureName, PictureText1, PictureText2)
 {

   //Define Page properties, header
   var ePen1 = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Rock Climbing Photo Gallery</title></head>';
       ePen1 += '<body text="#FFFFFF" bgcolor="#000000" link="#C0C0C0" vlink="#666666" alink="#333333"><p><font face="arial"><center>click on image below to return to previous page</center></p>';

   //Define footers
   var ePen3 = '<p><center>' + PictureText1 + '</center></p>';
       ePen3 += '<center>' + PictureText2 + '</center></font></body></html>';


   //Create new window and document (virtual, has no filename)
   PicWindow = window.open();
   PicWindow.document.open();

   //write page properties and header to document
   PicWindow.document.write(ePen1);

   //Define picture source, create link back to Picture Gallery, write data to document
   PicWindow.document.write("<center><a href=\"javascript:window.close()\";><img src=\"" + PictureName + "\" BORDER=0></a></center>");

   //write footers to document
   PicWindow.document.write(ePen3);

   PicWindow.document.close();
 }
