
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('Project Pictures','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
new Array('Photo 1','0.jpg',402,400),
new Array('Photo 2','1.jpg',400,400),
new Array('Photo 3','10.jpg',510,400),
new Array('Photo 4','11.jpg',509,400),
new Array('Photo 5','12.jpg',390,400),
new Array('Photo 6','13.jpg',400,400),
new Array('Photo 7','14.jpg',405,400),
new Array('Photo 8','15.jpg',398,400),
new Array('Photo 9','16.jpg',418,400),
new Array('Photo 10','17.jpg',399,400),
new Array('Photo 11','18.jpg',400,400),
new Array('Photo 12','2.jpg',400,400),
new Array('Photo 13','20.jpg',511,400),
new Array('Photo 14','21.jpg',393,400),
new Array('Photo 15','22.jpg',397,400),
new Array('Photo 16','23.jpg',512,400),
new Array('Photo 17','24.jpg',398,400),
new Array('Photo 18','25.jpg',343,433),
new Array('Photo 19','26.jpg',502,400),
new Array('Photo 20','27.jpg',444,354),
new Array('Photo 21','28.jpg',323,400),
new Array('Photo 22','29.jpg',305,400),
new Array('Photo 23','3.jpg',400,400),
new Array('Photo 24','30.jpg',398,400),
new Array('Photo 25','31.jpg',515,400),
new Array('Photo 26','32.jpg',400,400),
new Array('Photo 27','33.jpg',393,400),
new Array('Photo 28','34.jpg',398,400),
new Array('Photo 29','35.jpg',313,400),
new Array('Photo 30','36.jpg',400,400),
new Array('Photo 31','37.jpg',319,400),
new Array('Photo 32','38.jpg',507,400),
new Array('Photo 33','39.jpg',398,400),
new Array('Photo 34','4.jpg',520,400),
new Array('Photo 35','40.jpg',515,401),
new Array('Photo 36','41.jpg',313,400),
new Array('Photo 37','42.jpg',396,400),
new Array('Photo 38','43.jpg',520,400),
new Array('Photo 39','44.jpg',313,400),
new Array('Photo 40','45.jpg',515,400),
new Array('Photo 41','46.jpg',424,426),
new Array('Photo 42','47.jpg',326,420),
new Array('Photo 43','48.jpg',318,400),
new Array('Photo 44','49.jpg',501,401),
new Array('Photo 45','5.jpg',398,400),
new Array('Photo 46','50.jpg',404,400),
new Array('Photo 47','51.jpg',318,400),
new Array('Photo 48','52.jpg',400,400),
new Array('Photo 49','53.jpg',400,400),
new Array('Photo 50','54.jpg',325,400),
new Array('Photo 51','55.jpg',504,400),
new Array('Photo 52','6.jpg',398,400),
new Array('Photo 53','7.jpg',318,400),
new Array('Photo 54','8.jpg',321,400),
new Array('Photo 55','9.jpg',541,436),

      new Array('Photo 56','100_1535.jpg',534,400),
      new Array('Photo 57','100_1539.jpg',534,400),
      new Array('Photo 58','100_1543.jpg',534,400),
      new Array('Photo 59','100_1546.jpg',534,400),
      new Array('Photo 60','101_2386.jpg',534,400),
      new Array('Photo 61','101_2389.jpg',534,400),
      new Array('Photo 62','101_2392.jpg',534,400),
      new Array('Photo 63','101_2488.jpg',534,400),
      new Array('Photo 64','101_2490.jpg',534,400),
      new Array('Photo 65','102_2325.jpg',534,400),
      new Array('Photo 66','102_2328.jpg',534,400),
      new Array('Photo 67','102_2338.jpg',534,400),
      new Array('Photo 68','102_2618.jpg',534,400),
      new Array('Photo 69','102_2622.jpg',534,400),
      new Array('Photo 70','102_2643.jpg',300,400),
      new Array('Photo 71','106_0880.jpg',534,400),
      new Array('Photo 72','106_0884.jpg',534,400),
      new Array('Photo 73','DSC_0023.jpg',598,400),
      new Array('Photo 74','DSC_0036.jpg',598,400),
      new Array('Photo 75','Heatheringtonfireplace1.jpg',534,400),
      new Array('Photo 76','HPIM0056.jpg',534,400),
      new Array('Photo 77','HPIM0067.jpg',534,400),
      new Array('Photo 78','HPIM0069.jpg',534,400),
      new Array('Photo 79','HPIM0072.jpg',534,400),
      new Array('Photo 80','image_00484.jpg',534,400),
      new Array('Photo 81','image_00485.jpg',534,400),
      new Array('Photo 82','KaminkyPatio1.jpg',533,400),
      new Array('Photo 83','100_1998.jpg',534,400),
      new Array('Photo 84','100_2187.jpg',534,400),
      new Array('Photo 85','100_2192.jpg',534,400),
      new Array('Photo 86','100_2193.jpg',534,400),
      new Array('Photo 87','100_2196.jpg',534,400),
      new Array('Photo 88','101_2402.jpg',534,400),
      new Array('Photo 89','101_2403.jpg',300,400),
      new Array('Photo 90','101_2405.jpg',534,400),
      new Array('Photo 91','101_2486.jpg',534,400),
      new Array('Photo 92','101_2489.jpg',534,400),
      new Array('Photo 93','106_0482.jpg',534,400),
      new Array('Photo 94','106_0991.jpg',534,400),
      new Array('Photo 95','Bluestone Irregular.jpg',250,188),
      new Array('Photo 96','Bluestone Patio.jpg',325,244),
      new Array('Photo 97','DSC_0001.jpg',598,400),
      new Array('Photo 98','DSC_0002.jpg',598,400),
      new Array('Photo 99','DSC_0016.jpg',598,400),
      new Array('Photo 100','DSC_0017.jpg',598,400),
      new Array('Photo 101','DSC_0071.jpg',598,400),
      new Array('Photo 102','DSC_0080.jpg',598,400),
      new Array('Photo 103','fireplaces 005.jpg',534,400),
      new Array('Photo 104','fireplaces 006.jpg',534,400),
      new Array('Photo 105','HPIM0185.jpg',534,400),
      new Array('Photo 106','HPIM0193.jpg',534,400),
      new Array('Photo 107','HPIM0197.jpg',534,400),
      new Array('Photo 108','IMAG0043.jpg',534,400),
      new Array('Photo 109','image_01261.jpg',534,400),
      new Array('Photo 110','image_01263.jpg',534,400),
      new Array('Photo 111','image_01633.jpg',534,400),
      new Array('Photo 112','image_01672.jpg',534,400),
      new Array('Photo 113','Stone Fire Pit1.jpg',232,157),
      new Array('Photo 114','Stone Fire Pit2.jpg',534,400),
      new Array('Photo 115','stone-fire-pit3.jpg',700,388),
      new Array('Photo 116','DSC_0247.jpg',598,400),
      new Array('Photo 117','DSC_0249.jpg',598,400),
      new Array('Photo 118','DSC_0250.jpg',598,400),
      new Array('Photo 119','DSC_0255.jpg',598,400),
      new Array('Photo 120','DSC_0267.jpg',598,400),
      new Array('Photo 121','DSC_0268.jpg',268,400),
      new Array('Photo 122','DSC_0270.jpg',598,400),
      new Array('Photo 123','DSC_0271.jpg',598,400),
      new Array('Photo 124','DSC_0274.jpg',598,400),
      new Array('Photo 125','DSC_0275.jpg',598,400),
      new Array('Photo 126','DSC_0277.jpg',598,400),
      new Array('Photo 127','DSC_0296.jpg',598,400),
      new Array('Photo 128','DSC_0300.jpg',598,400),
      new Array('Photo 129','DSC_0306.jpg',598,400),

      new Array('Photo 130','100_0768.jpg',534,400),
      new Array('Photo 131','100_0769.jpg',534,400),
      new Array('Photo 132','amP1020178.jpg',534,400),
      new Array('Photo 133','DSC_0097.jpg',598,400),
      new Array('Photo 134','DSC_0100.jpg',598,400),
      new Array('Photo 135','DSC_0102.jpg',598,400),
      new Array('Photo 136','DSC_0103.jpg',268,400),
      new Array('Photo 137','DSC_0105.jpg',598,400),
      new Array('Photo 138','DSC_0107.jpg',598,400),
      new Array('Photo 139','DSC_0108.jpg',598,400),
      new Array('Photo 140','DSC_0109.jpg',598,400),
      new Array('Photo 141','DSC_0124.jpg',598,400),
      new Array('Photo 142','DSC_0125.jpg',598,400),
      new Array('Photo 143','DSC_0128.jpg',598,400),
      new Array('Photo 144','DSC_0129.jpg',268,400),
      new Array('Photo 145','DSC_0130.jpg',598,400),
      new Array('Photo 146','DSC_0132.jpg',598,400),
      new Array('Photo 147','DSC_0133.jpg',598,400),
      new Array('Photo 148','DSC_0138.jpg',598,400),
      new Array('Photo 149','DSC_0139.jpg',598,400),
      new Array('Photo 150','DSC_0140.jpg',598,400),
      new Array('Photo 151','DSC_0158.jpg',598,400),
      new Array('Photo 152','DSC_0164.jpg',598,400),
      new Array('Photo 153','DSC_0168.jpg',598,400),
      new Array('Photo 154','DSC_0169.jpg',598,400),
      new Array('Photo 155','DSC_0170.jpg',598,400),
      new Array('Photo 156','DSC_0171.jpg',598,400),
      new Array('Photo 157','DSC_0172.jpg',598,400),
      new Array('Photo 158','DSC_0173.jpg',598,400),
      new Array('Photo 159','DSC_0176.jpg',268,400),
      new Array('Photo 160','DSC_0179.jpg',598,400),
      new Array('Photo 161','DSC_0203.jpg',598,400),
      new Array('Photo 162','DSC_0206.jpg',598,400),
      new Array('Photo 163','DSC_0207.jpg',598,400),
      new Array('Photo 164','DSC_0208.jpg',598,400),
      new Array('Photo 165','DSC_0211.jpg',598,400),
      new Array('Photo 166','DSC_0212.jpg',598,400),
      new Array('Photo 167','DSC_0217.jpg',598,400),
      new Array('Photo 168','DSC_0220.jpg',598,400),
      new Array('Photo 169','DSC_0221.jpg',598,400),
      new Array('Photo 170','DSC_0225.jpg',598,400),
      new Array('Photo 171','DSC_0228.jpg',598,400),
      new Array('Photo 172','DSC_0249_1.jpg',598,400),
      new Array('Photo 173','DSC_0250_1.jpg',598,400),
      new Array('Photo 174','DSC_0255_1.jpg',598,400),
      new Array('Photo 175','DSC_0256.jpg',598,400),
      new Array('Photo 176','DSC_0259.jpg',598,400),
      new Array('Photo 177','Just-A-Falls-Photo.jpg',300,400),
      new Array('Photo 178','ND110-micropond.jpg',500,334),
      new Array('Photo 179','patio 001.jpg',534,400),
      new Array('Photo 180','patio 010.jpg',534,400),
      new Array('Photo 181','pndls5.jpg',300,225),
      new Array('Photo 182','pondless_pix.jpg',350,291),
      new Array('Photo 183','pondless_water_fall.jpg',301,400),
      new Array('Photo 184','services.jpg',500,300),
      new Array('Photo 185','DSC_0041.jpg',598,400),
      new Array('Photo 186','DSC_0043.jpg',598,400),
      new Array('Photo 187','DSC_0045.jpg',598,400),
      new Array('Photo 188','DSC_0047.jpg',598,400),
      new Array('Photo 189','DSC_0050.jpg',598,400),
      new Array('Photo 190','DSC_0052.jpg',598,400),
      new Array('Photo 191','DSC_0054.jpg',598,400),
      new Array('Photo 192','DSC_0058.jpg',598,400),
      new Array('Photo 193','DSC_0062.jpg',598,400),
      new Array('Photo 194','DSC_0064.jpg',598,400),
      new Array('Photo 195','DSC_0066.jpg',268,400),
      new Array('Photo 196','DSC_0068.jpg',598,400),
      new Array('Photo 197','DSC_0069.jpg',598,400),
      new Array('Photo 198','DSC_0071_1.jpg',598,400),
      new Array('Photo 199','DSC_0075.jpg',598,400),
      new Array('Photo 200','DSC_0092.jpg',598,400),
      new Array('Photo 201','DSC_0094.jpg',598,400),
      new Array('Photo 202','DSC_0095.jpg',268,400),
      new Array('Photo 203','DSC_0102_1.jpg',598,400),
      new Array('Photo 204','DSC_0103_1.jpg',598,400),
      new Array('Photo 205','DSC_0110.jpg',598,400),
      new Array('Photo 206','DSC_0112.jpg',598,400),
      new Array('Photo 207','patiorocker.jpg',598,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]);
}
