
smallSizes = new Array(80,80);
mediumSizes = new Array();
pageName = 'otherpavers_colors.htm';
scriptName = 'belgard_colors.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('Cobble Colors','images/belgard/colors/cobble/small/','','images/belgard/colors/cobble/big/',
    new Array(
      new Array('La Jolla Blend','lajollablendrough.jpg',457,348),
      new Array('Rio Blend','rioblendrough.jpg',457,348),
      new Array('Sedona Blend','sedonablendcobble.jpg',457,348),
      new Array('Sierra Blend','sierrablend.jpg',457,348),
      new Array('Toscana','toscana-cobble.jpg',457,348)
    )
  ),
  new Array('Paver Colors','images/belgard/colors/paver/small/','','images/belgard/colors/paver/big/',
    new Array(
      new Array('Desert Blend','desertblend.jpg',457,348),
      new Array('La Jolla Blend','lajollablend.jpg',457,348),
      new Array('Mesquite Blend','mesquiteblend.jpg',457,348),
      new Array('Rio Blend','rioblend.jpg',457,348),
      new Array('Sedona Blend','sedonablendsmooth.jpg',457,348),
      new Array('Sierra Blend','sierrablendsmooth.jpg',457,348)
    )
  ),
  new Array('Celtik Wall Colors','images/belgard/colors/wall/small/','','images/belgard/colors/wall/big/',
    new Array(
      new Array('La Jolla Blend','la-jolla.jpg',457,348),
      new Array('Rio Blend','riox.jpg',457,348),
      new Array('Sedona Blend','sedonablendrough.jpg',457,348),
      new Array('Sierra Blend','sierrablendrough.jpg',457,348),
      new Array('Toscana','toscana-wall.jpg',457,348)
    )
  )
)

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]);
}
