
smallSizes = new Array(100,83);
mediumSizes = new Array(250,208);
pageName = 'naturalstone.htm';
scriptName = 'naturalstone.js';
countX = 3;
countY = 1;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Natural Stone','images/naturalstone/small/','images/naturalstone/medium/','images/naturalstone/big/',
    new Array(
      new Array('Style 1','st01.jpg',481,400),
      new Array('Style 2','st02.jpg',481,400),
      new Array('Style 3','st03.jpg',481,400),
      new Array('Style 4','st04.jpg',481,400),
      new Array('Style 5','st05.jpg',481,400),
      new Array('Style 6','st06.jpg',481,400),
      new Array('Style 7','st07.jpg',481,400),
      new Array('Style 8','st08.jpg',481,400),
      new Array('Style 9','st09.jpg',481,400),
      new Array('Style 10','st10.jpg',481,400),
      new Array('Style 11','st11.jpg',481,400),
      new Array('Style 12','st12.jpg',481,400),
      new Array('Style 13','st13.jpg',481,400),
      new Array('Style 14','st14.jpg',481,400)
    )
  ),

  new Array('Travertine Pavers','images/naturalstone/small/','images/naturalstone/medium/','images/naturalstone/big/',
    new Array(
      new Array('Style 1','1322 Southwind 010.jpg',534,400),
      new Array('Style 2','Byers,Brooks,Carson-45.jpg',700,394),
      new Array('Style 3','IMG_0007.jpg',600,400),
      new Array('Style 4','IMG_0182.jpg',600,400),
      new Array('Style 5','IMG_0193.jpg',600,400),
      new Array('Style 6','IMG_0218.jpg',600,400),
      new Array('Style 7','IMG_0271.jpg',600,400),
      new Array('Style 8','IMG_0287.jpg',600,400),
      new Array('Style 9','IMG_0323.jpg',600,400),
      new Array('Style 10','IMG_0363.jpg',600,400),
      new Array('Style 11','IMG_0437.jpg',600,400),
      new Array('Style 12','L1010818.jpg',700,394),
      new Array('Style 13','L1010819.jpg',700,394),
      new Array('Style 14','L1010821.jpg',700,394),
      new Array('Style 15','L1010822.jpg',700,394),
      new Array('Style 16','L1010823.jpg',700,394),
      new Array('Style 17','L1010825.jpg',700,394),
      new Array('Style 18','L1010828.jpg',700,394),
      new Array('Style 19','P1000023.jpg',534,400),
      new Array('Style 20','P1000026.jpg',534,400),
      new Array('Style 21','TRAVERTINE_024.jpg',534,400),
      new Array('Style 22','TRAVERTINE_043.jpg',534,400),
      new Array('Style 23','TRAVERTINE_048.jpg',534,400),
      new Array('Style 24','TRAVERTINE_051.jpg',534,400),
      new Array('Style 25','TRAVERTINE_053.jpg',534,400),
      new Array('Style 26','TRAVERTINE_060.jpg',600,400),
      new Array('Style 27','TRAVERTINE_081.jpg',534,400),
      new Array('Style 28','TRAVERTINE_088.jpg',602,400),
      new Array('Style 29','TRAVERTINE_095.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]);
}
