
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'stones.htm';
scriptName = 'stones.js';
countX = 2;
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('Stone Walls','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','essex county 067.jpg',600,400),
      new Array('Photo 2','essex county 068.jpg',600,400),
      new Array('Photo 3','essex county 069.jpg',600,400),
      new Array('Photo 4','essex county 070.jpg',600,400),
      new Array('Photo 5','essex county 071.jpg',600,400),
      new Array('Photo 6','essex county 072.jpg',600,400),
      new Array('Photo 7','essex county 073.jpg',600,400),
      new Array('Photo 8','essex county 074.jpg',600,400),
      new Array('Photo 9','essex county 075.jpg',600,400),
      new Array('Photo 10','essex county 076.jpg',600,400),
      new Array('Photo 11','essex county 077.jpg',600,400),
      new Array('Photo 12','essex county 078.jpg',600,400),
      new Array('Photo 13','knoll 058_1.jpg',534,400),
      new Array('Photo 14','knoll 059_1.jpg',534,400),
      new Array('Photo 15','knoll 064_1.jpg',534,400),
      new Array('Photo 16','knoll 065_1.jpg',534,400),
      new Array('Photo 17','knoll 066_1.jpg',534,400),
      new Array('Photo 18','knoll 067_1.jpg',534,400),
      new Array('Photo 19','knoll 068_1.jpg',534,400),
      new Array('Photo 20','knoll 069_1.jpg',534,400),
      new Array('Photo 21','knoll 070_1.jpg',534,400),
      new Array('Photo 22','knoll 071_1.jpg',534,400),
      new Array('Photo 23','knoll 072_1.jpg',534,400),
      new Array('Photo 24','knoll 073_1.jpg',534,400),
      new Array('Photo 25','knoll 074_1.jpg',534,400),
      new Array('Photo 26','knoll 075.jpg',534,400),
      new Array('Photo 27','knoll 076.jpg',534,400)
    )
  )

)

section = getParameter(self.document.location.href, 'section');
if (isNaN(section) || (section=='') || (section<0) || (section>arImages.length))
  section = 0; 

ind = getParameter(self.document.location.href, 'ind');
if (isNaN(ind) || (ind=='') || (ind<0) || (ind>arImages[section][4].length))
  ind = 0; 

var arPreloadImages = new Array();
function preload() {
  if (arImages[section][2]!='') {
    for (i=ind;(i<(Number(ind)+Number(countX*countY))) && (i<arImages[section][4].length);i++) {
      arPreloadImages[i] = new Image(mediumSizes[0],mediumSizes[1]);
      arPreloadImages[i].src = arImages[section][2]+arImages[section][4][i][1];
    }
  }
}
  
function showImageMedium(number) {
  showImage('imagemedium',arImages[section][2]+arImages[section][4][number][1]);
  showMessage('imagemediumname',arImages[section][4][number][0]);
}

function showImageBig(number) {
  showImagePopup(scriptName,section,number,arImages[section][4][number][2],
   arImages[section][4][number][3]);
}

