
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 1;
countY = 6;

// 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','HPIM1811.jpg',532,400),
      new Array('Photo 2','HPIM1839.jpg',302,400),
      new Array('Photo 3','HPIM1841.jpg',302,400),
      new Array('Photo 4','HPIM1844.jpg',532,400),
	  new Array('Photo 5','HPIM1846.jpg',532,400),
      new Array('Photo 6','HPIM1848.jpg',532,400),
      new Array('Photo 7','HPIM1850.jpg',532,400),
      new Array('Photo 8','HPIM1859.jpg',532,400),
      new Array('Photo 9','HPIM1867.jpg',532,400), 
	  new Array('Photo 10','pic-Urich_Website.jpg',500,377),
      new Array('Photo 11','pic-ZGL_Romero_2_Website.jpg',500,377),
      new Array('Photo 12','pic-ZGL_Romero_Website.jpg',500,377),
      new Array('Photo 13','pic-Hoffmaster_Website.jpg',500,377),
      new Array('Photo 14','pic-McShea_Back_Website.jpg',500,377),
      new Array('Photo 15','pic-McShea_Front_Website.jpg',500,377),
      new Array('Photo 16','pic-Reed_Website.jpg',500,377),
      new Array('Photo 17','Hazlett_copy.jpg',500,400),
      new Array('Photo 18','Horling_ copy.jpg',500,400),
      new Array('Photo 19','Horling_2_copy.jpg',500,400),
      new Array('Photo 20','HURR1 copy.jpg',500,400),
      new Array('Photo 21','HURR_Windsor_copy.jpg',490,400),
      new Array('Photo 22','Isham_Walk_copy.jpg',500,400),
      new Array('Photo 23','Lsham_Walk2_ copy.jpg',500,400),
      new Array('Photo 24','Merten copy.jpg',500,400),
      new Array('Photo 25','Peterson copy.jpg',500,400),
      new Array('Photo 26','RJB copy.jpg',500,400),
      new Array('Photo 27','RJB_39_2_copy.jpg',500,400),
      new Array('Photo 28','RJB_39_copy.jpg',500,400),
      new Array('Photo 29','Salmon_Driveway copy.jpg',500,400),
      new Array('Photo 30','Salmon_Front_Door copy.jpg',500,400),
      new Array('Photo 31','Stoner_copy.jpg',500,400),
      new Array('Photo 32','Trails End Equestrian Center copy.jpg',500,400),
      new Array('Photo 33','Trails End_copy.jpg',500,400),
      new Array('Photo 34','Trumble copy.jpg',500,400),
      new Array('Photo 35','Urban Living Lofts copy.jpg',500,400),
      new Array('Photo 36','Valdez_copy.jpg',500,400),
      new Array('Photo 37','Amel.jpg',500,400),
      new Array('Photo 38','Buccheri After.jpg',500,400),
      new Array('Photo 39','Buccheri_After two.jpg',500,400),
      new Array('Photo 40','Grube.jpg',600,400),
      new Array('Photo 41','Hazlett_2.jpg',500,400),
	  new Array('Photo 42','Hazlett_3_ copy.jpg',500,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();
      arPreloadImages[i].src = arImages[section][3]+arImages[section][4][i][1];
    }
  }
}
  
function showImageMedium(number) {
  showImage('imagemedium',arImages[section][3]+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]);
}
