window.thumbnails = {};
															thumbnails[1699377] = clik.newPhoto({"id":1699377,"src":"montenegro_cover_thumb_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":191});
															thumbnails[1699378] = clik.newPhoto({"id":1699378,"src":"croatia_cover_thumb_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":194});
															thumbnails[5389695] = clik.newPhoto({"id":5389695,"src":"roadlesstravelled_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":159});
															thumbnails[5412189] = clik.newPhoto({"id":5412189,"src":"bradtcroatia_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":207});
															thumbnails[5524163] = clik.newPhoto({"id":5524163,"src":"timelineFR_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":193});
															thumbnails[5528466] = clik.newPhoto({"id":5528466,"src":"torrescover_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":190});
															thumbnails[5663880] = clik.newPhoto({"id":5663880,"src":"ADvdi_068b_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"In Andorra, April 2007 (photo by Ivana Jovic Abraham)","height":107});
															thumbnails[6213691] = clik.newPhoto({"id":6213691,"src":"Cro4_new_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":194});
															thumbnails[6355495] = clik.newPhoto({"id":6355495,"src":"ng_cro_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"National Geographic Traveler Croatia","height":206});
															thumbnails[6926081] = clik.newPhoto({"id":6926081,"src":"ArtsofIslam_TandH_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":149});
															thumbnails[7232058] = clik.newPhoto({"id":7232058,"src":"arPfr_0110-argentina-chalten-glaciares_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[7237224] = clik.newPhoto({"id":7237224,"src":"HRzag_1441.zagreb.croatia.markov.trg2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":86});
															thumbnails[7237478] = clik.newPhoto({"id":7237478,"src":"FRang_032.angouleme.comic.france_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":84});
															thumbnails[7239056] = clik.newPhoto({"id":7239056,"src":"HRvel_0028.croatia.velebit_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[7748934] = clik.newPhoto({"id":7748934,"src":"HRjov_0325a_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":86});
															thumbnails[7750819] = clik.newPhoto({"id":7750819,"src":"tcook_ljubljana_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":205});
															thumbnails[8131802] = clik.newPhoto({"id":8131802,"src":"TOCVG2011_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":168});
															thumbnails[8131836] = clik.newPhoto({"id":8131836,"src":"WorldonaPlate_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":156});
															thumbnails[8673498] = clik.newPhoto({"id":8673498,"src":"HRsen_0257_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":86});
															thumbnails[7232469] = clik.newPhoto({"id":7232469,"src":"HRzad_0483b_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":77});
															thumbnails[7237339] = clik.newPhoto({"id":7237339,"src":"HRzad_0483b_33FA5422-24E8-5EC4-4F7E307F6FB195B0_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":77});
															thumbnails[2296031] = clik.newPhoto({"id":2296031,"src":"GEkaz_001a_thumb.jpg","galleries_id":113676,"server_id":1,"link":"photo_2296031.html","width":130,"caption":"Mt Kazbek, Georgia","height":83});
															thumbnails[2298964] = clik.newPhoto({"id":2298964,"src":"Ladakh_201_thumb.jpg","galleries_id":125045,"server_id":1,"link":"photo_2298964.html","width":130,"caption":"Leh, Ladakh","height":84});
															thumbnails[2300675] = clik.newPhoto({"id":2300675,"src":"UKlonSE10_0111_thumb.jpg","galleries_id":196524,"server_id":1,"link":"photo_2300675.html","width":130,"caption":"London, UK","height":87});
															thumbnails[2818725] = clik.newPhoto({"id":2818725,"src":"TRist_0195_thumb.jpg","galleries_id":113661,"server_id":1,"link":"photo_2818725.html","width":130,"caption":"Istanbul, Turkey","height":87});
															thumbnails[7232061] = clik.newPhoto({"id":7232061,"src":"chPpn_162.chile.patagonia.natales2_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232061.html","width":130,"caption":"","height":86});
															thumbnails[1690110] = clik.newPhoto({"id":1690110,"src":"Komovi 02_thumb.JPG","galleries_id":113659,"server_id":1,"link":"photo_1690110.html","width":130,"caption":"Komovi, Montenegro","height":87});
															thumbnails[2819577] = clik.newPhoto({"id":2819577,"src":"TRala_0298_thumb.jpg","galleries_id":113661,"server_id":1,"link":"photo_2819577.html","width":130,"caption":"Ala Daglar, eastern Turkey","height":87});
															thumbnails[5035641] = clik.newPhoto({"id":5035641,"src":"UKne_0703a_thumb.jpg","galleries_id":196524,"server_id":1,"link":"photo_5035641.html","width":130,"caption":"Northumberland, UK","height":86});
															thumbnails[8461308] = clik.newPhoto({"id":8461308,"src":"NOlof_0322_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_8461308.html","width":130,"caption":"","height":86});
															thumbnails[7232057] = clik.newPhoto({"id":7232057,"src":"arPfr_0091a-patagonia-cerro-torre_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232057.html","width":130,"caption":"","height":87});
															thumbnails[1690119] = clik.newPhoto({"id":1690119,"src":"Montenegro_0191_thumb.jpg","galleries_id":113659,"server_id":1,"link":"photo_1690119.html","width":130,"caption":"Bay of Kotor, Montenegro","height":87});
															thumbnails[1858791] = clik.newPhoto({"id":1858791,"src":"Ladakh_048_thumb.jpg","galleries_id":125045,"server_id":1,"link":"photo_1858791.html","width":130,"caption":"Digar La, Ladakh","height":88});
															thumbnails[7336850] = clik.newPhoto({"id":7336850,"src":"HRpj_0413a_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7336850.html","width":130,"caption":"","height":85});
															thumbnails[1690122] = clik.newPhoto({"id":1690122,"src":"Montenegro 028_thumb.jpg","galleries_id":113659,"server_id":1,"link":"photo_1690122.html","width":130,"caption":"Bjelasica, Montenegro","height":86});
															thumbnails[3618179] = clik.newPhoto({"id":3618179,"src":"UKlonSJP_006a_thumb.jpg","galleries_id":196524,"server_id":1,"link":"photo_3618179.html","width":130,"caption":"London, UK","height":86});
															thumbnails[4042104] = clik.newPhoto({"id":4042104,"src":"HRpj_0056_thumb.jpg","galleries_id":113660,"server_id":1,"link":"photo_4042104.html","width":130,"caption":"Plitvicka jezera, Croatia","height":86});
															thumbnails[7232464] = clik.newPhoto({"id":7232464,"src":"HRdra_0028a1_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232464.html","width":130,"caption":"","height":86});
															thumbnails[7232465] = clik.newPhoto({"id":7232465,"src":"HRmed_0100b2_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232465.html","width":130,"caption":"","height":88});
															thumbnails[1690160] = clik.newPhoto({"id":1690160,"src":"Montenegro 100_thumb.jpg","galleries_id":113659,"server_id":1,"link":"photo_1690160.html","width":130,"caption":"Komovi, Montenegro","height":86});
															thumbnails[8463019] = clik.newPhoto({"id":8463019,"src":"UKne_1273_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_8463019.html","width":130,"caption":"","height":86});
															thumbnails[3618807] = clik.newPhoto({"id":3618807,"src":"UKlonSW1p_023_thumb.jpg","galleries_id":196524,"server_id":1,"link":"photo_3618807.html","width":130,"caption":"London, UK","height":87});
															thumbnails[8461309] = clik.newPhoto({"id":8461309,"src":"NOlof_0434_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_8461309.html","width":130,"caption":"","height":87});
															thumbnails[3216803] = clik.newPhoto({"id":3216803,"src":"UKliv_050_thumb.jpg","galleries_id":196524,"server_id":1,"link":"photo_3216803.html","width":130,"caption":"Liverpool, UK","height":87});
															thumbnails[1690183] = clik.newPhoto({"id":1690183,"src":"Prokletije 02_thumb.JPG","galleries_id":113659,"server_id":1,"link":"photo_1690183.html","width":130,"caption":"Prokletije, Montenegro","height":87});
															thumbnails[3270793] = clik.newPhoto({"id":3270793,"src":"UKsdw_0170_thumb.jpg","galleries_id":196524,"server_id":1,"link":"photo_3270793.html","width":130,"caption":"South Downs Way, UK","height":86});
															thumbnails[3433176] = clik.newPhoto({"id":3433176,"src":"chPtdp_1575_thumb.jpg","galleries_id":131852,"server_id":1,"link":"photo_3433176.html","width":130,"caption":"Torres del Paine National Park, Chile","height":86});
															thumbnails[4068657] = clik.newPhoto({"id":4068657,"src":"HRpj_0099_thumb.jpg","galleries_id":113660,"server_id":1,"link":"photo_4068657.html","width":130,"caption":"Plitvicka jezera, Croatia","height":86});
															thumbnails[7232474] = clik.newPhoto({"id":7232474,"src":"HRpul_0160a1_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232474.html","width":130,"caption":"","height":86});
															thumbnails[3618858] = clik.newPhoto({"id":3618858,"src":"UKsdw_0096_thumb.jpg","galleries_id":196524,"server_id":1,"link":"photo_3618858.html","width":130,"caption":"South Downs Way, UK","height":86});
															thumbnails[8461310] = clik.newPhoto({"id":8461310,"src":"NOlof_0642b_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_8461310.html","width":130,"caption":"","height":83});
															thumbnails[2819409] = clik.newPhoto({"id":2819409,"src":"TRala_0087_thumb.jpg","galleries_id":113661,"server_id":1,"link":"photo_2819409.html","width":130,"caption":"Ala Daglar, eastern Turkey","height":87});
															thumbnails[7232466] = clik.newPhoto({"id":7232466,"src":"HRsib_0252a_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232466.html","width":130,"caption":"","height":88});
															thumbnails[7232470] = clik.newPhoto({"id":7232470,"src":"HRzag_2694a1_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232470.html","width":130,"caption":"","height":87});
															thumbnails[7232462] = clik.newPhoto({"id":7232462,"src":"HRbuz_0409b_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232462.html","width":130,"caption":"","height":92});
															thumbnails[7232467] = clik.newPhoto({"id":7232467,"src":"HRspl_0233a1_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232467.html","width":130,"caption":"","height":86});
															thumbnails[3659280] = clik.newPhoto({"id":3659280,"src":"chPtdpB_0082_thumb.jpg","galleries_id":131852,"server_id":1,"link":"photo_3659280.html","width":130,"caption":"Sierra Baguales, Patagonia, Chile","height":86});
															thumbnails[7232468] = clik.newPhoto({"id":7232468,"src":"HRvuk_0215_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232468.html","width":130,"caption":"","height":86});
															thumbnails[7225869] = clik.newPhoto({"id":7225869,"src":"HRtur_0102a_thumb.jpg","galleries_id":113660,"server_id":1,"link":"photo_7225869.html","width":130,"caption":"","height":86});
															thumbnails[7237221] = clik.newPhoto({"id":7237221,"src":"HRkr_0065a.croatia.kopacki.rit_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7237221.html","width":130,"caption":"","height":81});
															thumbnails[7232473] = clik.newPhoto({"id":7232473,"src":"arPfr_0321.argentina.los.glaciares1_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232473.html","width":130,"caption":"","height":87});
															thumbnails[3730021] = clik.newPhoto({"id":3730021,"src":"HRzag_0870_thumb.jpg","galleries_id":113660,"server_id":1,"link":"photo_3730021.html","width":130,"caption":"Zagreb, Croatia","height":86});
															thumbnails[4068717] = clik.newPhoto({"id":4068717,"src":"HRkr_0065a_thumb.jpg","galleries_id":113660,"server_id":1,"link":"photo_4068717.html","width":130,"caption":"Kopacki rit, Croatia","height":87});
															thumbnails[7232060] = clik.newPhoto({"id":7232060,"src":"CGkot_001.montenegro.kotor_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232060.html","width":130,"caption":"","height":80});
															thumbnails[2296059] = clik.newPhoto({"id":2296059,"src":"TRist_0005_thumb.jpg","galleries_id":113661,"server_id":1,"link":"photo_2296059.html","width":130,"caption":"Istanbul, Turkey","height":84});
															thumbnails[7232059] = clik.newPhoto({"id":7232059,"src":"CGkom_001.komovi.montenegro.mountains_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232059.html","width":130,"caption":"","height":84});
															thumbnails[2476215] = clik.newPhoto({"id":2476215,"src":"ptMDR_0443_thumb.jpg","galleries_id":158893,"server_id":1,"link":"photo_2476215.html","width":130,"caption":"Ponta de Sao Lourenco, Madeira","height":87});
															thumbnails[3433178] = clik.newPhoto({"id":3433178,"src":"chPtdpB_0020_thumb.jpg","galleries_id":131852,"server_id":1,"link":"photo_3433178.html","width":130,"caption":"Sierra Baguales, Patagonia, Chile","height":86});
															thumbnails[3075739] = clik.newPhoto({"id":3075739,"src":"HRzag_0103_thumb.jpg","galleries_id":113660,"server_id":1,"link":"photo_3075739.html","width":130,"caption":"Zagreb, Croatia","height":87});
															thumbnails[3618853] = clik.newPhoto({"id":3618853,"src":"UKlonSJP_0221_thumb.jpg","galleries_id":196524,"server_id":1,"link":"photo_3618853.html","width":130,"caption":"London, UK","height":86});
															thumbnails[7237346] = clik.newPhoto({"id":7237346,"src":"HRzag_3121b_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7237346.html","width":130,"caption":"","height":72});
															thumbnails[3433173] = clik.newPhoto({"id":3433173,"src":"chPtdp_1409_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_3433173.html","width":130,"caption":"Torres del Paine National Park, Chile","height":86});
															thumbnails[7232472] = clik.newPhoto({"id":7232472,"src":"chPtdp_1663.chile.torres.paine_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232472.html","width":130,"caption":"","height":86});
															thumbnails[7232064] = clik.newPhoto({"id":7232064,"src":"UKne_0703a.northumberland.national.park_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232064.html","width":130,"caption":"","height":86});
															thumbnails[7336852] = clik.newPhoto({"id":7336852,"src":"HRpj_0629_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7336852.html","width":130,"caption":"","height":86});
															thumbnails[3270652] = clik.newPhoto({"id":3270652,"src":"_DSC1599_thumb.jpg","galleries_id":196524,"server_id":1,"link":"photo_3270652.html","width":130,"caption":"South Downs Way, UK","height":86});
															thumbnails[7232063] = clik.newPhoto({"id":7232063,"src":"TRala_0298.turkey.ala.daglar_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232063.html","width":130,"caption":"","height":87});
															thumbnails[7232065] = clik.newPhoto({"id":7232065,"src":"TRist_0195.turkey.istanbul1_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7232065.html","width":130,"caption":"","height":87});
															thumbnails[7237477] = clik.newPhoto({"id":7237477,"src":"TRala_0087.turkey.ala.daglar_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7237477.html","width":130,"caption":"","height":87});
															thumbnails[1690093] = clik.newPhoto({"id":1690093,"src":"TRkac_0005_thumb.jpg","galleries_id":113661,"server_id":1,"link":"photo_1690093.html","width":130,"caption":"Ishan, eastern Turkey","height":88});
															thumbnails[1690023] = clik.newPhoto({"id":1690023,"src":"blue mountains 06_thumb.JPG","galleries_id":113522,"server_id":1,"link":"photo_1690023.html","width":130,"caption":"Blue Mountains, Australia","height":87});
															thumbnails[1690031] = clik.newPhoto({"id":1690031,"src":"Andorra 01_thumb.JPG","galleries_id":113522,"server_id":1,"link":"photo_1690031.html","width":130,"caption":"Vall d'Incles, Andorra","height":87});
															thumbnails[1690078] = clik.newPhoto({"id":1690078,"src":"IT_thumb.Agrpa_0001.jpg","galleries_id":113522,"server_id":1,"link":"photo_1690078.html","width":130,"caption":"Gran Paradiso, Italy","height":84});
															thumbnails[3436586] = clik.newPhoto({"id":3436586,"src":"CHval_034_thumb.jpg","galleries_id":113522,"server_id":1,"link":"photo_3436586.html","width":130,"caption":"Valparaiso, Chile","height":86});
															thumbnails[1858912] = clik.newPhoto({"id":1858912,"src":"Agra_005_thumb.jpg","galleries_id":113522,"server_id":1,"link":"photo_1858912.html","width":130,"caption":"Agra, India","height":88});
															thumbnails[1858738] = clik.newPhoto({"id":1858738,"src":"Rome_003_thumb.jpg","galleries_id":113522,"server_id":1,"link":"photo_1858738.html","width":130,"caption":"Rome, Italy","height":89});
															thumbnails[1858475] = clik.newPhoto({"id":1858475,"src":"Rome_001_thumb.jpg","galleries_id":113522,"server_id":1,"link":"photo_1858475.html","width":130,"caption":"Rome, Italy","height":88});
															thumbnails[7237306] = clik.newPhoto({"id":7237306,"src":"BobanMarkovic_121a1.marko.markovic.serbian.music.balkan.brass3_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7237306.html","width":130,"caption":"","height":86});
															thumbnails[7237225] = clik.newPhoto({"id":7237225,"src":"Noisettes100812_216.noisettes.concert.union.chapel.london2_33DFA81B-24E8-5EC4-4F46EEB5E4735E5C_thumb.jpg","galleries_id":390814,"server_id":1,"link":"photo_7237225.html","width":130,"caption":"","height":86});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[113676] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Caucasus","link":"gallery_113676.html","maxRecords":0.0,"photoIDs":[2296031.0],"skipIndex":0,"section_code":"gallery","featured_images":2296031.0,"id":113676,"singleSection":false});				  						galleries[113674] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Central Asia","link":"gallery_113674.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":113674,"singleSection":false});				  						galleries[113660] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Croatia","link":"gallery_113660.html","maxRecords":0.0,"photoIDs":[4042104.0,4068657.0,7225869.0,3730021.0,4068717.0,3075739.0],"skipIndex":0,"section_code":"gallery","featured_images":"7225869,4068717,4068657,4042104,3730021,3075739","id":113660,"singleSection":false});				  						galleries[196655] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"France","link":"gallery_196655.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":196655,"singleSection":false});				  						galleries[113735] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Iran","link":"gallery_113735.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":113735,"singleSection":false});				  						galleries[113665] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Karakoram","link":"gallery_113665.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":113665,"singleSection":false});				  						galleries[125045] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Ladakh","link":"gallery_125045.html","maxRecords":0.0,"photoIDs":[2298964.0,1858791.0],"skipIndex":0,"section_code":"gallery","featured_images":"2298964,1858791","id":125045,"singleSection":false});				  						galleries[158893] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Madeira","link":"gallery_158893.html","maxRecords":0.0,"photoIDs":[2476215.0],"skipIndex":0,"section_code":"gallery","featured_images":2476215.0,"id":158893,"singleSection":false});				  						galleries[113659] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Montenegro","link":"gallery_113659.html","maxRecords":0.0,"photoIDs":[1690110.0,1690119.0,1690122.0,1690160.0,1690183.0],"skipIndex":0,"section_code":"gallery","featured_images":"1690183,1690160,1690122,1690119,1690110","id":113659,"singleSection":false});				  						galleries[131852] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Patagonia","link":"gallery_131852.html","maxRecords":0.0,"photoIDs":[3433176.0,3659280.0,3433178.0],"skipIndex":0,"section_code":"gallery","featured_images":"3659280,3433178,3433176","id":131852,"singleSection":false});				  						galleries[389261] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Slideshow","link":"gallery_389261.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":389261,"singleSection":false});				  						galleries[113677] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Spain","link":"gallery_113677.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":113677,"singleSection":false});				  						galleries[113661] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Turkey","link":"gallery_113661.html","maxRecords":0.0,"photoIDs":[2818725.0,2819577.0,2819409.0,2296059.0,1690093.0],"skipIndex":0,"section_code":"gallery","featured_images":"2819577,2819409,2818725,2296059,1690093","id":113661,"singleSection":false});				  						galleries[196524] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"UK","link":"gallery_196524.html","maxRecords":0.0,"photoIDs":[2300675.0,5035641.0,3618179.0,3618807.0,3216803.0,3270793.0,3618858.0,3618853.0,3270652.0],"skipIndex":0,"section_code":"gallery","featured_images":"5035641,3618858,3618853,3618807,3618179,3270793,3270652,3216803,2300675","id":196524,"singleSection":false});				  						galleries[390814] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"_Portfolio_homepage_slideshow","link":"gallery_390814.html","maxRecords":0.0,"photoIDs":[7232061.0,8461308.0,7232057.0,7336850.0,7232464.0,7232465.0,8463019.0,8461309.0,7232474.0,8461310.0,7232466.0,7232470.0,7232462.0,7232467.0,7232468.0,7237221.0,7232473.0,7232060.0,7232059.0,7237346.0,3433173.0,7232472.0,7232064.0,7336852.0,7232063.0,7232065.0,7237477.0,7237306.0,7237225.0],"skipIndex":0,"section_code":"gallery","featured_images":"8463019,8461310,8461309,8461308,7336852,7336850,7237477,7237346,7237306,7237225","id":390814,"singleSection":false});				  						galleries[113522] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Various","link":"gallery_113522.html","maxRecords":0.0,"photoIDs":[1690023.0,1690031.0,1690078.0,3436586.0,1858912.0,1858738.0,1858475.0],"skipIndex":0,"section_code":"gallery","featured_images":"3436586,1858912,1858738,1858475,1690078,1690031,1690023","id":113522,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7232061,8461308,7232057,7336850,7232464,7232465,8463019,8461309,7232474,8461310,7232466,7232470,7232462,7232467,7232468,7237221,7232473,7232060,7232059,7237346,3433173,7232472,7232064,7336852,7232063,7232065,7237477,7237306,7237225';
imageSets[3] = '6926081,6355495,6213691,5663880,5528466,5524163,5412189,5389695,2818725,5035641,2819577,4042104,3618179,3618807,3216803,4068657,3433176';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/rudolfabraham/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/rudolfabraham/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'RUDOLF ABRAHAM travel writer & photographer: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Date: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer/Copyright </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

