/* 
Created by Carlos Berguido 2004 - http://www.csnetserver.com
*/

//-----------------------------------------------------------------------
function SetUp()
{
// Reserved for future enhancements
}

//-----------------------------------------------------------------------
function ShowFull()
{
// Show the full size image of a thumbnail
// Derive the thumbnail image file name
var lcSrc = event.srcElement.src;

// Determine the start and end of the full size filename in the thumbnail image name
var re = /BB3/i;
var lnStart = lcSrc.search(re);
re = /.jpg/i;
var lnEnd = lcSrc.search(re) - 2;
var lcFullSize = lcSrc.substring(lnStart, lnEnd) + ".jpg";
// alert(lcFullSize);

// Derive the image title or the empty sting when no title is present
var lcTitle = event.srcElement.alt
// alert(lcTitle)

// load the image in an object
// nice idea, but sometimes liImg.width returned zero
// var liImg = new Image();
// liImg.src=lcFullSize;

// Write contents of the page
var oNewDoc = document.open("Slide", "_blank");
oNewDoc.writeln('<html><head><title>' + lcTitle + ' Image</title><link rel="stylesheet" type="text/css" href="gallery.css"></head><body bgcolor="black">');
oNewDoc.writeln('<center><img src="' + lcFullSize + '" GALLERYIMG="no"></center>');
// the table is as wide as the image with any caption left justified and the back link right justified
//document.writeln('<table align="center" width=' + liImg.width + '><tr>');
oNewDoc.writeln('<table align="center" width=720><tr>');
oNewDoc.writeln('<td><h3>' + lcTitle + '</h3>');
oNewDoc.writeln('<td width="50px" align="right"><h3><a href=null onclick="window.history.back(); return false">Back</a></h3></td>');
oNewDoc.writeln('</tr></table>');
oNewDoc.writeln('</body><html>');
oNewDoc.close();
}

