document.writeln('<BODY TEXT="#CCCCCC" BGCOLOR="#000000" LINK="#339933" VLINK="#339933" ALINK="#339933">');
document.writeln('<CENTER>');
document.writeln('<TABLE BGCOLOR="#990000" BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=750>');
document.writeln('<TR>');
document.writeln('   <TD ALIGN=CENTER VALIGN=MIDDLE><IMG BORDER=0 WIDTH=750 HEIGHT=100 SRC="graphics/header.gif"></TD>');
document.writeln('</TR>');
document.writeln('<TR>');
document.writeln('   <TD ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="#000000"><IMG BORDER=0 WIDTH=750 HEIGHT=6 SRC="graphics/cleardot.gif"></TD>');
document.writeln('</TR>');
document.writeln('<TR>');
document.writeln('   <TD ALIGN=CENTER VALIGN=MIDDLE>');
document.writeln('      <TABLE BORDER=0 CELLPADDING=7 CELLSPACING=2 WIDTH=750>');
document.writeln('      <TR BGCOLOR="#222222">');
document.writeln('         <TD ALIGN=CENTER VALIGN=MIDDLE><A');
document.writeln('            HREF="index.htm"><IMG BORDER=0 WIDTH=140 HEIGHT=30 SRC="graphics/home.gif"></A><IMG BORDER=0 WIDTH=8 HEIGHT=30 SRC="graphics/cleardot.gif"><A');
document.writeln('            HREF="info.htm"><IMG BORDER=0 WIDTH=140 HEIGHT=30 SRC="graphics/info.gif"></A><IMG BORDER=0 WIDTH=8 HEIGHT=30 SRC="graphics/cleardot.gif"><A');
document.writeln('            HREF="other.htm"><IMG BORDER=0 WIDTH=140 HEIGHT=30 SRC="graphics/other.gif"></A><IMG BORDER=0 WIDTH=8 HEIGHT=30 SRC="graphics/cleardot.gif"><A');
document.writeln('            HREF="archives.htm"><IMG BORDER=0 WIDTH=140 HEIGHT=30 SRC="graphics/archives.gif"></A><IMG BORDER=0 WIDTH=8 HEIGHT=30 SRC="graphics/cleardot.gif"><A');
document.writeln('            HREF="links.htm"><IMG BORDER=0 WIDTH=140 HEIGHT=30 SRC="graphics/links.gif"></A></TD>');
document.writeln('      </TR>');
document.writeln('      <TR BGCOLOR="#222222">');
document.writeln('         <TD ALIGN=CENTER VALIGN=TOP>');
document.writeln('            <FONT FACE="ARIAL" COLOR="#339933" SIZE=4><B><U>' + photosTitle + '</U></B><BR>&nbsp;</FONT>');
document.writeln('            <FONT FACE="ARIAL" COLOR="#CCCCCC" SIZE=2>&nbsp;<BR>Click on a picture to see a larger image.<BR>&nbsp;</FONT>');
document.writeln('            <FONT FACE="ARIAL" COLOR="#CCCCCC" SIZE=2>&nbsp;<BR>Recent additions to this page are identified by a </FONT><FONT FACE="ARIAL" COLOR="#339933" SIZE=2><B>GREEN</B></FONT><FONT FACE="ARIAL" COLOR="#CCCCCC" SIZE=2> description.<BR>&nbsp;</FONT>');
document.writeln('            <FONT FACE="ARIAL" COLOR="#CCCCCC" SIZE=2>&nbsp;<BR>High quality prints of any of these photos can be purchased online by clicking <A HREF="http://www.photoboxgallery.com/sc-photography" TARGET="_blank"><B>HERE</B></A>.<BR>&nbsp;<BR>&nbsp;</FONT>');
document.writeln('            <TABLE BGCOLOR="#222222" BORDER=0 CELLPADDING=0 CELLSPACING=10>');

columnCount = 0;
columnMax   = 6;
row1Cell    = new Array(columnMax);
row2Cell    = new Array(columnMax);
photoNum    = photosDisplayed - 1;

for (i=0; i<photosDisplayed; i++) {
   photoInfo = photo[photoNum].split("|");

   photoID   = photoInfo[0];
   photoType = photoInfo[1];
   recentAdd = photoInfo[2];
   photoDesc = photoInfo[3];

   photoYear = photoID.substring(0,4);
   photoMM   = photoID.substring(5,7);
   photoDD   = photoID.substring(8,10);

   photoDay  = photoDD * 1;

   if (photoDay==1 || photoDay==21 || photoDay==31) {
      photoDay += "st";
   } else if (photoDay==2 || photoDay==22) {
      photoDay += "nd";
   } else if (photoDay==3 || photoDay==23) {
      photoDay += "rd";
   } else {
      photoDay += "th";
   }

   if (photoMM=="01") {
      photoMonth = "January";
   } else if (photoMM=="02") {
      photoMonth = "February";
   } else if (photoMM=="03") {
      photoMonth = "March";
   } else if (photoMM=="04") {
      photoMonth = "April";
   } else if (photoMM=="05") {
      photoMonth = "May";
   } else if (photoMM=="06") {
      photoMonth = "June";
   } else if (photoMM=="07") {
      photoMonth = "July";
   } else if (photoMM=="08") {
      photoMonth = "August";
   } else if (photoMM=="09") {
      photoMonth = "September";
   } else if (photoMM=="10") {
      photoMonth = "October";
   } else if (photoMM=="11") {
      photoMonth = "November";
   } else {
      photoMonth = "December";
   }

   photoDate = photoDay + " " + photoMonth + " " + photoYear;

   if (photoType=="W") {
      thumbW = 105;
      thumbH = 35;
   } else if (photoType=="L") {
      thumbW = 105;
      thumbH = 70;
   } else {
      thumbW = 70;
      thumbH = 105;
   }

   if (recentAdd=="Y") {
      descColour = "#339933";
   } else {
      descColour = "#CCCCCC";
   }

   row1Cell[columnCount] = '               <TD ALIGN=CENTER VALIGN=BOTTOM WIDTH=110><A HREF="javascript:showPhoto(' + photoNum + ');"><IMG BORDER=0 WIDTH=' + thumbW + ' HEIGHT=' + thumbH + ' SRC="other/' + photoYear + '/thumbs/' + photoID + '.jpg"></A></TD>';
   row2Cell[columnCount] = '               <TD ALIGN=CENTER VALIGN=TOP    WIDTH=110><FONT FACE="ARIAL" COLOR="' + descColour + '" SIZE=1><B><U>' + photoDate + '</U><BR>' + photoDesc + '</B></FONT><BR>&nbsp;</TD>';

   columnCount++;

   if (columnCount==columnMax) {
      document.writeln('            <TR>');
      for (j=0; j<columnMax; j++) {
         document.writeln(row1Cell[j]);
      }
      document.writeln('            </TR>');
      document.writeln('            <TR>');
      for (j=0; j<columnMax; j++) {
         document.writeln(row2Cell[j]);
      }
      document.writeln('            </TR>');
      columnCount = 0;
   }
   photoNum--;
}

if (columnCount>0 && columnCount<columnMax) {
   for (i=columnCount; i<columnMax; i++) {
      row1Cell[i] = '               <TD ALIGN=CENTER VALIGN=BOTTOM WIDTH=110><IMG BORDER=0 WIDTH=105 HEIGHT=70 SRC="graphics/cleardot.gif"></TD>';
      row2Cell[i] = '               <TD ALIGN=CENTER VALIGN=TOP    WIDTH=110><FONT FACE="ARIAL" COLOR="#CCCCCC" SIZE=1><B>&nbsp;<BR>&nbsp;</B></FONT><BR>&nbsp;</TD>';
   }
   document.writeln('            <TR>');
   for (j=0; j<columnMax; j++) {
      document.writeln(row1Cell[j]);
   }
   document.writeln('            </TR>');
   document.writeln('            <TR>');
   for (j=0; j<columnMax; j++) {
      document.writeln(row2Cell[j]);
   }
   document.writeln('            </TR>');
}

document.writeln('            </TABLE>');
document.writeln('         </TD>');
document.writeln('      </TR>');
document.writeln('      <TR BGCOLOR="#222222">');
document.writeln('         <TD ALIGN=CENTER VALIGN=MIDDLE><FONT FACE="ARIAL" COLOR="#CCCCCC" SIZE=3><B>These pages and photographs &copy; Simon Clarke</B></FONT></TD>');
document.writeln('      </TR>');
document.writeln('      </TABLE>');
document.writeln('   </TD>');
document.writeln('</TR>');
document.writeln('</TABLE>');
document.writeln('</CENTER>');
document.writeln('</BODY>');

