
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'outsidephoto.html';
scriptName = 'outside.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('Outside Basement Entries','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','20101117_0301_299_300_fused.jpg',399,600),
      new Array('Photo 2','20101117_0310_08_09_fused.jpg',600,400),
      new Array('Photo 3','20101117_0316_4_5_fused.jpg',600,400),

      new Array('Photo 4','OusideEntryKavanaugh.jpg',651,400),
      new Array('Photo 5','OutsideEntry2Kavanaugh.jpg',700,394),
      new Array('Photo 6','foundationbuildersllc.com_stair_image.jpg',518,400),
		new Array('Photo 7','FbsWeb_20110914_0190.jpg',550,365),

		new Array('Photo 8','entryway1_tonemapped.jpg',550,365),
		new Array('Photo 9','entryway2_tonemapped.jpg',550,363),
		new Array('Photo 10','entryway3_tonemapped.jpg',266,400),
		new Array('Photo 11','entryway4_tonemapped.jpg',550,363),
		new Array('Photo 12','entryway5_tonemapped.jpg',265,400),
		new Array('Photo 13','entryway6_tonemapped.jpg',550,365),
		new Array('Photo 14','entryway7_tonemapped.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]);
}

