
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.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('Portfolio','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','01.jpg',596,400),
      new Array('Photo 2','02.jpg',605,400),
      new Array('Photo 3','03.jpg',602,400),
      new Array('Photo 4','04.jpg',592,400),
      new Array('Photo 5','05.jpg',598,400),
      new Array('Photo 6','06.jpg',609,400),
      new Array('Photo 7','07.jpg',600,400),
      new Array('Photo 8','08.jpg',610,400),
      new Array('Photo 9','09.jpg',598,400),
      new Array('Photo 10','10.jpg',612,400),
      new Array('Photo 11','11.jpg',598,400),
      new Array('Photo 12','12.jpg',613,400),
      new Array('Photo 13','13.jpg',598,400),
      new Array('Photo 14','14.jpg',603,400),
      new Array('Photo 15','15.jpg',598,400),
      new Array('Photo 16','16.jpg',609,400),
      new Array('Photo 17','17.jpg',598,400),
      new Array('Photo 18','18.jpg',612,400),
      new Array('Photo 19','19.jpg',602,400),
      new Array('Photo 20','20.jpg',614,400),
      new Array('Photo 21','21.jpg',267,400),
      new Array('Photo 22','22.jpg',609,400),
      new Array('Photo 23','23.jpg',600,400),
      new Array('Photo 24','24.jpg',610,400),
      new Array('Photo 25','25.jpg',598,400),
      new Array('Photo 26','26.jpg',607,400),
      new Array('Photo 27','27.jpg',603,400),
      new Array('Photo 28','28.jpg',619,400),
      new Array('Photo 29','29.jpg',601,400),
      new Array('Photo 30','30.jpg',609,400),
      new Array('Photo 31','31.jpg',598,400),
      new Array('Photo 32','32.jpg',619,400),
      new Array('Photo 33','33.jpg',602,400),
      new Array('Photo 34','34.jpg',607,400),
      new Array('Photo 35','35.jpg',591,400),
      new Array('Photo 36','36.jpg',616,400),
      new Array('Photo 37','37.jpg',594,400),
      new Array('Photo 38','38.jpg',603,400),
      new Array('Photo 39','39.jpg',603,400),
      new Array('Photo 40','40.jpg',610,400),
      new Array('Photo 41','41.jpg',267,400),
      new Array('Photo 42','42.jpg',610,400),
      new Array('Photo 43','43.jpg',602,400),
      new Array('Photo 44','44.jpg',608,400),
      new Array('Photo 45','45.jpg',602,400),
      new Array('Photo 46','46.jpg',607,400),
      new Array('Photo 47','47.jpg',600,400),
      new Array('Photo 48','48.jpg',607,400),
      new Array('Photo 49','49.jpg',602,400),
      new Array('Photo 50','50.jpg',613,400),
      new Array('Photo 51','51.jpg',602,400),
      new Array('Photo 52','52.jpg',611,400),
      new Array('Photo 53','53.jpg',596,400),
      new Array('Photo 54','54.jpg',608,400),
      new Array('Photo 55','55.jpg',590,400),
      new Array('Photo 56','56.jpg',602,400),
      new Array('Photo 57','57.jpg',602,400),
      new Array('Photo 58','58.jpg',615,400),
      new Array('Photo 59','59.jpg',588,400),
      new Array('Photo 60','60.jpg',605,400),
      new Array('Photo 61','61.jpg',594,400),
      new Array('Photo 62','62.jpg',606,400),
      new Array('Photo 63','63.jpg',272,400),
      new Array('Photo 64','64.jpg',612,400),
      new Array('Photo 65','65.jpg',596,400),
      new Array('Photo 66','66.jpg',606,400),
      new Array('Photo 67','67.jpg',602,400),
      new Array('Photo 68','68.jpg',613,400),
      new Array('Photo 69','69.jpg',596,400),
      new Array('Photo 70','70.jpg',608,400),
      new Array('Photo 71','71.jpg',602,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]);
}
