
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 2;
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('Hardscaping','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('Photo 1','0408111335.jpg',533,400),
		new Array('Photo 2','0719111405b.jpg',533,400),
		new Array('Photo 3','0719111407a.jpg',533,400),
		new Array('Photo 4','0719111409a.jpg',533,400),
		new Array('Photo 5','0830110948a.jpg',533,400),
		new Array('Photo 6','0910001455.jpg',533,400),
		new Array('Photo 7','1019001342.jpg',533,400),
		new Array('Photo 8','Patterson-Car.jpg',550,366),
		new Array('Photo 9','Patterson-Circle-1.jpg',550,372),
		new Array('Photo 10','Patterson-Circle-2.jpg',550,366),
		new Array('Photo 11','Patterson-Wheel.jpg',550,366),
		new Array('Photo 12','Pattterson-Detail-Border-1.jpg',266,400),
		new Array('Photo 13','Pattterson-Detail-Circle-1.jpg',550,366),
		new Array('Photo 14','Pattterson-Detail-Circle-2.jpg',550,367),
		new Array('Photo 15','Pattterson-Detail-Circle-3.jpg',550,371),
		new Array('Photo 16','Pattterson-driveway.jpg',550,251),
		new Array('Photo 17','downsized_0816001534.jpg',533,400), 
		new Array('Photo 18','0719111437.jpg',533,400),
		new Array('Photo 19','0915001447.jpg',533,400),
		new Array('Photo 20','0209111120.jpg',533,400),
		new Array('Photo 21','1019001343.jpg',533,400),
		new Array('Photo 22','IMG00408-20110619-0932.jpg',300,400),
		new Array('Photo 23','IMG00409-20110619-0933.jpg',533,400),
		new Array('Photo 24','IMG00413-20110620-0658.jpg',300,400),
      new Array('Photo 25','After.jpg',300,400),
      new Array('Photo 26','After_2.jpg',534,400),
      new Array('Photo 27','After Patio.jpg',300,400),
      new Array('Photo 28','After Patio & Landscaping 1.jpg',534,400),
      new Array('Photo 29','After with view of Knee Wall and Retaining Wall.jpg',534,400),
      new Array('Photo 30','Business 146.jpg',534,400),
      new Array('Photo 31','DSC01456.jpg',300,400),
      new Array('Photo 32','DSC01528.jpg',300,400),
      new Array('Photo 33','Walkway.jpg',534,400),
      new Array('Photo 34','After Patio & Landscaping.jpg',534,400),
      new Array('Photo 35','View of Knee-wall.jpg',534,400),
      new Array('Photo 36','View of Patio.jpg',534,400),
	  new Array('Photo 37','Front Walkway with Holland Stone Terra Cotta.jpg',534,400),
      new Array('Photo 38','Patio and Firepit1.jpg',502,400),
      new Array('Photo 39','Patio with Brittany Beige.jpg',300,400),
      new Array('Photo 40','Patio.jpg',300,400),
      new Array('Photo 41','Patio with Walkway - Brittany Beige.jpg',534,400),
      new Array('Photo 42','Patio-pic-2.jpg',534,400),
      new Array('Photo 43','Built-in Grill.jpg',534,400),
      new Array('Photo 44','Firepit inset in Patio.jpg',534,400),
	  new Array('Photo 45','Patio and Firepit.jpg',502,400),
      new Array('Photo 46','Steps.jpg',300,400),
      new Array('Photo 47','After_3_4.jpg',534,400),
      new Array('Photo 48','DSC00934.jpg',534,400),
      new Array('Photo 49','DSC01320.jpg',534,400),
      new Array('Photo 50','DSC01443.jpg',534,400),
      new Array('Photo 51','DSC01444.jpg',534,400),
      new Array('Photo 52','DSC01445.jpg',534,400),
	  new Array('Photo 53','DSC01615.jpg',534,400),
      new Array('Photo 54','Retaining Wall.jpg',534,400),
      new Array('Photo 55','Wall.jpg',534,400)	  
    )
  ),

  new Array('Landscaping','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','After_1.jpg',534,400),
      new Array('Photo 2','After_3.jpg',534,400),
      new Array('Photo 3','After2.jpg',534,400),
      new Array('Photo 4','After clean-up with Sod and Landscaping.jpg',534,400),
      new Array('Photo 5','After Sod.jpg',534,400),
	  new Array('Photo 6','After Landscaping.jpg',534,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]);
}


