/*============================*/
/* j_events_template.js       */
/* Laura Aquino 5/9/2001      */
/* script to display album    */
/*============================*/


// INSTRUCTIONS ON USING THIS SCRIPT
// This script will generate an album of pictures
// The user will be able to click on the thumbnail picture to see the larger view

// STEP 1: Declare picture array 
// imgArr = contains the filename of the picture, regular size
// txtArr = describes the picture in imgArr
// tmbArr = contains the filename of the picture thumbnail, max width= 150 pixels
// desArr = contains a longer picture description

// STEP 2: Control the number of pictures per line in the function showPictureTable() function
// By modifying the lines of code that display the <TR></TR> 

function openImageI(i)
// this function will launch a new window whenever the thumbnail image is clicked

{
  newWindow1 = window.open("","newWindow1","menubar=no, toolbar=no, resizable, scrollbars=yes, width=640, height=640");
  newWindow1.document.write('<HTML><HEAD><TITLE>'+ imgArr[i]+'<\/TITLE>');
  newWindow1.document.write('<link REL="stylesheet" HREF="style1.css"  TYPE="text/css">');
  newWindow1.document.write('<\/HEAD><BODY BGCOLOR="#FFFFFF">');
  newWindow1.document.write('<CENTER><IMG SRC="'+ imgArr[i] + '">');
  newWindow1.document.write('<P CLASS=CAPTION>' + '<BR>'+txtArr[i]+'<\/P><\/CENTER>');
  newWindow1.document.write('<P CLASS=TEXTC>'+desArr[i]);
  newWindow1.focus();
  newWindow1.document.close();

}

function showPictureTable(num,tmbsize)
{
document.write('<TABLE BORDER="0" CELLPADDING="5" CELLSPACING="0" BGCOLOR=#FFFFFF>');
document.write('<TR VALIGN="TOP">');
//=================== start to loop on the TDs ==============================
for (i=1;i<imgArr.length;i++)
{
 document.write('<TD  WIDTH="' +tmbsize+'" BGCOLOR=#FFFFFF> <P CLASS=Caption2>');
 document.write('<P CLASS="VERSE2">');
 document.write('<A HREF=javascript:openImageI(',i,')>');
 document.write('<IMG BORDER=0 WIDTH="'+tmbsize+'" SRC="' + tmbArr[i] + '"><\/A>');
 document.write('<BR>'+txtArr[i]);

 if ((i%num)== 0) 
 {   
   document.write('</TR><TR>') 
 };
}
document.write('</TR></TABLE>');
}

/**************************************************************************************/
function openImageI2(i)
// this function will launch a new window whenever the thumbnail image is clicked

{
  newWindow1 = window.open("","newWindow1","menubar=no, toolbar=no, resizable, scrollbars=yes, width=640, height=640");
  newWindow1.document.write('<HTML><HEAD><TITLE>'+ imgArr2[i]+'<\/TITLE>');
  newWindow1.document.write('<link REL="stylesheet" HREF="style1.css"  TYPE="text/css">');
  newWindow1.document.write('<\/HEAD><BODY BGCOLOR="#FFFFFF">');
  newWindow1.document.write('<CENTER><IMG SRC="'+ imgArr2[i] + '">');
  newWindow1.document.write('<P CLASS=CAPTION>' + '<BR>'+txtArr2[i]+'<\/P><\/CENTER>');
  newWindow1.document.write('<P CLASS=TEXTC>'+desArr2[i]);
  newWindow1.focus();
  newWindow1.document.close();

}

function showPictureTable2(num,tmbsize)
{
document.write('<TABLE BORDER="0" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#FFFFFF"'+'BORDERCOLOR='+borderColor+'>');
document.write('<TR>');
//=================== start to loop on the TDs ==============================
for (i=1;i<imgArr2.length;i++)
{
 document.write('<TD VALIGN="TOP" WIDTH="' +tmbsize+'" BGCOLOR=#FFFFFF> <P CLASS=Caption2>');
 document.write('<P CLASS="VERSE2">');
 document.write('<A HREF=javascript:openImageI2(',i,')>');
 document.write('<IMG BORDER=0 WIDTH="'+tmbsize+'" SRC="' + tmbArr2[i] + '"><\/A>');
 document.write('<BR>'+txtArr2[i]);

 if ((i%num)== 0) 
 {   
   document.write('</TR><TR>') 
 };
}
document.write('</TR></TABLE>');
}

/**************************************************************************************/
/* This function displays pictures and anchors to albums */

function showPictureTable3(num,tmbsize,borderColor)
{
document.write('<TABLE BORDER="0" CELLPADDING="3" CELLSPACING="0" BGCOLOR="#FFFFFF"'+'BORDERCOLOR='+borderColor+'>');
document.write('<TR VALIGN="TOP">');
//=================== start to loop on the TDs ==============================
for (i=1;i<tmbArr.length;i++)
{
 document.write('<TD ALIGN=CENTER WIDTH=' +tmbsize+' BGCOLOR=#FFFFFF>');
 document.write('<A HREF="'+anchor[i]+'">');
 document.write('<IMG BORDER=0 WIDTH='+tmbsize+' SRC="' + tmbArr[i] + '"><BR>'+txtArr[i]+'<\/A>');
 if ((i%num)== 0) 
 {   
   document.write('</TR><TR>') 
 };
}
document.write('</TR></TABLE>');
}



/**************************************************************************************/
/* This function displays pictures and anchors to albums */

function showPictureTable4(num,tmbsize,borderColor)
{
document.write('<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" BGCOLOR="#FFFFFF"'+'BORDERCOLOR='+borderColor+'>');
document.write('<TR>');
//=================== start to loop on the TDs ==============================
for (i=1;i<tmbArr4.length;i++)
{
 document.write('<TD ALIGN=CENTER VALIGN=BOTTOM WIDTH=' +tmbsize+' BGCOLOR=#FFFFFF>');
 document.write('<A HREF="'+anchor4[i]+'">');
 document.write('<IMG BORDER=0 WIDTH='+tmbsize+' SRC="' + tmbArr4[i] + '"><BR>'+txtArr4[i]+'<\/A>');
 if ((i%num)== 0) 
 {   
   document.write('</TR><TR>') 
 };
}
document.write('</TR></TABLE>');
}

