smallSizes = new Array(77,77);
mediumSizes = new Array(280,176);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 3;
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('','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','DSCN0043f.jpg',640,480,'Circular Drive'),
      new Array('Photo 2','drawings-016f.jpg',640,480,'Stone Porch'),
//      new Array('Photo 3','house1.jpg',640,480,'Backyard Walkway'),
      new Array('Photo 3','DSCN0064f.jpg',640,480,'Stone Porch'),
      new Array('Photo 4','DSCN0060f.jpg',640,480,'Stone Porch'),
      new Array('Photo 5','DSCN0059f.jpg',640,480,'Stone Porch'),
      new Array('Photo 6','Ashville-Blue-Mist-Farms-08.jpg',640,480,'Front Entrance Way'),
      new Array('Photo 7','drawings-019f.jpg',640,480,'Circle Pattern Patio'),
      new Array('Photo 8','drawings-074f.jpg',640,480,'Front Entrance Way'),
      new Array('Photo 9','DSCN0038f.jpg',640,480,'Commercial Walkway'),
      new Array('Photo 10','DSCN0048f.jpg',640,480,'Side Entrance Gate'),
      new Array('Photo 11','Summer-2003-030f.jpg',640,480,'Swimming Pool'),
      new Array('Photo 12','Back-Patio.jpg',640,480,'Back Patio'),
      new Array('Photo 13','Ball.jpg',640,480,'Courtyard'),
     // new Array('Photo 14','Fountain.jpg',640,480,'Fountain'),
      new Array('Photo 15','Huddler.jpg',640,480,'Mazus Lawn'),
      new Array('Photo 16','1.jpg',576,432,'Lakeside'),
      new Array('Photo 17','2.jpg',576,432,'Lakeside Walkway'),
      new Array('Photo 18','3.jpg',576,432,''),
new Array('Photo 19','57.jpg',576,432,''),
new Array('Photo 20','58.jpg',576,432,''),
new Array('Photo 21','59.jpg',576,432,''),
new Array('Photo 22','60.jpg',576,432,''),
new Array('Photo 23','61.jpg',576,432,''),
new Array('Photo 24','62.jpg',576,432,''),
new Array('Photo 25','63.jpg',576,432,''),
new Array('Photo 26','64.jpg',576,432,''),
new Array('Photo 27','65.jpg',576,432,''),
new Array('Photo 28','66.jpg',576,432,''),
new Array('Photo 29','67.jpg',576,432,''),
new Array('Photo 30','68.jpg',576,432,''),
new Array('Photo 31','4.jpg',576,432,''),
new Array('Photo 32','5.jpg',576,432,''),
new Array('Photo 33','6.jpg',576,432,''),
new Array('Photo 34','7.jpg',576,432,''),
new Array('Photo 35','8.jpg',576,432,''),
new Array('Photo 36','9.jpg',576,432,''),
new Array('Photo 37','10.jpg',576,432,''),
new Array('Photo 38','11.jpg',576,432,''),
new Array('Photo 39','12.jpg',576,432,''),
new Array('Photo 40','13.jpg',576,432,''),
//new Array('Photo 41','14.jpg',576,432,''),
new Array('Photo 42','15.jpg',576,432,''),
new Array('Photo 43','16.jpg',576,432,''),
new Array('Photo 44','17.jpg',576,432,''),
new Array('Photo 45','18.jpg',576,432,'')
//      new Array('Photo 17','blackburn1.jpg',640,480,'Lakeside Walkway'),
//      new Array('Photo 18','grass1.jpg',640,480,'Lakeside Lawn')
    )
  )
)

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][4]);
}

function showImageBig(number) {
  showImagePopup(scriptName,section,number,arImages[section][4][number][2],
   arImages[section][4][number][3]);
}
