
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.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('Before and after','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array( 
	  new Array('Before 1','b1.jpg',534,400),
      new Array('After 1','a1.jpg',534,400),
	  new Array('Before 2','b3.jpg',534,400),
      new Array('After 2','a3.jpg',534,400),
	  new Array('Before 3','b6.jpg',534,400),
      new Array('After 3','a6.jpg',534,400),
	  new Array('Before 4','b7.jpg',534,400),
      new Array('After 4','a7.jpg',534,400),
	  new Array('Before 5','b8.jpg',534,400),
      new Array('After 5','a8.jpg',534,400),
	  new Array('Before 6','b9.jpg',534,400),
      new Array('After 6','a9.jpg',534,400),
	  new Array('Before 7','b10.jpg',534,400),
	  new Array('After 7','a10.jpg',534,400),
	  new Array('Before 8','Before A.jpg',534,400),
	  new Array('After 8','After A.jpg',534,400),
	  new Array('Before 9','Before.jpg',534,400),
      new Array('After 9','After.jpg',534,400)
      

    )
  ),

  new Array('Community Volunteer Work','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','fg.jpg',534,400),
      new Array('Photo 2','IM000001_1.jpg',534,400),
      new Array('Photo 3','IM000002_1.jpg',534,400),
      new Array('Photo 4','IM000007_2.jpg',534,400),
      new Array('Photo 5','IM000008_3.jpg',534,400),
      new Array('Photo 6','IM000071.jpg',534,400),
      new Array('Photo 7','IM000074.jpg',534,400),
      new Array('Photo 8','IM000075.jpg',534,400),
      new Array('Photo 9','IM000089.jpg',534,400)
    )
  ),

  new Array('Concrete Block Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','7.jpg',534,400),
      new Array('Photo 2','Anchor Wall, Belgard Patio, Outcropping Steps.jpg',534,400),
      new Array('Photo 3','IM000004_1.jpg',534,400),
      new Array('Photo 4','IM000005_1.jpg',534,400),
      new Array('Photo 5','IM000044.jpg',534,400),
      new Array('Photo 6','IM000045.jpg',534,400),
      new Array('Photo 7','IM000053.jpg',534,400),
      new Array('Photo 8','IM000109.jpg',534,400),
      new Array('Photo 9','IM000119.jpg',534,400),
      new Array('Photo 10','IM000126.jpg',534,400),
      new Array('Photo 11','IM000127.jpg',534,400),
      new Array('Photo 12','IM000131.jpg',534,400),
      new Array('Photo 13','IM000143.jpg',534,400),
	  new Array('Photo 14','Garden Wall around Foundation of home.jpg',534,400),
	  new Array('Anchor Highland 1','Anchor Highland 1.jpg',534,400),
      new Array('Anchor Highland 3 Piece','Anchor Highland 3 Piece.jpg',534,400),
      new Array('Anchor Highland','Anchor Highland.jpg',534,400),
      new Array('Aspen Garden Wall','Aspen Garden Wall.jpg',534,400)
    )
  ),

  new Array('Edging and Beds','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
	  new Array('Photo 1','ShowLetter[2]_2.jpg',534,400),
      new Array('Photo 2','b.jpg',300,400),
      new Array('Photo 3','IM000048.jpg',534,400),
      new Array('Photo 4','IM000050.jpg',534,400),
      new Array('Photo 5','IM000266.jpg',534,400),
      new Array('Photo 6','IM000268.jpg',534,400),
      new Array('Photo 7','IM000269.jpg',534,400),
      new Array('Photo 8','IM000403.jpg',534,400),
      new Array('Photo 9','IM000404.jpg',534,400),
	  new Array('Outcropping and Birch','Outcropping and Birch.jpg',534,400),
      new Array('Terrace with Outcropping','Terrace with Outcropping.jpg',534,400)
    )
  ),

  new Array('Lawn Installation','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','IM000007.jpg',534,400),
      new Array('Photo 2','IM000008_2.jpg',534,400),
      new Array('Photo 3','IM000102.jpg',534,400),
      new Array('Photo 4','IM000198.jpg',534,400)
    )
  ),

  new Array('Maintenance','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','IM000127_1.jpg',534,400),
      new Array('Photo 2','IM000150.jpg',534,400),
      new Array('Photo 3','IM000154.jpg',534,400),
	  new Array('Residential Mowing','Residential Mowing.jpg',534,400)

    )
  ),

  new Array('Men at work','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','IM000070.jpg',534,400),
      new Array('Photo 2','IM000086.jpg',534,400),
      new Array('Photo 3','IM000087_1.jpg',534,400),
      new Array('Photo 4','IM000094.jpg',534,400),
      new Array('Photo 5','IM000487.jpg',534,400),
      new Array('Photo 6','IM000488.jpg',534,400),
      new Array('Photo 7','IM000489.jpg',534,400),
      new Array('Photo 8','IM000490.jpg',534,400),
      new Array('Photo 9','IM000491.jpg',534,400),
      new Array('Photo 10','P1010059.jpg',534,400),
      new Array('Photo 11','P1010061.jpg',534,400),
      new Array('Photo 12','P1010062.jpg',534,400)
    )
  ),

  new Array('Natural Stone Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Fon DuLac Stone Wall.jpg',534,400),
      new Array('Photo 2','Fon DuLac Stone Walls to retain exposed basement.jpg',534,400),
      new Array('Photo 3','Grey Outcropping Wall.jpg',534,400),
      new Array('Photo 4','IM000003_2.jpg',534,400),
      new Array('Photo 5','IM000024.jpg',534,400),
      new Array('Photo 6','IM000059.jpg',534,400),
      new Array('Photo 7','IM000087.jpg',534,400),
      new Array('Photo 8','IM000088_1.jpg',534,400),
      new Array('Photo 9','IM000110.jpg',534,400),
      new Array('Photo 10','IM000120.jpg',534,400),
      new Array('Photo 11','IM000141.jpg',534,400),
      new Array('Photo 12','IM000148.jpg',534,400),
      new Array('Photo 13','IM000194.jpg',534,400),
      new Array('Photo 14','IM000248.jpg',534,400),
      new Array('Photo 15','IM000257.jpg',534,400),
      new Array('Photo 16','yellow pages photo.jpg',266,400),
	  new Array('50 Blend of Chilton Weather Edge and Greys','50 Blend of Chilton Weather Edge and Greys.jpg',534,400),
      new Array('Chilton Gret Outcroppings','Chilton Gret Outcroppings.jpg',534,400),
      new Array('Chilton Grey  Outcroppings','Chilton Grey  Outcroppings.jpg',534,400),
      new Array('Chilton Grey Outcroppings 8 High','Chilton Grey Outcroppings 8 High.jpg',534,400),
      new Array('Field Stone Terrace 6 High','Field Stone Terrace 6 High.jpg',534,400),
      new Array('Fieldstone  Wall','Fieldstone  Wall.jpg',534,400),
      new Array('Fieldstone Wall','Fieldstone Wall.jpg',534,400),
      new Array('Outcropping Terrace','Outcropping Terrace.jpg',534,400)

    )
  ),

  new Array('Natural Stone Patios','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','IM000020.jpg',534,400),
      new Array('Photo 2','IM000046.jpg',534,400),
      new Array('Photo 3','IM000085_1.jpg',534,400),
      new Array('Photo 4','IM000102_1.jpg',534,400),
      new Array('Photo 5','IM000263.jpg',534,400)
    )
  ),

  new Array('Natural Stone Walkways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','IM000006_1.jpg',534,400),
      new Array('Photo 2','IM000007_1.jpg',534,400),
      new Array('Photo 3','IM000009_1.jpg',534,400),
      new Array('Photo 4','IM000050_1.jpg',534,400),
      new Array('Photo 5','IM000082.jpg',534,400),
      new Array('Photo 6','IM000084.jpg',534,400),
      new Array('Photo 7','IM000091.jpg',534,400),
	  new Array('Flagstone Steppers','Flagstone Steppers.jpg',534,400)

    )
  ),

  new Array('Paver Driveways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','c.jpg',534,400),
      new Array('Photo 2','IM000088.jpg',534,400),
      new Array('Photo 3','n.jpg',534,400),
      new Array('Photo 4','ShowLetter[1].jpg',534,400),
      new Array('Photo 5','ShowLetter[2].jpg',535,400),
      new Array('Photo 6','ShowLetter[3].jpg',534,400),
	  new Array('Paver Borders (2)','Paver Borders (2).jpg',534,400),
      new Array('Paver Borders','Paver Borders.jpg',534,400)

    )
  ),

  new Array('Paver Patio','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Dublin Patio with Outcropping Steps','12 of 15 Outdoor Escape.jpg',534,400),
      new Array('Dublin Patio with Outcropping Steps','8 of 15 Outdoor Escape.jpg',534,400),
      //new Array('Delete picture','Back Yard Escape 6 of 14.jpg',534,400),
      new Array('Dublin Pool Deck','Back Yard Escape 8 of 14.jpg',534,400),
      new Array('Dublin Walk with Outcropping Step','Back Yard Escape 9 of 14.jpg',534,400),
      new Array('Custom Cut Edges','Dublin Patio with Garden Bed.jpg',534,400),
      new Array('Dublin Patio with Drywall Steps','IM000009.jpg',534,400),
      new Array('Round Patio with Seat Wall','IM000010.jpg',534,400),
      new Array('Dublin Patio with Double Soldier Course','IM000085.jpg',534,400),
      new Array('Mega Bergerac Patio','IM000254.jpg',534,400),
      new Array('Olde Grenwich Cobble Patio','IM000405.jpg',534,400),
      new Array('Olde Grenwich Coble Patio and Path','IM000406.jpg',534,400),
      new Array('Shaded Seating Areas','IM000408.jpg',534,400),
      new Array('Shaded Seating Areas','IM000411.jpg',534,400),
      new Array('Dublin Paver Pool Decks','IM000471.jpg',534,400),
      new Array('Customize Color Mix, Size and Curves','s.jpg',534,400),
      new Array('Brick Inlays','ShowLetter[2]_1.jpg',535,400),
      new Array('Patio / Driveway Combinations','ShowLetter[3]_1.jpg',534,400),
	  new Array('Alcove Patio','Alcove Patio.jpg',534,400),
      new Array('Belgard Stone Patio-Herringbone Pattern','Belgard Stone Patio-Herringbone Pattern.jpg',534,400),
      new Array('Belgard Stone Patio','Belgard Stone Patio.jpg',534,400),
      new Array('Bergerac Circle Patern','Bergerac Circle Patern.jpg',534,400),
      new Array('Bergerac Circle','Bergerac Circle.jpg',534,400),
      new Array('Circle Meeting with Walkway - Dublin Stone','Circle Meeting with Walkway - Dublin Stone.jpg',534,400),
      new Array('Circle Meeting with Walkway -Dublin Stone','Circle Meeting with Walkway -Dublin Stone.jpg',534,400),
      new Array('Dublin Patio with Accent Color Soldier Course','Dublin Patio with Accent Color Soldier Course.jpg',534,400),
      new Array('Dublin Patio with Weston Seat Wall (2)','Dublin Patio with Weston Seat Wall (2).jpg',534,400),
      new Array('Dublin Patio with Weston Seat Wall','Dublin Patio with Weston Seat Wall.jpg',534,400),
      new Array('Dublin Pavers with Versa-Lok Seat Wall','Dublin Pavers with Versa-Lok Seat Wall.jpg',534,400),
      new Array('Dublin Stone Patio with Random Pattern','Dublin Stone Patio with Random Pattern.jpg',534,400),
      new Array('Dubling Patio with Chilton Stone Steps','Dubling Patio with Chilton Stone Steps.jpg',300,400),
      new Array('Hollandstone In Herringbone Pattern','Hollandstone In Herringbone Pattern.jpg',534,400),
      new Array('Natural Stone Coping with Dublin Pavers','Natural Stone Coping with Dublin Pavers.jpg',534,400),
      new Array('Pine Hall Clay Pavers (2)','Pine Hall Clay Pavers (2).jpg',534,400),
      new Array('Pine Hall Clay Pavers','Pine Hall Clay Pavers.jpg',534,400),
      new Array('Raised Patio (2)','Raised Patio (2).jpg',534,400),
      new Array('Raised Patio','Raised Patio.jpg',534,400),
      new Array('Weston Stone Fire pit with Cambridge Patio','Weston Stone Fire pit with Cambridge Patio.jpg',534,400),
      new Array('Weston Stone Wall, Firepit and Stairs','Weston Stone Wall, Firepit and Stairs.jpg',534,400)

    )
  ),

  new Array('Paver Walkways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','IM000002_2.jpg',534,400),
      new Array('Photo 2','IM000062.jpg',534,400),
      new Array('Photo 3','IM000093.jpg',534,400),
      new Array('Photo 4','IM000249.jpg',534,400),
      new Array('Photo 5','IM000407.jpg',534,400),
      new Array('Photo 6','IM000410.jpg',534,400),
	  new Array('Bergerac Pavers','Bergerac Pavers.jpg',534,400),
      new Array('Bergerac Walkway','Bergerac Walkway.jpg',534,400),
      new Array('Cambridge Pavers','Cambridge Pavers.jpg',534,400),
      new Array('Dublin Pavers','Dublin Pavers.jpg',534,400)

    )
  ),

  new Array('Pool Decks','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Back Yard Escape 2 of 14.jpg',534,400),
      new Array('Photo 2','Back Yard Escape 7 of 14.jpg',534,400),
	  new Array('Pine Hall  Pavers','Pine Hall  Pavers.jpg',534,400),
      new Array('Pine Hall Pavers','Pine Hall Pavers.jpg',534,400)

    )
  ),

  new Array('Seat Walls Pillars Firepits','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Back Yard Escape 4 of 14.jpg',534,400),
      new Array('Photo 2','hj.jpg',534,400),
      new Array('Photo 3','IM000009_2.jpg',534,400),
      new Array('Photo 4','IM000011_1.jpg',534,400),
      new Array('Photo 5','IM000012.jpg',534,400),
	  new Array('Anchor Seat Wall','Anchor Seat Wall.jpg',534,400),
      new Array('Anchor Wall, Belgard Patio, Outcropping Steps','Anchor Wall, Belgard Patio, Outcropping Steps.jpg',534,400),
      new Array('Anchore Freestanding Seat Wall (2)','Anchore Freestanding Seat Wall (2).jpg',534,400),
      new Array('Anchore Freestanding Seat Wall','Anchore Freestanding Seat Wall.jpg',534,400),
      new Array('Custom Natural Stone Coping (2)','Custom Natural Stone Coping (2).jpg',534,400),
      new Array('Custom Natural Stone Coping (3)','Custom Natural Stone Coping (3).jpg',534,400),
      new Array('Custom Natural Stone Coping','Custom Natural Stone Coping.jpg',534,400),
      new Array('Firepit with Crushed Granite','Firepit with Crushed Granite.jpg',534,400),
      new Array('Firepit with Weston Stone (2)','Firepit with Weston Stone (2).jpg',534,400),
      new Array('Firepit with Weston Stone','Firepit with Weston Stone.jpg',534,400),
      new Array('Seat Wall with Weston Stone','Seat Wall with Weston Stone.jpg',534,400),
      new Array('Weston Seat Walls (2)','Weston Seat Walls (2).jpg',534,400),
      new Array('Weston Seat Walls','Weston Seat Walls.jpg',534,400)

    )
  ),

  new Array('Staircases','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','10 of 15.jpg',534,400),
      new Array('Photo 2','14 of 15 Outdoor Escape.jpg',534,400),
      new Array('Photo 3','15 of 15 Outdoor Escape.jpg',534,400),
      new Array('Photo 4','4 of 15 Outdoor Escape.jpg',534,400),
      new Array('Photo 5','6 of 15 Outdoor Escape.jpg',534,400),
      new Array('Photo 6','7 of 15 Outdoor Escape.jpg',534,400),
      new Array('Photo 7','aaa.jpg',534,400),
      new Array('Photo 8','Back Yard Escape 1 of 14 .jpg',534,400),
      new Array('Photo 9','Back Yard Escape 12 of 14.jpg',534,400),
      new Array('Photo 10','Back Yard Escape 13 of 14.jpg',534,400),
      new Array('Photo 11','IM000002.jpg',534,400),
      new Array('Photo 12','IM000003_1.jpg',534,400),
      new Array('Photo 13','IM000004.jpg',534,400),
      new Array('Photo 14','IM000005.jpg',534,400),
      new Array('Photo 15','IM000006.jpg',534,400),
      new Array('Photo 16','IM000011.jpg',534,400),
      new Array('Photo 17','IM000025.jpg',534,400),
      new Array('Photo 18','IM000049.jpg',534,400),
      new Array('Photo 19','IM000086_1.jpg',534,400),
      new Array('Photo 20','IM000161.jpg',534,400),
      new Array('Photo 21','IM000220.jpg',534,400),
	  new Array('Chilton Split Steps','Chilton Split Steps.jpg',300,400),
      new Array('Chilton Weather Edge-Seam Face Outcropping Steps (2)','Chilton Weather Edge-Seam Face Outcropping Steps (2).jpg',534,400),
      new Array('Chilton Weather Edge-Seam Face Outcropping Steps','Chilton Weather Edge-Seam Face Outcropping Steps.jpg',534,400),
      new Array('Fon Du Lac Split Steps','Fon Du Lac Split Steps.jpg',300,400),
      new Array('Fondulac Step with Bush Hammered Face','Fondulac Step with Bush Hammered Face.jpg',534,400),
      new Array('Stoop Overlayed with Clay Pavers','Stoop Overlayed with Clay Pavers.jpg',534,400),
      new Array('Stoop Overlayed with Natural Stone Tile (2)','Stoop Overlayed with Natural Stone Tile (2).jpg',300,400),
      new Array('Stoop Overlayed with Natural Stone Tile','Stoop Overlayed with Natural Stone Tile.jpg',534,400),
      new Array('Stoop Overlayed with Raised Patio','Stoop Overlayed with Raised Patio.jpg',534,400),
      new Array('Weston Stone Staircase','Weston Stone Staircase.jpg',534,400)
    )
  ),

  new Array('Waterfalls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Back Yard Escape 11 of 14.jpg',534,400),
      new Array('Photo 2','Back Yard Escape 5 of 14.jpg',534,400),
      new Array('Photo 3','IM000064.jpg',534,400),
      new Array('Photo 4','IM000065.jpg',534,400),
      new Array('Photo 5','IM000066.jpg',300,400),
      new Array('Photo 6','IM000067.jpg',320,240)
    )
  )
)


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]);
}

function go2section(section) {
  window.location.href = pageName+'?section='+section;
}
