
smallSizes = new Array(110,66);
mediumSizes = new Array(210,126);
pageName = 'thin_veneer.htm';
scriptName = 'thin_veneer.js';
countX = 15;
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('Higgins Evergreen Veneer','images/colors/small/','','images/colors/big/',
    new Array(
      new Array('Aiden','Aiden Web.jpg',678,400),
      new Array('Astoria','Astoria Web.jpg',678,400),
      new Array('Crestline','Crestline Web.jpg',678,400,'images/Crestline-big.jpg',400,400),
      new Array('Haystack','Haystack Web.jpg',678,400,'images/Haystack-big.jpg',400,400),
      new Array('Macon','Macon Web.jpg',678,400,'images/Macon-big.jpg',400,400),
      new Array('Moraga','Moraga Web.jpg',678,400),
      new Array('Sundance','Sundance Web.jpg',678,400,'images/Sundance-big.jpg',400,400),
      new Array('Windamere','Windamere Web.jpg',678,400,'images/Windemere-big.jpg',400,400),
      new Array('Yellowstone','Yellowstone Web.jpg',678,400,'images/Yellowstone-big.jpg',400,400),
      new Array('Cumberland','cumberland.jpg',678,400),
      new Array('Emberweave','emberweave.jpg',678,400),
      new Array('Glacier Bay','glacier_bay.jpg',678,400),
      new Array('Rocklin','rocklin.jpg',678,400),
      new Array('Seneca','seneca.jpg',678,400),
      new Array('Spruce','spruce.jpg',678,400,'images/Spruce-big.jpg',400,400),
      new Array('Storm Cloud','storm_cloud.jpg',678,400,'images/Storm-Cloud-big.jpg',400,400),
      new Array('Somerset','Somerset.jpg',678,400,'images/Somerset1_big.jpg',400,400),
      new Array('Cabrillo','Cabrillo.jpg',678,400),
      new Array('Catalina','Catalina.jpg',678,400),
      new Array('Westlake','Westlake.jpg',678,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();
}
