smallSizes = new Array(77,77);
mediumSizes = new Array(228,171);
pageName = 'photos.htm';
scriptName = 'photos.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('','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Kitchen and Fireplace','Kitchen-and-Fireplace.jpg',450,338),
      new Array('Outdoor Kitchen','Outdoor-Kitchen.jpg',450,338),
      new Array('Steps to Fireplace','Steps-to-Fireplace.jpg',450,338),
      new Array('Waterfall Construction','slide0001_image008.jpg',507,380),
      new Array('Waterfall Construction','slide0003_image010.jpg',507,380),
      new Array('Waterfall Construction','DCP00463.jpg',507,380),
      new Array('Photo 4','DCP00462.jpg',507,380),
      new Array('First Episcopal Church Before','slide0008_image020.jpg',527,380),
      new Array('First Episcopal Church After','Nat038.jpg',572,380),
      new Array('Gragg Job Before','slide0011_image026.jpg',516,380),
      new Array('Gragg Job After','slide0018_image028.jpg',572,380),
      new Array('Murphy Before','slide0017_image040.jpg',520,380),
      new Array('Murphy After','slide0021_image046.jpg',528,380),
//      new Array('Photo 11','DCP00464.jpg',507,380),
//      new Array('Photo 12','DCP00465.jpg',507,380),
//      new Array('Photo 13','DCP00473.jpg',507,380),
//      new Array('Photo 14','DCP00476.jpg',507,380),
      new Array('Ross After','Nat001.jpg',572,380),
      new Array('Ross After','Nat011.jpg',572,380),
      new Array('Photo 1','Nat044.jpg',572,380),
      new Array('Photo 2','Nat070.jpg',572,380),
      new Array('Photo 3','Nat078.jpg',572,380),
      new Array('Photo 4','Nat082.jpg',572,380),
      new Array('Photo 5','slide0002_image006.jpg',507,380),
      new Array('Photo 6','slide0005_image014.jpg',507,380),
//      new Array('Photo 23','slide0007_image018.jpg',572,380),
//      new Array('Photo 24','slide0007_image018.jpg',572,380),
      new Array('Photo 7','slide0013_image032.jpg',572,380),
      new Array('Photo 8','slide0016_image038.jpg',507,380),
      new Array('Photo 9','slide0019_image042.jpg',557,380),
      new Array('Photo 10','slide0020_image044.jpg',507,380),
      new Array('Mason Before','Mason-Before.jpg',450,338),
      new Array('Mason After','Mason-After.jpg',450,319),
      new Array('Mason After 2','Mason-After-2.jpg',450,338),
      new Array('Wood side yard','Wood-Side-Yard.jpg',450,338),
      new Array('Capito Front Before','Capito-front-before.jpg',450,338),
      new Array('Capito Front Before','Capito-front-before-1.jpg',450,338),
      new Array('Capito Front Drive','Capito-front-drive.jpg',450,338),
      new Array('Capito Lake House','PICT0524.jpg',640,480),
      new Array('Capito Lake House','PICT0527.jpg',640,480),
      new Array('Capito Lake House','PICT0528.jpg',640,480),
      new Array('Capito Lake House','PICT0530.jpg',640,480),
      new Array('Capito Lake House','PICT0531.jpg',640,480),
      new Array('Capito Lake House','PICT0533.jpg',640,480),
      new Array('Capito Lake House','PICT0537.jpg',640,480),
      new Array('Capito Lake House','PICT0539.jpg',640,480),
      new Array('Capito Lake House','PICT0543.jpg',640,480)
    )
  )
)
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]);
}
