function arrayPic() {
   X=0

   this[X] = "NEWGROUP&The Greens"; X++;
   this[X] = "fgreen4&A view of the Front Green from the Top Green."; X++;
   this[X] = "fgreen2&A view of the Front Green and the clubhouse."; X++;
   this[X] = "fgreen3&A view of the Front Green, also showing the winter green in the background."; X++;
   this[X] = "tgreen1&A view of the Top Green."; X++;
   this[X] = "tgreen2&RVBA Pennant Practice on the Top Green."; X++;
   this[X] = "tgreen3&On the mat and ready to bowl."; X++;
   this[X] = "fgreen5&Skips giving instructions to their team."; X++;
   this[X] = "fgreen6&The Front Green with the clubhouse in the background."; X++;
   this[X] = "galaday3&A view of the Front Green from the winter green, on the Ladies Gala Day."; X++;
   this[X] = "galaday4&Making the tough decisions."; X++;
   this[X] = "fgreen7&Wide shot of the clubhouse and Front Green."; X++;
   this[X] = "galaday2&Bowling on the Ladies Gala Day."; X++;
   this[X] = "tgreen4&Monday Triples."; X++;

   this[X] = "NEWGROUP&The Clubhouse"; X++;
   this[X] = "teabreak&Afternoon tea, during a RVBA Pennant practice game."; X++;
   this[X] = "teabreak2&Afternoon tea, during a RVBA Pennant practice game."; X++;
   this[X] = "club3&A view of the inside of the clubhouse."; X++;
   this[X] = "club4&A view of the inside of the clubhouse."; X++;
   this[X] = "teabreak3&Lunch on the Ladies Gala Day."; X++;
   this[X] = "kitchen&The clubs kitchen."; X++;
   this[X] = "dinner1&A catered dinner at the club."; X++;
   this[X] = "dinner2&A catered dinner at the club."; X++;
   this[X] = "dance1&Entertainment at one of the clubs social activities"; X++;

   this[X] = "NEWGROUP&The Club's 90th Birthday Celebration"; X++;
   this[X] = "90celebration1&"; X++;
   this[X] = "90celebration2&"; X++;
   this[X] = "90celebration3&"; X++;
   this[X] = "90celebration4&"; X++;
   this[X] = "90celebration5&"; X++;
   this[X] = "90celebration6&"; X++;
   this[X] = "90celebration7&"; X++;

   this[X] = "NEWGROUP&Bowlers at Play"; X++;
   this[X] = "bowler1&"; X++;
   this[X] = "bowler2&"; X++;
   this[X] = "bowler3&"; X++;
   this[X] = "bowler4&"; X++;
   this[X] = "bowler5&"; X++;
   this[X] = "bowler6&"; X++;
   this[X] = "bowler7&"; X++;
   this[X] = "bowler8&Measuring to determine shot."; X++;
   this[X] = "bowler9&"; X++;
   this[X] = "bowler10&The first game of the 2002/2003 season."; X++;
   this[X] = "champ03&RVBA Club Championship Final 2003."; X++;

   this[X] = "NEWGROUP&Bowlers Enjoying Themselves at the Club"; X++;
   this[X] = "gentlemen&"; X++;
   this[X] = "people2&"; X++;
   this[X] = "people1&"; X++;
   this[X] = "ladies&"; X++;
   this[X] = "people3&"; X++;
   this[X] = "people4&"; X++;
   this[X] = "people5&"; X++;
   this[X] = "people6&"; X++;

   this[X] = "NEWGROUP&Season Openings"; X++;
   this[X] = "open2002&Opening of the 2002/2003 bowls season."; X++;
   this[X] = "openjack&The first roll of the jack for the 2002/2003 season."; X++;
   this[X] = "openbowl&The first bowl for the 2002/2003 season."; X++;
   this[X] = "openjack03&The first roll of the jack for the 2003/2004 season."; X++;
   this[X] = "openbowl03&The first bowl for the 2003/2004 season."; X++;

   this[X] = "NEWGROUP&2003/2004 RVBA Pennant Sides"; X++;
   this[X] = "div304&The members of the Division 3 pennant side for the season 2003/2004."; X++;
   this[X] = "div604&The members of the Division 6 pennant side for the season 2003/2004."; X++;
   this[X] = "div804&The members of the Division 8 pennant side for the season 2003/2004."; X++;

   this[X] = "NEWGROUP&Division 3 Pennant Final 2003/2004"; X++;
   this[X] = "final04&The Division 3 Runners Up at the Melbourne Metropolitan Final."; X++;
   this[X] = "pennants04&The Pennants awarded to the club for the 2003/2004 season."; X++;

   this[X] = "NEWGROUP&Flood Damage at the Club - 3/12/2003"; X++;
   this[X] = "flood1&The Front green after flooding."; X++;
   this[X] = "flood4&The Front green after flooding."; X++;
   this[X] = "flood3&The Top green after flooding."; X++;
   this[X] = "flood2&The water level after the flooding."; X++;

   this[X] = "NEWGROUP&Other"; X++;
   this[X] = "scene&A view down Stradbroke Avenue showing the club."; X++;
   this[X] = "head1&A close head."; X++;
   this[X] = "skips&Ready for the skips to bowl."; X++;
   this[X] = "galaday&The stalls on the Ladies Gala Day."; X++;

   this.length = X;
}

function getDescription(index)
{
   return arrayPic[index].substring(arrayPic[index].indexOf('&')+1);
}
function getPicture(index)
{
   return arrayPic[index].substring(0,arrayPic[index].indexOf('&'));
}

function drawGallery()
{
   var groupStart = 1;

   getSize();
   NoRow = Math.round((FrameWidth - 80) / 200);
   if (NoRow>(FrameWidth - 80) / 200) {
      NoRow--;
   }
   document.writeln("<h2>"+getDescription(0)+"</h2>");
   document.writeln("<table class=\"gallery\">");
   document.writeln("<tr>");

   for (PicNo=1; PicNo<arrayPic.length;PicNo++) {
      if (getPicture(PicNo) == "NEWGROUP") {
         document.writeln("</tr>");
         document.writeln("</table>");
         document.writeln("<h2>"+getDescription(PicNo)+"</h2>");
         document.writeln("<table class=\"gallery\">");
         document.writeln("<tr>");
         groupStart = PicNo + 1;
      }
      else {
         if ((PicNo - groupStart) / NoRow == Math.round((PicNo - groupStart) / NoRow)) {
            document.writeln("</tr>");
            document.writeln("<tr>");
            document.writeln("<td class=\"gallery\"><a href=\"./showpic.html?pic="+PicNo+"\" target=\"_showpicWindow\" onclick=\"displayPic("+PicNo+"); return false;\"><img src=\"./graphics/gallery/thumb/"+getPicture(PicNo)+".jpg\" class=\"gallery\" title=\""+getDescription(PicNo)+"\"></a></td>");
         }
         else {
            document.writeln("<td class=\"gallery\"><a href=\"./showpic.html?pic="+PicNo+"\" target=\"_showpicWindow\" onclick=\"displayPic("+PicNo+"); return false;\"><img src=\"./graphics/gallery/thumb/"+getPicture(PicNo)+".jpg\" class=\"gallery\" title=\""+getDescription(PicNo)+"\"></a></td>");
         }
      }
   }
   document.writeln("</tr>");
   document.writeln("</table>");

}

var showpicWindow = null;

function displayPic(index)
{
   if (showpicWindow == null || showpicWindow.closed) {
      showpicWindow = window.open("./showpic.html?pic="+index, "_showpicWindow","height=600,width=800,resizable=yes");
   }
   else {
      showpicWindow.focus();
   }
}

