//
// Display the target image for this thumbnail
// Returns false so the calling anchor link is deactivated.
//

function displayImage(src, width, height, title)
{
   /*global Number, window */   /* for the JSLint Javascript validator */

   var winWidth = 650;  /* Original arbitrary default */
   var winHeight = 510;
   var widthDesc = '';
   var heightDesc = '';
   var titleDesc = 'Elim Photo Album Image';
   var win;

   if (width > 0) {
      winWidth = Number(width) + 15;
      widthDesc = 'width="' + width + '" ';
   }
   if (height > 0) {
      winHeight = Number(height) + 25;
      heightDesc = 'height="' + height + '" ';
   }
   if (null !== title && title !== "") {
      titleDesc = title;
   }

   win = window.open('','Thumb', 'toolbar=0,scrollbars=1,location=0,' +
      'status=0,resizable=1,menubar=0,width=' + winWidth + ',height=' +
      winHeight);

   // clear the new window's document content and then write our own.
   win.document.open();
   win.document.write('<html><head><title>' + titleDesc +
      '</title></head><body><center><img ' + widthDesc + heightDesc +
      'src="' + src + '"></center></body></html>');
   win.document.close();

   return false;
}