
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'retaining.htm';
scriptName = 'retaining.js';
countX = 4;
countY = 2;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Retaining Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','100_0568.jpg',534,400),
      new Array('Photo 2','allanblock-brown.jpg',600,176),
      new Array('Photo 3','Allen Block Retaining Wall 2.jpg',424,279),
      new Array('Photo 4','aug102005 152.jpg',384,288),
      new Array('Photo 5','Blackburn3.jpg',534,400),
      new Array('Photo 6','celtic-stone-planter-wall.jpg',600,278),
      new Array('Photo 7','DSCN4917.jpg',535,400),
      new Array('Photo 8','DSCN5006.jpg',535,400),
      new Array('Photo 9','DSCN5007.jpg',535,400),
      new Array('Photo 10','DSCN5163.jpg',535,400),
      new Array('Photo 11','DSCN5167.jpg',535,400),
      new Array('Photo 12','DSCN5258.jpg',535,400),
      new Array('Photo 13','DSCN5323.jpg',535,400),
      new Array('Photo 14','DSCN5330_1.jpg',535,400),
      new Array('Photo 15','DSCN5632.jpg',535,400),
      new Array('Photo 16','IMG_1534.jpg',534,400),
      new Array('Photo 17','Rebholz After 600 pix.jpg',534,400),
      new Array('Photo 18','stacked stone with low lying ground cover.jpg',534,400),
      new Array('Photo 19','Untitled-8.jpg',480,345),
      new Array('Photo 20','Woodland Garden1 600 pix.jpg',600,338)
    )
  )
)


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]);
}

