
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'driveways.html';
scriptName = 'driveways.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('Driveways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','DrivewayMalmedahl.jpg',657,400),
      new Array('Photo 2','foundationbuildersllc.com_morgan_0909.jpg',630,400),
      new Array('Photo 3','foundationbuildersllc.com_sterling_driveway_after_stain_10-13-09_005.jpg',700,394),
      new Array('Photo 4','20101019_0192_0_1_fused.jpg',266,400),
      new Array('Photo 5','20101019_0254_2_3_fused.jpg',266,400),
      new Array('Photo 6','20101019_0260_58_59_fused.jpg',600,399),
		new Array('Photo 7','FbsWeb_20110914_0205.jpg',265,400),
		new Array('Photo 8','FbsWeb_20110914_0207.jpg',550,365),
		new Array('Photo 9','FbsWeb_20110914_0219.jpg',550,365),
		new Array('Photo 10','FbsWeb_20110914_0273.jpg',550,365),
		new Array('Photo 11','FbsWeb_20110914_0277.jpg',550,365),
		new Array('Photo 12','WebHDR_20110911_0062.jpg',550,365),
		new Array('Photo 13','WebHDR_20110911_0070.jpg',265,400),
		new Array('Photo 14','WebHDR_20110911_0076.jpg',550,365),
		new Array('Photo 15','WebHDR_20110911_0084.jpg',550,365),
		new Array('Photo 16','WebHDR_20110911_0091.jpg',265,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]);
}

