
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'gallery.html';
scriptName = 'gallery.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('Mcnear Pictures','images/photos/small/','images/photos/medium/','images/photos/big/',
	 new Array(
	 new Array('Tan Cobble','Charcoal Tan Cobble.jpg',300,448),
	 new Array('Coping','Coping.jpg',550,400),
	 new Array('Napa Walkway','Napa Walkway.jpg',550,400),
	 new Array('Napa walkway 2','Napa walkway 2.jpg',300,448),
	 new Array('Napa walkway 3','Napa walkway 3.jpg',550,400),
	 new Array('Cobble','New Image.jpg',550,400),
	 new Array('Permiable Cobble','Permiable Cobble.jpg',550,400),
	 new Array('Permiable Cobble','Permiable cobble1.jpg',550,400),
	 new Array('Torino','Torino.jpg',550,400),
	 new Array('Torino 1','Torino1.jpg',550,400)
    )
  ),
    new Array('Old World Cobble Job Pictures','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Belgard','Belgard.jpg',550,400),
      new Array('Calstone Classic','Calstone classic cobble.jpg',550,400),
      new Array('Cobble 3','IMG001.jpg',550,400),
      new Array('Cobble 4','IMG008.jpg',550,400),
      new Array('Cobble 5','IMG011.jpg',550,400),
      new Array('Cobble 6','IMG017.jpg',550,400),
      new Array('Permeable 2','permeable2.jpg',550,400)
    )
  ),
  new Array('Stowe Contracting Pics ','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Stowe Job 1','Stowe Job 1.jpg',550,400),
      new Array('Stowe 2','Stowe Contracting 2.jpg',550,400),
      new Array('Stowe 3','Stowe Contacting 3.jpg',550,400),
      new Array('Stowe 4','Stowe Contracting 4.jpg',300,448),
      new Array('Stowe 5','Stowe Contracting 5.jpg',550,400),
      new Array('Stowe 6','Stowe Contracting, SF Rima Job.jpg',550,400),
      new Array('Stowe Patio','StowePatio062004-1.jpg',550,400)
	  )
  ),	

  new Array('Drives','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','Drive 1.jpg',506,400),
      new Array('Photo 2','Drive 2.jpg',534,400),
      new Array('Photo 3','Drive 3.jpg',534,400),
      new Array('Photo 4','Drive 4.jpg',534,400),
      new Array('Photo 5','Drive 5.jpg',534,400),
      new Array('Photo 6','100_0127.jpg',533,400),
      new Array('Photo 7','Camera Pictures 002.jpg',512,384),
      new Array('Photo 8','CPG & Cosola 008.jpg',534,400),
      new Array('Photo 9','Grandelli Mailbox Pedestal.jpg',512,384),
      new Array('Photo 10','P1010006.jpg',534,400),
      new Array('Photo 11','P2010006.jpg',534,400),
      new Array('Photo 12','PB010010.jpg',534,400),
      new Array('Photo 13','Venetian-CPG-Camelback Manor 007.jpg',533,400),
      new Array('Photo 14','080711145344.jpg',601,400)
    )
  ),

  new Array('Patios','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','File0002.jpg',508,400),
      new Array('Photo 2','File0004.jpg',320,400),
      new Array('Photo 3','File0005.jpg',315,400),
      new Array('Photo 4','File0007.jpg',316,400),
      new Array('Photo 5','File0008.jpg',316,400),
      new Array('Photo 6','100_0006.jpg',533,400),
      new Array('Photo 7','100_0009.jpg',533,400),
      new Array('Photo 8','100_0120.jpg',533,400),
      new Array('Photo 9','080711145436.jpg',534,400)
    )
  ),

  new Array('Pools','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','File0002_1.jpg',534,400),
      new Array('Photo 2','File0009.jpg',508,400),
      new Array('Photo 3','File0017.jpg',506,400),
      new Array('Photo 4','File0031.jpg',594,400),
      new Array('Photo 5','File0032.jpg',589,400),
      new Array('Photo 6','Camera Pictures 019.jpg',534,400),
      new Array('Photo 7','Mega Coping Spa Deck $.jpg',534,400),
      new Array('Photo 8','Mega Coping Spa.jpg',534,400),
      new Array('Photo 9','Mega Pool Deck $$$.jpg',534,400),
      new Array('Photo 10','P9140006.jpg',534,400),
      new Array('Photo 11','PA280003.jpg',534,400),
      new Array('Photo 12','Pool Retaining Wall.jpg',534,400),
      new Array('Photo 13','Remodel Overlay.jpg',534,400),
      new Array('Photo 14','Valencia $.jpg',534,400),
      new Array('Photo 15','Venetian-CPG-Camelback Manor 010.jpg',533,400),
      new Array('Photo 16','Venetian-CPG-Camelback Manor 011.jpg',533,400),
      new Array('Photo 17','PA250004.jpg',534,400),
      new Array('Photo 18','PA250008.jpg',534,400),
      new Array('Photo 19','PB080003.jpg',534,400),
      new Array('Photo 20','pools1.jpg',500,375),
      new Array('Photo 21','080711145531.jpg',534,400)
    )
  ),

  new Array('Walks','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','File0014.jpg',592,400),
      new Array('Photo 2','File0019.jpg',599,400),
      new Array('Photo 3','IMG_0013.jpg',534,400),
      new Array('Photo 4','IMG_0048.jpg',534,400),
      new Array('Photo 5','100_0154.jpg',533,400),
      new Array('Photo 6','PC080002.jpg',534,400),
      new Array('Photo 7','PC080004.jpg',534,400),
      new Array('Photo 8','walks1_2.jpg',500,375),
      new Array('Photo 9','walks2_3.jpg',500,375)
    )
  ),

  new Array('Commercial','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
    )
  )

)

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]);
}


/*

      new Array('Photo 1','01.jpg',267,400),
      new Array('Photo 2','02.jpg',267,400),
      new Array('Photo 3','03.jpg',400,267),
      new Array('Photo 4','04.jpg',267,400),
      new Array('Photo 5','05.jpg',267,400),
      new Array('Photo 6','06.jpg',267,400),
      new Array('Photo 7','07.jpg',267,400),
      new Array('Photo 8','08.jpg',267,400),
      new Array('Photo 9','09.jpg',267,400),
      new Array('Photo 10','10.jpg',267,400),
      new Array('Photo 11','11.jpg',400,267),
      new Array('Photo 12','12.jpg',267,400),
      new Array('Photo 13','13.jpg',267,400),
      new Array('Photo 14','14.jpg',267,400),
      new Array('Photo 15','15.jpg',267,400),
      new Array('Photo 16','16.jpg',400,267),
      new Array('Photo 17','17.jpg',267,400),
      new Array('Photo 18','18.jpg',267,400),
      new Array('Photo 19','19.jpg',267,400),
      new Array('Photo 20','20.jpg',267,400),
      new Array('Photo 21','21.jpg',267,400),
      new Array('Photo 22','22.jpg',300,200),
      new Array('Photo 23','23.jpg',267,400),
      new Array('Photo 24','24.jpg',267,400),
      new Array('Photo 25','25.jpg',267,400)

*/
