
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'cast_lighting.htm';
scriptName = 'cast_lighting.js';
countX = 2;
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('Cast Lighting','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','cast-logo-r-small.jpg',474,400),
      new Array('Photo 2','BULLET_d854624_r135_fr11.jpg',325,400),
      new Array('Photo 3','CHINAHAT_LG_d854624_r142_fr05.jpg',148,400),
      new Array('Photo 4','CHINAHAT_SM_d854624_r142_fr11.jpg',135,400),
      new Array('Photo 5','css1.jpg',259,400),
      new Array('Photo 6','DECKLIGHT_d854624_r139_fr05.jpg',367,400),
      new Array('Photo 7','GRATE_d854624_r139_fr06.jpg',378,400),
      new Array('Photo 8','MR16_d854624_r3_fr02.jpg',186,401),
      new Array('Photo 9','MUSH_LG_d854624_r142_fr08.jpg',198,400),
      new Array('Photo 10','MUSH_SM_d854624_r135_fr01.jpg',160,400),
      new Array('Photo 11','NEWHAT_d854624_r142_fr02.jpg',141,400),
      new Array('Photo 12','NEWORLEANS_d854624_r142_fr02.jpg',141,400),
      new Array('Photo 13','NICHE_d854624_r141B_fr08.jpg',310,400),
      new Array('Photo 14','RING&LENS4WELLLIGHT_d854624_r144_fr09.jpg',376,400),
      new Array('Photo 15','SAVANNA_d87957_r135_fr05.jpg',148,400),
      new Array('Photo 16','SPLICE_d854624_r141B_fr03.jpg',362,400),
      new Array('Photo 17','ad_0006-crop.jpg',354,400),
      new Array('Photo 18','area light by wall.jpg',316,400),
      new Array('Photo 19','bullet against wall3.jpg',319,400),
      new Array('Photo 20','bullet up to tree c_up.jpg',319,400),
      new Array('Photo 21','cast-cbl1cb-beach.jpg',340,400),
      new Array('Photo 22','cast-cnl1cb-reflect.jpg',534,400),
      new Array('Photo 23','chinahat lg.jpg',313,400),
      new Array('Photo 24','cno1cb-verdi.jpg',267,400),
      new Array('Photo 25','cno1cb.jpg',297,400),
      new Array('Photo 26','deck-on-post.jpg',534,400),
      new Array('Photo 27','IMG_1261.jpg',277,400),
      new Array('Photo 28','IMG_1263.jpg',548,400),
      new Array('Photo 29','IMG_1266.jpg',562,400),
      new Array('Photo 30','mush sm daytime by tulips.jpg',268,400),
      new Array('Photo 31','sm mush in flowerbed.jpg',321,400),
      new Array('Photo 32','small-china-hat.jpg',277,400),
      new Array('Photo 33','TREECANOPY_ctreeh1.jpg',300,400),
      new Array('Photo 34','well-w-grate.jpg',269,400),
      new Array('Photo 35','brick wall w pot plant romance.jpg',285,400),
      new Array('Photo 36','brick-house-2.jpg',598,400),
      new Array('Photo 37','bridge-mag.jpg',618,400),
      new Array('Photo 38','cover-photo-bc.jpg',498,400),
      new Array('Photo 39','Cprairie house front 2.jpg',504,400),
      new Array('Photo 40','farmhouse-f1.jpg',494,400),
      new Array('Photo 41','halo-house-drive-hi-res.jpg',512,400),
      new Array('Photo 42','halo-house-side-hi-res.jpg',512,400),
      new Array('Photo 43','IMG_0005-ret.jpg',601,400),
      new Array('Photo 44','IMG_0009-ret.jpg',267,400),
      new Array('Photo 45','IMG_0010-ret.jpg',267,400),
      new Array('Photo 46','IMG_0014.jpg',473,400),
      new Array('Photo 47','IMG_0019.jpg',267,400),
      new Array('Photo 48','IMG_0020-ret.jpg',533,400),
      new Array('Photo 49','IMG_1065-hires-rgb.jpg',600,400),
      new Array('Photo 50','japanese style-bench w bamboo wall.jpg',506,400),
      new Array('Photo 51','moon-china-1.jpg',267,400),
      new Array('Photo 52','moon-corner-1.jpg',547,400),
      new Array('Photo 53','moon-end-porch-2.jpg',600,400),
      new Array('Photo 54','moon-house-no.jpg',267,400),
      new Array('Photo 55','moon-side-1.jpg',600,400),
      new Array('Photo 56','moon_7-7-05-garden.jpg',600,400)
    )
  )

)

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 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 showImageMedium(number) {
  showImage('imagemedium',arImages[section][2]+arImages[section][4][number][1]);
  showMessage('imagemediumname',arImages[section][4][number][0]);
}

function showImageBig(number) {
  showImagePopup(scriptName,section,number,arImages[section][4][number][2],
   arImages[section][4][number][3]);
}
