
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'photos.htm';
scriptName = 'photos.js';
countX = 5;
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('Garden Ideas','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','nick1.jpg',504,378,''), 
		new Array('','Nick2.jpg',504,378,''), 
		new Array('','apothecaries_017.jpg',266,400,''), 
		new Array('','gardentour_008.jpg',504,380,''), 
		new Array('','gardentour_012.jpg',504,380,''), 
		new Array('','gardentour_022.jpg',504,380,''), 
		new Array('','gardentour_032.jpg',301,400,''), 
		new Array('','gardentour_033.jpg',301,400,''), 
		new Array('','gardentour_034.jpg',504,380,''), 
		new Array('','gardentour_036.jpg',504,385,''), 
		new Array('','HPIM0569.jpg',504,380,''), 
		new Array('','HPIM0624.jpg',504,380,''), 
		new Array('','HPIM0762.jpg',301,400,''), 
		new Array('','HPIM0792.jpg',504,380,''), 
		new Array('','HPIM1734.jpg',464,400,''), 
		new Array('','HPIM1991s.jpg',504,380,''), 
		new Array('','jbrown1.jpg',509,226,''), 
		new Array('','Kcgarju2.jpg',555,363,''), 
		new Array('','Kcgmay99.jpg',468,359,''), 
		new Array('','potsprob_008.jpg',367,400,''), 
		new Array('','redbegonias.jpg',414,400,''), 
		new Array('','water_use-4.jpg',266,400,''), 	
		new Array('','HPIM0180.jpg',530,400,''), 
		new Array('','HPIM0181.jpg',530,400,''), 
		new Array('','HPIM0530.jpg',530,400,''), 
		new Array('','HPIM0545-copy.jpg',388,400,''), 
		new Array('','HPIM0558.jpg',495,400,''), 
		new Array('','HPIM0570.jpg',530,400,''), 
		new Array('','HPIM0718.jpg',530,400,''), 
		new Array('','HPIM0807.jpg',301,400,''), 
		new Array('','HPIM1905.jpg',530,400,''), 
		new Array('','HPIM1922.jpg',530,400,''), 
		new Array('','springflowering-048.jpg',515,400,''), 
		new Array('','anngi_arbor.jpg',194,299,''),
		new Array('','anngi_castironpath.jpg',283,400,''),
		new Array('','anngi_gate.jpg',300,262,''),
		new Array('','anngi_herb-garden.jpg',452,300,''),
		new Array('','anngi_oudolfdrifts.jpg',295,227,''),
		new Array('','anngi_rock-garden.jpg',451,291,''),
		new Array('','anngi_shadegarden.jpg',517,400,''),
		new Array('','anngi_yellow-theme.jpg',451,299,''),
		new Array('','rs_idearock10.jpg',316,400,''),
		new Array('','rs_idearock18.jpg',530,400,''),
		new Array('','rs_idearock7.jpg',700,396,''),
		new Array('','rs_idearock9.jpg',351,400,''),
		new Array('','rs_idearock16.jpg',267,400,''),
		new Array('','rs_idearock19.jpg',300,359,''),
		new Array('','rs_idearock6.jpg',700,343,'')
    ),0
  ),
  new Array('My Garden','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('Nancy B., Kansas City','nancybrown.jpg',504,378,''),	
		new Array('Nick G., Lee\'s Summit','new3.jpg',504,336,''), 
		new Array('Nick G., Lee\'s Summit','nick5.jpg',533,400,''), 	
		new Array('Rick and Sharon, Peculiar','sharon_0441.jpg',504,345,''), 
		new Array('Rick and Sharon, Peculiar','sharon_052.jpg',504,398,''), 
		new Array('Susie B., Cleveland','susie.jpg',504,378,''), 
		new Array('Angie & Craig, Raymore','june2010a_005_copy.jpg',504,378,''), 
		new Array('Bob & Cheryl, Raymore','june2010a_010_copy.jpg',504,356,''), 
		new Array('Bob & Cheryl, Raymore','june2010a_011_copy.jpg',504,378,''), 
		new Array('Mike & Diane, Raytown','june2010b_001_copy.jpg',600,400,''), 
		new Array('Mike & Diane, Raytown','june2010b_005_copy.jpg',600,400,''), 
		new Array('Kay T., Raytown','june2010c_001.jpg',504,378,''), 
		new Array('Kay T., Raytown','june2010c_002.jpg',504,378,''),
		new Array('Lee S, Belton','lee1.jpg',376,400,''), 
		new Array('Lee S, Belton','lee3.jpg',438,400,'') 	
//		new Array('K.Patten, Raytown','gardentour_007.jpg',504,380,'') 
    ),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" style="font-size:11px;">');
  document.write('<option value="">Please select...</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]);
}
