smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'photos.htm';
scriptName = 'photos.js';
countX = 2;
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('Hardscape photos','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
		new Array('','hrd_564363-R1-16-8A.jpg',592,400), 
		new Array('Afton MN','hrd_Afton_MN_0001.jpg',270,400), 
		new Array('Afton MN','hrd_Afton_MN_0002.jpg',270,400), 
		new Array('Hudson WI','hrd_Hudson_WI_0002.jpg',592,400), 
		new Array('Hudson WI','hrd_Hudson_WI_0003.jpg',270,400), 
		new Array('Hudson WI','hrd_Hudson_WI_0007.jpg',270,400), 
		new Array('Stillwater MN','hrd_Stillwater_MN_0003.jpg',592,400), 
		new Array('Stillwater MN','hrd_Stillwater_MN_0004.jpg',592,400), 
		new Array('Stillwater MN','hrd_Stillwater_MN_0009.jpg',592,400), 
		new Array('Stillwater MN','hrd_Stillwater_MN_0013.jpg',592,400), 
		new Array('Stillwater MN','hrd_Stillwater_MN_0016.jpg',592,400), 
		new Array('Stillwater MN','hrd_Stillwater_MN_0025.jpg',270,400), 
		new Array('These versa-lok retaining walls create a comfortable seating arrangment around this unique fire pit, located in Hudson WI','np_Preview64_064.jpg',533,400), 
		new Array('','0.jpg',402,400),
		new Array('','1.jpg',400,400),
		new Array('','10.jpg',510,400),
		new Array('','11.jpg',509,400),
		new Array('','12.jpg',390,400),
		new Array('','13.jpg',400,400),
		new Array('','14.jpg',405,400),
		new Array('','15.jpg',398,400),
		new Array('','16.jpg',418,400),
		new Array('','17.jpg',399,400),
		new Array('','18.jpg',400,400),
		new Array('','2.jpg',400,400),
		new Array('','20.jpg',511,400),
		new Array('','21.jpg',393,400),
		new Array('','22.jpg',397,400),
		new Array('','23.jpg',512,400),
		new Array('','24.jpg',398,400),
		new Array('','25.jpg',343,433),
		new Array('','26.jpg',502,400),
		new Array('','27.jpg',444,354),
		new Array('','28.jpg',323,400),
		new Array('','29.jpg',305,400),
		new Array('','3.jpg',400,400),
		new Array('','30.jpg',398,400),
		new Array('','31.jpg',515,400),
		new Array('','32.jpg',400,400),
		new Array('','33.jpg',393,400),
		new Array('','34.jpg',398,400),
		new Array('','35.jpg',313,400),
		new Array('','36.jpg',400,400),
		new Array('','37.jpg',319,400),
		new Array('','38.jpg',507,400),
		new Array('','39.jpg',398,400),
		new Array('','4.jpg',520,400),
		new Array('','40.jpg',515,401),
		new Array('','41.jpg',313,400),
		new Array('','42.jpg',396,400),
		new Array('','43.jpg',520,400),
		new Array('','44.jpg',313,400),
		new Array('','45.jpg',515,400),
		new Array('','46.jpg',424,426),
		new Array('','47.jpg',326,420),
		new Array('','48.jpg',318,400),
		new Array('','49.jpg',501,401),
		new Array('','5.jpg',398,400),
		new Array('','50.jpg',404,400),
		new Array('','51.jpg',318,400),
		new Array('','52.jpg',400,400),
		new Array('','53.jpg',400,400),
		new Array('','54.jpg',325,400),
		new Array('','55.jpg',504,400),
		new Array('','6.jpg',398,400),
		new Array('','7.jpg',318,400),
		new Array('','8.jpg',321,400),
		new Array('','9.jpg',541,436)
    )
  )  
)

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]);
  if (arImages[section][4][number][0]!='')
   showMessage('imagemediumname',arImages[section][4][number][0]);   
  else
   showMessage('imagemediumname','Photo '+Number(Number(number)+1));
}

function showImageBig(number) {
  showImagePopup(scriptName,section,number,arImages[section][4][number][2],
   arImages[section][4][number][3]);
}
