
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 3;
countY = 4;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Gallery','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','new pics 001.jpg',534,400),
//      new Array('Photo 2','scan0009.jpg',405,329),
      new Array('Photo 2','scan0025.jpg',700,369),
      new Array('Photo 3','scan0026.jpg',612,400),
      new Array('Photo 4','scan0027.jpg',620,400),
      new Array('Photo 5','scan0030.jpg',252,400),
      new Array('Photo 6','scan0032.jpg',269,400),
      new Array('Photo 7','scan0036.jpg',588,400),
      new Array('Photo 8','scan0038.jpg',268,400),
      new Array('Photo 9','scan0040.jpg',560,400),
      new Array('Photo 10','scan0041.jpg',600,400),
      new Array('Photo 11','scan0042.jpg',270,400),
      new Array('Photo 12','scan0043.jpg',585,400),
      new Array('Photo 13','scan0045.jpg',600,400),
      new Array('Photo 14','scan0047.jpg',598,400),
      new Array('Photo 15','Stonework 001.jpg',700,205),
      new Array('Photo 16','Lake Lure Trading Co  Pictures.jpg',272,400),
      new Array('Photo 17','Lake Lure Trading Co Pictures.jpg',606,400),
      new Array('Photo 18','new pics 003.jpg',534,400),
      new Array('Photo 19','scan0029.jpg',700,329),
      new Array('Photo 20','scan0034.jpg',700,378),
      new Array('Photo 21','scan0037.jpg',600,400),
      new Array('Photo 22','scan0044.jpg',604,400),
      new Array('Photo 23','Stonework 008.jpg',403,400)
    )
  ),

  new Array('Stone Masonry Samples','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','scan0046.jpg',617,400),
      new Array('Photo 2','Stonework 002.jpg',300,400),
      new Array('Photo 3','Stonework 003.jpg',300,400),
      new Array('Photo 4','Stonework 004.jpg',300,400),
      new Array('Photo 5','Stonework 005.jpg',534,400),
      new Array('Photo 6','Stonework 006.jpg',295,400),
      new Array('Photo 7','Stonework 007.jpg',333,400),
      new Array('Photo 8','Stonework 009.jpg',374,400),
      new Array('Photo 9','Stonework 010.jpg',290,400),
      new Array('Photo 10','Stonework 011.jpg',300,400),
      new Array('Photo 11','Stonework 012.jpg',300,400),
      new Array('Photo 12','Stonework 013.jpg',303,400),
      new Array('Photo 13','Stonework 014.jpg',300,400),
      new Array('Photo 14','Stonework 015.jpg',295,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]);
}
