
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 4;
countY = 5;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Boulder Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','boulder_walls_001.jpg',672,400,''), 
		new Array('','boulder_walls_002.jpg',600,400,''), 
		new Array('','boulder_walls_003.jpg',600,400,''), 
		new Array('','boulder_walls_004.jpg',621,400,''), 
		new Array('','boulder_walls_005.jpg',630,400,'')
    ),0
  ),
  new Array('General Landscaping','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','general_landscaping_001.jpg',600,400,''), 
		new Array('','general_landscaping_002.jpg',606,400,''), 
		new Array('','general_landscaping_003.jpg',586,400,''), 
		new Array('','general_landscaping_004.jpg',606,400,''), 
		new Array('','general_landscaping_005.jpg',575,400,''), 
		new Array('','general_landscaping_006.jpg',607,400,''), 
		new Array('','general_landscaping_007.jpg',600,400,''), 
		new Array('','general_landscaping_008.jpg',600,400,'')
    ),0
  ),
  new Array('Modular Block Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','mod_blwalls_001.jpg',600,400,''), 
		new Array('','mod_blwalls_002.jpg',700,327,''), 
		new Array('','mod_blwalls_003.jpg',632,400,''), 
		new Array('','mod_blwalls_004.jpg',600,400,''), 
		new Array('','mod_blwalls_005.jpg',640,400,''), 
		new Array('','mod_blwalls_006.jpg',606,400,''), 
		new Array('','mod_blwalls_007.jpg',533,400,'')
    ),0
  ),
  new Array('Natural Stone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','natural_stone_001.jpg',660,400,''), 
		new Array('','natural_stone_002.jpg',600,400,''), 
		new Array('','natural_stone_003.jpg',606,400,''), 
		new Array('','natural_stone_004.jpg',600,400,''), 
		new Array('','natural_stone_005.jpg',606,400,'')
    ),0
  ),
  new Array('Pavers','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','pavers_001.jpg',700,392,''), 
		new Array('','pavers_002.jpg',600,400,''), 
		new Array('','pavers_003.jpg',606,400,''), 
		new Array('','pavers_004.jpg',600,400,''), 
		new Array('','pavers_005.jpg',603,400,''), 
		new Array('','pavers_006.jpg',600,400,''), 
		new Array('','pavers_007.jpg',573,400,''), 
		new Array('','pavers_008.jpg',606,400,''), 
		new Array('','pavers_009.jpg',533,400,''), 
		new Array('','pavers_010.jpg',600,400,'')
    ),0
  )
)

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 preloadphotos() {
  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">');
  document.write('<option value="portfolio.htm">Categories Menu</option>');
  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]);
}