
smallSizes = new Array(66,66);
mediumSizes = new Array(360,230);
pageName = 'photos1.htm';
scriptName = 'photos.js';
countX = 2;
countY = 4;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Natural and Freeform Pools ','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      //new Array('Photo 1','1.jpg',450,338),
     // new Array('Photo 2','2.jpg',450,338),
     // new Array('Photo 3','3.jpg',450,338),
     // new Array('Photo 4','4.jpg',450,338),
     // new Array('Photo 5','5.jpg',450,338),
     // new Array('Photo 6','6.jpg',450,338),
     // new Array('Photo 7','7.jpg',450,338),
     // new Array('Photo 8','8.jpg',450,338),
     // new Array('Photo 9','9.jpg',450,338),
     // new Array('Photo 10','10.jpg',450,338),
	  new Array('Photo 1','Appleby_1.jpg',534,401),
      new Array('Photo 2','Benjamin.jpg',534,401),
      new Array('Photo 3','Bjerk_1.jpg',534,401),
      new Array('Photo 4','Blackham-Chartier_1.jpg',534,401),
      new Array('Photo 5','Bronski.jpg',534,401),
      new Array('Photo 6','Crane.jpg',604,400),
      new Array('Photo 7','Glass_1.jpg',265,400),
      new Array('Photo 8','Graham.jpg',534,401),
      new Array('Photo 9','Green 2.jpg',501,400),
      new Array('Photo 10','Green 3.jpg',511,400),
      new Array('Photo 11','Hershberger_1.jpg',534,401),
      new Array('Photo 12','Jackson_1.jpg',604,400),
      new Array('Photo 13','Johnson.jpg',534,401),
      new Array('Photo 14','Kiraly.jpg',604,400),
      new Array('Photo 15','Klein.jpg',604,400),
      new Array('Photo 16','Klugman.jpg',534,401),
      new Array('Photo 17','Kottke.jpg',534,401),
      new Array('Photo 18','Labine.jpg',534,400),
      new Array('Photo 19','Mais.jpg',534,401),
      new Array('Photo 20','McSweeney.jpg',534,401),
      new Array('Photo 21','Moseley_1.jpg',534,401),
      new Array('Photo 22','Oblinger.jpg',534,401),
      new Array('Photo 23','Page.jpg',534,401),
      new Array('Photo 24','Pulte.jpg',534,401),
      new Array('Photo 25','Ryan.jpg',534,401),
      new Array('Photo 26','Settadecato.jpg',534,401),
      new Array('Photo 27','Spilatro.jpg',534,401),
      new Array('Photo 28','Stevens.jpg',604,400),
      new Array('Photo 29','Stone.jpg',534,400),
      new Array('Photo 30','Tuscany Shores.jpg',534,401)
	)
  ),
	
  new Array('Geometric and Formal Pools ','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      //new Array('Photo 1','11.jpg',450,338),
      //new Array('Photo 2','12.jpg',450,338),
      //new Array('Photo 3','13.jpg',450,338),
      //new Array('Photo 4','14.jpg',450,338),
      //new Array('Photo 5','15.jpg',450,338),
     // new Array('Photo 6','16.jpg',450,338),
     // new Array('Photo 7','17.jpg',450,338),
      //new Array('Photo 8','18.jpg',450,338),
      //new Array('Photo 9','19.jpg',450,338),
     // new Array('Photo 10','20.jpg',450,338),
	  new Array('Photo 1','Adams.jpg',534,401),
      new Array('Photo 2','Bronson.jpg',546,400),
      new Array('Photo 3','Cedar Ridge.jpg',534,401),
      new Array('Photo 4','Cuomo Bros.jpg',496,400),
      new Array('Photo 5','Cuomo.jpg',500,400),
      new Array('Photo 6','Domino_1.jpg',534,401),
      new Array('Photo 7','Falknor_1.jpg',534,401),
      new Array('Photo 8','Ford.jpg',534,401),
      new Array('Photo 9','Fossey.jpg',534,401),
      new Array('Photo 10','Gallo.jpg',534,401),
      new Array('Photo 11','Goldstein.jpg',534,401),
      new Array('Photo 12','Kaverman.jpg',534,401),
      new Array('Photo 13','Kerzman.jpg',489,400),
      new Array('Photo 14','Keuck_2.jpg',534,400),
      new Array('Photo 15','Kozak.jpg',534,401),
      new Array('Photo 16','Kraft_1.jpg',534,401),
      new Array('Photo 17','Marshall.jpg',604,400),
      new Array('Photo 18','Mellon_1.jpg',534,401),
      new Array('Photo 19','Monheit.jpg',534,401),
      new Array('Photo 20','Peterson_1.jpg',534,401),
      new Array('Photo 21','Pickett.jpg',534,401),
      new Array('Photo 22','Pinkney.jpg',534,401),
      new Array('Photo 23','Sierka_1.jpg',534,401),
      new Array('Photo 24','Wozniak_1.jpg',534,401)
	)
  ),

 // new Array('Negative Edge Design Gallery','images/photos/small/','images/photos/medium/','images/photos/big/',
  //  new Array(
   //   new Array('Photo 1','21.jpg',450,338),
   //   new Array('Photo 2','22.jpg',450,338),
    //  new Array('Photo 3','23.jpg',450,338),
    //  new Array('Photo 4','24.jpg',450,338),
     // new Array('Photo 5','25.jpg',450,338),
    //  new Array('Photo 6','26.jpg',450,338),
     // new Array('Photo 7','27.jpg',450,338),
     // new Array('Photo 8','28.jpg',450,338),
    //  new Array('Photo 9','29.jpg',450,338),
     // new Array('Photo 10','30.jpg',450,338)
	//)
 // ),

  new Array('Water Features and Unique Concepts','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      //new Array('Photo 1','31.jpg',450,338),
     // new Array('Photo 2','32.jpg',450,338),
      //new Array('Photo 3','33.jpg',450,338),
      //new Array('Photo 4','34.jpg',450,338),
      //new Array('Photo 5','35.jpg',450,338),
     // new Array('Photo 6','36.jpg',450,338),
     // new Array('Photo 7','37.jpg',450,338),
     // new Array('Photo 8','38.jpg',450,338),
      //new Array('Photo 9','39.jpg',450,338),
     // new Array('Photo 10','40.jpg',450,338),
	  new Array('Photo 1','Appleby.jpg',534,401),
      new Array('Photo 2','Bisgrove.jpg',495,400),
      new Array('Photo 3','Bjerk.jpg',534,401),
      new Array('Photo 4','Blackham-Chartier.jpg',534,401),
      new Array('Photo 5','Chui.jpg',501,400),
      new Array('Photo 6','Cuomo Bros_1.jpg',499,400),
      new Array('Photo 7','Cuomo_1.jpg',500,400),
      new Array('Photo 8','DSC00324.jpg',534,401),
      new Array('Photo 9','DSC00474.jpg',534,401),
      new Array('Photo 10','DSC00670.jpg',534,401),
      new Array('Photo 11','DSC00833.jpg',534,401),
      new Array('Photo 12','DSC00859.jpg',534,401),
      new Array('Photo 13','DSC00868.jpg',534,401),
      new Array('Photo 14','DSC00886.jpg',534,401),
      new Array('Photo 15','DSC00890.jpg',534,401),
      new Array('Photo 16','DSC00899.jpg',534,401),
      new Array('Photo 17','DSC00915.jpg',534,401),
      new Array('Photo 18','DSC00923.jpg',534,401),
      new Array('Photo 19','DSC00926.jpg',534,401),
      new Array('Photo 20','DSC00928.jpg',300,400),
      new Array('Photo 21','DSC00938.jpg',300,400),
      new Array('Photo 22','DSC01015.jpg',534,401),
      new Array('Photo 23','DSCN0034.jpg',534,400),
      new Array('Photo 24','Egger WF.jpg',311,400),
      new Array('Photo 25','Falknor.jpg',534,401),
      new Array('Photo 26','Glass.jpg',604,400),
      new Array('Photo 27','Green_2.jpg',534,401),
      new Array('Photo 28','Gujrathi Rainfall.jpg',534,401),
      new Array('Photo 29','Hershberger.jpg',534,401),
      new Array('Photo 30','Hogan 4.jpg',534,400),
      new Array('Photo 31','IM000248.jpg',534,400),
      new Array('Photo 32','Jackson.jpg',604,400),
      new Array('Photo 33','Keuck.jpg',534,400),
      new Array('Photo 34','Kraft.jpg',534,401),
      new Array('Photo 35','Mellon.jpg',534,401),
      new Array('Photo 36','Moseley.jpg',534,401),
      new Array('Photo 37','MVC-022F.jpg',534,401),
      new Array('Photo 38','MVC-293F.jpg',604,400),
      new Array('Photo 39','MVC-315F.jpg',604,400),
      new Array('Photo 40','MVC-737F.jpg',534,401),
      new Array('Photo 41','Page_1.jpg',534,401),
      new Array('Photo 42','piccone.jpg',506,401),
      new Array('Photo 43','Pulte_1.jpg',534,401),
      new Array('Photo 44','Rainfall.jpg',534,401),
      new Array('Photo 45','Rondo.jpg',300,400),
      new Array('Photo 46','Wozniak.jpg',534,401)
	)
  ),

  new Array('Pools and Spas','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      //new Array('Photo 1','41.jpg',450,338),
     // new Array('Photo 2','42.jpg',450,338),
     // new Array('Photo 3','43.jpg',450,338),
     // new Array('Photo 4','44.jpg',450,338),
     // new Array('Photo 5','45.jpg',450,338),
     // new Array('Photo 6','46.jpg',450,338),
     // new Array('Photo 7','47.jpg',450,338),
     // new Array('Photo 8','48.jpg',450,338),
     // new Array('Photo 9','49.jpg',450,338),
      //new Array('Photo 10','50.jpg',450,338),
	  new Array('Photo 1','Damhoff.jpg',604,400),
      new Array('Photo 2','Domino.jpg',534,401),
      new Array('Photo 3','DSC00907.jpg',534,401),
      new Array('Photo 4','Goldstein_1.jpg',534,401),
      new Array('Photo 5','Green.jpg',314,400),
      new Array('Photo 6','Gujrathi.jpg',534,401),
      new Array('Photo 7','Hilgart_1.jpg',534,401),
      new Array('Photo 8','Kerzman_1.jpg',486,400),
      new Array('Photo 9','Keuck_1.jpg',534,400),
      new Array('Photo 10','Lyson.jpg',534,401),
      new Array('Photo 11','Navarro_1.jpg',534,401),
      new Array('Photo 12','Obremski.jpg',534,401),
      new Array('Photo 13','Olsen.jpg',604,400),
      new Array('Photo 14','Peterson.jpg',534,401),
      new Array('Photo 15','Piposa.jpg',534,400),
      new Array('Photo 16','Pulte Spa.jpg',534,401),
      new Array('Photo 17','Pulte Spool.jpg',534,401),
      new Array('Photo 18','Sierka.jpg',534,401),
      new Array('Photo 19','Stern.jpg',519,400),
      new Array('Photo 20','thomas - top spa.jpg',534,400),
      new Array('Photo 21','Thomas.jpg',534,400)
	)
  ),

 // new Array('Commercial Design Gallery','images/photos/small/','images/photos/medium/','images/photos/big/',
  //  new Array(
   //   new Array('Photo 1','51.jpg',450,338),
    //  new Array('Photo 2','52.jpg',450,338),
   //   new Array('Photo 3','53.jpg',450,338),
   //   new Array('Photo 4','54.jpg',450,338),
   //   new Array('Photo 5','55.jpg',450,338),
   //   new Array('Photo 6','56.jpg',450,338),
    //  new Array('Photo 7','57.jpg',450,338),
    //  new Array('Photo 8','58.jpg',450,338),
    //  new Array('Photo 9','59.jpg',450,338),
    //  new Array('Photo 10','60.jpg',450,338)
	//)
 // ),  
	  
    new Array('Award Winning Pools and Spas','images/photos/small/','images/photos/medium/','images/photos/big/',
     new Array(
      new Array('Photo 1','Bengamin 1 - 2006 Silver -  Residential Pool - Freeform 750 or more.jpg',602,400),
      new Array('Photo 2','Bengamin 2 - 2006 Silver -  Residential Pool - Freeform 750 or more.jpg',500,400),
      new Array('Photo 3','Bengamin 3 - 2006 Silver -  Residential Pool - Freeform 750 or more.jpg',500,400),
      new Array('Photo 4','Bengamin 4 - 2006 Silver -  Residential Pool - Freeform 750 or more.jpg',500,400),
      new Array('Photo 5','Bisgrove 1 - 2001 Silver - Residential  Pool - Natural.jpg',512,400),
      new Array('Photo 6','Bisgrove 2 - 2001 Silver - Residential  Pool - Natural.jpg',509,400),
      new Array('Photo 7','Bisgrove 3 - 2001 Silver - Residential  Pool - Natural.jpg',498,400),
      new Array('Photo 8','Carr 1 - 2001 Gold - Residential  Pool - Geometric.jpg',510,400),
      new Array('Photo 9','Carr 2 - 2001 Gold - Residential  Pool - Geometric.jpg',509,400),
      new Array('Photo 10','Carr 3 - 2001 Gold - Residential  Pool - Geometric.jpg',533,400),
      new Array('Photo 11','Chui 1 - 2002 Gold - Residential  Pool - Geometric.jpg',506,400),
      new Array('Photo 12','Chui 2 - 2002 Gold - Residential  Pool - Geometric.jpg',501,400),
      new Array('Photo 13','Egger 1 - 2000 Bronze -  Vanishing Edge 600 or Less.jpg',510,400),
      new Array('Photo 14','Egger 2 - 2000 Bronze - Vanishing Edge 600 or Less.jpg',512,400),
      new Array('Photo 15','Egger 3 - 2000 Bronze - Vanishing Edge 600 or Less.jpg',311,400),
      new Array('Photo 16','Gujrathi 1 - 2006 Gold -  Residential Pool - Geometric 600 or more.jpg',500,400),
      new Array('Photo 17','Gujrathi 2 - 2006 Gold -  Residential Pool - Geometric 600 or more.jpg',500,400),
      new Array('Photo 18','Gujrathi 3 - 2006 Gold -  Residential Pool - Geometric 600 or more.jpg',300,400),
      new Array('Photo 19','Hadlock 1 - 2005 Bronze - Residential Pool - Freeform 600 or more.jpg',500,400),
      new Array('Photo 20','Hadlock 2 - 2005 Bronze - Residential Pool - Freeform 600 or more.jpg',500,400),
      new Array('Photo 21','Hamner 1 - 2005 Gold - Residential Pool - Geometric 600 or less.jpg',500,400),
      new Array('Photo 22','Hamner 2 - 2005 Gold - Residential Pool - Geometric 600 or less.jpg',500,400),
      new Array('Photo 23','Hogan 1 - 2003 Silver - Vanishing edge 600 or less.jpg',500,400),
      new Array('Photo 24','Hogan 2 - 2003 Silver - Vanishing edge 600 or less.jpg',500,400),
      new Array('Photo 25','Johnson 1 - 2002 Silver - Residential  Pool - Natural.jpg',500,400),
      new Array('Photo 26','Johnson 2 - 2002 Silver - Residential  Pool - Natural.jpg',503,400),
      new Array('Photo 27','Kozak 1 - 2005 Gold - Residential Pool - Geometric 600 or less.jpg',507,400),
      new Array('Photo 28','Kozak 2 - 2005 Gold - Residential Pool - Geometric 600 or less.jpg',510,401),
      new Array('Photo 29','McGill 1 - 2000 Gold - Vanishing Edge 600 or more.jpg',511,400),
      new Array('Photo 30','McGill 2 - 2000 Gold - Vanishing Edge 600 or more.jpg',507,400),
      new Array('Photo 31','Pearse 1 - 2003 Gold - Concrete Spas.jpg',500,400),
      new Array('Photo 32','Pearse 2 - 2003 Gold - Concrete Spas.jpg',500,400),
      new Array('Photo 33','Rancho Manana 1 - 2001 Gold -  Semi-Public Pool.jpg',511,400),
      new Array('Photo 34','Rancho Manana 2 - 2001 Gold -  Semi-Public Pool.jpg',516,400),
      new Array('Photo 35','Rancho Manana 3 - 2001 Gold -  Semi-Public Pool.jpg',509,400),
      new Array('Photo 36','Rondo Display 1 - 2003 Gold - Geometric 600 or more.jpg',500,400),
      new Array('Photo 37','Rondo Display 1 - 2003 Gold - Swim Spas.jpg',500,400),
      new Array('Photo 38','Rondo Display 2 - 2003 Gold - Geometric 600 or more.jpg',500,400),
      new Array('Photo 39','Rondo Display 2 - 2003 Gold - Swim Spas.jpg',500,400),
      new Array('Photo 40','Sinagoga 1 - 2000 Gold - Residential  Pool - Natural.jpg',501,400),
      new Array('Photo 41','Sinagoga 2 - 2000 Gold - Residential  Pool - Natural.jpg',513,400),
      new Array('Photo 42','Tompor 1 - 2000 Gold - Residential  Pool - Geometric.jpg',510,400),
      new Array('Photo 43','Tompor 2 - 2000 Gold - Residential  Pool - Geometric.jpg',511,400),
      new Array('Photo 44','Traditions 1 - 2000 Gold -  Semi-Public Pool.jpg',506,400),
      new Array('Photo 45','Traditions 2 - 2000 Gold -  Semi-Public Pool.jpg',510,400)
  
    )
  ),

  new Array('Vanishing Edge Pools','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','Berens.jpg',534,401),
      new Array('Photo 2','Devine-Kitar.jpg',534,401),
      new Array('Photo 3','Eckhart.jpg',534,400),
      new Array('Photo 4','Goodman.jpg',534,401),
      new Array('Photo 5','Green 1.jpg',504,400),
      new Array('Photo 6','Green 2_1.jpg',604,400),
      new Array('Photo 7','Green 3_1.jpg',534,401),
      new Array('Photo 8','Green 4.jpg',534,401),
      new Array('Photo 9','Green_1.jpg',700,369),
      new Array('Photo 10','Gujrathi_1.jpg',534,401),
      new Array('Photo 11','Hilgart.jpg',534,401),
      new Array('Photo 12','Hogan.jpg',534,400),
      new Array('Photo 13','Hoyt.jpg',534,401),
      new Array('Photo 14','Kerzman_2.jpg',489,400),
      new Array('Photo 15','Maddox.jpg',534,401),
      new Array('Photo 16','Navarro.jpg',534,401),
      new Array('Photo 17','Peet.jpg',534,401)
    )
  ),

  new Array('Commercial Pools and Spas','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','1  Red Rock Villas Luxury Apartments.jpg',534,401),
      new Array('Photo 2','10- Legacy Park Luxury Apartments 1.jpg',534,401),
      new Array('Photo 3','2  The Spa at Rancho Manana.jpg',534,401),
      new Array('Photo 4','3  Riverwalk Luxury Apartments.jpg',534,401),
      new Array('Photo 5','4  Legacy Park Luxury Apartments 2.jpg',534,401),
      new Array('Photo 6','5  The Lake at Red Rock Villas.jpg',534,401),
      new Array('Photo 7','6  Firerock Country Club.jpg',604,400),
      new Array('Photo 8','7  Andover Square Luxury Apartments.jpg',534,401),
      new Array('Photo 9','8  Montivida Luxury Apartments.jpg',534,401),
      new Array('Photo 10','9  Sierra Point Luxury Apartments.jpg',534,401),
      new Array('Photo 11','Andover Square.jpg',534,401),
      new Array('Photo 12','Carefree Condos 1.jpg',491,400),
      new Array('Photo 13','Carefree Condos 2.jpg',499,400),
      new Array('Photo 14','carefree condos 3.jpg',510,400),
      new Array('Photo 15','carefree condos 4.jpg',315,400),
      new Array('Photo 16','casa fiesta commercial pool.jpg',518,400),
      new Array('Photo 17','Firerock Country Club.jpg',604,400),
      new Array('Photo 18','Metro North 1.jpg',534,401),
      new Array('Photo 19','Metro North 2.jpg',534,401),
      new Array('Photo 20','Metro North 3.jpg',534,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]);
}

