
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'weston_photos.htm';
scriptName = 'weston_photos.js';
countX = 3;
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('Weston Stone Photo Gallery','images/belgard/photos/small/','images/belgard/photos/medium/','images/belgard/photos/big/',
    new Array(
//new Array('Photo 1','Weston Grill Picture 5.jpg',533,400),
//new Array('Photo 2','Weston Grill Picture 9.jpg',533,400),
//new Array('Photo 3','Weston Stone 3pc.jpg',533,400),
//new Array('Photo 4','Weston Stone.Permacon.jpg',270,360),
//new Array('Photo 5','Weston Stone.Permacon2.jpg',306,167),
//new Array('Photo 6','Weston Grill Picture 3.jpg',533,400),
new Array('Photo 1','NFDwestonwall005.jpg',261,400),
new Array('Photo 2','NFDwestonwall007.jpg',266,400),
new Array('Photo 3','NFDwestonwall003.jpg',515,400),
new Array('Photo 4','NFDwestonwall008.jpg',274,400),
new Array('Photo 5','NFDwestonwall001.jpg',512,400),
new Array('Photo 6','NFDwestonwall002.jpg',454,400),
      new Array('Photo 7','NFDDublinWeston003.jpg',379,400),
      new Array('Photo 8','NFDMegaBergeracWeston001.jpg',374,400),
      new Array('Photo 9','NFDMegaBergeracWeston002.jpg',482,400),
      new Array('Photo 10','NFDMegaBergeracWeston004.jpg',700,365),
      new Array('Photo 11','NFDMegaBergeracWeston005.jpg',320,400),
      new Array('Photo 12','NFDWeston001.jpg',320,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]);
}

