
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.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('Landscape','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','DISPLAY-3.jpg',602,400,''), 
		new Array('','DISPLAY-AREA-2.jpg',602,400,''),
		new Array('','SIGN.jpg',602,400,''), 
		new Array('','STREET-VIEW-OF-BLDG..jpg',602,400,'') 
    )
  ),
  new Array('Materials','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('Barney Run','mater_BARNEYRUN.jpg',300,400,''), 
		new Array('Brown Carpet Mulch','mater_BROWNCARPETMULCH.jpg',533,400,''), 
		new Array('Cypress Mulch','mater_CYPRESSMULCH.jpg',533,400,''), 
		new Array('Dyed Black Mulch','mater_DYEDBLACKMULCH.jpg',533,400,''), 
		new Array('Erth Food','mater_ERTHFOOD.jpg',300,400,''), 
		new Array('Hardwood Blend Mulch','mater_HARDWOODBLENDMULCH.jpg',533,400,''), 
		new Array('M-10 Granite Sand','mater_M-10GRANITESAND.jpg',300,400,''), 
		new Array('Masonary Sand','mater_MASONARYSAND.jpg',300,400,''), 
		new Array('Pine Bark Mini Nuggets','mater_PINEBARKMININUGGETS.jpg',533,400,''), 
		new Array('Red Carpet Mulch','RED-CARPET.jpg',400,400,''), 
		new Array('Red Oak Mulch','mater_REDOAKMULCH.jpg',533,400,''), 
		new Array('Riversand','mater_RIVERSAND.jpg',300,400,''), 
		new Array('Screened Top Soil','mater_SCREENEDTOPSOIL.jpg',300,400,''), 
		new Array('Single Ground Hardwood Blend Mulch','mater_SINGLEGROUNDMULCH.jpg',533,400,''),
		new Array('','BLOCKS-3.jpg',602,400,''), 
		new Array('','BLOCKS.jpg',602,400,''), 
		new Array('Fieldstone Mountain Boulders','BOULDERS.jpg',602,400,''), 
		new Array('Fieldstone Mountain Boulders','BOULDERS1.jpg',602,400,''), 
		new Array('','BRICK.jpg',602,400,''), 
		new Array('','BRICK2.jpg',266,400,''),
		new Array('','LANDSCAPE-YARD.jpg',602,400,''), 
		new Array('','DISPLAY-AREA.jpg',602,400,''), 
		new Array('','LANDSCAPE-YARD-2.jpg',602,400,''), 
		new Array('','LUMBER.jpg',602,400,''), 
		new Array('','LUMBER02.jpg',602,400,''), 
		new Array('','MASON-CEMENTS.jpg',602,400,''), 
		new Array('','MULCH.jpg',602,400,''),
		new Array('','PIPE.jpg',266,400,''), 
		new Array('','PIPE2.jpg',602,400,''), 
		new Array('','PIPE3.jpg',602,400,''), 
		new Array('','RAILROAD-TIES.jpg',602,400,''), 
		new Array('','REBAR.jpg',602,400,''), 
		new Array('','REBAR2.jpg',266,400,''),
		new Array('','REWIRE.jpg',602,400,''), 
		new Array('','REWIRE2.jpg',602,400,''), 
		new Array('','REWIRE3.jpg',602,400,'') 
    )
  ),
  new Array('Stores','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','DELIVERY-TRUCK.jpg',602,400,''), 
		new Array('','CONCRETE-EQUIPTMENT.jpg',602,400,''), 
		new Array('','CONCRETE-FLOATS.jpg',602,400,''), 
		new Array('','CONCRETE-REPAIR-ITEMS.jpg',602,400,''), 
		new Array('','CONCRETE-STAMPS.jpg',602,400,''), 
		new Array('','CONCRETE-TOOLS.jpg',602,400,''), 
		new Array('','DECORATIVE-CONCRETE-PRODUCT.jpg',602,400,''),
		new Array('','ELECTRIC-SAWS.jpg',266,400,''), 
		new Array('','GAS-SAWS.jpg',266,400,''),
		new Array('','INTERIOR-STORE-4.jpg',602,400,''), 
		new Array('','INTERIOR-STORE-TOOLS.jpg',602,400,''), 
		new Array('','INTERIOR-STORE-TOOLS2.jpg',602,400,''), 
		new Array('','INTERIOR-TOOLS-3.jpg',602,400,''),
		new Array('','TOOLS-6.jpg',602,400,'') 
    )
  ),
  new Array('Decorative Concrete','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','100_0080.jpg',533,400,''), 
		new Array('','Chem1.jpg',533,400,''), 
		new Array('','Chem11.jpg',533,400,''), 
		new Array('','Chem3.jpg',533,400,''), 
		new Array('','Chem9.jpg',533,400,''), 
		new Array('','Chemstain11.jpg',533,400,''), 
		new Array('','Chemstain13.jpg',533,400,''), 
		new Array('','D&A-SAMPLES-021.jpg',533,400,''), 
		new Array('','D&A-SAMPLES-024.jpg',533,400,''), 
		new Array('','D&A-SAMPLES-044.jpg',533,400,''), 
		new Array('','D&A-SAMPLES-070.jpg',533,400,''), 
		new Array('','D&A-SAMPLES-071.jpg',533,400,''), 
		new Array('','D&A-SAMPLES-085.jpg',533,400,''), 
		new Array('','img_0014.jpg',533,400,''), 
		new Array('','IMG_0017_2.jpg',533,400,''), 
		new Array('','IMG_0302.jpg',533,400,''), 
		new Array('','IMG_0316.jpg',533,400,''), 
		new Array('','P1000293.jpg',533,400,''), 
		new Array('','P1000297.jpg',533,400,''), 
		new Array('','P1000331.jpg',533,400,''), 
		new Array('','P1000332.jpg',533,400,''), 
		new Array('','P1000335.jpg',533,400,''), 
		new Array('','P1000336.jpg',533,400,''), 
		new Array('','P1000342.jpg',533,400,''), 
		new Array('','P1000351.jpg',533,400,''), 
		new Array('','P1000356.jpg',533,400,''), 
		new Array('','P1000367.jpg',533,400,''), 
		new Array('','P1000369.jpg',533,400,''), 
		new Array('','P1000375.jpg',533,400,''), 
		new Array('','StampedOverlay1.jpg',533,400,''), 
		new Array('','StampedOverlay3.jpg',533,400,'') 
    )
  )    
)

section = getParameter(self.document.location.href, 'section');
if (isNaN(section) || (section=='') || (section<0) || (section>arImages.length-1))
  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:11px;width:150px;">');
  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]);
}
