
smallSizes = new Array(77,77);
mediumSizes = new Array(249,140);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 3;
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('Patios/Gardens','images/portfolio/patios/small/','images/portfolio/patios/medium/','images/portfolio/patios/big/',
    new Array(
      new Array('Photo 1','patio1.jpg',570,360),
      new Array('Photo 2','patio2.jpg',570,450),
      new Array('Photo 3','rockgarden2.jpg',570,358),
	  new Array('Photo 4','pic-1.jpg',570,394)
    )
  ),
  
  new Array('Pools','images/portfolio/pools/small/','images/portfolio/pools/medium/','images/portfolio/pools/big/',
    new Array(
      new Array('Photo 1','pool1.jpg',570,371),
      new Array('Photo 2','pool2.jpg',570,391),
      new Array('Photo 3','pool3.jpg',570,426),
	  new Array('Photo 4','pic-7.jpg',570,377),
	  new Array('Photo 5','pic-9.jpg',570,368),
	  new Array('Photo 6','pic-11.jpg',570,363)
    )
  ),
  
  new Array('Lakes','images/portfolio/lakes/small/','images/portfolio/lakes/medium/','images/portfolio/lakes/big/',
    new Array(
      new Array('Photo 1','lake1.jpg',570,191),
      new Array('Photo 2','lake2.jpg',570,190),
      new Array('Photo 3','lake3.jpg',570,182),
	  new Array('Photo 4','pic-2.jpg',570,376),
	  new Array('Photo 5','pic-3.jpg',570,369),
	  new Array('Photo 6','pic-4.jpg',570,378),
	  new Array('Photo 7','pic-12.jpg',570,193)
    )
  ),
  
  new Array('Lakes (Under Const.)','images/portfolio/lakes/small/','images/portfolio/lakes/medium/','images/portfolio/lakes/big/',
    new Array(
      new Array('Photo 1','lake4.jpg',570,210),
      new Array('Photo 2','lake5.jpg',570,428),
      new Array('Photo 3','lake6.jpg',570,428),
	  new Array('Photo 4','pic-5.jpg',570,398),
	  new Array('Photo 5','pic-6.jpg',570,390),
	  new Array('Photo 6','pic-8.jpg',284,430),
	  new Array('Photo 7','pic-10.jpg',284,393)
    )
  ),
  
  new Array('Stonework','images/portfolio/stonework/small/','images/portfolio/stonework/medium/','images/portfolio/stonework/big/',
    new Array(
      new Array('Photo 1','pavers1.jpg',284,450),
      new Array('Photo 2','pavers2.jpg',570,370),
      new Array('Photo 3','stonewall1.jpg',570,384)
    )
  ),
  
   new Array('Equipment','images/portfolio/equipment/small/','images/portfolio/equipment/medium/','images/portfolio/equipment/big/',
    new Array(
      new Array('Photo 1','dozer.jpg',570,428),
      new Array('Photo 2','crane1.jpg',570,380),
      new Array('Photo 3','bobcat.jpg',570,428)
  
    )
  )

)

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]);
}
