
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portphotos.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('','img_0713.jpg',533,400,''), 
		new Array('','Landscape1.jpg',350,234,''), 
		new Array('','Landscape2.jpg',350,222,''), 
		new Array('','Landscape3.jpg',350,228,''), 
		new Array('','Landscape4.jpg',350,227,''), 
		new Array('','Landscape5.jpg',350,229,''), 
		new Array('','Landscape6.jpg',350,196,''), 
//		new Array('','Landscape7.jpg',250,225,''), 
		new Array('','Landscape8.jpg',350,237,''),
//		new Array('','land_patio2.jpg',280,205,'')
		new Array('','land_013_13A.jpg',646,400,''), 
		new Array('','land_014_14A.jpg',266,400,''), 
		new Array('','land_033_9A.jpg',413,400,''), 
		new Array('','land_041_17A.jpg',333,400,''), 
		new Array('','land_065_17A.jpg',500,400,'')
    ),0
  ),
  new Array('Pools & Spas','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','img_0402.jpg',533,400,''), 
		new Array('','img_0709.jpg',533,400,''), 
		new Array('','img_0730.jpg',533,400,''), 
		new Array('','img_0731.jpg',533,400,''),	
		new Array('','pools_001.jpg',600,400,''), 
//		new Array('','pools_002.jpg',233,350,''), 
		new Array('','pools_003.jpg',600,400,''), 
		new Array('','pools_004.jpg',597,400,''), 
		new Array('','pools_005.jpg',597,400,''), 
		new Array('','pools_006.jpg',597,400,''), 
		new Array('','pools_007.jpg',597,400,''), 
		new Array('','pools_008.jpg',635,400,''), 
		new Array('','pools_009.jpg',597,400,''), 	
		new Array('','Pools1.jpg',351,297,''), 
		new Array('','Pools2.jpg',350,233,''), 
		new Array('','Pools3.jpg',350,233,''), 
		new Array('','Pools4.jpg',350,208,''), 
		new Array('','Pools6.jpg',350,222,''), 
		new Array('','pool_spa2.jpg',330,215,''), 
		new Array('','pool_swpool.jpg',330,215,''),
		new Array('','pool_IMG_0261.jpg',431,400,''), 
		new Array('','pool_IMG_0265.jpg',505,400,''), 
		new Array('','pool_IMG_0266.jpg',497,400,''), 
		new Array('','pool_IMG_0270.jpg',408,400,''), 
		new Array('','pool_IMG_0272.jpg',527,400,''), 
		new Array('','pool_IMG_0273.jpg',533,400,''), 
		new Array('','pool_IMG_0345.jpg',533,400,''), 
		new Array('','pool_IMG_0457.jpg',503,400,''), 
		new Array('','pool_IMG_0471.jpg',551,400,''), 
		new Array('','pool_IMG_0491.jpg',480,400,''), 
		new Array('','pool_old_spa_with_new_travertine_deck_and_planting_beds.jpg',700,289,''), 
		new Array('','pool_overflow_spa.jpg',700,365,''), 
		new Array('','pool_poolside_tropicals.jpg',258,400,'')
    ),0
  ),
  new Array('Patios, Pavers & Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','ppw_IMG_0543.jpg',533,400,''), 
		new Array('','ppw_IMG_0544.jpg',533,400,''), 
		new Array('','ppw_IMG_0553.jpg',300,400,''), 
		new Array('','ppw_IMG_0670.jpg',533,400,''), 
		new Array('','ppw_IMG_0694.jpg',533,400,''), 
		new Array('','ppw_IMG_0698.jpg',533,400,''), 
		new Array('','ppw_IMG_0700.jpg',533,400,''), 
		new Array('','ppw_IMG_0705.jpg',533,400,''), 
		new Array('','ppw_IMG_0707.jpg',533,400,''), 
		new Array('','ppw_IMG_0713.jpg',533,400,''), 
		new Array('','ppw_IMG_0719.jpg',533,400,''), 
		new Array('','ppw_IMG_0730.jpg',533,400,''), 
		new Array('','ppw_IMG_0735.jpg',533,400,''), 
		new Array('','ppw_IMG_0738.jpg',533,400,''), 
		new Array('','ppw_IMG_0749.jpg',533,400,''), 
		new Array('','ppw_IMG_0868.jpg',300,400,''), 
		new Array('','ppw_IMG_0879.jpg',533,400,''), 
		new Array('','ppw_IMG_0885.jpg',533,400,''), 
		new Array('','ppw_IMG_0966.jpg',533,400,''), 	
		new Array('','allpavers_001.jpg',233,350,''), 
		new Array('','allpavers_002.jpg',600,400,''), 
		new Array('','allpavers_003.jpg',233,350,''), 
		new Array('','allpavers_004.jpg',233,350,''), 
		new Array('','allpavers_005.jpg',600,400,''), 
		new Array('','allpavers_006.jpg',600,400,''), 
		new Array('','allpavers_007.jpg',600,400,''), 
		new Array('','allpavers_008.jpg',233,350,''), 
		new Array('','allpavers_009.jpg',233,350,''), 
		new Array('','allpavers_010.jpg',597,400,''), 
		new Array('','allpavers_011.jpg',597,400,''), 
		new Array('','allpavers_012.jpg',597,400,''), 
		new Array('','allpavers_013.jpg',597,400,''), 
		new Array('','allpavers_014.jpg',597,400,''), 
		new Array('','allpavers_015.jpg',234,350,''), 
		new Array('','allpavers_016.jpg',597,400,''), 
		new Array('','allpavers_017.jpg',234,350,''), 
		new Array('','allpavers_018.jpg',234,350,''), 
		new Array('','allpavers_019.jpg',597,400,''), 
		new Array('','allpavers_020.jpg',234,350,''), 
		new Array('','allpavers_021.jpg',234,350,''), 
		new Array('','allpavers_022.jpg',234,350,''), 
		new Array('','allpavers_023.jpg',597,400,''), 
		new Array('','allpavers_024.jpg',597,400,''), 
		new Array('','allpavers_025.jpg',597,400,''), 
		new Array('','allpavers_026.jpg',234,350,''), 
		new Array('','allpavers_027.jpg',597,400,''), 
		new Array('','allpavers_028.jpg',234,350,''), 
		new Array('','allpavers_029.jpg',234,350,''), 
		new Array('','allpavers_030.jpg',597,400,''), 
		new Array('','allpavers_031.jpg',234,350,''), 
		new Array('','allpavers_032.jpg',234,350,''), 
		new Array('','allpavers_033.jpg',597,400,''), 
		new Array('','allpavers_034.jpg',597,400,''), 
		new Array('','allpavers_035.jpg',234,350,''), 
		new Array('','allpavers_036.jpg',234,350,''), 
		new Array('','allpavers_037.jpg',234,350,''), 
		new Array('','allpavers_038.jpg',234,350,''), 
		new Array('','allpavers_039.jpg',597,400,''), 
		new Array('','allpavers_040.jpg',597,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]);
}
