function DisplayPicture()
{
var InString = location.search.substring(1, location.search.length);
InString = InString.replace(/\%20/g, " ");
InArray = InString.split("&");
document.write("<a href='#' onClick='history.go(-1)' Target='mainFrame'><img src='" + InArray[1] + "' alt='" + InArray[2] + "' Style='border-style: ridge; border-width: 0.8em; border-color: #527D4A;'><\/A><BR><BR>" + InArray[2]);
// width='449' height='280'
}

function ShowTitle()
{
  if (location.search.length > 0)
   {
    var InString = location.search.substring(1, location.search.length);
    InString = InString.replace(/\%20/g, " ");
    InArray = InString.split("&");
   }
  else
    InArray[0] = "Thumbnails";

  document.write(InArray[0]);
}

function createThumbnails()
{
  var InString = location.search.substring(1, location.search.length);
  InString = InString.replace(/\%20/g, " ");
  InArray = InString.split("&");

  if (InArray.length >= 3)
   {
    var PicNr = 0;
    document.write("<Table Width='70%' Border='1' Align='Center' Class='NormalFont'>");
    for (row=0; row<99; row++)
     {
      document.write("<TR>");
      for (col=0; col<5; col++)
       {
        document.write("<TD Align='Center' VAlign='Center' Width='20%'>");
  
        if (PicNr<InArray[2])
         {
          var ImageSrc = InArray[1] + "/" + (PicNr + 1) + ".jpg";
          var ImageTxt = (PicNr+3 < InArray.length) ? InArray[PicNr + 3] : '';
          document.write("<A HRef='PhotoPage.htm?" + InArray[0] + "&" + ImageSrc.replace("Thumbnails", "Full") + "&" + ImageTxt + "' Target='mainFrame'><Img Src=" + ImageSrc + " Border='0' Alt='" + ImageTxt + "'><\/A><BR>");
          document.write("<Font Size='-1'>" + ImageTxt + "<\/Font>");
          PicNr++;
         }
        else
         {
          document.write("&nbsp;");
          row = 999;
         }
 
        document.write("</TD>");
       }
      document.write("</TR>");

      if (PicNr>=InArray[2])
        row = 999;
     }

    document.write("</Table>");
  }
}

function writeThumbnail(cTitle, cPath, cNumberOfPic, cDescription, cImage)
{
  document.write("<A href='..\/..\/Photos\/Thumbnails.htm?" + cTitle + "&" + cPath + "&" + cNumberOfPic + "&" + cDescription + "' Target='mainFrame'>");
  document.write("<Img Src=" + cImage + "><\/A>");
}

