
smallSizes = new Array(150,100);
mediumSizes = new Array(200,170);
pageName = 'sand_aggregates.htm';
scriptName = 'sand_aggregates.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('Sand & Aggregates','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('Pit Gravel','pit_gravel.jpg',348,283,'Pit Gravel is a mixture of rock & dirt that’s compactable. Pit gravel works well for backfilling foundations and making natural walkways & hiking trails.'), 
		new Array('ABC','abc.jpg',348,283,'ABC is a crushed aggregate product that contains stones up to an inch in diameter and everything smaller down to a sand size particle called fines. When wetted and tamped down, the mixture of fines and aggregate will compact into a solid base material. ABC is used as the base material for gravel driveways and parking lots. ABC is sometimes called Crush \'n Run.'), 
		new Array('#5 Stone','5_stone.jpg',348,283,'#5 Stone is a washed stone that\'s a little larger that #67 stone; it is commonly used around drainage pipe.'), 
		new Array('#67 Stone','67_stone.jpg',348,283,'#67 Stone is a washed stone that’s about the size of a quarter; it is commonly used as a top-dressing for gravel driveways & parking lots.'), 
		new Array('78m Stone','78m_stone.jpg',348,283,'78M Stone is a washed stone that’s about the size of your fingernail. 78Ms work well for a top-dressing on gravel driveways if you want something easier to walk on, however the smaller size can become stuck in tire treads and shoe treads. Some people refer to 78M stone as pea gravel.'), 
		new Array('Washed Screenings','washed_screenings.jpg',348,283,'Washed Screenings are very small crushed aggregate stones that are sometimes referred to as rock dust. Washed screenings can be used instead of sand as a leveling material and joint filler with concrete pavers.'), 
		new Array('Rip Rap','rip_rap.jpg',348,283,'Rip Rap is a large aggregate that ranges in size from the size of your fist to the size of a basketball. Rip rap is most commonly used to line ditches.'), 
		new Array('Ballast','ballast.jpg',348,283,'Ballast is a golf ball-sized stone that is often used to line railroad tracks.'), 
		new Array('Gabion','gabion.jpg',348,283,'Gabion is a fist-sized aggregate that is sometimes used to line ditches or creek beds. It does not work well in areas with heavy water run-off because the smaller sized stones get washed away with the current.')
    ),'Click on the images to view a larger display of our elegant colors, shapes and patterns.'
  )
)

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 menu_portfolio() {
  var jp;
  document.write('<table border="0" cellspacing="0" cellpadding="0">');
  document.write('<tr><td>Choose a category:&nbsp;<select name="cat" class="select1" onChange="if (this.value.length!=0) window.location=this.value" style="font-size:9px;">');
  for (jp=0;jp<arImages.length;jp++) {
    document.write('<option value="'+pageName+'?section='+jp+'"'+((jp==section)?' selected':'')+'>'+arImages[jp][0]+'</option>');
  }  
  document.write('</select></td></tr>')
  document.write('</table>');
} 
  
function showImageMedium(number) {
  showImage('imagemedium',arImages[section][2]+arImages[section][4][number][1]);
  if (arImages[section][4][number][0]!='')
   showMessage('imagemediumname',arImages[section][4][number][0]);   
  else
   showMessage('imagemediumname','Photo '+Number(Number(number)+1));
}

function showImageBig(number) {
  showImagePopup(scriptName,section,number,arImages[section][4][number][2],
   arImages[section][4][number][3]);
}

