
smallSizes = new Array(77,77);
mediumSizes = new Array(200,200);
pageName = 'belgard_colors.htm';
scriptName = 'belgard_colors.js';
countX = 5;
countY = 3;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Arbel Stone','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Battery Park Blend','Battery Park Blend_1.jpg'),
      new Array('Belgian Stone Blend','Belgian Stone Blend_2.jpg'),
      new Array('River Street Blend','River Street Blend_2.jpg'),
      new Array('Smoky Mountain Blend','Smoky Mountain Blend_3.jpg')
    )
  ),
  new Array('Bergerac','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Ardennes Grey','Ardennes Grey_1.jpg'),
      new Array('Fossil Beige','Fossil Beige_1.jpg'),
      new Array('Potomac Blend','Potomac Blend_2.jpg'),
      new Array('Terra Cotta','Terra Cotta_2.jpg')
    )
  ),
  new Array('Cambridge Cobble','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Cobble Blend','Cobble Blend.jpg'),
      new Array('Guilford Blend','Guilford Blend.jpg'),
      new Array('Low Country Blend','Low Country Blend.jpg'),
      new Array('Westerwood Blend','Westerwood Blend_1.jpg')
    )
  ),
  new Array('Celtik Wall','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Edinburgh Red','Edinburgh Red.jpg'),
      new Array('Highland Brown','Highland Brown.jpg'),
      new Array('Oxford Charcoal','Oxford Charcoal_1.jpg'),
      new Array('Sheffield Beige - Black','Sheffield Beige - Black.jpg')
    )
  ),
  new Array('Century Wall','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Highland Brown','Highland Brown_1.jpg'),
      new Array('Oxford Charcoal','Oxford Charcoal.jpg'),
      new Array('Sheffield Beige - Black','Sheffield Beige - Black_1.jpg')
    )
  ),
  new Array('Country Manor Wall','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Blue Ridge Blend','Blue Ridge Blend.jpg'),
      new Array('Colonial Blend','Colonial Blend.jpg'),
      new Array('Piedmont Blend','Piedmont Blend.jpg')
    )
  ),
  new Array('Dublin Cobble','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Ardennes Grey','Ardennes Grey_2.jpg'),
      new Array('Fossil Beige','Fossil Beige.jpg'),
      new Array('Potomac Blend','Potomac Blend_1.jpg'),
      new Array('Terra Cotta','Terra Cotta.jpg')
    )
  ),
  new Array('Holland Stone','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Capital Blend','Capital Blend.jpg'),
      new Array('Guilford Blend','Guilford Blend_1.jpg'),
      new Array('Slate Grey','Slate Grey.jpg'),
      new Array('Westerwood Blend','Westerwood Blend.jpg')
    )
  ),
  new Array('Mega-Arbel','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Battery Park Blend','Battery Park Blend.jpg'),
      new Array('Belgian Stone Blend','Belgian Stone Blend_1.jpg'),
      new Array('River Street Blend','River Street Blend_3.jpg'),
      new Array('Smoky Mountain Blend','Smoky Mountain Blend_1.jpg')
    )
  ),
  new Array('Mega-Bergerac','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Ardennes Grey','Ardennes Grey.jpg'),
      new Array('Fossil Beige','Fossil Beige_2.jpg'),
      new Array('Potomac Blend','Potomac Blend.jpg'),
      new Array('Terra Cotta','Terra Cotta_1.jpg')
    )
  ),
  new Array('Old World','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Battery Park Blend','Battery Park Blend_3.jpg'),
      new Array('Belgian Stone Blend','Belgian Stone Blend_3.jpg'),
      new Array('River Street Blend','River Street Blend_1.jpg'),
      new Array('Smoky Mountain Blend','Smoky Mountain Blend.jpg')
    )
  ),
  new Array('Urbana Stone','images/colors_new/small/','images/colors_new/medium/','',
    new Array(
      new Array('Battery Park Blend','Battery Park Blend_2.jpg'),
      new Array('Belgian Stone Blend','Belgian Stone Blend.jpg'),
      new Array('River Street Blend','River Street Blend.jpg'),
      new Array('Smoky Mountain Blend','Smoky Mountain Blend_2.jpg')
    )
  )
)

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; 

function showImagePopup(scriptName,section,ind,width,height) {
  width = (width>750)?750:width;
  height = (height>500)?500:height;
  width+=50;
  height+=150;
  width = (width<220)?350:width;
  height = (height<220)?450:height;
  win = window.open('big_image.htm?script='+scriptName+'&section='+section
	+'&ind='+ind,'_blank','width='+width+',height='
	+height+',left=17,top=17,statusbar=no,toolbar=no,scrollbars= never,navbar=no');
  win.focus();
}  
  
var arPreloadImages = new Array();
function preloadphotos() {
  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]);
}


