
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'featured-project.htm';
scriptName = 'featured-project.js';
countX = 4;
countY = 2;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Featured Project','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','_L003661.jpg',327,400),
      new Array('Photo 2','_L003663.jpg',601,401),
      new Array('Photo 3','_L003670.jpg',601,401),
      new Array('Photo 4','_L003680.jpg',601,401),
      new Array('Photo 5','_L003684.jpg',267,400),
      new Array('Photo 6','_L003687.jpg',267,400),
      new Array('Photo 7','_L003694.jpg',601,401),
      new Array('Photo 8','_L003702.jpg',601,401),
      new Array('Photo 9','_L003707.jpg',297,400),
      new Array('Photo 10','_L003724.jpg',601,401),
      new Array('Photo 11','_L003731.jpg',601,401),
      new Array('Photo 12','_L003735.jpg',601,401),
      new Array('Photo 13','_L003740.jpg',601,401),
      new Array('Photo 14','_L003763.jpg',267,400),
      new Array('Photo 15','_L003764.jpg',267,400),
      new Array('Photo 16','_L003765.jpg',300,400),
      new Array('Photo 17','_L003767.jpg',304,400),
      new Array('Photo 18','_L003772.jpg',267,400),
      new Array('Photo 19','_L003773.jpg',267,400),
      new Array('Photo 20','_L003776.jpg',321,400),
      new Array('Photo 21','_L003786.jpg',601,401),
      new Array('Photo 22','_L003792.jpg',601,401),
      new Array('Photo 23','_L003815.jpg',294,400),
      new Array('Photo 24','_L003840.jpg',311,400),
      new Array('Photo 25','_L003869.jpg',267,400),
      new Array('Photo 26','_L003874.jpg',601,401),
      new Array('Photo 27','_L003909.jpg',396,400),
      new Array('Photo 28','_L003911.jpg',601,401),
      new Array('Photo 29','_L003914.jpg',267,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]);
}

