
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'prestige.htm';
scriptName = 'prestige.js';
countX = 3;
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('Fieldstone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Bluegrass','Bluegrass_2.jpg',654,400),
      new Array('Burned Aspen','Burned Aspen.jpg',654,400),
      new Array('Canyon Creek','Canyon Creek_1.jpg',700,306),
      new Array('Grey','Grey.jpg',700,390),
      new Array('Native Blend','Native Blend_1.jpg',700,390),
      new Array('Tan','Tan.jpg',700,366)
    )
  ),

  new Array('Limestone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Bluegrass','Bluegrass_3.jpg',700,346),
      new Array('Buckeye','Buckeye.jpg',700,390),
      new Array('Canyon Creek','Canyon Creek_4.jpg',700,390),
      new Array('County Line','County Line_1.jpg',700,390),
      new Array('Crooked Valley','Crooked Valley.jpg',700,390),
      new Array('Grey','Grey_1.jpg',700,384),
      new Array('Holmes County','Holmes County_1.jpg',700,390),
      new Array('Native Blend','Native Blend.jpg',700,390),
      new Array('Ohio White Vein','Ohio White Vein.jpg',700,390),
      new Array('Saltcreek','Saltcreek.jpg',700,390),
      new Array('Sandusky Shore','Sandusky Shore.jpg',700,331),
      new Array('Smokey','Smokey.jpg',700,390)
    )
  ),

  new Array('Ledgestone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Bluegrass','Bluegrass_1.jpg',700,390),
      new Array('Canyon Creek','Canyon Creek_2.jpg',700,390),
      new Array('County Line','County Line.jpg',700,390),
      new Array('Geden Valley','Geden Valley.jpg',700,390),
      new Array('Holmes County','Holmes County.jpg',700,390),
      new Array('Santa Fe','Santa Fe.jpg',700,390),
      new Array('Tan','Tan_3.jpg',700,390)
    )
  ),

  new Array('Nativestone','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Bluegrass','Bluegrass.jpg',700,390),
      new Array('Canyon Creek','Canyon Creek_3.jpg',700,390),
      new Array('County Line','County Line_2.jpg',700,390),
      new Array('Sandusky Shore','Sandusky Shore_1.jpg',700,390),
      new Array('Tan','Tan_2.jpg',700,390),
      new Array('White Vein','White Vein.jpg',700,390)
    )
  ),

  new Array('Weatherledge','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Blue Grass','Blue Grass.jpg',640,400),
      new Array('Canyon Creek','Canyon Creek.jpg',640,400),
      new Array('County Line','County Line_3.jpg',700,381),
      new Array('Saltcreek','Saltcreek_1.jpg',640,400),
      new Array('Santa Fe','Santa Fe_1.jpg',640,400),
      new Array('Tan','Tan_1.jpg',654,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]);
}

