
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('Landscaping','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Before','Before_1.jpg',534,400),
      new Array('After','After_1.jpg',534,400),
      new Array('Before 2','Before_3.jpg',534,400),
      new Array('After 2','After_3.jpg',534,400),
      new Array('Before 3','Before2.jpg',534,400),
      new Array('After 3','After2.jpg',534,400),
      new Array('Before Clean-up','Before Clean-up.jpg',534,400),
      new Array('After clean-up with Sod and Landscaping','After clean-up with Sod and Landscaping.jpg',534,400),
      new Array('Before Sod','Before Sod.jpg',534,400),
      new Array('After Sod','After Sod.jpg',534,400),
      new Array('Before Landscaping','Before Landscaping.jpg',534,400),
			new Array('After Landscaping','After Landscaping.jpg',534,400)
		
    )
  ),

  new Array('Patios & Walkways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Before','Before.jpg',534,400),
      new Array('After','After.jpg',300,400),
      new Array('Before 2','Before_3_4.jpg',534,400),
      new Array('After 2','After_2.jpg',534,400),
      new Array('Before Patio','Before Patio.jpg',534,400),
      new Array('After Patio','After Patio.jpg',300,400),
      new Array('Before Patio & Landscaping','Before Patio & Landscaping.jpg',534,400),
      new Array('After Patio & Landscaping 1','After Patio & Landscaping 1.jpg',534,400),
      new Array('After with view of Knee Wall and Retaining Wall','After with view of Knee Wall and Retaining Wall.jpg',534,400),
      new Array('Photo 1','Business 146.jpg',534,400),
      new Array('Photo 2','DSC01456.jpg',300,400),
      new Array('Photo 3','DSC01528.jpg',300,400),
      new Array('Photo 4','Walkway.jpg',534,400),
      new Array('After Patio & Landscaping','After Patio & Landscaping.jpg',534,400),
      new Array('Before Patio & Landscaping','Before Patio & Landscaping.jpg',534,400),
      new Array('View of<br> Knee-wall','View of Knee-wall.jpg',534,400),
      new Array('View of Patio','View of Patio.jpg',534,400),
			new Array('Front Walkway with Holland Stone Terra Cotta','Front Walkway with Holland Stone Terra Cotta.jpg',534,400),
      new Array('Patio and Firepit','Patio and Firepit1.jpg',502,400),
      new Array('Patio with Brittany Beige','Patio with Brittany Beige.jpg',300,400),
      new Array('Patio','Patio.jpg',300,400),
      new Array('Before<br> Patio with Walkway','Before Patio and Walkway.jpg',300,400),
      new Array('After<br> Patio with Walkway','Patio with Walkway - Brittany Beige.jpg',534,400),
      new Array('Patio','Patio-pic-2.jpg',534,400)			
    )
  ),
	
	
  new Array('Built-in Grills','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Built-in Grill','Built-in Grill.jpg',534,400)
    )
  ),

  new Array('Firepits','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Firepit<br> inset in Patio','Firepit inset in Patio.jpg',534,400),
			new Array('Patio and Firepit','Patio and Firepit.jpg',502,400)
    )
  ),	
	
  new Array('Steps','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Steps','Steps.jpg',300,400)
    )
  ),	

  
  new Array('Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Before','Before_2.jpg',534,400),
      new Array('After','After_3_4.jpg',534,400),
      new Array('Photo 1','Business 151.jpg',534,400),
      new Array('Photo 2','DSC00934.jpg',534,400),
      new Array('Photo 3','DSC01320.jpg',534,400),
      new Array('Photo 4','DSC01443.jpg',534,400),
      new Array('Photo 5','DSC01444.jpg',534,400),
      new Array('Photo 6','DSC01445.jpg',534,400),
			new Array('Photo 7','DSC01615.jpg',534,400),
      new Array('Photo 8','Picture 001.jpg',534,400),
      new Array('Photo 9','Picture 002.jpg',534,400),
      new Array('Retaining Wall','Retaining Wall.jpg',534,400),
      new Array('Wall','Wall.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]);
}
