
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('Portfolio','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','jobs 005.jpg',534,400),
      new Array('Photo 2','jobs 008.jpg',534,400),
      new Array('Photo 3','jobs 084.jpg',534,400),
      new Array('Photo 4','jobs 086.jpg',534,400),
      new Array('Photo 5','jobs 087.jpg',534,400),
      new Array('Photo 6','jobs 094.jpg',534,400),
      new Array('Photo 7','picture 006.jpg',534,400),
      new Array('Photo 8','picture 009.jpg',534,400),
      new Array('Photo 9','picture 025.jpg',534,400),
      new Array('Photo 10','picture 030.jpg',300,400),
      new Array('Photo 11','picture 2.jpg',609,400),
      new Array('Photo 12','picture.jpg',598,400),
      new Array('Photo 13','web-site 001.jpg',588,400),
      new Array('Photo 14','web-site 002.jpg',271,400),
      new Array('Photo 15','web-site 003.jpg',592,400),
      new Array('Photo 16','web-site 004.jpg',273,400),
      new Array('Photo 17','web-site 005.jpg',588,400),
      new Array('Photo 18','web-site 006.jpg',602,400),
      new Array('Photo 19','web-site 007.jpg',263,401),
      new Array('Photo 20','070114231115.jpg',534,400),
      new Array('Photo 21','070114231228.jpg',534,400),
      new Array('Photo 22','070114231317.jpg',534,400),
      new Array('Photo 23','070114231402.jpg',534,400),
      new Array('Photo 24','070114231520.jpg',534,400),
      new Array('Photo 25','070114231623.jpg',534,400),
      new Array('Photo 26','070114231701.jpg',534,400),
      new Array('Photo 27','070114231747.jpg',534,400),
      new Array('Photo 28','070114231830.jpg',534,400),
      new Array('Photo 29','070114231911.jpg',534,400),
      new Array('Photo 30','070114231942.jpg',534,400),
      new Array('Photo 31','070114232019.jpg',534,400),
      new Array('Photo 32','070114232050.jpg',534,400),
      new Array('Photo 33','070114232120.jpg',534,400),
      new Array('Photo 34','070115000709.jpg',534,400),
      new Array('Photo 35','070115001415.jpg',534,400),
      new Array('Photo 36','070115001556.jpg',534,400),
      new Array('Photo 37','070115001656.jpg',534,400),
      new Array('Photo 38','070115001748.jpg',534,400),
      new Array('Photo 39','070115001909.jpg',534,400),
      new Array('Photo 40','070115002330.jpg',534,400),
      new Array('Photo 41','070115002433.jpg',534,400),
      new Array('Photo 42','070613000204.jpg',534,400),
      new Array('Photo 43','070613000341.jpg',534,400),
      new Array('Photo 44','070613000422.jpg',534,400),
      new Array('Photo 45','070613001040.jpg',534,400)
	  
    )
  ),

  new Array('ZEKE`S','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','zeke_s 001.jpg',610,400),
      new Array('Photo 2','zeke_s 002.jpg',700,361),
      new Array('Photo 3','zeke_s 003.jpg',534,400),
      new Array('Photo 4','zeke_s 004.jpg',534,400),
      new Array('Photo 5','zeke_s 005.jpg',534,400),
      new Array('Photo 6','zeke_s 006.jpg',534,400),
      new Array('Photo 7','zeke_s 007.jpg',534,400),
      new Array('Photo 8','zeke_s 008.jpg',534,400),
      new Array('Photo 9','zeke_s 009.jpg',534,400),
      new Array('Photo 10','zeke_s 010.jpg',534,400),
      new Array('Photo 11','zeke_s 011.jpg',534,400),
      new Array('Photo 12','zeke_s 012.jpg',534,400),
      new Array('Photo 13','zeke_s 013.jpg',534,400),
      new Array('Photo 14','zeke_s 014.jpg',534,400),
      new Array('Photo 15','zeke_s 015.jpg',534,400),
      new Array('Photo 16','zeke_s 016.jpg',534,400),
      new Array('Photo 17','zeke_s 017.jpg',300,400),
      new Array('Photo 18','zeke_s 018.jpg',534,400),
      new Array('Photo 19','zeke_s 019.jpg',534,400),
      new Array('Photo 20','zeke_s 020.jpg',300,400),
      new Array('Photo 21','zeke_s 021.jpg',534,400),
      new Array('Photo 22','zeke_s 022.jpg',534,400),
      new Array('Photo 23','zeke_s 023.jpg',312,401)
    )
  )
)

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]);
}
