
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'turfs.htm';
scriptName = 'turf.js';
countX = 3;
countY = 5;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Sod Photos','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Bermuda Close Up','Bermuda Close Up.jpg',400,400),
      new Array('Bermuda Cut','Bermuda Cut.jpg',398,400),
      new Array('Bermuda Field','Bermuda Field.jpg',392,400),
      new Array('Bermuda Harvester','Bermuda Harvester.jpg',400,400),
      new Array('Bermuda Installation 2','Bermuda Installation 2.jpg',400,400),
      new Array('Bermuda Installation','Bermuda Installation.jpg',400,400),
      new Array('Bermuda Pallet','Bermuda Pallet.jpg',400,400),
      new Array('Bermuda Tractor','Bermuda Tractor.jpg',400,400),
      new Array('Caledonia Green Diamond Zoysia','Caledonia Green Diamond Zoysia.jpg',534,400),
      new Array('Cavalier Lawn','Cavalier Lawn.jpg',534,400),
      new Array('Celebration Lawn','Celebration Lawn.jpg',460,304),
      new Array('Centipede Lawn','Centipede Lawn_1.jpg',200,150),
      new Array('College Campus Fescue','College Campus Fescue.jpg',534,400),
      new Array('Diamond Fairway','Diamond Fairway.jpg',350,263),
      new Array('Driver Loading','Driver Loading.jpg',400,400),
      new Array('Empire Zoysia Lawn','Empire Zoysia Lawn.jpg',534,400),
      new Array('Empire Zoysia','Empire Zoysia_1.jpg',534,400),
      new Array('Fescue  Irrigation','Fescue  Irrigation.jpg',400,400),
      new Array('Fescue Close','Fescue Close_1.jpg',400,400),
      new Array('Fescue Field 3','Fescue Field 3.jpg',641,400),
      new Array('Fescue Field','Fescue Field.jpg',393,400),
      new Array('Fescue Harvester 2','Fescue Harvester 2.jpg',400,400),
      new Array('Fescue Harvester','Fescue Harvester.jpg',400,400),
      new Array('Fescue Harvesting','Fescue Harvesting.jpg',400,400),
      new Array('Fescue Pallets','Fescue Pallets.jpg',395,400),
      new Array('Gary Player National  HQ Palisades','Gary Player National  HQ Palisades.jpg',534,400),
      new Array('Irrigation Pivot','Irrigation Pivot.jpg',400,400),
      new Array('Irrigation','Irrigation.jpg',400,400),
      new Array('Loader','Loader.jpg',400,400),
      new Array('Mowing','Mowing.jpg',400,400),
      new Array('Palisades Keowee Springs','Palisades Keowee Springs.jpg',534,400),
      new Array('Palisades Lawn 2','Palisades Lawn 2.jpg',534,400),
      new Array('Palisades Lawn','Palisades Lawn.jpg',534,400),
      new Array('Plowing','Plowing.jpg',400,400),
      new Array('Pond','Pond.jpg',400,400),
      new Array('St Augustine Lawn','St Augustine Lawn.jpg',533,400),
      new Array('Tifway 419 Stadium 2','Tifway 419 Stadium 2.jpg',534,400),
      new Array('Tifway 419 Stadium 3','Tifway 419 Stadium 3.jpg',603,400),
      new Array('Tifway 419 Stadium C','Tifway 419 Stadium C.jpg',601,400),
      new Array('Tifway 419 Stadium','Tifway 419 Stadium.jpg',534,400),
      new Array('Unloading','Unloading.jpg',399,400),
      new Array('Zeon Lawn','Zeon Lawn.jpg',400,300)
    )
  )
)


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]);
}

