
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('Clay Pavers','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','3dpavingbig.jpg',401,400,''),	
		new Array('','52.jpg',502,340,''), 
		new Array('','53.jpg',504,339,''), 
		new Array('','54.jpg',334,349,''), 
		new Array('','55.jpg',469,339,''), 
		new Array('','56.jpg',431,444,''), 
		new Array('','58.jpg',444,447,''), 
		new Array('','59.jpg',440,444,''), 
		new Array('','60.jpg',431,444,''), 
		new Array('','61.jpg',431,444,''), 
		new Array('','62.jpg',218,442,''), 
		new Array('','63.jpg',578,579,''), 
		new Array('','64.jpg',333,293,''), 
		new Array('','65.jpg',444,253,''), 
		new Array('','66.jpg',444,296,''), 
		new Array('','68.jpg',431,444,''), 
		new Array('','69.jpg',439,328,''), 
		new Array('','70.jpg',444,444,''), 
		new Array('','71.jpg',444,439,''), 
		new Array('','72.jpg',431,442,''), 
		new Array('','73.jpg',431,444,''), 
		new Array('','74.jpg',325,444,''), 
		new Array('','75.jpg',293,444,''), 
		new Array('','76.jpg',443,300,'')
    ),0
  ),
  new Array('Natural Stone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','Natural_Stone_001.jpg',533,400,''), 
		new Array('','Natural_Stone_002.jpg',700,393,''), 
		new Array('','Natural_Stone_003.jpg',600,400,''), 
		new Array('','Natural_Stone_004.jpg',600,400,''), 
		new Array('','Natural_Stone_005.jpg',600,400,''), 
		new Array('','Natural_Stone_006.jpg',600,400,''), 
		new Array('','Natural_Stone_007.jpg',600,400,''), 
		new Array('','Natural_Stone_008.jpg',600,400,''), 
		new Array('','Natural_Stone_009.jpg',600,400,''), 
		new Array('','Natural_Stone_010.jpg',600,400,''), 
		new Array('','Natural_Stone_011.jpg',600,400,''), 
		new Array('','Natural_Stone_012.jpg',700,393,''), 
		new Array('','Natural_Stone_013.jpg',700,393,''), 
		new Array('','Natural_Stone_014.jpg',700,393,''), 
		new Array('','Natural_Stone_015.jpg',700,393,''), 
		new Array('','Natural_Stone_016.jpg',700,393,''), 
		new Array('','Natural_Stone_017.jpg',700,393,''), 
		new Array('','Natural_Stone_018.jpg',700,393,''), 
		new Array('','Natural_Stone_019.jpg',533,400,''), 
		new Array('','Natural_Stone_020.jpg',533,400,''), 
		new Array('','Natural_Stone_021.jpg',533,400,''), 
		new Array('','Natural_Stone_022.jpg',533,400,''), 
		new Array('','Natural_Stone_023.jpg',533,400,''), 
		new Array('','Natural_Stone_024.jpg',533,400,''), 
		new Array('','Natural_Stone_025.jpg',533,400,''), 
		new Array('','Natural_Stone_026.jpg',600,400,''), 
		new Array('','Natural_Stone_027.jpg',533,400,''), 
		new Array('','Natural_Stone_028.jpg',601,400,''), 
		new Array('','Natural_Stone_029.jpg',533,400,'')
    ),0
  ),
  new Array('Permeable Pavers','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','Permeable_Pavers_001.jpg',275,400,''), 
		new Array('','Permeable_Pavers_002.jpg',303,400,''), 
		new Array('','Permeable_Pavers_003.jpg',271,400,''), 
		new Array('','Permeable_Pavers_004.jpg',323,400,''), 
		new Array('','Permeable_Pavers_005.jpg',528,400,'') 
    ),0
  ),
  new Array('Walls & Pilasters','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','Walls_Pilasters_001.jpg',700,384,''), 
		new Array('','Walls_Pilasters_003.jpg',270,400,''), 
		new Array('','Walls_Pilasters_004.jpg',401,400,''), 
		new Array('','Walls_Pilasters_005.jpg',397,400,''), 
		new Array('','Walls_Pilasters_006.jpg',345,400,''), 
		new Array('','Walls_Pilasters_007.jpg',500,400,'') 
    ),0
  ),
  new Array('Belgard Pavers','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
		new Array('','0.jpg',402,400),
		new Array('','1.jpg',400,400),
		new Array('','10.jpg',510,400),
		new Array('','11.jpg',509,400),
		new Array('','12.jpg',390,400),
		new Array('','13.jpg',400,400),
		new Array('','14.jpg',405,400),
		new Array('','15.jpg',398,400),
		new Array('','16.jpg',418,400),
		new Array('','17.jpg',399,400),
		new Array('','18.jpg',400,400),
		new Array('','2.jpg',400,400),
		new Array('','20.jpg',511,400),
		new Array('','21.jpg',393,400),
		new Array('','22.jpg',397,400),
		new Array('','23.jpg',512,400),
		new Array('','24.jpg',398,400),
		new Array('','25.jpg',343,433),
		new Array('','26.jpg',502,400),
		new Array('','27.jpg',444,354),
		new Array('','28.jpg',323,400),
		new Array('','29.jpg',305,400),
		new Array('','3.jpg',400,400),
		new Array('','30.jpg',398,400),
		new Array('','31.jpg',515,400),
		new Array('','32.jpg',400,400),
		new Array('','33.jpg',393,400),
		new Array('','34.jpg',398,400),
		new Array('','35.jpg',313,400),
		new Array('','36.jpg',400,400),
		new Array('','37.jpg',319,400),
		new Array('','38.jpg',507,400),
		new Array('','39.jpg',398,400),
		new Array('','4.jpg',520,400),
		new Array('','40.jpg',515,401),
		new Array('','41.jpg',313,400),
		new Array('','42.jpg',396,400),
		new Array('','43.jpg',520,400),
		new Array('','44.jpg',313,400),
		new Array('','45.jpg',515,400),
		new Array('','46.jpg',424,426),
		new Array('','47.jpg',326,420),
		new Array('','48.jpg',318,400),
		new Array('','49.jpg',501,401),
		new Array('','5.jpg',398,400),
		new Array('','50.jpg',404,400),
		new Array('','51.jpg',318,400),
		new Array('','52.jpg',400,400),
		new Array('','53.jpg',400,400),
		new Array('','54.jpg',325,400),
		new Array('','55.jpg',504,400),
		new Array('','6.jpg',398,400),
		new Array('','7.jpg',318,400),
		new Array('','8.jpg',321,400),
		new Array('','9.jpg',541,436)
    ),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]);
}