
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'pool_decking.htm';
scriptName = 'pool_decking.js';
countX = 4;
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('Pool Decking','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','92590-ca-surfacing-solutions-brown-large-stones_447.jpg',400,300),
      new Array('Photo 2','BREA.jpg',374,239),
      new Array('Photo 3','concrete patio pool.jpg',400,300),
      new Array('Photo 4','FLAG STONE 021.jpg',534,400),
      new Array('Photo 5','FLAG STONE 022.jpg',534,400),
      new Array('Photo 6','HART- SANTA ANA 012.jpg',534,400),
      new Array('Photo 7','MidnightBlue pool.jpg',374,255),
      new Array('Photo 8','parker 050.jpg',534,400),
      new Array('Photo 9','parker 052.jpg',534,400),
      new Array('Photo 10','photo_Kohler.jpg',375,281),
      new Array('Photo 11','R.C 2.jpg',534,400),
      new Array('Photo 12','RANCHO POOL.jpg',504,397)
    )
  )

)

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]);
}
