
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 2;
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('Day 1','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','DSC_0005.jpg',596,400),
      new Array('Photo 2','DSC_0008.jpg',596,400),
      new Array('Photo 3','DSC_0009.jpg',596,400),
      new Array('Photo 4','DSC_0014.jpg',269,400),
      new Array('Photo 5','DSC_0015_1.jpg',269,400),
      new Array('Photo 6','DSC_0027.jpg',596,400),
      new Array('Photo 7','DSC_0030.jpg',269,400),
      new Array('Photo 8','DSC_0039.jpg',269,400),
      new Array('Photo 9','DSC_0044_1.jpg',596,400),
      new Array('Photo 10','DSC_0046.jpg',596,400),
      new Array('Photo 11','DSC_0054.jpg',596,400),
      new Array('Photo 12','DSC_0056.jpg',596,400),
      new Array('Photo 13','DSC_0061.jpg',596,400),
      new Array('Photo 14','DSC_0113.jpg',269,400),
      new Array('Photo 15','DSC_0123.jpg',269,400),
      new Array('Photo 16','DSC_0307.jpg',596,400),
      new Array('Photo 17','DSC_0308.jpg',596,400),
      new Array('Photo 18','DSC_0315.jpg',269,400),
      new Array('Photo 19','DSC_0322.jpg',596,400),
      new Array('Photo 20','DSC_0323.jpg',269,400),
      new Array('Photo 21','DSC_0328.jpg',269,400),
      new Array('Photo 22','DSC_0335.jpg',596,400),
      new Array('Photo 23','DSC_0344.jpg',269,400),
      new Array('Photo 24','DSC_0350.jpg',596,400),
      new Array('Photo 25','DSC_0351.jpg',596,400),
      new Array('Photo 26','DSC_0362.jpg',596,400),
      new Array('Photo 27','DSC_0384.jpg',596,400),
      new Array('Photo 28','DSC_0392.jpg',269,400),
      new Array('Photo 29','DSC_0416.jpg',596,400),
      new Array('Photo 30','DSC_0423.jpg',596,400),
      new Array('Photo 31','DSC_0430.jpg',269,400),
      new Array('Photo 32','DSC_0432.jpg',596,400),
      new Array('Photo 33','DSC_0457.jpg',269,400),
      new Array('Photo 34','DSC_0481.jpg',596,400)
    )
  ),

  new Array('Day2','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','DSC_0015.jpg',269,400),
      new Array('Photo 2','DSC_0017_1.jpg',596,400),
      new Array('Photo 3','DSC_0018_1.jpg',269,400),
      new Array('Photo 4','DSC_0019_1.jpg',269,400),
      new Array('Photo 5','DSC_0023_1.jpg',269,400),
      new Array('Photo 6','DSC_0026.jpg',596,400),
      new Array('Photo 7','DSC_0028_1.jpg',596,400),
      new Array('Photo 8','DSC_0034_1.jpg',269,400),
      new Array('Photo 9','DSC_0037.jpg',596,400),
      new Array('Photo 10','DSC_0043.jpg',596,400),
      new Array('Photo 11','DSC_0044.jpg',596,400),
      new Array('Photo 12','DSC_0047.jpg',596,400),
      new Array('Photo 13','DSC_0049_1.jpg',596,400),
      new Array('Photo 14','DSC_0060.jpg',596,400),
      new Array('Photo 15','DSC_0064.jpg',596,400),
      new Array('Photo 16','DSC_0066.jpg',596,400),
      new Array('Photo 17','DSC_0070.jpg',596,400),
      new Array('Photo 18','DSC_0089.jpg',596,400),
      new Array('Photo 19','DSC_0106.jpg',596,400),
      new Array('Photo 20','DSC_0113_1.jpg',596,400),
      new Array('Photo 21','DSC_0114.jpg',596,400),
      new Array('Photo 22','DSC_0119.jpg',596,400),
      new Array('Photo 23','DSC_0133_1.jpg',596,400),
      new Array('Photo 24','DSC_0134.jpg',596,400),
      new Array('Photo 25','DSC_0139_1.jpg',596,400),
      new Array('Photo 26','DSC_0140.jpg',596,400),
      new Array('Photo 27','DSC_0143.jpg',269,400),
      new Array('Photo 28','DSC_0146.jpg',269,400),
      new Array('Photo 29','DSC_0147.jpg',269,400),
      new Array('Photo 30','DSC_0149.jpg',269,400),
      new Array('Photo 31','DSC_0156.jpg',596,400),
      new Array('Photo 32','DSC_0157.jpg',596,400),
      new Array('Photo 33','DSC_0171_1.jpg',269,400),
      new Array('Photo 34','DSC_0179_1.jpg',269,400),
      new Array('Photo 35','DSC_0180_1.jpg',596,400),
      new Array('Photo 36','DSC_0196.jpg',269,400),
      new Array('Photo 37','DSC_0210.jpg',596,400),
      new Array('Photo 38','DSC_0211.jpg',596,400),
      new Array('Photo 39','DSC_0213.jpg',596,400),
      new Array('Photo 40','DSC_0216.jpg',596,400),
      new Array('Photo 41','DSC_0227.jpg',269,400),
      new Array('Photo 42','DSC_0229.jpg',596,400),
      new Array('Photo 43','DSC_0232.jpg',596,400),
      new Array('Photo 44','DSC_0234.jpg',596,400),
      new Array('Photo 45','DSC_0241.jpg',596,400),
      new Array('Photo 46','DSC_0243.jpg',596,400),
      new Array('Photo 47','DSC_0261.jpg',596,400),
      new Array('Photo 48','DSC_0263.jpg',596,400),
      new Array('Photo 49','DSC_0264_1.jpg',596,400),
      new Array('Photo 50','DSC_0284.jpg',269,400),
      new Array('Photo 51','DSC_0285.jpg',269,400),
      new Array('Photo 52','DSC_0386.jpg',596,400),
      new Array('Photo 53','DSC_0388.jpg',596,400),
      new Array('Photo 54','DSC_0389.jpg',596,400),
      new Array('Photo 55','DSC_0398.jpg',596,400),
      new Array('Photo 56','DSC_0415.jpg',596,400),
      new Array('Photo 57','DSC_0419.jpg',596,400),
      new Array('Photo 58','DSC_0423_1.jpg',269,400)
    )
  ),

  new Array('Extras','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','DSC_0017.jpg',269,400),
      new Array('Photo 2','DSC_0018.jpg',269,400),
      new Array('Photo 3','DSC_0019.jpg',269,400),
      new Array('Photo 4','DSC_0023.jpg',596,400),
      new Array('Photo 5','DSC_0026_1.jpg',269,400),
      new Array('Photo 6','DSC_0028.jpg',596,400),
      new Array('Photo 7','DSC_0034.jpg',596,400),
      new Array('Photo 8','DSC_0043_1.jpg',596,400),
      new Array('Photo 9','DSC_0047_1.jpg',596,400),
      new Array('Photo 10','DSC_0049.jpg',596,400),
      new Array('Photo 11','DSC_0060_1.jpg',596,400),
      new Array('Photo 12','DSC_0066_1.jpg',269,400),
      new Array('Photo 13','DSC_0133.jpg',596,400),
      new Array('Photo 14','DSC_0139.jpg',269,400),
      new Array('Photo 15','DSC_0140_1.jpg',269,400),
      new Array('Photo 16','DSC_0143_1.jpg',596,400),
      new Array('Photo 17','DSC_0149_1.jpg',596,400),
      new Array('Photo 18','DSC_0156_1.jpg',596,400),
      new Array('Photo 19','DSC_0171.jpg',269,400),
      new Array('Photo 20','DSC_0179.jpg',596,400),
      new Array('Photo 21','DSC_0180.jpg',596,400),
      new Array('Photo 22','DSC_0216_1.jpg',269,400),
      new Array('Photo 23','DSC_0241_1.jpg',269,400),
      new Array('Photo 24','DSC_0263_1.jpg',596,400),
      new Array('Photo 25','DSC_0264.jpg',596,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]);
}

