
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'showroom_photos.htm';
scriptName = 'showroom_photos.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('Showroom Image Gallery','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('Photo 1','Showroom_001.jpg',700,347), 
		new Array('Photo 2','Showroom_002.jpg',267,400), 
		new Array('Photo 3','Showroom_003.jpg',332,400), 
		new Array('Photo 4','Showroom_004.jpg',350,400), 
		new Array('Photo 5','Showroom_005.jpg',700,392), 
		new Array('Photo 6','Showroom_006.jpg',591,400), 
		new Array('Photo 7','Showroom_007.jpg',291,400), 
		new Array('Photo 8','Showroom_008.jpg',605,400), 
		new Array('Photo 9','Showroom_009.jpg',664,400), 
		new Array('Photo 10','Showroom_010.jpg',355,400), 
		new Array('Photo 11','Showroom_011.jpg',610,400), 
		new Array('Photo 12','Showroom_012.jpg',597,400), 
		new Array('Photo 13','Showroom_013.jpg',617,400), 
		new Array('Photo 14','Showroom_014.jpg',625,400), 
		new Array('Photo 15','Showroom_015.jpg',621,400), 
		new Array('Photo 16','Showroom_016.jpg',657,400), 
		new Array('Photo 17','Showroom_017.jpg',619,400), 
		new Array('Photo 18','Showroom_018.jpg',645,400), 
		new Array('Photo 19','Showroom_019.jpg',597,400), 
		new Array('Photo 20','Showroom_020.jpg',260,400), 
		new Array('Photo 21','Showroom_021.jpg',267,400), 
		new Array('Photo 22','Showroom_022.jpg',220,400), 
		new Array('Photo 23','Showroom_023.jpg',278,400), 
		new Array('Photo 24','Showroom_024.jpg',601,400), 
		new Array('Photo 25','Showroom_025.jpg',191,400), 
		new Array('Photo 26','Showroom_026.jpg',273,400), 
		new Array('Photo 27','Showroom_027.jpg',267,400), 
		new Array('Photo 28','Showroom_028.jpg',597,400), 
		new Array('Photo 29','Showroom_029.jpg',665,400), 
		new Array('Photo 30','Showroom_030.jpg',487,400), 
		new Array('Photo 31','Showroom_031.jpg',631,400), 
		new Array('Photo 32','Showroom_032.jpg',584,400), 
		new Array('Photo 33','Showroom_033.jpg',322,400), 
		new Array('Photo 34','Showroom_034.jpg',359,400), 
		new Array('Photo 35','Showroom_035.jpg',700,338), 
		new Array('Photo 36','Showroom_036.jpg',597,400), 
		new Array('Photo 37','Showroom_037.jpg',267,400), 
		new Array('Photo 38','Showroom_038.jpg',227,400), 
		new Array('Photo 39','Showroom_039.jpg',267,400), 
		new Array('Photo 40','Showroom_040.jpg',236,400), 
		new Array('Photo 41','Showroom_041.jpg',231,400), 
		new Array('Photo 42','Showroom_042.jpg',426,400), 
		new Array('Photo 43','Showroom_043.jpg',353,400), 
		new Array('Photo 44','Showroom_044.jpg',597,400), 
		new Array('Photo 45','Showroom_045.jpg',650,400), 
		new Array('Photo 46','Showroom_046.jpg',573,400), 
		new Array('Photo 47','Showroom_047.jpg',269,400), 
		new Array('Photo 48','Showroom_048.jpg',254,400), 
		new Array('Photo 49','Showroom_049.jpg',209,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]);
}
