smallSizes = new Array(80,80);
mediumSizes = new Array();
pageName = 'naturalstone.htm';
scriptName = 'naturalstone.js';
countX = 4;
countY = 5;
// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('','images/naturalstone/small/','','images/naturalstone/big/',
    new Array(
      new Array('','natural_stone1.jpg',500,340),
      new Array('','natural_stone2.jpg',500,343),
      new Array('','natural_stone3.jpg',500,375),
      new Array('','natural_stone4.jpg',500,375),
      new Array('','natural_stone5.jpg',500,375),
      new Array('','natural_stone6.jpg',500,375),
      new Array('','natural_stone7.jpg',500,386),
      new Array('','natural_stone8.jpg',500,361),
      new Array('','natural_stone9.jpg',500,375),
      new Array('','natural_stone10.jpg',500,375),
      new Array('','natural_stone11.jpg',500,375),
      new Array('','natural_stone12.jpg',500,375),
      new Array('','natural_stone13.jpg',500,384),
      new Array('','natural_stone14.jpg',500,410),
      new Array('','natural_stone15.jpg',500,375),
      new Array('','natural_stone16.jpg',426,500),
      new Array('','natural_stone17.jpg',450,338)
    )
  )
)

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]);
}
