
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'heritage.htm';
scriptName = 'heritage.js';
countX = 3;
countY = 2;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Drystack','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Salt Fork Dry Stack','Salt Fork Dry Stack.jpg',227,156),
      new Array('Shawnee Dry Stack','Shawnee Dry Stack.jpg',231,157),

      new Array('Catawba Drystack','Catawba Drystack.jpg',550,395),
      new Array('Erie Drystack','Erie Drystack.jpg',550,395),
      new Array('Huron Drystack','Huron Drystack.jpg',550,395),
      new Array('Ottawa Drystack','Ottawa Drystack.jpg',550,395),
      new Array('Seneca Drystack','Seneca Drystack.jpg',550,395)
    )
  ),

  new Array('Fieldstone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Gray Fieldstone','Gray Fieldstone.jpg',227,157),
      new Array('Old Dominion Fieldstone','Old Dominion Fieldstone.jpg',231,157),
      new Array('Potomac Fieldstone','Potomac Fieldstone.jpg',227,157),

      new Array('Buff Fieldstone','Buff Fieldstone.jpg',550,395),
      new Array('Pennsylvania Fieldstone','Pennsylvania Fieldstone.jpg',550,395),
      new Array('Shenandoah Fieldstone','Shenandoah Fieldstone.jpg',550,395),
      new Array('Top Rock Fieldstone','Top Rock Fieldstone.jpg',550,395)
    )
  ),

  new Array('Ledge Stone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Scioto Ledge Stone','Scioto Ledge Stone.jpg',223,154),
      new Array('Susquehanna Ledge Stone','Susquehanna Ledge Stone.jpg',231,158),

      new Array('Osage Ledge Stone','Osage Ledge Stone.jpg',550,395),
      new Array('Saginaw Ledge Stone','Saginaw Ledge Stone.jpg',550,395),
      new Array('Santee Ledge Stone','Santee Ledge Stone.jpg',550,395)
    )
  ),

  new Array('Limestone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Buckingham Limestone','Buckingham Limestone.jpg',227,157),
      new Array('Allegheny Limestone','Allegheny Limestone.jpg',550,395),
      new Array('Amherst Limestone','Amherst Limestone.jpg',550,395),
      new Array('Blue Ridge Limestone','Blue Ridge Limestone.jpg',550,395),
      new Array('Buff Limestone','Buff Limestone.jpg',550,395),
      new Array('Nantucket Limestone','Nantucket Limestone.jpg',550,395),
      new Array('Ohio Vintage Limestone','Ohio Vintage Limestone.jpg',550,395),
      new Array('Sandusky Shore Limestone','Sandusky Shore Limestone.jpg',550,395),
      new Array('Shoreline Limestone','Shoreline Limestone.jpg',550,395),
      new Array('Southern Limestone','Southern Limestone.jpg',550,395),
      new Array('Tan Limestone','Tan Limestone.jpg',550,395)
    )
  ),

  new Array('River Rock','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Michigan River Rock','Michigan River Rock.jpg',550,395),
      new Array('Mountain River Rock','Mountain River Rock.jpg',550,395)
    )
  ),

  new Array('Hearthstones','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Brown Hearthstone','Brown Hearthstone.jpg',135,128),
      new Array('Grey Hearthstone','Grey Hearthstone.jpg',139,132),
      new Array('Ivory Hearthstone','Ivory Hearthstone.jpg',139,136),
      new Array('Natural Hearthstone','Natural Hearthstone.jpg',135,131),
      new Array('Tan Hearthstone','Tan Hearthstone.jpg',135,134)
    )
  ),

  new Array('Accessories','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Brick Headers','Brick Headers.jpg',215,87),
      new Array('Brick Sill with Drip','Brick Sill with Drip.jpg',167,117),
      new Array('Brick Stretchers','Brick Stretchers.jpg',179,105),
      new Array('Flat Window Trim','Flat Window Trim.jpg',235,121),
      new Array('Hydrant Stone','Hydrant Stone.jpg',79,97),
      new Array('Keystone','Keystone.jpg',131,119),
      new Array('Light Trim','Light Trim.jpg',87,126),
      new Array('Receptacle Stone','Receptacle Stone.jpg',75,89),
      new Array('Row Locks','Row Locks.jpg',275,99),
      new Array('Trim Stone','Trim Stone.jpg',75,90),
      new Array('Wall Caps','Wall Caps.jpg',215,153),
      new Array('Water Sill','Water Sill.jpg',291,109)
    )
  )

)

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]);
}

