
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'photos.htm';
scriptName = 'photos.js';
countX = 3;
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('Paver Stone Designs','images/photos/small/','images/photos/medium/','images/photos/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','andrews grill area.jpg',534,400)
    )
  ),

  new Array('2006 Gallery','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','andrews grill.jpg',534,400),
      new Array('Photo 2','andrews patio.jpg',534,400),
      new Array('Photo 3','andrews pool.jpg',534,400),
      new Array('Photo 4','andrews.jpg',534,400),
      new Array('Photo 5','cg wall.jpg',534,400),
      new Array('Photo 6','culture stone.jpg',534,400),
      new Array('Photo 7','essex fells cc comfort station.jpg',534,400),
      new Array('Photo 8','essex fells cc main. building.jpg',534,400),
      new Array('Photo 9','fells main building.jpg',534,400),
      new Array('Photo 10','nc paver drive.jpg',534,400),
      new Array('Photo 11','Pabon 006.jpg',534,400),
      new Array('Photo 12','Pabon 017.jpg',534,400),
      new Array('Photo 13','Pabon 018.jpg',534,400),
      new Array('Photo 14','Pabon 019.jpg',534,400),
      new Array('Photo 15','Pabon 028.jpg',534,400),
      new Array('Photo 16','Pabon 034.jpg',534,400),
      new Array('Photo 17','paver drive.jpg',534,400),
      new Array('Photo 18','paver driveway.jpg',534,400),
      new Array('Photo 19','pavers.jpg',534,400),
      new Array('Photo 20','pond verzaleno.jpg',600,400),
      new Array('Photo 21','pool nc1.jpg',534,400),
      new Array('Photo 22','pool shell nc.jpg',534,400),
      new Array('Photo 23','pool shell.jpg',534,400),
      new Array('Photo 24','pool verzaleno.jpg',600,400),
      new Array('Photo 25','retaining wall.jpg',534,400),
      new Array('Photo 26','shriber wall.jpg',534,400),
      new Array('Photo 27','stone face house.jpg',534,400),
      new Array('Photo 28','verona driveway.jpg',534,400),
      new Array('Photo 29','verzaleno back.jpg',600,400),
      new Array('Photo 30','verzaleno front.jpg',600,400),
      new Array('Photo 31','wall cg.jpg',534,400)
    )
  ),

  new Array('Essex Fells','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','knoll 051.jpg',534,400),
      new Array('Photo 2','knoll 052.jpg',534,400),
      new Array('Photo 3','knoll 053.jpg',534,400),
      new Array('Photo 4','knoll 054.jpg',534,400),
      new Array('Photo 5','knoll 055.jpg',534,400),
      new Array('Photo 6','knoll 056.jpg',534,400),
      new Array('Photo 7','knoll 058.jpg',534,400),
      new Array('Photo 8','knoll 059.jpg',534,400),
      new Array('Photo 9','knoll 060.jpg',534,400),
      new Array('Photo 10','knoll 061.jpg',534,400),
      new Array('Photo 11','knoll 062.jpg',534,400),
      new Array('Photo 12','knoll 063.jpg',534,400),
      new Array('Photo 13','knoll 064.jpg',534,400),
      new Array('Photo 14','knoll 065.jpg',534,400),
      new Array('Photo 15','knoll 066.jpg',534,400),
      new Array('Photo 16','knoll 067.jpg',534,400),
      new Array('Photo 17','knoll 068.jpg',534,400),
      new Array('Photo 18','knoll 069.jpg',534,400),
      new Array('Photo 19','knoll 070.jpg',534,400),
      new Array('Photo 20','knoll 071.jpg',534,400),
      new Array('Photo 21','knoll 072.jpg',534,400),
      new Array('Photo 22','knoll 073.jpg',534,400),
      new Array('Photo 23','knoll 074.jpg',534,400)
    )
  ),

  new Array('Montclair','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','DSC01008.jpg',534,400),
      new Array('Photo 2','DSC01009.jpg',534,400),
      new Array('Photo 3','DSC01014.jpg',534,400),
      new Array('Photo 4','DSC01015.jpg',534,400),
      new Array('Photo 5','DSC01016.jpg',534,400),
      new Array('Photo 6','DSC01017.jpg',534,400),
      new Array('Photo 7','DSC01249.jpg',534,400),
      new Array('Photo 8','DSC01250.jpg',534,400),
      new Array('Photo 9','DSC01251.jpg',534,400),
      new Array('Photo 10','DSC01252.jpg',534,400),
      new Array('Photo 11','DSC01253.jpg',534,400),
      new Array('Photo 12','DSC01254.jpg',534,400),
      new Array('Photo 13','DSC01255.jpg',534,400),
      new Array('Photo 14','DSC01256.jpg',534,400),
      new Array('Photo 15','DSC01257.jpg',534,400),
      new Array('Photo 16','DSC01258.jpg',534,400),
      new Array('Photo 17','DSC01259.jpg',534,400),
      new Array('Photo 18','DSC01260.jpg',534,400),
      new Array('Photo 19','DSC01261.jpg',534,400),
      new Array('Photo 20','DSC01262.jpg',534,400),
      new Array('Photo 21','DSC01263.jpg',534,400),
      new Array('Photo 22','DSC01264.jpg',534,400),
      new Array('Photo 23','DSC01265.jpg',534,400),
      new Array('Photo 24','DSC01266.jpg',534,400),
      new Array('Photo 25','DSC01267.jpg',534,400),
      new Array('Photo 26','DSC01268.jpg',534,400),
      new Array('Photo 27','DSC01269.jpg',534,400),
      new Array('Photo 28','DSC01270.jpg',534,400),
      new Array('Photo 29','DSC01271.jpg',534,400),
      new Array('Photo 30','DSC01272.jpg',534,400),
      new Array('Photo 31','DSC01273.jpg',534,400),
      new Array('Photo 32','DSC01274.jpg',534,400),
      new Array('Photo 33','DSC01275.jpg',534,400),
      new Array('Photo 34','DSC01276.jpg',534,400),
      new Array('Photo 35','DSC01277.jpg',534,400),
      new Array('Photo 36','DSC01280.jpg',534,400),
      new Array('Photo 37','DSC01282.jpg',534,400),
      new Array('Photo 38','DSC01283.jpg',534,400),
      new Array('Photo 39','DSC01287.jpg',534,400),
      new Array('Photo 40','DSC01289.jpg',534,400),
      new Array('Photo 41','DSC01291.jpg',534,400),
      new Array('Photo 42','DSC01292.jpg',534,400),
      new Array('Photo 43','DSC01293.jpg',534,400),
      new Array('Photo 44','DSC01294.jpg',534,400),
      new Array('Photo 45','DSC01295.jpg',534,400),
      new Array('Photo 46','DSC01297.jpg',534,400),
      new Array('Photo 47','DSC01302.jpg',534,400),
      new Array('Photo 48','DSC01303.jpg',534,400),
      new Array('Photo 49','DSC01304.jpg',534,400),
      new Array('Photo 50','DSC01305.jpg',534,400),
      new Array('Photo 51','DSC01307.jpg',534,400),
      new Array('Photo 52','DSC01308.jpg',534,400),
      new Array('Photo 53','DSC01309.jpg',534,400),
      new Array('Photo 54','DSC01371.jpg',534,400),
      new Array('Photo 55','DSC01372.jpg',534,400),
      new Array('Photo 56','DSC01373.jpg',534,400),
      new Array('Photo 57','DSC01375.jpg',534,400),
      new Array('Photo 58','DSC01376.jpg',534,400),
      new Array('Photo 59','DSC01378.jpg',534,400),
      new Array('Photo 60','DSC01379.jpg',534,400),
      new Array('Photo 61','DSC01380.jpg',534,400),
      new Array('Photo 62','DSC01381.jpg',534,400),
      new Array('Photo 63','DSC01382.jpg',534,400),
      new Array('Photo 64','DSC01383.jpg',534,400),
      new Array('Photo 65','DSC01384.jpg',534,400),
      new Array('Photo 66','DSC01386.jpg',534,400),
      new Array('Photo 67','DSC01388.jpg',534,400),
      new Array('Photo 68','DSC01389.jpg',534,400),
      new Array('Photo 69','DSC01390.jpg',534,400),
      new Array('Photo 70','DSC01391.jpg',534,400),
      new Array('Photo 71','DSC01392.jpg',534,400),
      new Array('Photo 72','DSC01393.jpg',534,400),
      new Array('Photo 73','DSC01395.jpg',534,400),
      new Array('Photo 74','DSC01396.jpg',534,400),
      new Array('Photo 75','DSC01397.jpg',534,400),
      new Array('Photo 76','DSC01398.jpg',534,400)
    )
  ),

  new Array('North Caldwell','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','Picture 009.jpg',534,400),
      new Array('Photo 2','Picture 010.jpg',534,400),
      new Array('Photo 3','Picture 012.jpg',534,400),
      new Array('Photo 4','Picture 016.jpg',534,400),
      new Array('Photo 5','Picture 018.jpg',534,400),
      new Array('Photo 6','Picture 019.jpg',534,400),
      new Array('Photo 7','Picture 020.jpg',534,400),
      new Array('Photo 8','Picture 021.jpg',534,400),
      new Array('Photo 9','Picture 049.jpg',534,400), 
      new Array('Photo 10','PEPE 002.jpg',534,400),
      new Array('Photo 11','PEPE 003.jpg',534,400),
      new Array('Photo 12','PEPE 004.jpg',534,400),
      new Array('Photo 13','PEPE 005.jpg',534,400),
      new Array('Photo 14','PEPE 007.jpg',534,400),
      new Array('Photo 15','PEPE 008.jpg',534,400),
      new Array('Photo 16','PEPE 009.jpg',534,400),
      new Array('Photo 17','PEPE 011.jpg',534,400),
      new Array('Photo 18','PEPE 013.jpg',300,400),
      new Array('Photo 19','PEPE 017.jpg',534,400),
      new Array('Photo 20','PEPE 018.jpg',300,400),
      new Array('Photo 21','PEPE 019.jpg',534,400),
      new Array('Photo 22','PEPE 020.jpg',534,400),
      new Array('Photo 23','PEPE 022.jpg',534,400),
      new Array('Photo 24','PEPE 023.jpg',534,400),
      new Array('Photo 25','PEPE 024.jpg',534,400),
      new Array('Photo 26','PEPE 025.jpg',534,400),
      new Array('Photo 27','PEPE 026.jpg',534,400),
      new Array('Photo 28','PEPE 027.jpg',534,400),
      new Array('Photo 29','PEPE 029.jpg',534,400)
    )
  ),

  new Array('Richfield Regency','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','Richfield 002.jpg',534,400),
      new Array('Photo 2','Richfield 007.jpg',534,400),
      new Array('Photo 3','Richfield 008.jpg',534,400),
      new Array('Photo 4','Richfield 009.jpg',534,400),
      new Array('Photo 5','Richfield 010.jpg',534,400),
      new Array('Photo 6','Richfield 013.jpg',534,400),
      new Array('Photo 7','Richfield 014.jpg',534,400),
      new Array('Photo 8','Richfield1.jpg',534,400),
      new Array('Photo 9','Richfield3.jpg',534,400),
      new Array('Photo 10','Richfield4.jpg',300,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]);
}

