
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'home-shows.htm';
scriptName = 'home-shows.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('2006 SM Home Show','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','P3310039.jpg',534,400),
      new Array('Photo 2','P3310042.jpg',534,400),
      new Array('Photo 3','P3310044.jpg',300,400),
      new Array('Photo 4','P3310048.jpg',534,400),
      new Array('Photo 5','P3310050.jpg',534,400),
      new Array('Photo 6','P3310051.jpg',534,400),
      new Array('Photo 7','P3310052.jpg',534,400),
      new Array('Photo 8','P3310054.jpg',300,400),
      new Array('Photo 9','P4010056.jpg',300,400),
      new Array('Photo 10','P4010058.jpg',534,400),
      new Array('Photo 11','P4010060.jpg',534,400),
      new Array('Photo 12','P4010061.jpg',534,400),
      new Array('Photo 13','P4010063.jpg',534,400),
      new Array('Photo 14','P4020083.jpg',300,400),
      new Array('Photo 15','P4020085.jpg',300,400)
    )
  ),

  new Array('2007 Mid State Fair','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','PI250033.jpg',534,400),
      new Array('Photo 2','PI250035.jpg',534,400),
      new Array('Photo 3','PI250039.jpg',534,400),
      new Array('Photo 4','PI250042.jpg',300,400),
      new Array('Photo 5','PI250057.jpg',534,400),
      new Array('Photo 6','PI250058.jpg',534,400)
    )
  ),

  new Array('2007 SLO Home Show','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','DSCN0640.jpg',534,400),
      new Array('Photo 2','DSCN0642.jpg',534,400),
      new Array('Photo 3','PI280429.jpg',300,400),
      new Array('Photo 4','PI280430.jpg',538,400),
      new Array('Photo 5','PI280432.jpg',534,400),
      new Array('Photo 6','PI280439.jpg',534,400),
      new Array('Photo 7','PI280441.jpg',300,400),
      new Array('Photo 8','PI280442.jpg',300,400),
      new Array('Photo 9','PI290450.jpg',300,400),
      new Array('Photo 10','PI290451.jpg',300,400),
      new Array('Photo 11','PI290461.jpg',534,400),
      new Array('Photo 12','PI290462.jpg',534,400),
      new Array('Photo 13','PI300477.jpg',534,400),
      new Array('Photo 14','PI300480.jpg',534,400),
      new Array('Photo 15','PI300486.jpg',300,400),
      new Array('Photo 16','PI300491.jpg',300,400),
      new Array('Photo 17','PI300495.jpg',534,400),
      new Array('Photo 18','PI300497.jpg',534,400),
      new Array('Photo 19','PI300502.jpg',534,400),
      new Array('Photo 20','PI300515.jpg',300,400),
      new Array('Photo 21','PI300516.jpg',300,400),
      new Array('Photo 22','SLO SHOW SEPT 07 001.jpg',535,400),
      new Array('Photo 23','SLO SHOW SEPT 07 002.jpg',535,400),
      new Array('Photo 24','SLO SHOW SEPT 07 004.jpg',535,400),
      new Array('Photo 25','SLO SHOW SEPT 07 007.jpg',535,400),
      new Array('Photo 26','SLO SHOW SEPT 07 009.jpg',535,400)
    )
  ),

  new Array('2007 SM Home Show','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Job5_1.jpg',317,400),
      new Array('Photo 2','PI140013.jpg',534,400),
      new Array('Photo 3','PI140014.jpg',534,400),
      new Array('Photo 4','PI140015.jpg',534,400),
      new Array('Photo 5','PI140016.jpg',534,400),
      new Array('Photo 6','PI140018.jpg',534,400),
      new Array('Photo 7','PI140021.jpg',534,400),
      new Array('Photo 8','PI140022.jpg',534,400),
      new Array('Photo 9','PI140023.jpg',534,400),
      new Array('Photo 10','PI140027.jpg',534,400),
      new Array('Photo 11','PI140049.jpg',534,400),
      new Array('Photo 12','PI140050.jpg',300,400),
      new Array('Photo 13','PI140051.jpg',534,400),
      new Array('Photo 14','PI150070.jpg',534,400),
      new Array('Photo 15','PI150071.jpg',534,400),
      new Array('Photo 16','PI150074.jpg',534,400),
      new Array('Photo 17','PI150075.jpg',300,400),
      new Array('Photo 18','PI150076.jpg',300,400),
      new Array('Photo 19','PI270026.jpg',300,400)
    )
  ),

  new Array('2008 SLO Home Show','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','PI280062.jpg',300,400),
      new Array('Photo 2','PI280063_1.jpg',534,400),
      new Array('Photo 3','PI280064.jpg',534,400),
      new Array('Photo 4','PI280067.jpg',534,400),
      new Array('Photo 5','PI280068.jpg',534,400),
      new Array('Photo 6','PI280071.jpg',534,400),
      new Array('Photo 7','PI280074.jpg',534,400),
      new Array('Photo 8','PI280075.jpg',534,400)
    )
  ),

  new Array('2008 SM Home Show','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Bassalts Bench.jpg',534,400),
      new Array('Photo 2','Bonsai.jpg',534,400),
      new Array('Photo 3','Boulder.jpg',300,400),
      new Array('Photo 4','Center Feature 2.jpg',534,400),
      new Array('Photo 5','Center Feature 4.jpg',534,400),
      new Array('Photo 6','Center Feature 5.jpg',534,400),
      new Array('Photo 7','Center Feature.jpg',534,400),
      new Array('Photo 8','Compost.jpg',534,400),
      new Array('Photo 9','Display.jpg',534,400),
      new Array('Photo 10','Flagstone 1.jpg',300,400),
      new Array('Photo 11','Flagstone 2.jpg',534,400),
      new Array('Photo 12','Flagstone 3.jpg',300,400),
      new Array('Photo 13','Paperwork.jpg',300,400),
      new Array('Photo 14','PI060035.jpg',534,400),
      new Array('Photo 15','PI060053.jpg',300,400),
      new Array('Photo 16','PI060073.jpg',300,400),
      new Array('Photo 17','PI060088.jpg',534,400),
      new Array('Photo 18','PI060125.jpg',300,400),
      new Array('Photo 19','Shelving.jpg',300,400),
      new Array('Photo 20','Water Features 2.jpg',300,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]);
}

