
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.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('Decorative Concrete','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Before 1','Before 1.jpg',534,400),
      new Array('Before 2','Before 2.jpg',300,400),
      new Array('Before 3','Before 3.jpg',534,400),
      new Array('After 1','After 1.jpg',534,400),
      new Array('After 2','After 2.jpg',300,400),
      new Array('After 3','After 3.jpg',534,400),
      new Array('Before 4','Before 4.jpg',300,400),
      new Array('Before 5','Before 5.jpg',534,400),
      new Array('Before 6','Before 6.jpg',300,400),
      new Array('After 4','After 4_1.jpg',534,400),
      new Array('After 5','After 5_1.jpg',534,400),
      new Array('After 6','After 6.jpg',300,400),
      new Array('Before 7','Before 7.jpg',300,400),
      new Array('Before 8','Before 8.jpg',534,400),
      new Array('Before 9','Before 9.jpg',534,400),
      new Array('After 7','After 7.jpg',534,400),
      new Array('After 8','After 8.jpg',534,400),
      new Array('After 9','After 9.jpg',534,400),
      new Array('Before 10','Before 10.jpg',534,400),
      new Array('Before 11','Before 11.jpg',534,400),
      new Array('Before 12','Before 12.jpg',534,400),
      new Array('After 10','After 10.jpg',534,400),
      new Array('After 11','After 11.jpg',534,400),
      new Array('After 12','After 12.jpg',534,400),
      new Array('Before 13','Before 13.jpg',534,400),
      new Array('Before 14','Before 14.jpg',534,400),
      new Array('Before 15','Before 15.jpg',534,400),
      new Array('After 13','After 13.jpg',534,400),
      new Array('After 14','After 14.jpg',534,400),
      new Array('After 15','After 15.jpg',534,400),
      new Array('Before 16','Before 16.jpg',534,400),
      new Array('Before 17','Before 17.jpg',534,400),
      new Array('Before 18','Before 18.jpg',300,400),
      new Array('After 16','After 16.jpg',534,400),
      new Array('After 17','After 17.jpg',534,400),
      new Array('After 18','After 18.jpg',300,400),
      new Array('Before 19','Before 19.jpg',534,400),
      new Array('Before 20','Before 20.jpg',295,400),
      new Array('Before 21','Before 21.jpg',300,400),
      new Array('After 19','After 19.jpg',300,400),
      new Array('After 20','After 20.jpg',296,400),
      new Array('After 21','After 21.jpg',534,400),
      new Array('Before 22','Before 22.jpg',534,400),
      new Array('Before 23','Before 23.jpg',300,400),
      new Array('Before 24','Before 24.jpg',534,400),
      new Array('After 22','After 22.jpg',534,400),
      new Array('After 23','After 23.jpg',300,400),
      new Array('After 24','After 24.jpg',300,400),
      new Array('Before 25','Before 25.jpg',534,400),
      new Array('Before 26','Before 26.jpg',534,400),
      new Array('Before 27','Before 27.jpg',300,400),
      new Array('After 25','After 25.jpg',534,400),
      new Array('After 26','After 26.jpg',534,400),
      new Array('After 27','After 27.jpg',300,400),
      new Array('Before 28','Before 28.jpg',534,400),
      new Array('Before 29','Before 29.jpg',300,400),
      new Array('Photo 1','57.jpg',300,400),
      new Array('After 28','After 28.jpg',534,400),
      new Array('After 29','After 29.jpg',534,400),
      new Array('Photo 2','58.jpg',534,400),
      new Array('Photo 3','59.jpg',300,400),
      new Array('Photo 4','60.jpg',534,400),
      new Array('Photo 5','61.jpg',300,400),
      new Array('Photo 6','62.jpg',534,400),
      new Array('Photo 7','63.jpg',534,400),
      new Array('Photo 8','64.jpg',534,400),
      new Array('Photo 9','65.jpg',534,400),
      new Array('Photo 10','66.jpg',534,400)
    )
  ),

  new Array('Interlocking Pavers','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','2000_08_A.jpg',508,400),
      new Array('Photo 2','2000_12_D.jpg',400,400),
      new Array('Photo 3','2000_17_B.jpg',408,400),
      new Array('Photo 4','2002_01_A copy.jpg',504,400),
      new Array('Photo 5','2002_08_B_corr.jpg',506,400),
      new Array('Photo 6','2002_12_A.jpg',507,400),
      new Array('Photo 7','2003_2157.jpg',598,400),
      new Array('Photo 8','AnchorWindsorStone.jpg',590,401),
      new Array('Photo 9','celtik wall..jpg',316,400),
      new Array('Photo 10','CIMG0107.jpg',534,400),
      new Array('Photo 11','CIMG0110.jpg',534,400),
      new Array('Photo 12','CIMG0113.jpg',534,400),
      new Array('Photo 13','DSC01972.jpg',534,400),
      new Array('Photo 14','DSC01974.jpg',300,400),
      new Array('Photo 15','dublin3.jpg',317,400),
      new Array('Photo 16','FPO_Pollock_Camb2.jpg',398,400),
      new Array('Photo 17','OldCastle008.jpg',320,400),
      new Array('Photo 18','OldCastle069.jpg',392,400),
      new Array('Photo 19','US2002_03_A.jpg',398,400),
      new Array('Photo 20','US2002_04_B.jpg',397,400),
      new Array('Photo 21','US2002_09_A.jpg',315,400)
    )
  ),

  new Array('Natural Stone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Before 1','Before 1_1.jpg',300,400),
      new Array('Before 2','Before 2_1.jpg',534,400),
      new Array('Before 3','Before 3_1.jpg',534,400),
      new Array('After 1','After 1_1.jpg',534,400),
      new Array('After 2','After 2_1.jpg',534,400),
      new Array('After 3','After 3_1.jpg',300,400),
      new Array('Before 4','Before 4_1.jpg',534,400),
      new Array('Before 5','Before 5_1.jpg',534,400),
      new Array('Before 6','Before 6_1.jpg',534,400),
      new Array('After 4','After 4.jpg',534,400),
      new Array('After 5','After 5.jpg',300,400),
      new Array('After 6','After 6_1.jpg',534,400),
      new Array('Photo 1','13.jpg',534,400),
      new Array('Photo 2','14.jpg',534,400),
      new Array('Photo 3','15.jpg',534,400),
      new Array('Photo 4','16.jpg',552,400),
      new Array('Photo 5','17.jpg',534,400),
      new Array('Photo 6','18.jpg',300,400),
      new Array('Photo 7','19.jpg',300,400),
      new Array('Photo 8','20.jpg',300,400),
      new Array('Photo 9','21.jpg',534,400),
      new Array('Photo 10','22.jpg',534,400),
      new Array('Photo 11','23.jpg',534,400),
      new Array('Photo 12','24.jpg',534,400),
      new Array('Photo 13','25.jpg',534,400),
      new Array('Photo 14','26.jpg',534,400),
      new Array('Photo 15','27.jpg',300,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]);
}
