
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'Water_Features.html';
scriptName = 'Water_Features.js';
countX = 3;
countY = 3;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Water Features','water_features','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','schpond_6bc5.jpg',534,400),
      new Array('Photo 2','schworking2_qifd.jpg',500,375),
      new Array('Photo 3','waterfeature2.jpg',480,316),
      new Array('Photo 4','water_garden.jpg',400,297),
      new Array('Photo 5','watr2.jpg',343,344)
    )
  )
)


section = getParameter(self.document.location.href, 'section');
var sectionIndex = 0;

if (section != '') {
  for (var i=0; i<arImages.length; i++) {
    if (arImages[i][1] == section) {
	  sectionIndex = i;
	  break;
	}
  }
}
section = arImages[sectionIndex][1];

ind = getParameter(self.document.location.href, 'ind');
if (isNaN(ind) || (ind=='') || (ind<0) || (ind>arImages[sectionIndex][5].length))
  ind = 0;

var arPreloadImages = new Array();
function preload() {
  if (arImages[sectionIndex][3]!='') {
    for (i=ind;(i<(Number(ind)+Number(countX*countY))) && (i<arImages[sectionIndex][5].length);i++) {
      arPreloadImages[i] = new Image(mediumSizes[0],mediumSizes[1]);
      arPreloadImages[i].src = arImages[sectionIndex][3]+arImages[sectionIndex][5][i][1];
    }
  }
}

function showImageMedium(number) {
  showImage('imagemedium',arImages[sectionIndex][3]+arImages[sectionIndex][5][number][1]);
  showMessage('imagemediumname',arImages[sectionIndex][5][number][0]);
}
