
smallSizes = new Array(77,77);
mediumSizes = new Array(156,155);
pageName = 'colors.htm';
scriptName = 'colors.js';
countX = 2;
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('Bergerac Pavers','images/colors/Bergerac Paver/fw_th/','images/colors/Bergerac Paver/fw/','',
    new Array(
      new Array('Ardennes Grey','2_18_ARDENNES_GREY.gif'),
      new Array('Brittany Beige','2_20-BRITTANY_BEIGE.gif'),
      new Array('Esterel Red','2_21_ESTEREL_RED.gif')
    )
  ),
  new Array('Celtik Wall','images/colors/Celtik Wall/fw_th/','images/colors/Celtik Wall/fw/','',
    new Array(
      new Array('Edinburg Red','1_04_EDINBURG_RED.gif'),
      new Array('Sheffield Beige Black','1_06_SHEFFIELD_Beige_Black.gif'),
      new Array('St Malo Beige','1_07_ST_MALO_BEIGE.gif')
    )
  ),
  new Array('Dublin Cobble Pavers','images/colors/Dublin Cobble Paver/fw_th/','images/colors/Dublin Cobble Paver/fw/','',
    new Array(
      new Array('Brownstone Red','2_02_BROWNSTONE_RED.gif'),
      new Array('Fossil Beige','2_03_FOSSIL_BEIGE.gif'),
      new Array('Silex Grey','2_06_SILEX_GREY.gif'),
      new Array('Terra Cotta','2_08_TERRA_COTTA.gif')
    )
  ),
  new Array('Standard Pavers','images/colors/Standard Paver/fw_th/','images/colors/Standard Paver/fw/','',
    new Array(
      new Array('Walnut Blend','3_35_WALNUT_BLEND.gif'),
      new Array('Sandstone','3_45_SANDSTONE.gif'),
      new Array('Capitol Blend','3_69_capitol_blend.gif'),
      new Array('Cobble Blend','3_70_cobble_blend.gif'),
      new Array('Westerwood Blend','3_71_WESTERWOOD_blend.gif'),
      new Array('Slate Grey','3_72_slate_grey.gif'),
      new Array('Brick Red','3_75_brick_red.gif'),
      new Array('Gullford Blend','3_76_gullford_blend.gif')
    )
  )
)

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]);
}
