
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 3;
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('Our Work','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Our Work 007.jpg',607,400),
      new Array('Photo 2','Our Work 008.jpg',600,400),
      new Array('Photo 3','Our Work 009.jpg',606,400),
      new Array('Photo 4','Our Work 010.jpg',267,400),
      new Array('Photo 5','Our Work 011.jpg',600,400),
      new Array('Photo 6','Our Work 012.jpg',267,400),
      new Array('Photo 7','Our Work 013.jpg',600,400),
      new Array('Photo 8','Our Work 014.jpg',600,400),
      new Array('Photo 9','Our Work 015.jpg',600,400),
      new Array('Photo 10','Our Work 016.jpg',605,400),
      new Array('Photo 11','Our Work 017.jpg',600,400),
      new Array('Photo 12','Our Work 018.jpg',600,400),
      new Array('Photo 13','Our Work 019.jpg',600,400),
      new Array('Photo 14','Our Work 020.jpg',600,400),
      new Array('Photo 15','Our Work 021.jpg',600,400),
      new Array('Photo 16','Our Work 022.jpg',600,400),
      new Array('Photo 17','Our Work 023.jpg',600,400),
      new Array('Photo 18','IMG_8981.jpg',600,400),
      new Array('Photo 19','IMG_8982.jpg',600,400),
      new Array('Photo 20','IMG_8983.jpg',600,400),
      new Array('Photo 21','IMG_8984.jpg',600,400),
      new Array('Photo 22','IMG_8985.jpg',600,400),
      new Array('Photo 23','IMG_8986.jpg',600,400),
      new Array('Photo 24','IMG_8988.jpg',600,400),
      new Array('Photo 25','IMG_8989.jpg',600,400),
      new Array('Photo 26','IMG_8990.jpg',600,400),
      new Array('Photo 27','IMG_8991.jpg',600,400),
      new Array('Photo 28','IMG_8992.jpg',600,400),
      new Array('Photo 29','IMG_8993.jpg',600,400),
      new Array('Photo 30','IMG_8994.jpg',600,400),
      new Array('Photo 31','IMG_8995.jpg',600,400)
   )
  ),

  new Array('Outdoor Kitchen','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Picture 001.jpg',286,400),
      new Array('Photo 2','Picture 002.jpg',560,400),
      new Array('Photo 3','Picture 003.jpg',560,400),
      new Array('Photo 4','Picture 004.jpg',320,400),
      new Array('Photo 5','Picture 005.jpg',286,400),
      new Array('Photo 6','Picture 006.jpg',600,400),
      new Array('Photo 7','Picture 007.jpg',500,400),
      new Array('Photo 8','Picture 008.jpg',560,400),
      new Array('Photo 9','Picture 009.jpg',320,400),
      new Array('Photo 10','Picture 010.jpg',578,400),
      new Array('Photo 11','Picture 011.jpg',560,400),
      new Array('Photo 12','Picture 012.jpg',286,400),
      new Array('Photo 13','Large Kitchen.jpg',500,400),
      new Array('Photo 14','Small Island front shot.jpg',506,400)
   )
  ),
  
 new Array('Grill Accessories','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','3 Piece Grill Tool Set.jpg',254,400),
      new Array('Photo 2','Another Showroom Display.jpg',610,400),
      new Array('Photo 3','Beer Can Chicken Kit.jpg',482,401),
      new Array('Photo 4','Dual Grill Light.jpg',300,400),
      new Array('Photo 5','Freestanding Stainless Steel Gas Grills.jpg',373,400),
      new Array('Photo 6','Golfer Corn Set.jpg',534,400),
      new Array('Photo 7','Golfer Grill Tool Set.jpg',197,400),
      new Array('Photo 8','Great Selection of Grill Accessories.jpg',153,400),
      new Array('Photo 9','Griddle for your BBQ.jpg',198,401),
      new Array('Photo 10','Grilling Planks.jpg',534,400),
      new Array('Photo 11','Grilling Wok.jpg',465,400),
      new Array('Photo 12','Indoor & Outdoor Bar Stool Collections.jpg',524,400),
      new Array('Photo 13','Insulated Gloves.jpg',300,400),
      new Array('Photo 14','Three Birds deap seating.jpg',700,351),
      new Array('Photo 15','Three Birds Set.jpg',678,400),
      new Array('Photo 16','48 freestanding grill.jpg',564,400),
      new Array('Photo 17','Copy of 27 Free Standing.jpg',401,400)
    )
  ),

 new Array('Patios & Walkways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Our Work 020_1.jpg',600,400),
      new Array('Photo 2','Our Work 022_1.jpg',600,400),
      new Array('Photo 3','Our Work 023_1.jpg',600,400),
      new Array('Photo 4','Our Work 027.jpg',600,400),
      new Array('Photo 5','Patios_Decks_Porches_1138.jpg',673,401),
      new Array('Photo 6','Patios_Decks_Porches_1259.jpg',264,400),
      new Array('Photo 7','Patios_Decks_Porches_1279.jpg',700,389),
      new Array('Photo 8','Patios_Decks_Porches_1999.jpg',695,401),
      new Array('Photo 9','Patios_Decks_Porches_2000.jpg',660,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]);
}
