
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.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('Hardscape','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Beyes Hardscape 006.jpg',534,400),
      new Array('Photo 2','Beyes Hardscape 007.jpg',534,400),
      new Array('Photo 3','Beyes Hardscape 008.jpg',534,400),
      new Array('Photo 4','Beyes Hardscape 009.jpg',534,400),
      new Array('Photo 5','Beyes Hardscape 010.jpg',534,400),
      new Array('Photo 6','Beyes Hardscape 011.jpg',534,400),
      new Array('Photo 7','Beyes Hardscape 020.jpg',534,400),
	  //
      new Array('Photo 8','Outdoor Systems 07 042.jpg',534,400),
      new Array('Photo 9','Outdoor Systems 07 068.jpg',534,400),
      new Array('Photo 10','Outdoor Systems 07 069.jpg',534,400),
      new Array('Photo 11','Outdoor Systems 07 074.jpg',534,400),
      new Array('Photo 12','Outdoor Systems 07 075.jpg',534,400),
      new Array('Photo 13','Outdoor Systems 07 080.jpg',534,400),
      new Array('Photo 14','Outdoor Systems 07 083.jpg',534,400),
      new Array('Photo 15','Outdoor Systems 07 086.jpg',534,400),
	  //
      new Array('Photo 16','Roth Wall & Patio 002.jpg',534,400),
      new Array('Photo 17','Roth Wall & Patio 003.jpg',534,400),
      new Array('Photo 18','Roth Wall & Patio 006.jpg',534,400),
      new Array('Photo 19','Roth Wall & Patio 007.jpg',534,400),
      new Array('Photo 20','Roth Wall & Patio 008.jpg',534,400),
	  //
      new Array('Photo 21','Streepy Fireplace 001.jpg',534,400),
      new Array('Photo 22','Swansea Pool Deck 024.jpg',534,400),
      new Array('Photo 23','Swansea Pool Deck 025.jpg',534,400),
      new Array('Photo 24','Swansea Pool Deck 026.jpg',534,400),
	  //
      new Array('Photo 25','Trotter Sidewalk 001.jpg',534,400),
      new Array('Photo 26','Trotter Sidewalk 002.jpg',534,400),
      new Array('Photo 27','Trotter Sidewalk 003.jpg',534,400),
      new Array('Photo 28','Trotter Sidewalk 005.jpg',534,400),
	  //
      new Array('Photo 29','Trotter Wall & Pool Deck 020.jpg',534,400),
      new Array('Photo 30','Trotter Wall & Pool Deck 022.jpg',534,400),
      new Array('Photo 31','Trotter Wall & Pool Deck 032.jpg',534,400),
      new Array('Photo 32','Trotter Wall & Pool Deck 037.jpg',534,400),
      new Array('Photo 33','Trotter Wall & Pool Deck 039.jpg',534,400),
      new Array('Photo 34','Trotter Wall & Pool Deck 053.jpg',534,400),
      new Array('Photo 35','Trotter Wall & Pool Deck 054.jpg',534,400),
	  //
	  new Array('Photo 36','Blocker Landscape 011.jpg',534,400),
      new Array('Photo 37','Blocker Landscape 030.jpg',534,400),
      new Array('Photo 38','Blocker Landscape 031.jpg',534,400),
      new Array('Photo 39','Blocker Landscape 048.jpg',534,400),
      new Array('Photo 40','Blocker Landscape 049.jpg',534,400),
      new Array('Photo 50','Blocker Landscape 051.jpg',534,400),
      new Array('Photo 51','Blocker Landscape 057.jpg',534,400),
      new Array('Photo 52','Blocker Landscape 058.jpg',534,400),
      new Array('Photo 53','Blocker Landscape 067.jpg',534,400),
	  //
      new Array('Photo 54','Hooser Pond & Waterfall 003.jpg',534,400),
      new Array('Photo 55','Hooser Pond & Waterfall 004.jpg',534,400),
	  //
      new Array('Photo 56','Kleinschmidt Pool Landscape 08.jpg',534,400),
      new Array('Photo 57','Kleinschmidt Pool Landscape 09.jpg',534,400),
      new Array('Photo 58','Kleinschmidt Pool Landscape 10.jpg',534,400),
      new Array('Photo 59','Kleinschmidt Pool Landscape 11.jpg',534,400),
      new Array('Photo 60','Kleinschmidt Pool Landscape 15.jpg',534,400),
      new Array('Photo 61','Kleinschmidt Pool Landscape 16.jpg',534,400),
      new Array('Photo 62','Kleinschmidt Pool Landscape 26.jpg',534,400),
      new Array('Photo 63','Kleinschmidt Pool Landscape 29.jpg',534,400),
      new Array('Photo 64','Kleinschmidt Pool Landscape 30.jpg',534,400),
	  //
      new Array('Photo 65','Maxwell Hardscape 048.jpg',534,400),
      new Array('Photo 66','Maxwell Hardscape 049.jpg',534,400),
      new Array('Photo 67','Maxwell Hardscape 050.jpg',534,400),
      new Array('Photo 68','Maxwell Hardscape 051.jpg',534,400),
      new Array('Photo 69','Maxwell Hardscape 052.jpg',534,400),
      new Array('Photo 70','Maxwell Hardscape 053.jpg',534,400),
      new Array('Photo 71','Maxwell Hardscape 054.jpg',534,400),
      new Array('Photo 72','Maxwell Hardscape 055.jpg',534,400),
      new Array('Photo 73','Maxwell Hardscape 056.jpg',534,400),
      new Array('Photo 74','Maxwell Hardscape 057.jpg',534,400),
      new Array('Photo 75','Maxwell Hardscape 058.jpg',534,400),
      new Array('Photo 76','Maxwell Hardscape 059.jpg',534,400),
      new Array('Photo 77','Maxwell Hardscape 060.jpg',534,400),
      new Array('Photo 78','Maxwell Hardscape 061.jpg',534,400),
	  //
      new Array('Photo 79','Ortyl Pool Deck 002.jpg',534,400),
      new Array('Photo 80','Ortyl Pool Deck 003.jpg',534,400),
      new Array('Photo 81','Ortyl Pool Deck 004.jpg',534,400),
      new Array('Photo 82','Ortyl Pool Deck 005.jpg',534,400),
      new Array('Photo 83','Ortyl Pool Deck 006.jpg',534,400),
	  //
      new Array('Photo 84','Outdoor Systems 07 074_1.jpg',534,400),
      new Array('Photo 85','Outdoor Systems 07 078.jpg',534,400),
	  //
      new Array('Photo 86','Schnoebelen Fireplace 001.jpg',534,400),
      new Array('Photo 87','Schnoebelen Fireplace 002.jpg',534,400),
      new Array('Photo 88','Schnoebelen Fireplace 003.jpg',534,400),
      new Array('Photo 89','Streepy Fireplace 001_1.jpg',534,400),
      new Array('Photo 90','Streepy Fireplace 003.jpg',534,400),
	  //
      new Array('Photo 91','Trotter Landscape 010.jpg',534,400),
      new Array('Photo 92','Trotter Landscape 011.jpg',534,400),
      new Array('Photo 93','Trotter Landscape 012.jpg',534,400),
      new Array('Photo 94','Trotter Landscape 013.jpg',534,400),
      new Array('Photo 95','Trotter Landscape 014.jpg',534,400),
      new Array('Photo 96','Trotter Landscape 015.jpg',534,400),
      new Array('Photo 97','Trotter Landscape 016.jpg',534,400),
      new Array('Photo 98','Trotter Landscape 017.jpg',534,400),
      new Array('Photo 99','Trotter Landscape 018.jpg',534,400),
      new Array('Photo 100','Trotter Landscape 019.jpg',534,400),
      new Array('Photo 101','Trotter Landscape 020.jpg',534,400),
      new Array('Photo 102','Trotter Landscape 024.jpg',534,400),
      new Array('Photo 103','Trotter Landscape 025.jpg',534,400),
      new Array('Photo 104','Trotter Landscape 026.jpg',534,400),
      new Array('Photo 105','Trotter Landscape 027.jpg',534,400),
      new Array('Photo 106','Trotter Landscape 028.jpg',534,400),
      new Array('Photo 107','Trotter Landscape 029.jpg',534,400),
      new Array('Photo 108','Trotter Landscape 030.jpg',534,400),
      new Array('Photo 109','Trotter Landscape 031.jpg',534,400),
      new Array('Photo 110','Trotter Landscape 032.jpg',534,400),
      new Array('Photo 111','Trotter Landscape 033.jpg',534,400),
      new Array('Photo 112','Trotter Landscape 034.jpg',534,400),
      new Array('Photo 113','Trotter Landscape 035.jpg',534,400),
      new Array('Photo 114','Trotter Landscape 036.jpg',534,400),
      new Array('Photo 115','Trotter Landscape 037.jpg',534,400),
	  //
      new Array('Photo 116','West Patio & Fireplace 016.jpg',534,400),
      new Array('Photo 117','West Patio & Fireplace 017.jpg',534,400),
      new Array('Photo 118','West Patio & Fireplace 018.jpg',534,400),
      new Array('Photo 119','West Patio & Fireplace 019.jpg',534,400),
      new Array('Photo 120','West Patio & Fireplace 020.jpg',534,400),
	  //
      new Array('Photo 121','20100917-Bartels.jpg',300,400),
      new Array('Photo 122','20100917-IMG_0155.jpg',534,400),
      new Array('Photo 123','20100917-IMG_0156.jpg',534,400),
      new Array('Photo 124','20100917-IMG_0157.jpg',534,400),
      new Array('Photo 125','20100917-IMG_0158.jpg',534,400),
      new Array('Photo 126','20100917-IMG_0159.jpg',534,400),
      new Array('Photo 127','20100917-IMG_0160.jpg',534,400),
      new Array('Photo 128','20100917-IMG_0162.jpg',534,400)
    )
  ),

  new Array('Irrigation','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','IMG_0176.jpg',534,400),
      new Array('Photo 2','Outdoor Systems 07 070.jpg',534,400),
      new Array('Photo 3','Outdoor Systems 07 071.jpg',534,400),
      new Array('Photo 4','Outdoor Systems 07 084_1.jpg',534,400),
      new Array('Photo 5','Outdoor Systems 07 085.jpg',534,400),
      new Array('Photo 6','Outdoor Systems 07 098_1.jpg',534,400),
      new Array('Photo 7','TP16.jpg',360,237)
    )
  )
)

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]);
}

