
smallSizes = new Array(50,50);
mediumSizes = new Array(251,170);
pageName = 'commercial_photos.htm';
scriptName = 'commercial_photos.js';
countX = 3;
countY = 4;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Commercial Photos','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
// page 1 
      new Array('','pic003_1.jpg',578,400),
      new Array('','pic004_1.jpg',300,400),
      new Array('','pic001_1.jpg',534,400),
      new Array('','pic002_1.jpg',598,400),
      new Array('','pic005_1.jpg',251,170),
      new Array('','pic006_1.jpg',251,170),
      new Array('','pic007_1.jpg',251,170),
      new Array('','pic008_1.jpg',251,170),
      new Array('','pic009_1.jpg',251,170),
      new Array('','pic011_1.jpg',251,170),
      new Array('','pic012_1.jpg',251,170),
      new Array('','pic013_1.jpg',251,170),
// page 2
      new Array('','pic014_1.jpg',300,400),
      new Array('','pic015_1.jpg',534,400),
      new Array('','pic060_1.jpg',600,400),
      new Array('','pic062_1.jpg',496,400),
      new Array('','pic066_1.jpg',614,400),
      new Array('','pic071_1.jpg',273,170),
      new Array('','pic072_1.jpg',273,170),
      new Array('','pic075_1.jpg',273,170),
      new Array('','pic077_1.jpg',273,170),
      new Array('','pic078_1.jpg',273,170),
      new Array('','P1010010_1.jpg',534,400),
      new Array('','P1010012_1.jpg',317,400),
// page 3
      new Array('','DSCF0055_1.jpg',534,400),
      new Array('','TRUNCATED CHRCL4_1.jpg',534,400),
      new Array('','Ontario t.d.151_1.jpg',300,400),
      new Array('','truncated domes 034_1.jpg',534,400),
      new Array('','truncated domes 037_1.jpg',534,400)
//      new Array('','San Ramon Truncated Domes 02_1.jpg',534,400),
//      new Array('','San Ramon Truncated Domes 07_1.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 showProfile(number) {
  profile(arImages[section][4][number][2]);
}
