
smallSizes = new Array(110,66);
mediumSizes = new Array(210,126);
pageName = 'pavers.htm';
scriptName = 'pavers.js';
countX = 30;
countY = 4;
 
// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('PAVER COLORS','images/pavers/small/','images/pavers/medium/','images/pavers/big/',
    new Array(
      new Array('Antique Paver','Antique Paver.jpg',497,400),
      new Array('Avalon Paver','Avalon Paver.jpg',483,400),
      new Array('Balboa Paver','Balboa Paver.jpg',477,400),
      new Array('Burnt Oak Paver','Burnt Oak Paver.jpg',481,400),
      new Array('Cabrillo Paver','Cabrillo Paver.jpg',480,400),
      new Array('Catalina Paver','Catalina Paver.jpg',478,400),
      new Array('Crestline Paver','Crestline Paver.jpg',472,400),
      new Array('Cumberland Paver','Cumberland Paver.jpg',479,400),
      new Array('Glacier Bay Paver','Glacier Bay Paver.jpg',478,400),
      new Array('Haystack Paver','Haystack Paver.jpg',490,400),
      new Array('Hermosa Paver','Hermosa Paver.jpg',491,400),
      new Array('Landmark Paver','Landmark Paver.jpg',479,400),
      new Array('Macon Paver','Macon Paver.jpg',483,400),
      new Array('Mohave Paver','Mohave Paver.jpg',480,400),
      new Array('Monument Paver','Monument Paver.jpg',485,400),
      new Array('Moraga Paver','Moraga Paver.jpg',481,400),
      new Array('Rocklin Paver','Rocklin Paver.jpg',485,400),
      new Array('Saturn Flash Paver','Saturn Flash Paver.jpg',495,400),
      new Array('Saturn Red Paver','Saturn Red Paver.jpg',496,400),
      new Array('Sedona Paver','Sedona Paver.jpg',481,400),
      new Array('Somerset Paver','Somerset Paver.jpg',482,400),
      new Array('Spruce Paver','Spruce Paver.jpg',487,400),
      new Array('Storm Cloud Paver','Storm Cloud Paver.jpg',478,400),
      new Array('Sundance Paver','Sundance Paver.jpg',484,400),
      new Array('Westlake Paver','Westlake Paver.jpg',485,400),
      new Array('Windemere Paver','Windemere Paver.jpg',485,400),
      new Array('Yellowstone Paver','Yellowstone Paver.jpg',478,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) {
  width = arImages[section][4][number][2];
  height = arImages[section][4][number][3];
  width = (width>750)?750:width;
  height = (height>500)?500:height;
  width+=130;
  height+=180;
  width = (width<350)?350:width;
  height = (height<200)?200:height;
  win = window.open('big_image_print.htm?script='+scriptName+'&section='+section
	+'&ind='+number,'_blank');
  win.focus();
}

function showImageBigSection(number) {
  width = arImages[section][4][number][2];
  height = arImages[section][4][number][3];
  width = (width>750)?750:width;
  height = (height>500)?500:height;
  width+=130;
  height+=180;
  width = (width<350)?350:width;
  height = (height<200)?200:height;
  win = window.open('big_image_print.htm?script='+scriptName+'&section='+arImages[section][4][number][4]+'&ind='+arImages[section][4][number][5],'_blank');
  win.focus();
}
