
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'serv_photos.js';
countX = 4;
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('Paver Applications','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','1.jpg',400,400),
		new Array('','13.jpg',400,400),
		new Array('','14.jpg',405,400),
		new Array('','16.jpg',418,400),
		new Array('','18.jpg',400,400),
		new Array('','2.jpg',400,400),
		new Array('','21.jpg',393,400),
		new Array('','22.jpg',397,400),
		new Array('','28.jpg',323,400),
		new Array('','34.jpg',398,400),
		new Array('','35.jpg',313,400),
		new Array('','36.jpg',400,400),
		new Array('','4.jpg',520,400)
    )
  ),
  new Array('Driveways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','28.jpg',323,400),
		new Array('','29.jpg',305,400),
		new Array('','35.jpg',313,400),
		new Array('','43.jpg',520,400),
		new Array('','52.jpg',400,400),
		new Array('','53.jpg',400,400),
		new Array('','54.jpg',325,400)
    )
  ),
  new Array('Patios','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','23.jpg',512,400),
		new Array('','31.jpg',515,400),
		new Array('','4.jpg',520,400),
		new Array('','9.jpg',541,436),
		new Array('','Iverson-1.jpg',533,400), 
		new Array('','060328210506.jpg',338,400), 
		new Array('','060328213231.jpg',533,400), 
		new Array('','060328215832.jpg',533,400), 
		new Array('','060331210932.jpg',533,400), 
		new Array('','060331211106.jpg',300,400), 
		new Array('','060331211908.jpg',533,400), 
		new Array('','Flagstone-1@-Eric\'s.jpg',300,400), 
		new Array('','flowers-at-La-Passerelle.jpg',300,400), 
		new Array('','limestone-b.jpg',533,400), 
		new Array('','Limestone.jpg',300,400), 
		new Array('','RIMG0406.jpg',300,400) 
    )
  ),
  new Array('Walkways and Stairs','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','14.jpg',405,400),
		new Array('','15.jpg',398,400),
		new Array('','17.jpg',399,400),
		new Array('','18.jpg',400,400),
		new Array('','2.jpg',400,400),
		new Array('','21.jpg',393,400),
		new Array('','22.jpg',397,400),
		new Array('','51.jpg',318,400),
		new Array('','Iverson-1.jpg',533,400), 
		new Array('','060328214039.jpg',300,400), 
		new Array('','stream9.jpg',533,400)
    )
  ),
  new Array('Water Features','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','Iverson-7.jpg',533,400), 
		new Array('','Iverson-9.jpg',300,400), 
		new Array('','060328213231.jpg',533,400), 
		new Array('','060331211300.jpg',528,400), 
		new Array('','canyon1.jpg',332,400), 
		new Array('','lights-&-falls-copy.jpg',316,400), 
		new Array('','lights-&-falls0-copy.jpg',323,400), 
		new Array('','oil-of-Janets-waterfall.jpg',535,400), 
		new Array('','RIMG0498.jpg',533,400), 
		new Array('','stream7-(2).jpg',300,400), 
		new Array('','waterfall-&-lights.jpg',318,400)
    )
  ),
  new Array('Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','26.jpg',502,400),
		new Array('','30.jpg',398,400),
		new Array('','33.jpg',393,400),
		new Array('','34.jpg',398,400),
		new Array('','4.jpg',520,400),
		new Array('','5.jpg',398,400),
		new Array('','6.jpg',398,400),
		new Array('','9.jpg',541,436),
		new Array('','060328210506.jpg',338,400), 
		new Array('','060331170106.jpg',300,400), 
		new Array('','060331211106.jpg',300,400), 
		new Array('','RIMG0498.jpg',533,400)
    )
  ),
  new Array('Landscape Lighting','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','paverlights_after.jpg',415,310,''), 
		new Array('','lighting_01.jpg',212,276,''), 
		new Array('','lighting_03.jpg',213,276,'')
	
    )
  ),
  new Array('Fencing','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','fence_decks_003.jpg',533,400,''),
		new Array('','fence_decks_009.jpg',533,400,'')
    )
  ),
  new Array('Drought Tolerant Landscaping','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','Home-5.jpg',534,400,''), 
		new Array('','HPIM0726.jpg',534,400,''),
		new Array('','lndsc_HPIM1110.jpg',534,400,''),
		new Array('','landscaping_003.jpg',533,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]);
}
