
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.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('Portfolio','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Before1.jpg',534,400),
      new Array('Photo 2','After1.jpg',604,400),
      new Array('Photo 3','020_6A.jpg',604,400),
      new Array('Photo 4','024_2A.jpg',604,400),
      new Array('Photo 5','022_4A.jpg',604,400),
      new Array('Photo 6','BBQ Before2.jpg',534,400),
      new Array('Photo 7','BBQ Aft5.jpg',534,400),
      new Array('Photo 8','BBQ Berfore1.jpg',534,400),
	  new Array('Photo 9','BBQ Aft1.jpg',534,400),
      new Array('Photo 10','BBQ Aft4.jpg',534,400),
      new Array('Photo 11','BBQ Aft2.jpg',534,400),
      new Array('Photo 12','BBQ Aft3.jpg',534,400),
      new Array('Photo 13','Cloud Step4.jpg',534,400),
      new Array('Photo 14','Cloud aft4.jpg',534,400),
      new Array('Photo 15','Cloud AftBBQ.jpg',534,400),
      new Array('Photo 16','Cloud Step 2.jpg',534,400),
      new Array('Photo 17','Cloud Step1.jpg',534,400),
      new Array('Photo 18','Excavt3.jpg',534,400),
      new Array('Photo 19','Finish Brgh 3.jpg',534,400),
      new Array('Photo 20','Finish brgh2.jpg',534,400),
      new Array('Photo 21','Random I.jpg',534,400),
	  new Array('Photo 22','Gray 1.jpg',534,400),
      new Array('Photo 23','Gray 3.jpg',534,400),
      new Array('Photo 24','Gray 2.jpg',534,400),
      new Array('Photo 25','Gray 4.jpg',534,400),
      new Array('Photo 26','Gray 5.jpg',534,400),
      new Array('Photo 27','Mckinnley Aft2.jpg',534,400),
      new Array('Photo 28','Patio Mckinley.jpg',534,400),
      new Array('Photo 29','McKinnley Aft3.jpg',534,400),
      new Array('Photo 30','Patio Small.jpg',534,400),
      new Array('Photo 31','Picture 1.jpg',534,400),
      new Array('Photo 32','Picture 20.jpg',534,400),
      new Array('Photo 33','Picture 34.jpg',534,400),
      new Array('Photo 34','Picture 22.jpg',534,400),
      new Array('Photo 35','Picture 24.jpg',534,400),
      new Array('Photo 36','Picture 25.jpg',534,400),
      new Array('Photo 37','Entry B1.jpg',534,400),
      new Array('Photo 38','EntryG Aft1.jpg',534,400),
      new Array('Photo 39','Picture 27.jpg',534,400),
      new Array('Photo 40','Retain Bf1.jpg',534,400),
      new Array('Photo 41','Retain Aft1.jpg',534,400),
      new Array('Photo 42','Retain PrepEx.jpg',534,400),
      new Array('Photo 43','Retain PrepEx2.jpg',534,400),
      new Array('Photo 44','Retain Prep1.jpg',534,400),
      new Array('Photo 45','Retain PrepD.jpg',534,400),
      new Array('Photo 46','Retain Comp2.jpg',534,400),
	  new Array('Photo 47','Retain Comp1.jpg',534,400),
	  new Array('Photo 48','Wall 4.jpg',534,400),
      new Array('Photo 49','Retain Aft3.jpg',534,400),
      new Array('Photo 50','Wall.jpg',534,400),
      new Array('Photo 51','Wall2.jpg',534,400),
      new Array('Photo 52','Wall 5.jpg',534,400),
      new Array('Photo 53','Steps 3.jpg',534,400),	  
      new Array('Photo 54','Picture 19.jpg',534,400),
      new Array('Photo 55','Steps 4.jpg',534,400),
      new Array('Photo 56','Steps 1.jpg',534,400),
      new Array('Photo 57','Steps 2.jpg',534,400),
      new Array('Photo 58','Screen Wall Brick.jpg',534,400),
      new Array('Photo 59','Fireplace1.jpg',534,400),
      new Array('Photo 60','Elbow 2.jpg',300,400),
      new Array('Photo 61','Brick Bay.jpg',534,400),
      new Array('Photo 62','Brick Bay2.jpg',534,400),
      new Array('Photo 63','Brick Step.jpg',534,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]);
}
