
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'gallery.htm';
scriptName = 'gallery.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('Residential','images/gallery/small/','images/gallery/medium/','images/gallery/big/',
    new Array(
      new Array('Giallo Santa Cecilia - Granite','Garrett Kit 2.jpg',534,400),
      new Array('Blue Pearl - Granite','Greenblat kit 3.jpg',534,400),
      new Array('White Carrara - Marble','kitchen5_1.jpg',600,400),
      new Array('Olive Green - Silestone','Parets Kit 1.jpg',480,360),
      new Array('Olive Green - Silestone','Parets Kit 4.jpg',300,400),
//      new Array('Photo 6','DSC00156.jpg',530,270),
//      new Array('Photo 7','Image-05.jpg',530,270),
//      new Array('Photo 8','Image-09.jpg',530,270),
//      new Array('Photo 9','kitchen1.jpg',530,270),
      new Array('Giallo Santa Cecilia - Granite','kitchen16.jpg',307,230),
//      new Array('Photo 11','kitchen2.jpg',530,270),
//      new Array('Photo 12','kitchen3.jpg',530,270),
//      new Array('Photo 13','kitchen5.jpg',530,270),
      new Array('Kilimanjaro  - Granite','Showroom-Kitchen-A.jpg',530,270),
      new Array('Burnt Amber - Corian with Integral Sink','3.jpg',585,400),
      new Array('Evergreen with Bone border - Corian','33.jpg',585,400),
//      new Array('Photo 17','57b.jpg',585,400),
//      new Array('Photo 18','57f.jpg',585,400),
      new Array('Sahara - Corian','63d.jpg',585,400),

      new Array('Noce - Travertine','Garrett bath 1.jpg',534,400),
      new Array('Calacutta Gold - Marble','VANITY.jpg',534,400),
      new Array('Mozambique White - Granite','vanity2.jpg',534,400),
//      new Array('Photo 4','bathroom2.jpg',530,270),
      new Array('Saint Laurent - Marble Tub Surround','bathroom6.jpg',307,230),
      new Array('Bianco Carrara - Marble','bathroom7.jpg',301,227),
//      new Array('Photo 7','4.jpg',585,400),
//      new Array('Photo 8','57d.jpg',585,400),

//      new Array('Photo 1','applications-3.jpg',530,270),
//      new Array('Photo 2','DCP_0389.jpg',530,270),
      new Array('Verde Mare - Marble','DSC00153.jpg',530,270),
      new Array('Copper Brown - Marble','Image-11.jpg',530,270),
//      new Array('Photo 5','Image-12.jpg',530,270),
      new Array('Absolute Black - Granite with laminated Eased edge','table.jpg',530,270),

      new Array('Giallo Santa Cecilia - Granite','Photo-20.jpg',500,332),
      new Array('New Venetian Gold - Granite','Photo-21.jpg',500,332),
      new Array('Kashmir Gold - Granite','Photo-22.jpg',500,320),
      new Array('Jonquil - Granite','Photo-23.jpg',500,332),
      new Array('Giallo Santa Cecilia  - Granite','Photo-24.jpg',480,360),

      new Array('Granite - Delicatus','Granite - Delicatus.jpg',534,400),
      new Array('Granite - Lady Dream','Granite - Lady Dream.jpg',300,400),
      new Array('Zodiaq - Copper Sunset','Zodiaq - Copper Sunset.jpg',393,400)

    )
  ),
  
  new Array('Miscellaneous','images/gallery/small/','images/gallery/medium/','images/gallery/big/',
    new Array(
      new Array('Photo 1','ga home expo 16.jpg',534,400),
      new Array('Photo 2','SHOWROOM2.jpg',534,400),
      new Array('Photo 3','work 039.jpg',534,400),
//      new Array('Photo 4','work 050.jpg',534,400),
//      new Array('Photo 5','work 057.jpg',534,400),
//      new Array('Photo 6','work 064.jpg',534,400),
      new Array('Photo 4','40.jpg',585,400),
      new Array('Photo 5','42.jpg',585,400),
      new Array('Photo 6','43.jpg',585,400),
      new Array('Photo 7','44.jpg',585,400),
      new Array('Photo 8','45.jpg',585,400),
      new Array('Photo 9','49.jpg',585,400),
      new Array('Photo 10','50.jpg',585,400),
      new Array('Photo 11','72.jpg',585,400),
      new Array('Photo 12','73.jpg',585,400),
      new Array('Photo 13','96.jpg',585,400)
    )
  ),

  new Array('Facility','images/gallery/small/','images/gallery/medium/','images/gallery/big/',
    new Array(
//      new Array('Photo 1','FRONT BLDING.jpg',534,400),
      new Array('Photo 1','work 040.jpg',534,400),
      new Array('Photo 2','work 041.jpg',534,400),
      new Array('Photo 3','work 043.jpg',534,400),
      new Array('Photo 4','work 044.jpg',534,400),
      new Array('Photo 5','work 045.jpg',534,400),
      new Array('Photo 6','work 046.jpg',534,400),
      new Array('Photo 7','17a.jpg',585,400),
      new Array('Photo 8','17c.jpg',585,400),
      new Array('Photo 9','34alt.jpg',585,400),
      new Array('Photo 10','68a.jpg',585,400),
      new Array('Photo 11','68b.jpg',585,400),
      new Array('Photo 12','84.jpg',585,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]);
}
