
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'sawn_chop.html';
scriptName = 'sawn_chop.js';
countX = 4;
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('Sawn Chop','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Austin Brown 4"6"8','Austin Brown 468.jpg',534,400), 
      new Array('Austin Brown 4"6"8','Austin Brown 468 (2).jpg',534,400),
      new Array('Autumn Blend 4"6"8','Autumn Blend 468 (2).jpg',534,400),
      new Array('Autumn Blend 4"6"8','Autumn Blend 468.jpg',534,400),
      new Array('Blue Marble 4"6"8','Blue Marble 468 (2).jpg',700,394),
      new Array('Blue Marble 4"6"8','Blue Marble 468.jpg',700,394),
      new Array('Cave Rock 4"6"8','Cave Rock 468 (2).jpg',700,394),
      new Array('Cave Rock 4"6"8','Cave Rock 468.jpg',534,400),
      new Array('Cobra‘s Blend 4"6"8','Cobras Blend 468 (2).jpg',534,400),
      new Array('Cobra‘s Blend 4"6"8','Cobras Blend 468.jpg',534,400),
      new Array('Cobra‘s Cream 4"12','Cobras Cream 412 (2).jpg',534,400),
      new Array('Cobra‘s Cream 4"12','Cobras Cream 412.jpg',700,394),
      new Array('Cream 4"6"8','Cream 468 (2).jpg',534,400),
      new Array('Cream 4"6"8','Cream 468.jpg',538,401),
      new Array('Cream with Gray Lueders 4"6"8','Cream with Gray Lueders 468 (2).jpg',700,394),
      new Array('Cream with Gray Lueders 4"6"8','Cream with Gray Lueders 468.jpg',700,309),
new Array('Cream with Vermeer Face 4"6"8','Cream with Vermeer Face 468.jpg',534,400),
      new Array('Cream with Vermeer Face 4"6"8','Cream with Vermeer Face 468 (2).jpg',495,400),
      new Array('Grey Blue Courses','Grey Blue Courses (2).jpg',534,400),
      new Array('Grey Blue Courses','Grey Blue Courses.jpg',534,400),
      new Array('Grey Lueder 4"6"8','Grey Lueder 468 (3).jpg',534,400),
      new Array('Grey Lueder 4"6"8','Grey Lueder 468.jpg',534,400),
      new Array('Mojave Desert 4"6"8','Mojave Desert 468 (2).jpg',700,394),
      new Array('Mojave Desert 4"6"8','Mojave Desert 468.jpg',534,400),
      new Array('Sienna 4"6"8','Sienna 468 (2).jpg',534,400),
      new Array('Sienna 4"6"8','Sienna 468.jpg',534,400),
      new Array('Sonoma Tan 4"6"8','Sonoma Tan 468 (2).jpg',700,394),
      new Array('Sonoma Tan 4"6"8','Sonoma Tan 468.jpg',588,400),
      new Array('Texas Mix 4"6"8','Texas Mix 468 (2).jpg',534,400),
      new Array('Texas Mix 4"6"8','Texas Mix 468.jpg',534,400),
      new Array('Vanilla 4"6"8','Vanilla 468.jpg',700,394),
      new Array('Vanilla Cream 4"6"8','Vanilla Cream 468.jpg',700,321),
      new Array('White 4"12','White 412.jpg',534,400),
      new Array('White 4"6"8','White 468.jpg',534,400),
      new Array('El Dorado Legestone','EL DORADO LEGESTONE.jpg',290,400),
      new Array('Montana Mix','MONTANA MIX.jpg',298,400),
      new Array('Rough Back','ROUGH BACK.jpg',259,400),

      new Array('Antique Lueders','Antique Lueders.jpg',534,400),
      new Array('Antique Lueders 2','Antique Lueders 2.jpg',534,400),
      new Array('Caramel Lueders','Caramel Lueders.jpg',645,400),
      new Array('Rough Back lueders 2','Rough Back lueders 2.jpg',533,400),
      new Array('White Smooth Face','White smooth Face.jpg',574,400),
      new Array('White Smooth Face (2)','White Smooth face (2).jpg',623,400),
      new Array('Rough Back Lueders Courses','Rough Back Lueders Courses 2.jpg',800,600),
      new Array('Rough Back Lueders Courses 2','Rough Back Lueders Courses.jpg',563,750),
      new Array('Antique Brown & Gold','Antique Brown & Gold 2.jpg',534,400),
      new Array('Antique Brown & Gold 2','Antique Brown & Gold.jpg',534,400),
      new Array('Cave Select','Cave Select 4-10.jpg',534,400),
      new Array('Cave Select 2','Cave Select 4-8 (2).jpg',676,400),
      new Array('Cave Select 3','Cave Select 4-8.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]);
}
