
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.html';
scriptName = 'portfolio.js';
countX = 4; 
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('Landscapes','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','100_0207_1.jpg',300,400),
      new Array('Photo 2','100_0469_1.jpg',534,400),
      new Array('Photo 3','100_0588_1.jpg',535,400),
      new Array('Photo 4','100_0589_1.jpg',535,400),
      new Array('Photo 5','100_0626_1.jpg',534,400),
      new Array('Photo 6','100_0628_1.jpg',534,400),
      new Array('Photo 7','100_0642.jpg',535,400),
      new Array('Photo 8','100_0698_1.jpg',535,400),
      new Array('Photo 9','100_2193_1.jpg',534,400),
      new Array('Photo 10','100_2274_1.jpg',534,400),
      new Array('Photo 11','100_2437.jpg',534,400),
      new Array('Photo 12','100_3591_1.jpg',601,401),
      new Array('Photo 13','100_4785_1.jpg',601,401),
      new Array('Photo 14','100_4786_1.jpg',601,401),
      new Array('Photo 15','100_4944_1.jpg',601,401),
      new Array('Photo 16','100_4945_1.jpg',601,401),
      new Array('Photo 17','100_4946_1.jpg',601,401),
      new Array('Photo 18','100_4947_1.jpg',601,401),
      new Array('Photo 19','100_4951_1.jpg',601,401),
      new Array('Photo 20','100_4952_1.jpg',601,401),
      new Array('Photo 21','100_4954_1.jpg',601,401),
      new Array('Photo 22','100_4955_1.jpg',601,401),
      new Array('Photo 23','100_5049_1.jpg',601,401),
      new Array('Photo 24','100_5051_1.jpg',601,401),
      new Array('Photo 25','100_5053_2.jpg',601,401),
      new Array('Photo 26','100_5056_1.jpg',601,401),
      new Array('Photo 27','100_5057_2.jpg',601,401),
      new Array('Photo 28','100_5064_1.jpg',601,401),
      new Array('Photo 29','100_5069_1.jpg',601,401),
      new Array('Photo 30','100_5073_1.jpg',601,401),
      new Array('Photo 31','100_5080_2.jpg',601,401),
      new Array('Photo 32','100_5088_1.jpg',601,401),
      new Array('Photo 33','100_5089_1.jpg',601,401),
      new Array('Photo 34','100_5095_1.jpg',601,401),
      new Array('Photo 35','100_5115_1.jpg',601,401),
      new Array('Photo 36','100_5117_1.jpg',601,401),
      new Array('Photo 37','100_5120_1.jpg',601,401),
      new Array('Photo 38','100_5491.jpg',601,401),
      new Array('Photo 39','100_5512_1.jpg',601,401),
      new Array('Photo 40','100_5514_1.jpg',601,401),
      new Array('Photo 41','100_5517_1.jpg',601,401),
      new Array('Photo 42','100_5520_1.jpg',601,401),
      new Array('Photo 43','100_5526_1.jpg',601,401),
      new Array('Photo 44','100_5529_1.jpg',601,401),
      new Array('Photo 45','100_5540_1.jpg',601,401),
      new Array('Photo 46','100_5549_2.jpg',601,401),
      new Array('Photo 47','ACC 1_1.jpg',601,401),
      new Array('Photo 48','ACC 2_2.jpg',601,401),
      new Array('Photo 49','ACC 3_1.jpg',601,401),
      new Array('Photo 50','Dunn After 1_1.jpg',535,400),
      new Array('Photo 51','Hdix After 1_1.jpg',601,401),
      new Array('Photo 52','Hdix After 2_1.jpg',601,401),
      new Array('Photo 53','Hdix After 3_1.jpg',601,401),
      new Array('Photo 54','Hdix After 4_1.jpg',601,401),
      new Array('Photo 55','Hdix After 5_1.jpg',601,401),
      new Array('Photo 56','Lake house_1.jpg',535,400),
      new Array('Photo 57','Photo_2005_12_15_5_48_46_1.jpg',260,400)
    )
  ),

  new Array('Commercial Jobs','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','100_5081_1.jpg',601,401),
      new Array('Photo 2','100_5082_1.jpg',601,401),
      new Array('Photo 3','100_5096_1.jpg',601,401),
      new Array('Photo 4','100_5121_1.jpg',601,401),
      new Array('Photo 5','100_5565_1.jpg',601,401),
      new Array('Photo 6','100_5697_1.jpg',601,401),
      new Array('Photo 7','100_5698_1.jpg',601,401),
      new Array('Photo 8','ACC 1_2.jpg',601,401),
      new Array('Photo 9','ACC 2_1.jpg',601,401)
    )
  )
/*
  new Array('Before & After','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','100_0187.jpg',535,400),
      new Array('Photo 2','100_0188.jpg',535,400),
      new Array('Photo 3','104_0019.jpg',535,400),
      new Array('Photo 4','104_0020_1.jpg',300,400),
      new Array('Photo 5','104_0031.jpg',535,400),
      new Array('Photo 6','104_0078.jpg',535,400),
      new Array('Photo 7','100_5556_2.jpg',601,401),
      new Array('Photo 8','100_5557.jpg',601,401),
      new Array('Photo 9','100_5558_3.jpg',601,401),
      new Array('Photo 10','100_5560_1.jpg',601,401),  

      new Array('Photo 11','DSC02413.jpg',534,400),
      new Array('Photo 12','DSC02414.jpg',534,400),
      new Array('Photo 13','DSC02416.jpg',534,400),
      new Array('Photo 14','100_4642_2.jpg',601,401),
      new Array('Photo 15','104_0112_1.jpg',535,400),
      new Array('Photo 16','100_5687.jpg',601,401),
      new Array('Photo 17','100_5688.jpg',601,401),
      new Array('Photo 18','100_5689.jpg',601,401),
      new Array('Photo 19','100_5690.jpg',267,400),
      new Array('Photo 20','100_4682.jpg',601,401),
      new Array('Photo 21','100_4683.jpg',601,401),
      new Array('Photo 22','100_4685.jpg',601,401),
      new Array('Photo 23','100_4687.jpg',601,401),
      new Array('Photo 24','100_4688.jpg',601,401),
      new Array('Photo 25','100_5691.jpg',601,401),
      new Array('Photo 26','100_5692.jpg',601,401),
      new Array('Photo 27','100_5693.jpg',601,401),
      new Array('Photo 28','100_5694.jpg',601,401),
      new Array('Photo 29','Feehan Before 1_1.jpg',535,400),
      new Array('Photo 30','Feehan Before 2_1.jpg',535,400),
      new Array('Photo 31','Feehan After 1_2.jpg',601,401),
      new Array('Photo 32','Feehan After 2_1.jpg',601,401),
      new Array('Photo 33','Feehan After 3_1.jpg',267,400),
      new Array('Photo 34','100_4607.jpg',601,401),
      new Array('Photo 35','100_4608.jpg',601,401),
      new Array('Photo 36','100_5101_2.jpg',601,401),
      new Array('Photo 37','100_5102_2.jpg',601,401),
      new Array('Photo 38','100_5105.jpg',601,401),
      new Array('Photo 39','Dunn Before 1.jpg',535,400),
      new Array('Photo 40','Dunn After 1_2.jpg',535,400),
      new Array('Photo 41','Dunn After 2.jpg',535,400),
      new Array('Photo 42','100_0237.jpg',535,400),
      new Array('Photo 43','100_5518.jpg',601,401),
      new Array('Photo 44','100_0211.jpg',300,400),
      new Array('Photo 45','100_4814.jpg',601,401),
      new Array('Photo 46','100_4815_2.jpg',601,401),
      new Array('Photo 47','100_5544.jpg',601,401),
      new Array('Photo 48','100_5546.jpg',601,401),
      new Array('Photo 49','100_4573.jpg',601,401),
      new Array('Photo 50','100_4575.jpg',601,401),
      new Array('Photo 51','100_4576.jpg',601,401),
      new Array('Photo 52','100_4579.jpg',601,401),
      new Array('Photo 53','100_4583.jpg',267,400),
      new Array('Photo 54','100_4586.jpg',601,401),
      new Array('Photo 55','100_4589.jpg',601,401),
      new Array('Photo 56','104_0284.jpg',535,400),
      new Array('Photo 57','104_0239_1.jpg',535,400),
      new Array('Photo 58','100_5561_2.jpg',601,401),
      new Array('Photo 59','100_5298.jpg',601,401),
      new Array('Photo 60','100_5299.jpg',601,401),
      new Array('Photo 61','100_5616.jpg',601,401),
      new Array('Photo 62','100_5302.jpg',601,401),
      new Array('Photo 63','100_5309.jpg',601,401),
      new Array('Photo 64','100_5618.jpg',601,401),
      new Array('Photo 65','100_5628.jpg',601,401),
      new Array('Photo 66','100_5629.jpg',601,401),  
      new Array('Photo 67','104_0130_1.jpg',535,400),
      new Array('Photo 68','104_0260.jpg',535,400),
      new Array('Photo 69','DSC02590.jpg',534,400),
      new Array('Photo 70','DSC02680_1.jpg',534,400),
      new Array('Photo 71','100_0299.jpg',535,400),
      new Array('Photo 72','100_0300_1.jpg',300,400),
      new Array('Photo 73','100_5085.jpg',601,401),
      new Array('Photo 74','100_5088_2.jpg',601,401),
      new Array('Photo 75','Hdix After 1_2.jpg',601,401),
      new Array('Photo 76','Hdix After 4_2.jpg',601,401),
      new Array('Photo 77','100_5180.jpg',601,401),
      new Array('Photo 78','100_5245.jpg',601,401),
      new Array('Photo 79','100_5247.jpg',601,401),
      new Array('Photo 80','100_5595.jpg',601,401),
      new Array('Photo 81','100_5596.jpg',601,401),
      new Array('Photo 82','100_5621.jpg',601,401),
      new Array('Photo 83','100_5624_2.jpg',601,401),
      new Array('Photo 84','100_5625_2.jpg',601,401),
      new Array('Photo 85','100_5313.jpg',601,401),
      new Array('Photo 86','100_5345.jpg',601,401),
      new Array('Photo 87','100_5538.jpg',601,401),
      new Array('Photo 88','100_4820.jpg',601,401),
      new Array('Photo 89','100_5542.jpg',601,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]);
}
