smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'landscape_lighting.html';
scriptName = 'landscape_lighting.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('Landscape Lighting','landscape_lighting','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','1_1.jpg',344,400),
      new Array('Photo 2','2_1.jpg',260,389),
      new Array('Photo 3','3_1.jpg',478,318),
      new Array('Photo 4','4_1.jpg',350,232),
      new Array('Photo 5','5_1.jpg',398,289),
      new Array('Photo 6','6_1.jpg',216,280),
      new Array('Photo 7','7_1.jpg',152,200),
      new Array('Photo 8','8_1.jpg',417,400)
    )
  )

)

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]);
}
