
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'tree_inventory.html';
scriptName = 'tree_inventory.js';
countX = 4; 
countY = 3;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Flowering Trees and Shrubs','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Alice Hydrangea.jpg',692,400),
      new Array('Photo 2','Crimson Queen Japanese Maple 2.jpg',601,401),
      new Array('Photo 3','100_5749.jpg',601,401),
      new Array('Photo 4','Caryopteris,native plant.jpg',534,400),
      new Array('Photo 5','Crimson Queen Japanese Maple_1.jpg',592,400),
      new Array('Photo 6','Gardenia.jpg',619,400),
      new Array('Photo 7','Gold Mound Spirea and Purple heart.jpg',604,400),
      new Array('Photo 8','Golden Shadow Mulberry.jpg',601,401),
      new Array('Photo 9','Grancey Gray Beard.jpg',613,400),
      new Array('Photo 10','Itea (2).jpg',250,185),
      new Array('Photo 11','Itea.jpg',671,400),
      new Array('Photo 12','Lorapetalum.jpg',618,400),
      new Array('Photo 13','Maple_1.jpg',300,400),
      new Array('Photo 14','Mass planting of Forsythia.jpg',601,401),
      new Array('Photo 15','Native Azalea (2).jpg',534,400),
      new Array('Photo 16','Native Azalea (3).jpg',534,400),
      new Array('Photo 17','Native Azalea.jpg',534,400),
      new Array('Photo 18','Nikko Blue Hydrangea.jpg',600,400),
      new Array('Photo 19','Red Bud.jpg',534,400),
      new Array('Photo 20','Snowball Viburnum (2).jpg',534,400),
      new Array('Photo 21','Vitex.jpg',534,400)
    )
  ),

  new Array('Flowers','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Black Eye Susan and Salvia.jpg',601,401),
      new Array('Photo 2','Black-eyed Susan and White Fountain.jpg',627,400),
      new Array('Photo 3','Disco Bell Hibiscus.jpg',603,400),
      new Array('Photo 4','Gailardia.jpg',304,400),
      new Array('Photo 5','Kniphofia Flemenco.jpg',275,275),
      new Array('Photo 6','Lantana.jpg',534,400),
      new Array('Photo 7','Miscanthus and Black Eye Susan_1.jpg',600,400),
      new Array('Photo 8','Phlox Divericata.jpg',534,400),
      new Array('Photo 9','Phlox Paniculata (2).jpg',534,400),
      new Array('Photo 10','Purple Cone Flower.jpg',413,400),
      new Array('Photo 11','Russian Sage.jpg',534,400),
      new Array('Photo 12','Salvia.jpg',601,401)
    )
  ),

  new Array('Ground Cover','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','100_5730.jpg',601,401),
      new Array('Photo 2','Agapanthus.jpg',414,400),
      new Array('Photo 3','Autumn Fern.jpg',534,400),
      new Array('Photo 4','Cast Iron Plant.jpg',534,400),
      new Array('Photo 5','Colocasia Illustrius_1.jpg',534,400),
      new Array('Photo 6','Creeping Jenny (2).jpg',273,400),
      new Array('Photo 7','Creeping Jenny.jpg',534,400),
      new Array('Photo 8','Japanese painted fern.jpg',612,400),
      new Array('Photo 9','Mass of Asiatic Jasmine.jpg',599,401),
      new Array('Photo 10','Mass of Ivy.jpg',700,358),
      new Array('Photo 11','Mass of Liriope (2).jpg',601,401),
      new Array('Photo 12','Mass of Liriope.jpg',534,400),
      new Array('Photo 13','Mondo Grass.jpg',601,401),
      new Array('Photo 14','Phlox paniculata.jpg',534,400)
    )
  ),

  new Array('Hedge Plants','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Tree Form Ligustrum.jpg',601,401),
      new Array('Photo 2','Hedge of Ligustrum (2).jpg',601,401),
      new Array('Photo 3','Hedge of Ligustrum_1.jpg',601,401),
      new Array('Photo 4','Hedge of Magnolia and Holly_1.jpg',601,401),
      new Array('Photo 5','Hedge of Wax Myrtle_1.jpg',601,401)
    )
  ),

  new Array('Ornamental Grass','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Muhley Gras.jpg',534,400)
    )
  ),

  new Array('Specimen Plants','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Italian cyprus.jpg',300,400)
    )
  ),

  new Array('Stone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','104_0083.jpg',535,400),
      new Array('Photo 2','River Stone_1.jpg',601,401)
    )
  ),

  new Array('Tree Inventory','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','100_5653_1.jpg',267,400),
      new Array('Photo 2','100_5657_1.jpg',601,401),
      new Array('Photo 3','100_5749_1.jpg',601,401),
      new Array('Photo 4','12 Chinese Pistache.jpg',601,401),
      new Array('Photo 5','12-14 Field Dug Maple.jpg',601,401),
      new Array('Photo 6','15g Cryptomeria_1.jpg',601,401),
      new Array('Photo 7','15g Leyland_1.jpg',601,401),
      new Array('Photo 8','20 Zelcova.jpg',601,401),
      new Array('Photo 9','30g Legustrum_1.jpg',601,401),
      new Array('Photo 10','30g Maple 2.jpg',267,400),
      new Array('Photo 11','Field Dug Bald Cypruss_1.jpg',267,400),
      new Array('Photo 12','Field Dug Oak 14_1.jpg',601,401),
      new Array('Photo 13','Oak_1.jpg',601,401),
      new Array('Photo 14','Small Field Dug Crapes_1.jpg',601,401)
    )
  )
)


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]);
}
