
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'fireplace.htm';
scriptName = 'fireplace.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('Fireplace Mantles','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Arizona Mantles $150 ea','Arizona Mantles $150 ea.jpg',534,400),
      new Array('Ark Cherry Blend Mantles $225 ea','Ark Cherry Blend Mantles $225 ea.jpg',534,400),
      new Array('Lueders Hand Chipped $250','Lueders Hand Chipped $250.jpg',534,400),
      new Array('OK $100','OK $100.jpg',534,400),
      new Array('Penn Mantel','Penn Mantel.jpg',534,400),
      new Array('Photo 1','T house pic 001.jpg',534,400),
      new Array('Photo 2','T house pic 002.jpg',534,400),
      new Array('Photo 3','T house pic 003.jpg',534,400),
      new Array('Photo 4','T house pic 004.jpg',534,400),
      new Array('Photo 5','T house pic 005.jpg',534,400),
      new Array('Photo 6','T house pic 006.jpg',534,400),
      new Array('Photo 7','T house pic 007.jpg',534,400),
      new Array('Photo 8','T house pic 008.jpg',534,400),
      new Array('Photo 9','T house pic 006.jpg',534,400),
      new Array('Photo 10','T house pic 007.jpg',534,400),
      new Array('Aged Pecan Mantle','aged_pecan_mantle.jpg',534,400),
      new Array('Black Walnut Mantle','black_walnut_mantle.jpg',534,400),
      new Array('Bodark Mantle','bodark_mantle.jpg',534,400),
      new Array('Burr Oak Mantle','burr_oak_mantle.jpg',534,400),
      new Array('Cherry Mantle','cherry_mantle.jpg',534,400),
      new Array('Cherry 2 Mantle','cherry_mantle_2.jpg',534,400),
      new Array('Mesquite Mantle','mesquite_mantle.jpg',534,400),
      new Array('Mesquite 2 Mantle','mequite_mantle_2.jpg',534,400),
      new Array('Mesquite 3 Mantle','mesquite_mantle_3.jpg',534,400),
      new Array('Mesquite 4 Mantle','mesquite_mantle_4.jpg',534,400),
      new Array('Native Cedar Mantle','native_cedar_mantle.jpg',534,400),
      new Array('Pecan Mantle','pecan_mantle.jpg',534,400),
      new Array('Pecan 2 Mantle','pecan_mantle_2.jpg',534,400),
      new Array('Oak Mantle','post_oak_mantle.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 showImageBig(number) {
  showImagePopup(scriptName,section,number,arImages[section][4][number][2],
   arImages[section][4][number][3]);
}
