
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'Plant_Database.html';
scriptName = 'Plant_Database.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('Hardscapes','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Arborvitae','Arborvitae.jpg',324,400),
      new Array('Azalea - Japanese','Azalea - Japanese.jpg',600,400),
      new Array('Azalea','Azalea.jpg',534,400),
      new Array('Barberry - Crimson','Barberry - Crimson.jpg',534,400),
      new Array('Barberry - Yellow','Barberry - Yellow.jpg',400,347),
      new Array('Burning  Bush','Burning  Bush.jpg',400,300),
      new Array('Butterfly - Bush','Butterfly - Bush.jpg',353,400),
      new Array('Clematis - Montana','Clematis - Montana.jpg',267,400),
      new Array('Clematis','Clematis.jpg',301,400),
      new Array('Coneflower - Purple','Coneflower - Purple.jpg',448,250),
      new Array('Coneflower - White Swan','Coneflower - White Swan.jpg',247,185),
      new Array('Coreopsis - Moonbeam','Coreopsis - Moonbeam.jpg',500,380),
      new Array('Crape Myrtle','Crape Myrtle.jpg',338,400),
      new Array('Danica Aborvitaie','Danica Aborvitaie.jpg',432,324),
      new Array('Daphne Carol Mackie','Daphne Carol Mackie.jpg',200,156),
      new Array('Daphne Carol Mackie2','Daphne Carol Mackie2.jpg',534,400),
      new Array('Forsythia','Forsythia.jpg',347,364),
      new Array('Grass - Japaneese Blood Grass','Grass - Japaneese Blood Grass.jpg',244,360),
      new Array('Grass - Ornimental','Grass - Ornimental.jpg',267,350),
      new Array('Heuchera','Heuchera.jpg',479,400),
      new Array('Hibiscus','Hibiscus.jpg',640,400),
      new Array('Holly - China Girl in Summer','Holly - China Girl in Summer.jpg',288,216),
      new Array('Holly - China Girl in winter','Holly - China Girl in winter.jpg',400,400),
      new Array('Holly - China Girl','Holly - China Girl.jpg',299,300),
      new Array('Holly - Sky Pencil','Holly - Sky Pencil.jpg',300,400),
      new Array('Hosta - Combo','Hosta - Combo.jpg',500,375),
      new Array('Hosta','Hosta.jpg',534,400),
      new Array('Hydrangea - Variegated','Hydrangea - Variegated.jpg',300,300),
      new Array('Hydrangea','Hydrangea.jpg',405,271),
      new Array('Jananese Yew','Jananese Yew.jpg',256,192),
      new Array('Juniper - Bluerug','Juniper - Bluerug.jpg',433,325),
      new Array('Juniper - Upright','Juniper - Upright.jpg',301,400),
      new Array('Lamiastrum','Lamiastrum.jpg',336,336),
      new Array('Lilac - Dwarf Korean','Lilac - Dwarf Korean.jpg',300,300),
      new Array('Liriope - Spicata','Liriope - Spicata.jpg',400,400),
      new Array('Lirope - Big Blue','Lirope - Big Blue.jpg',400,400),
      new Array('Lirope - Black Mondo','Lirope - Black Mondo.jpg',400,400),
      new Array('Lirope - Varigated','Lirope - Varigated.jpg',160,120),
      new Array('Nandina - Firepower','Nandina - Firepower.jpg',509,400),
      new Array('Ninebark','Ninebark.jpg',300,340),
      new Array('Ornimental switchgrass','Ornimental switchgrass.jpg',602,400),
      new Array('Phlox - Red Wing','Phlox - Red Wing.jpg',350,350),
      new Array('Phlox - White','Phlox - White.jpg',350,350),
      new Array('Potentilla Goldfinger','Potentilla Goldfinger.jpg',480,400),
      new Array('Privet','Privet.jpg',600,400),
      new Array('Rhododendron - PJM','Rhododendron - PJM.jpg',448,298),
      new Array('Rhododendron','Rhododendron.jpg',339,338),
      new Array('Rose - Knockout','Rose - Knockout.jpg',51,68),
      new Array('Rose - Knockout2','Rose - Knockout2.jpg',230,152),
      new Array('Rudbeckia - Black Eye Susan','Rudbeckia - Black Eye Susan.jpg',400,400),
      new Array('Sedum - Autumn Joy','Sedum - Autumn Joy.jpg',336,336),
      new Array('Sedum - Fuldaglut','Sedum - Fuldaglut.jpg',336,336),
      new Array('Sedum - Vera Jamison','Sedum - Vera Jamison.jpg',336,336),
      new Array('Sendum - Angelica','Sendum - Angelica.jpg',552,400),
      new Array('Spiraea - Anthony Waterer','Spiraea - Anthony Waterer.jpg',285,380),
      new Array('Spirea - Goldflame','Spirea - Goldflame.jpg',424,401),
      new Array('Spirea - Goldmound','Spirea - Goldmound.jpg',175,175),
      new Array('Spruce - Blue Globe','Spruce - Blue Globe.jpg',534,400),
      new Array('Spruce - Colorado Blue','Spruce - Colorado Blue.jpg',250,250),
      new Array('Sstella De Ora Daylilly','Sstella De Ora Daylilly.jpg',534,400),
      new Array('Stella - Ruby','Stella - Ruby.jpg',448,336),
      new Array('Viberinum','Viberinum.jpg',300,400),
      new Array('Vibernum - Leatherleaf','Vibernum - Leatherleaf.jpg',534,400),
      new Array('Weigela - Minuet','Weigela - Minuet.jpg',380,285),
      new Array('Weigela - Monet','Weigela - Monet.jpg',430,358),
      new Array('Zebragrass','Zebragrass.jpg',250,250)
	)
  )
)

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]);
}
