
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'decks-fences.htm';
scriptName = 'decks-fences.js';
countX = 4;
countY = 2;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Decking and Steps','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','angular steps finished.jpg',700,320),
      new Array('Photo 2','deck steps finished risers with benches.jpg',565,400),
      new Array('Photo 3','diagonals.jpg',501,372),
      new Array('Photo 4','DSCN5136.jpg',535,400),
      new Array('Photo 5','DSCN5296.jpg',535,400),
      new Array('Photo 6','DSCN5306.jpg',535,400),
      new Array('Photo 7','finished fronts multilevel with planters.jpg',565,400),
      new Array('Photo 8','IMG_1499.jpg',534,400),
      new Array('Photo 9','Ipe-double-pergola.jpg',565,400),
      new Array('Photo 10','Mixed media vinyl with wide plank and multi level.jpg',534,400),
      new Array('Photo 11','rounded w steel railing.jpg',534,400)
    )
  ),

  new Array('Fences and Railings','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','6 foot Lexington Vinyl fence White only Vinyl pickets 5_8in x 11 3_8in x 59 3_4in Post 5 in x 5 in_1.jpg',464,310),
      new Array('Photo 2','DSCN5018.jpg',535,400),
      new Array('Photo 3','DSCN5041.jpg',535,400),
      new Array('Photo 4','DSCN5136_1.jpg',535,400),
      new Array('Photo 5','DSCN5621.jpg',535,400),
      new Array('Photo 6','DSCN5622.jpg',535,400),
      new Array('Photo 7','DSCN5623.jpg',535,400),
      new Array('Photo 8','DSCN5624.jpg',535,400),
      new Array('Photo 9','Royal no caps simple base double top rail pic.jpg',450,250),
      new Array('Photo 10','Scalloped 4 foot treated privacy fence.jpg',600,395),
      new Array('Photo 11','Scalloped 6 foot treated privacy fence.jpg',609,400),
      new Array('Photo 12','Standard 3 foot railing 2.jpg',350,263),
      new Array('Photo 13','Standard 3 foot railing 3.jpg',350,263),
      new Array('Photo 14','Standard 3 foot railing.jpg',350,263),
      new Array('Photo 15','Standard 6 foot treated dog eared privacy fence.jpg',500,375),
      new Array('Photo 16','Standard stamped spear 3 rail aluminum fencing.jpg',531,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]);
}

