
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('Arbel','images/colors/Arbel/fw_th/','images/colors/Arbel/fw/','',
    new Array(
    new Array('Arbel-battery-park-sand.jpg','Battery Park Blend'),
	new Array('Arbel-belgian-stone-sand.jpg','Belgian Stone Blend'),
    new Array('Arbel-mega-bat-park-sand.jpg','Mega Bat Park Sand'),
    new Array('Arbel-mega-belg-stone-sand.jpg','Mega Belg Stone Sand'),
    new Array('Arbel-mega-river-st-sand.jpg','Mega River St Sand'),
    new Array('Arbel-mega-smky-mtn-sand.jpg','Mega Smky Mtn Sand'),
    new Array('Arbel-river-st-sand.jpg','River Street Blend'),
    new Array('Arbel-smoky-mnt-sand.jpg','Smoky Mountain Blend')
    )
  ),

  new Array('Bergerac','images/colors/Bergerac/fw_th/','images/colors/Bergerac/fw/','',
    new Array(
    new Array('Ardennes_Gray.jpg','Ardennes Gray'),
    new Array('Fossil_Beige.jpg','Fossil Beige'),
    new Array('Potomac.jpg','Potomac'),
    new Array('Terracotta.jpg','Terra Cotta')
    )
  ),

  new Array('Bergerac Circle','images/colors/Bergerac_Circle/fw_th/','images/colors/Bergerac_Circle/fw/','',
    new Array(
    new Array('Ardennes_Gray.jpg','Ardennes Gray'),
    new Array('Fossil_Beige.jpg','Fossil Beige'),
    new Array('Potomac_Blend.jpg','Potomac Blend'),
    new Array('Terra_Cotta.jpg','Terra Cotta')
    )
  ),

  new Array('Cambrige Cobble Circle','images/colors/Cambrige_Cobble_Circle/fw_th/','images/colors/Cambrige_Cobble_Circle/fw/','',
    new Array(
    new Array('Cobble_Blend.jpg','Cobble Blend'),
    new Array('Guilford_Blend.jpg','Guilford Blend'),
    new Array('Low_Country_Blend.jpg','Low Country Blend'),
    new Array('Westerwood_Blend.jpg','Westerwood Blend')
    )
  ),
    
  new Array('Celtik Wall','images/colors/Celtik_Wall/fw_th/','images/colors/Celtik_Wall/fw/','',
    new Array(
    new Array('Edingburgh_Red.jpg','Edingburgh Red'),
    new Array('Highland_Brown.jpg','Highland Brown'),
    new Array('Oxford_Charcoal.jpg','Oxford Charcoal'),
    new Array('Sheffield_Beige_Black.jpg','Sheffield Beige Black')
    )
  ),
  
  new Array('Century Wall','images/colors/Century_Wall/fw_th/','images/colors/Century_Wall/fw/','',
    new Array(
    new Array('Highland_Brown.jpg','Highland Brown'),
    new Array('Oxford_Charcoal.jpg','Oxford Charcoal'),
    new Array('Sheffield_Beige_Black.jpg','Sheffield Beige Black')
    )
  ),

  new Array('Country Manor','images/colors/Country_Manor/fw_th/','images/colors/Country_Manor/fw/','',
    new Array(
    new Array('Blueridge_Blend.jpg','Blueridge Blend'),
    new Array('Country_Blend.jpg','Country Blend'),
    new Array('Piedmont_Blend.jpg','Piedmont Blend')
    )
  ),

  new Array('Dublin','images/colors/Dublin/fw_th/','images/colors/Dublin/fw/','',
    new Array(
    new Array('Ardennes_Gray.jpg','Ardennes Gray'),
//    new Array('CobbleBlend.jpg','Cobble Blend'),
    new Array('Fossil_Beige.jpg','Fossil Beige'),
    new Array('Potomac.jpg','Potomac'),
    new Array('Terracotta.jpg','Terra Cotta')
    )
  ),

  new Array('Dublin Cobble Circle','images/colors/Dublin_Cobble_Circle/fw_th/','images/colors/Dublin_Cobble_Circle/fw/','',
    new Array(
    new Array('Ardennes_Gray.jpg','Ardennes Gray'),
    new Array('Fossil_Beige.jpg','Fossil Beige'),
    new Array('Potomac_Blend.jpg','Potomac Blend'),
    new Array('Terra_Cotta.jpg','Terra Cotta')
    )
  ),

  new Array('Mega Bergerac','images/colors/Mega_Bergerac/fw_th/','images/colors/Mega_Bergerac/fw/','',
    new Array(
    new Array('Ardennes_Gray.jpg','Ardennes Gray'),
    new Array('Fossil_Beige.jpg','Fossil Beige'),
    new Array('Potomac.jpg','Potomac'),
    new Array('Terracotta.jpg','Terra Cotta')
    )
  ),

  new Array('Mega Bergerac Circle','images/colors/Mega_Bergerac_Circle/fw_th/','images/colors/Mega_Bergerac_Circle/fw/','',
    new Array(
    new Array('Ardennes_Gray.jpg','Ardennes Gray'),
    new Array('Fossil_Beige.jpg','Fossil Beige'),
    new Array('Potomac_Blend.jpg','Potomac Blend'),
    new Array('Terra_Cotta.jpg','Terra Cotta')
    )
  ),

  new Array('Mega Stone','images/colors/Mega_Stone/fw_th/','images/colors/Mega_Stone/fw/','',
    new Array(
    new Array('Ardennes_Gray.jpg','Ardennes Gray'),
    new Array('Fossil_Beige.jpg','Fossil Beige'),
    new Array('Potomac.jpg','Potomac'),
    new Array('Terracotta.jpg','Terracotta')
    )
  ),

  new Array('Old World','images/colors/OW/fw_th/','images/colors/OW/fw/','',
    new Array(
    new Array('OW-battery-park-sand_ready.jpg','Battery Park Blend'),
    new Array('OW-belgian-stone-sand_ready.jpg','Belgian Stone Blend'),
    new Array('OW-river-st-sand_ready.jpg','River Street Blend'),
    new Array('OW-smky-mtn-sand_ready.jpg','Smoky Mountain Blend')
    )
  ),

  new Array('Urbana','images/colors/Urbana/fw_th/','images/colors/Urbana/fw/','',
    new Array(
    new Array('Urbana-batt-park-sand_ready.jpg','Battery Park Blend'),
    new Array('Urbana-belg-stone-sand_ready.jpg','Belgian Stone Blend'),
    new Array('Urbana-river-st-sand_ready.jpg','River Street Blend'),
    new Array('Urbana-smky-mtn-sand_ready.jpg','Smoky Mountain Blend')
    )
  ),

  new Array('Cambridge','images/colors/Cambridge/fw_th/','images/colors/Cambridge/fw/','',
    new Array(
    new Array('CobbleBlend.jpg','Cobble Blend'),
    new Array('GuilfordBlend.jpg','Guilford Blend'),
    new Array('LowCountry.jpg','Low Country'),
    new Array('Westerwood.jpg','Westerwood')
    )
  ),

  new Array('Holland','images/colors/Holland/fw_th/','images/colors/Holland/fw/','',
    new Array(
    new Array('CapitalBlend.jpg','Capital Blend'),
    new Array('SlateGrey.jpg','Slate Grey'),
    new Array('Unknown.jpg','Unknown'),
    new Array('Westerwood.jpg','Westerwood')
    )
  )
)

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][0]);
  showMessage('imagemediumname',arImages[section][4][number][1]);
}

function showImageBig(number) {
  showImagePopup(scriptName,section,number,arImages[section][4][number][2],
   arImages[section][4][number][3]);
}
