
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('Decks','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Patios and More Decks .jpg',512,400),
      new Array('Photo 2','Patios and More Decks 001.jpg',596,400),
      new Array('Photo 3','Patios and More Decks 002.jpg',596,400),
      new Array('Photo 4','Patios and More Decks 003.jpg',605,400),
      new Array('Photo 5','Patios and More Decks 004.jpg',600,400),
      new Array('Photo 6','Patios and More Decks 005.jpg',598,400),
      new Array('Photo 7','Patios and More Decks 006.jpg',596,400),
      new Array('Photo 8','Patios and More Decks 007.jpg',600,400),
      new Array('Photo 9','Patios and More Decks 008.jpg',652,400)
    )
  ),

  new Array('Paver Driveways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Patios and More Paver Driveways 003.jpg',605,400),
      new Array('Photo 2','Patios and More Paver Driveways 004.jpg',595,400),
      new Array('Photo 3','Patios and More Paver Driveways 005.jpg',597,400),
      new Array('Photo 4','Patios and More Paver Driveways 006.jpg',596,400),
      new Array('Photo 5','Patios and More Paver Driveways 007.jpg',605,400),
      new Array('Photo 6','Patios and More Paver Driveways 008.jpg',604,400),
      new Array('Photo 7','Patios and More Paver Driveways.jpg',605,400)
    )
  ),

  new Array('Paver Patios','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Patios and More Paver Patios 001.jpg',605,400),
      new Array('Photo 2','Patios and More Paver Patios 002.jpg',611,400),
      new Array('Photo 3','Patios and More Paver Patios 003.jpg',608,400),
      new Array('Photo 4','Patios and More Paver Patios 004.jpg',605,400),
      new Array('Photo 5','Patios and More Paver Patios 005.jpg',607,400),
      new Array('Photo 6','Patios and More Paver Patios 006.jpg',608,400),
      new Array('Photo 7','Patios and More Paver Patios 007.jpg',605,400),
      new Array('Photo 8','Patios and More Paver Patios 008.jpg',606,400),
      new Array('Photo 9','Patios and More Paver Patios 009.jpg',606,400),
      new Array('Photo 10','Patios and More Paver Patios 010.jpg',615,401),
      new Array('Photo 11','Patios and More Paver Patios 011.jpg',596,400),
      new Array('Photo 12','Patios and More Paver Patios 012.jpg',597,400),
      new Array('Photo 13','Patios and More Paver Patios 013.jpg',610,400),
      new Array('Photo 14','Patios and More Paver Patios 014.jpg',598,400),
      new Array('Photo 15','Patios and More Paver Patios 015.jpg',599,400),
      new Array('Photo 16','Patios and More Paver Patios.jpg',603,400)
    )
  ),

  new Array('Retaining Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Patios and More Retaining Walls 001.jpg',603,400),
      new Array('Photo 2','Patios and More Retaining Walls 002.jpg',598,400),
      new Array('Photo 3','Patios and More Retaining Walls 003.jpg',608,400),
      new Array('Photo 4','Patios and More Retaining Walls 004.jpg',608,400),
      new Array('Photo 5','Patios and More Retaining Walls 005.jpg',605,400),
      new Array('Photo 6','Patios and More Retaining Walls 006.jpg',596,400),
      new Array('Photo 7','Patios and More Retaining Walls 007.jpg',605,400),
      new Array('Photo 8','Patios and More Retaining Walls 008.jpg',700,384),
      new Array('Photo 9','Patios and More Retaining Walls 009.jpg',608,400),
      new Array('Photo 10','Patios and More Retaining Walls 010.jpg',595,400),
      new Array('Photo 11','Patios and More Retaining Walls 011.jpg',607,400),
      new Array('Photo 12','Patios and More Retaining Walls 012.jpg',592,400),
      new Array('Photo 13','Patios and More Retaining Walls 013.jpg',605,400),
      new Array('Photo 14','Patios and More Retaining Walls 014.jpg',605,400),
      new Array('Photo 15','Patios and More Retaining Walls.jpg',625,400)
    )
  ),

  new Array('Shade Structures','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Patios and More Shade Structures 001.jpg',597,400),
      new Array('Photo 2','Patios and More Shade Structures 002.jpg',606,400),
      new Array('Photo 3','Patios and More Shade Structures 003.jpg',603,400),
      new Array('Photo 4','Patios and More Shade Structures 004.jpg',607,400),
      new Array('Photo 5','Patios and More Shade Structures 005.jpg',596,400),
      new Array('Photo 6','Patios and More Shade Structures 006.jpg',597,400),
      new Array('Photo 7','Patios and More Shade Structures.jpg',574,400)
    )
  ),

  new Array('Walkways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Patios and More Walkways 001.jpg',605,400),
      new Array('Photo 2','Patios and More Walkways 002.jpg',608,400),
      new Array('Photo 3','Patios and More Walkways 003.jpg',646,400),
      new Array('Photo 4','Patios and More Walkways 004.jpg',594,400),
      new Array('Photo 5','Patios and More Walkways 005.jpg',605,400),
      new Array('Photo 6','Patios and More Walkways 006.jpg',599,400),
      new Array('Photo 7','Patios and More Walkways 007.jpg',606,400),
      new Array('Photo 8','Patios and More Walkways 008.jpg',610,400),
      new Array('Photo 9','Patios and More Walkways.jpg',596,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]);
}
