
smallSizes = new Array(80,80);
mediumSizes = new Array();
pageName = 'patterns.htm';
scriptName = 'patterns.js';
countX = 2;
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('Cambridge Cobble','images/patterns/fw_th/Bergerac/','','images/patterns/fw/Bergerac/',
    new Array(
      new Array('<b>I-Pattern</b><br> 75%Rec - 25%Square','bergerac1.gif',133,133),
      new Array('<b>Cambridge Cobble</b><br> 6x9 herringbone','bergerac2.gif',133,133),
      new Array('<b>Cambridge Cobble</b><br> 6x6 stack bond','bergerac3.gif',133,133),
      new Array('<b>Cambridge Cobble</b><br> 6x9 stack bond','bergerac4.gif',133,133)
    )
  ),
  new Array('Dublin Cobble Modular','images/patterns/fw_th/Dublin Cobble/','','images/patterns/fw/Dublin Cobble/',
    new Array(
      new Array('<b>0% Large Square</b>','dublin1.gif',133,133),
      new Array('<b>10-15%<br> Large Square</b>','dublin2.gif',133,133),
      new Array('<b>20-15%<br> Large Square</b>','dublin3.gif',133,133),
      new Array('<b>0% Large Square<br> coarse ashlar</b>','dublin4.gif',133,133),
      new Array('<b>Ashlar<br> Running Bond</b>','dublin5.gif',133,133),
      new Array('<b>50% Large Square</b>','dublin6.gif',133,133)
    )
  ),
  new Array('Holland Pavers','images/patterns/fw_th/Holland/','','images/patterns/fw/Holland/',
    new Array(
      new Array('<b>Basket Weave<br> 100% Standard</b>','holland1.gif',133,133),
      new Array('<b>Herringbone 1<br> 100% Standard</b','holland2.gif',133,133),
      new Array('<b>Herringbone 2<br> 100% Standard</b>','holland3.gif',133,133),
      new Array('<b>Running Bond<br> 100% Standard</b>','holland4.gif',133,133)
    )
  )
)

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]);
}
