
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 2;
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('Lighting','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Outdoor Lights.jpg',534,400)
    )
  ),

  new Array('Pergola','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Pergola 002.jpg',534,400),
      new Array('Photo 2','Pergola 003.jpg',534,400),
      new Array('Photo 3','Pergola 005.jpg',534,400),
      new Array('Photo 4','Pergola 006.jpg',534,400),
      new Array('Photo 5','Pergola with lights004.jpg',534,400)
    )
  ),

  new Array('Pinecrest','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Pinecrest Overlay.jpg',534,400),
      new Array('Photo 2','Pinecrest Overlay2.jpg',534,400),
      new Array('Photo 3','Pinecrest Overlay3.jpg',534,400),
      new Array('Photo 4','Pinecrest Overlay4.jpg',534,400)
    )
  ),

  new Array('Rivers End','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Rivers End 001.jpg',534,400),
      new Array('Photo 2','Rivers End 003.jpg',534,400),
      new Array('Photo 3','Rivers End 005.jpg',534,400),
      new Array('Photo 4','Rivers End 006.jpg',534,400),
      new Array('Photo 5','Rivers End 007.jpg',534,400),
      new Array('Photo 6','Rivers End 008.jpg',534,400)
    )
  ),

  new Array('Sea Pines','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Sea Pines 002.jpg',534,400),
      new Array('Photo 2','Sea Pines 003.jpg',534,400),
      new Array('Photo 3','Sea Pines 004.jpg',534,400)
    )
  ),

  new Array('Shell Hall','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Shell Hall 001.jpg',534,400),
      new Array('Photo 2','Shell Hall 002.jpg',534,400),
      new Array('Photo 3','Shell Hall 005.jpg',534,400),
      new Array('Photo 4','Shell Hall 007.jpg',534,400),
      new Array('Photo 5','Shell Hall 009.jpg',534,400),
      new Array('Photo 6','Shell Hall Landscaping & Pavers 001.jpg',534,400),
      new Array('Photo 7','Shell Hall Landscaping & Pavers 002.jpg',534,400),
      new Array('Photo 8','Shell Hall Landscaping & Pavers 003.jpg',534,400),
      new Array('Photo 9','Shell Hall Landscaping & Pavers 004.jpg',534,400),
      new Array('Photo 10','Shell Hall Landscaping & Pavers 005.jpg',534,400),
      new Array('Photo 11','Shell Hall Landscaping & Pavers 006.jpg',534,400),
      new Array('Photo 12','Shell Hall Landscaping & Pavers 007.jpg',534,400),
      new Array('Photo 13','Shell Hall Landscaping & Pavers 008.jpg',534,400)
    )
  ),

  new Array('Sun City','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Sun City1.jpg',534,400),
      new Array('Photo 2','Sun City2.jpg',534,400),
      new Array('Photo 3','Sun City3.jpg',534,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]);
}
