
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'photos.html';
scriptName = 'photos.js';
countX = 4;
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('Gallery','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','Aged_Cap_00699_0629.jpg',600,400),
      new Array('Photo 2','Allegro_P20_00629_9781.jpg',267,400),
      new Array('Photo 3','Antika Allegro.jpg',267,400),
      new Array('Photo 4','Antika.jpg',451,400),
      new Array('Photo 5','Antique.jpg',600,400),
      new Array('Photo 6','Athena.jpg',600,400),
      new Array('Photo 7','Athena_00631_2127.jpg',600,400),
      new Array('Photo 8','Athena_00699_Night_b.jpg',600,400),
      new Array('Photo 9','Athena_QuarryStone_P8_00699_0599.jpg',600,400),
      new Array('Photo 10','Belgik_Escala_00738_4073.jpg',663,400),
      new Array('Photo 11','Blu_80_00686_4400.jpg',600,400),
      new Array('Photo 12','Bullnose-Cap_A00191_1355.jpg',600,400),
      new Array('Photo 13','Elena_A00147_0531.jpg',601,400),
      new Array('Photo 14','Elena_MiniCretaPlus_A00174_0974-3.jpg',267,400),
      new Array('Photo 15','Elena_P27_A00171_0934.jpg',600,400),
      new Array('Photo 16','Escala_P53_00738_4068.jpg',600,400),
      new Array('Photo 17','Flagstone_P29_MG_0761.jpg',600,400),
      new Array('Photo 18','GrandVillagio.jpg',517,400),
      new Array('Photo 19','Hera_P30_A00181_1220.jpg',600,400),
      new Array('Photo 20','Inca_00708_4501.jpg',586,400),
      new Array('Photo 21','Inca_00708_4519.jpg',600,400),
      new Array('Photo 22','Inca_00708_4522.jpg',600,400),
      new Array('Photo 23','Inca_00708_4530.jpg',600,400),
      new Array('Photo 24','Inca_503.jpg',477,400),
      new Array('Photo 25','Inca_A00177_1173.jpg',600,400),
      new Array('Photo 26','Inca_P13_A00110_7749.jpg',267,400),
      new Array('Photo 27','Inca_Pillar_Neptune_A00177_1207.jpg',267,400),
      new Array('Photo 28','Manchester.jpg',600,400),
      new Array('Photo 29','Maya_P45_00728_3534.jpg',293,400),
      new Array('Photo 30','MiniCreta_A00234_2939.jpg',600,400),
      new Array('Photo 31','MiniCreta_A00234_3091.jpg',600,400),
      new Array('Photo 32','MiniCreta_AgedCap_P14_A00088_6761.jpg',600,400),
      new Array('Photo 33','MiniCreta_P56_57_A00234_3023.jpg',600,400),
      new Array('Photo 34','MiniCreta_P57_A00234_3022.jpg',600,400),
      new Array('Photo 35','Mini_Blok_l00653_2160.jpg',600,400),
      new Array('Photo 36','Mista_00688_0897.jpg',600,400),
      new Array('Photo 37','Mista_Niagara_P1-_00723_3422.jpg',601,400),
      new Array('Photo 38','Mista_P00688_0853.jpg',252,400),
      new Array('Photo 39','Mista_P33_00688_0869.jpg',267,400),
      new Array('Photo 40','Monaco_St_Lazare1.jpg',528,390),
      new Array('Photo 41','Monumental-Blpck_00637_0038.jpg',600,400),
      new Array('Photo 42','MuroCap_P65_A00250_2452.jpg',600,400),
      new Array('Photo 43','MuroNaturale_P55_A00254_2483.jpg',600,400),
      new Array('Photo 44','Neptune_P66_A00068_5072.jpg',267,400),
      new Array('Photo 45','Niagara_00670_4695.jpg',600,400),
      new Array('Photo 46','Niagara_P67_00723_3442.jpg',267,400),
      new Array('Photo 47','Olympia_00722_1169.jpg',600,400),
      new Array('Photo 48','Olympia_A00234_2934.jpg',267,400),
      new Array('Photo 49','Olympia_A00234_2936.jpg',600,400),
      new Array('Photo 50','Olympia_A00234_2966.jpg',268,400),
      new Array('Photo 51','Olympia_A00234_2994.jpg',528,400),
      new Array('Photo 52','Olympia_A00234_3001.jpg',267,400),
      new Array('Photo 53','Olympia_A00234_3004.jpg',601,400),
      new Array('Photo 54','Olympia_Allegro_P11_00722_1571.jpg',267,400),
      new Array('Photo 55','Olympia_MiniCreta_P10_A00234_2951.jpg',600,400),
      new Array('Photo 56','Olympia_P7_00722_1191.jpg',600,400),
      new Array('Photo 57','Parisien_P37_00658_0919.jpg',287,400),
      new Array('Photo 58','Permea_36_A00151_2115.jpg',699,315),
      new Array('Photo 59','Permea_P36_A00151_2129.jpg',600,400),
      new Array('Photo 60','Permea_P7_A00151_2118.jpg',601,400),
      new Array('Photo 61','Portofino_7495.jpg',600,400),
      new Array('Photo 62','Portofino_P69__7489.jpg',267,400),
      new Array('Photo 63','QuarryStone_00634_9846.jpg',600,400),
      new Array('Photo 64','QuarryStone_A00233_3264.jpg',601,400),
      new Array('Photo 65','QuarryStone_P59_A00129_2430.jpg',600,400),
      new Array('Photo 66','Rotondo_P31_00722_1389.jpg',267,400),
      new Array('Photo 67','Royale_P46_A00129_2347.jpg',600,400),
      new Array('Photo 68','Royale_P46_A00129_2429.jpg',600,400),
      new Array('Photo 69','Royale_Vistorien60_P13_A00129_2401.jpg',267,400),
      new Array('Photo 70','Santorini_A00192_1367.jpg',267,400),
      new Array('Photo 71','Santorini_A00192_1431.jpg',600,400),
      new Array('Photo 72','Stonedge_Pillar_Cap_P72_00699_0565.jpg',267,400),
      new Array('Photo 73','Suprema_P61_A00260_2636.jpg',600,400),
      new Array('Photo 74','Suprema_P61_A00260_2660.jpg',600,400),
      new Array('Photo 75','Trias_00628_9738.jpg',600,400),
      new Array('Photo 76','Villagio_P40_00396_7574.jpg',600,400),
      new Array('Photo 77','Villagio_P40_00708_4438.jpg',267,400),
      new Array('Photo 78','Walkway-Allegro.jpg',267,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]);
}
