window.thumbnails = {};
															thumbnails[8206627] = clik.newPhoto({"id":8206627,"src":"masond01_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"TEST_PHOTO_BEXHILL","height":86});
															thumbnails[8206650] = clik.newPhoto({"id":8206650,"src":"VENICE_LAGOON_by_Dave_Mason_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"venice lagoon test","height":87});
															thumbnails[8206679] = clik.newPhoto({"id":8206679,"src":"BODIAM_Dave_Mason_copy1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Bodiam test","height":87});
															thumbnails[8206689] = clik.newPhoto({"id":8206689,"src":"THE_GOOD_THE_BAD...._by_Dave_Mason_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"bexhill - beach test","height":87});
															thumbnails[8206792] = clik.newPhoto({"id":8206792,"src":"still_life_10_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":94});
															thumbnails[8206805] = clik.newPhoto({"id":8206805,"src":"xjs_v8_1_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[5889985] = clik.newPhoto({"id":5889985,"src":"QUOTE-1_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":89});
															thumbnails[5889988] = clik.newPhoto({"id":5889988,"src":"QUOTE-3_copy1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":89});
															thumbnails[5889986] = clik.newPhoto({"id":5889986,"src":"QUOTE-2_copy1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":89});
															thumbnails[5889989] = clik.newPhoto({"id":5889989,"src":"QUOTE-5_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":89});
															thumbnails[5889997] = clik.newPhoto({"id":5889997,"src":"QUOTE-4_copy1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":89});
															thumbnails[5889992] = clik.newPhoto({"id":5889992,"src":"QUOTE-6_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":89});
															thumbnails[3358286] = clik.newPhoto({"id":3358286,"src":"Serp_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":85});
															thumbnails[3358424] = clik.newPhoto({"id":3358424,"src":"PANTHEON copy_thumb.jpg","galleries_id":169236,"server_id":18,"link":"photo_3358424.html","width":130,"caption":"","height":126});
															thumbnails[249265] = clik.newPhoto({"id":249265,"src":"masai_tree_web copy_thumb.jpg","galleries_id":22613,"server_id":18,"link":"photo_249265.html","width":130,"caption":"","height":189});
															thumbnails[249273] = clik.newPhoto({"id":249273,"src":"masai_woman_web copy_thumb.jpg","galleries_id":22613,"server_id":18,"link":"photo_249273.html","width":130,"caption":"","height":335});
															thumbnails[250724] = clik.newPhoto({"id":250724,"src":"niger copy_thumb.jpg","galleries_id":22612,"server_id":18,"link":"photo_250724.html","width":130,"caption":"","height":86});
															thumbnails[250744] = clik.newPhoto({"id":250744,"src":"Senegal_Gorre Is_web_21_thumb.jpg","galleries_id":22612,"server_id":18,"link":"photo_250744.html","width":130,"caption":"","height":195});
															thumbnails[257712] = clik.newPhoto({"id":257712,"src":"Africa_Mali_DjenneMosque_thumb.jpg","galleries_id":22612,"server_id":18,"link":"photo_257712.html","width":110,"caption":"","height":73});
															thumbnails[250667] = clik.newPhoto({"id":250667,"src":"dogon_women_web_thumb.jpg","galleries_id":22613,"server_id":18,"link":"photo_250667.html","width":130,"caption":"","height":191});
															thumbnails[272898] = clik.newPhoto({"id":272898,"src":"man_in_courtyard copy1_thumb.jpg","galleries_id":5842,"server_id":18,"link":"photo_272898.html","width":130,"caption":"","height":195});
															thumbnails[273749] = clik.newPhoto({"id":273749,"src":"felluca_moor_sketch copy_thumb.jpg","galleries_id":22613,"server_id":18,"link":"photo_273749.html","width":130,"caption":"","height":183});
															thumbnails[273753] = clik.newPhoto({"id":273753,"src":"ghats_sketch copy_thumb.jpg","galleries_id":22613,"server_id":18,"link":"photo_273753.html","width":130,"caption":"","height":95});
															thumbnails[273760] = clik.newPhoto({"id":273760,"src":"trajan_sketch copy_thumb.jpg","galleries_id":22613,"server_id":18,"link":"photo_273760.html","width":130,"caption":"","height":182});
															thumbnails[496562] = clik.newPhoto({"id":496562,"src":"India_Cochin_Kathkali copy_thumb.jpg","galleries_id":5838,"server_id":18,"link":"photo_496562.html","width":130,"caption":"","height":164});
															thumbnails[1166501] = clik.newPhoto({"id":1166501,"src":"w_clr_stourhead_2 copy_thumb.jpg","galleries_id":22613,"server_id":18,"link":"photo_1166501.html","width":130,"caption":"","height":94});
															thumbnails[1231080] = clik.newPhoto({"id":1231080,"src":"Pamplona_web copy_thumb.jpg","galleries_id":5842,"server_id":18,"link":"photo_1231080.html","width":130,"caption":"","height":176});
															thumbnails[1234243] = clik.newPhoto({"id":1234243,"src":"UK_london_mil_bridge copy_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_1234243.html","width":130,"caption":"","height":195});
															thumbnails[1568302] = clik.newPhoto({"id":1568302,"src":"BX_Roll1_Frame30_webcopy_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_1568302.html","width":130,"caption":"","height":86});
															thumbnails[496639] = clik.newPhoto({"id":496639,"src":"Greenwich_27_03_8 copy_web_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_496639.html","width":130,"caption":"","height":89});
															thumbnails[242099] = clik.newPhoto({"id":242099,"src":"gorilla_3_crop_web copy_thumb.jpg","galleries_id":21868,"server_id":18,"link":"photo_242099.html","width":130,"caption":"","height":87});
															thumbnails[59203] = clik.newPhoto({"id":59203,"src":"Italy_venice copy2_thumb.jpg","galleries_id":169234,"server_id":18,"link":"photo_59203.html","width":130,"caption":"","height":201});
															thumbnails[272779] = clik.newPhoto({"id":272779,"src":"Africa_Namib_resize_thumb.jpg","galleries_id":22611,"server_id":18,"link":"photo_272779.html","width":130,"caption":"","height":201});
															thumbnails[1166497] = clik.newPhoto({"id":1166497,"src":"still_life_5 copy_thumb.jpg","galleries_id":84316,"server_id":18,"link":"photo_1166497.html","width":130,"caption":"","height":195});
															thumbnails[5175128] = clik.newPhoto({"id":5175128,"src":"iso_ven04_copy_thumb.jpg","galleries_id":169234,"server_id":18,"link":"photo_5175128.html","width":130,"caption":"","height":130});
															thumbnails[249205] = clik.newPhoto({"id":249205,"src":"gorilla_1_web copy_thumb.jpg","galleries_id":21868,"server_id":18,"link":"photo_249205.html","width":130,"caption":"","height":89});
															thumbnails[273770] = clik.newPhoto({"id":273770,"src":"seren_cloud_2 crop _web copy_thumb.jpg","galleries_id":22611,"server_id":18,"link":"photo_273770.html","width":130,"caption":"","height":98});
															thumbnails[59054] = clik.newPhoto({"id":59054,"src":"UK_Thame_flood_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_59054.html","width":130,"caption":"","height":197});
															thumbnails[59060] = clik.newPhoto({"id":59060,"src":"India_tunjore_thumb.jpg","galleries_id":5838,"server_id":18,"link":"photo_59060.html","width":130,"caption":"","height":198});
															thumbnails[1166492] = clik.newPhoto({"id":1166492,"src":"charc_3 copy_thumb.jpg","galleries_id":84316,"server_id":18,"link":"photo_1166492.html","width":130,"caption":"","height":179});
															thumbnails[59057] = clik.newPhoto({"id":59057,"src":"India_cochin copy_thumb.jpg","galleries_id":5838,"server_id":18,"link":"photo_59057.html","width":130,"caption":"","height":199});
															thumbnails[59070] = clik.newPhoto({"id":59070,"src":"India_Varanasi_ganges copy2_thumb.jpg","galleries_id":5838,"server_id":18,"link":"photo_59070.html","width":130,"caption":"","height":195});
															thumbnails[944949] = clik.newPhoto({"id":944949,"src":"India_TajMahal_detail copy_thumb.jpg","galleries_id":5838,"server_id":18,"link":"photo_944949.html","width":130,"caption":"","height":198});
															thumbnails[61861] = clik.newPhoto({"id":61861,"src":"India_khajarao_temple copy2_thumb.jpg","galleries_id":5838,"server_id":18,"link":"photo_61861.html","width":130,"caption":"","height":195});
															thumbnails[59066] = clik.newPhoto({"id":59066,"src":"India_varanasi copy_thumb.jpg","galleries_id":5838,"server_id":18,"link":"photo_59066.html","width":130,"caption":"","height":85});
															thumbnails[944973] = clik.newPhoto({"id":944973,"src":"India_Jaipur_obs_web_thumb.jpg","galleries_id":5838,"server_id":18,"link":"photo_944973.html","width":130,"caption":"","height":170});
															thumbnails[59064] = clik.newPhoto({"id":59064,"src":"India_Madras copy_thumb.jpg","galleries_id":5838,"server_id":18,"link":"photo_59064.html","width":130,"caption":"","height":87});
															thumbnails[59201] = clik.newPhoto({"id":59201,"src":"Tenerife_1 copy2_thumb.jpg","galleries_id":5842,"server_id":18,"link":"photo_59201.html","width":130,"caption":"","height":199});
															thumbnails[59199] = clik.newPhoto({"id":59199,"src":"Tenerife_costa copy_thumb.jpg","galleries_id":5842,"server_id":18,"link":"photo_59199.html","width":130,"caption":"","height":87});
															thumbnails[5175103] = clik.newPhoto({"id":5175103,"src":"iso_ven03_copy_thumb.jpg","galleries_id":169234,"server_id":18,"link":"photo_5175103.html","width":130,"caption":"","height":127});
															thumbnails[249224] = clik.newPhoto({"id":249224,"src":"gorilla_4_web copy_thumb.jpg","galleries_id":21868,"server_id":18,"link":"photo_249224.html","width":130,"caption":"","height":87});
															thumbnails[59051] = clik.newPhoto({"id":59051,"src":"UK_London_trafalgar_sq copy2_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_59051.html","width":130,"caption":"","height":196});
															thumbnails[272812] = clik.newPhoto({"id":272812,"src":"Africa_kenya_safaricamp_thumb.jpg","galleries_id":22611,"server_id":18,"link":"photo_272812.html","width":130,"caption":"","height":85});
															thumbnails[1166499] = clik.newPhoto({"id":1166499,"src":"still_life_7 copy_thumb.jpg","galleries_id":84316,"server_id":18,"link":"photo_1166499.html","width":130,"caption":"","height":195});
															thumbnails[59175] = clik.newPhoto({"id":59175,"src":"Spain_Santiago_church_thumb.jpg","galleries_id":5842,"server_id":18,"link":"photo_59175.html","width":130,"caption":"","height":194});
															thumbnails[59166] = clik.newPhoto({"id":59166,"src":"Spain_man_walk2_thumb.jpg","galleries_id":5842,"server_id":18,"link":"photo_59166.html","width":130,"caption":"","height":200});
															thumbnails[59171] = clik.newPhoto({"id":59171,"src":"Spain_Pilgrim_trail_thumb.jpg","galleries_id":5842,"server_id":18,"link":"photo_59171.html","width":130,"caption":"","height":194});
															thumbnails[59168] = clik.newPhoto({"id":59168,"src":"Spain_granada-church_thumb.jpg","galleries_id":5842,"server_id":18,"link":"photo_59168.html","width":130,"caption":"","height":86});
															thumbnails[659612] = clik.newPhoto({"id":659612,"src":"godafoss copy_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_659612.html","width":130,"caption":"","height":84});
															thumbnails[59177] = clik.newPhoto({"id":59177,"src":"Norway_fjord_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_59177.html","width":130,"caption":"","height":84});
															thumbnails[59192] = clik.newPhoto({"id":59192,"src":"iceberg2_crop copy_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_59192.html","width":130,"caption":"","height":87});
															thumbnails[59184] = clik.newPhoto({"id":59184,"src":"orca_sun_fin_copy2_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_59184.html","width":130,"caption":"","height":195});
															thumbnails[5175087] = clik.newPhoto({"id":5175087,"src":"iso_ven02_copy_thumb.jpg","galleries_id":169234,"server_id":18,"link":"photo_5175087.html","width":130,"caption":"","height":133});
															thumbnails[249256] = clik.newPhoto({"id":249256,"src":"lion_1 crop_web copy_thumb.jpg","galleries_id":21868,"server_id":18,"link":"photo_249256.html","width":130,"caption":"","height":87});
															thumbnails[59049] = clik.newPhoto({"id":59049,"src":"Brighton_1_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_59049.html","width":130,"caption":"","height":87});
															thumbnails[272786] = clik.newPhoto({"id":272786,"src":"Botswana_sunset_thumb.jpg","galleries_id":22611,"server_id":18,"link":"photo_272786.html","width":130,"caption":"","height":84});
															thumbnails[663363] = clik.newPhoto({"id":663363,"src":"waterpeople copy_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_663363.html","width":130,"caption":"","height":182});
															thumbnails[1166500] = clik.newPhoto({"id":1166500,"src":"still_life_8 copy_thumb.jpg","galleries_id":84316,"server_id":18,"link":"photo_1166500.html","width":130,"caption":"","height":87});
															thumbnails[1568377] = clik.newPhoto({"id":1568377,"src":"BX_Roll1_Frame36_ webcopy_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_1568377.html","width":130,"caption":"","height":88});
															thumbnails[61860] = clik.newPhoto({"id":61860,"src":"iceland_Solfari_copy_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_61860.html","width":130,"caption":"","height":205});
															thumbnails[59190] = clik.newPhoto({"id":59190,"src":"Iceland_desert copy_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_59190.html","width":130,"caption":"","height":85});
															thumbnails[59187] = clik.newPhoto({"id":59187,"src":"Iceland_cave copy_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_59187.html","width":130,"caption":"","height":84});
															thumbnails[59196] = clik.newPhoto({"id":59196,"src":"glacview copy_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_59196.html","width":130,"caption":"","height":83});
															thumbnails[59178] = clik.newPhoto({"id":59178,"src":"orca_man_1 copy_thumb.jpg","galleries_id":5839,"server_id":18,"link":"photo_59178.html","width":130,"caption":"","height":83});
															thumbnails[5175136] = clik.newPhoto({"id":5175136,"src":"iso_ven05_copy_thumb.jpg","galleries_id":169234,"server_id":18,"link":"photo_5175136.html","width":130,"caption":"","height":130});
															thumbnails[249229] = clik.newPhoto({"id":249229,"src":"hippo_1_crop_web_thumb.jpg","galleries_id":21868,"server_id":18,"link":"photo_249229.html","width":130,"caption":"","height":195});
															thumbnails[59046] = clik.newPhoto({"id":59046,"src":"UK_South_East_Brighton_2 copy_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_59046.html","width":130,"caption":"","height":197});
															thumbnails[59048] = clik.newPhoto({"id":59048,"src":"st_paul_bridge copy2_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_59048.html","width":130,"caption":"","height":195});
															thumbnails[496594] = clik.newPhoto({"id":496594,"src":"susulevidune copy_thumb.jpg","galleries_id":22611,"server_id":18,"link":"photo_496594.html","width":130,"caption":"","height":84});
															thumbnails[1166494] = clik.newPhoto({"id":1166494,"src":"still_life_3 copy_thumb.jpg","galleries_id":84316,"server_id":18,"link":"photo_1166494.html","width":130,"caption":"","height":87});
															thumbnails[5175061] = clik.newPhoto({"id":5175061,"src":"iso_ven01_copy1_thumb.jpg","galleries_id":169234,"server_id":18,"link":"photo_5175061.html","width":130,"caption":"","height":128});
															thumbnails[2073858] = clik.newPhoto({"id":2073858,"src":"Bexhill_clocktower copy_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_2073858.html","width":130,"caption":"","height":88});
															thumbnails[249278] = clik.newPhoto({"id":249278,"src":"cheetah_1_crop copy_thumb.jpg","galleries_id":21868,"server_id":18,"link":"photo_249278.html","width":130,"caption":"","height":87});
															thumbnails[273776] = clik.newPhoto({"id":273776,"src":"sereng_balloon_web copy_thumb.jpg","galleries_id":22611,"server_id":18,"link":"photo_273776.html","width":130,"caption":"","height":85});
															thumbnails[59052] = clik.newPhoto({"id":59052,"src":"Brighton_work copy_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_59052.html","width":130,"caption":"","height":86});
															thumbnails[1231091] = clik.newPhoto({"id":1231091,"src":"still_life_10 copy_thumb.jpg","galleries_id":84316,"server_id":18,"link":"photo_1231091.html","width":130,"caption":"","height":94});
															thumbnails[250691] = clik.newPhoto({"id":250691,"src":"zaire_silverback_thumb.jpg","galleries_id":21868,"server_id":18,"link":"photo_250691.html","width":130,"caption":"","height":87});
															thumbnails[59056] = clik.newPhoto({"id":59056,"src":"mil_bridge_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_59056.html","width":130,"caption":"","height":194});
															thumbnails[348180] = clik.newPhoto({"id":348180,"src":"Eden_06 copy_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_348180.html","width":130,"caption":"","height":89});
															thumbnails[250711] = clik.newPhoto({"id":250711,"src":"tree_leopard copy_thumb.jpg","galleries_id":21868,"server_id":18,"link":"photo_250711.html","width":130,"caption":"","height":86});
															thumbnails[2073861] = clik.newPhoto({"id":2073861,"src":"Bex_beach copy_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_2073861.html","width":130,"caption":"","height":82});
															thumbnails[239815] = clik.newPhoto({"id":239815,"src":"delawarr_web_450_thumb.jpg","galleries_id":169238,"server_id":18,"link":"photo_239815.html","width":130,"caption":"","height":89});
															thumbnails[271208] = clik.newPhoto({"id":271208,"src":"hipostyle_hall_egypt_thumb.jpg","galleries_id":22609,"server_id":18,"link":"photo_271208.html","width":110,"caption":"","height":165});
															thumbnails[271225] = clik.newPhoto({"id":271225,"src":"abydos_egypt_thumb.jpg","galleries_id":22609,"server_id":18,"link":"photo_271225.html","width":110,"caption":"","height":75});
															thumbnails[496569] = clik.newPhoto({"id":496569,"src":"libya_severus_arch_web_thumb.jpg","galleries_id":22609,"server_id":18,"link":"photo_496569.html","width":130,"caption":"","height":202});
															thumbnails[59208] = clik.newPhoto({"id":59208,"src":"lipari_ferry_sunset copy_thumb.jpg","galleries_id":169236,"server_id":18,"link":"photo_59208.html","width":130,"caption":"","height":195});
															thumbnails[2901445] = clik.newPhoto({"id":2901445,"src":"SABINE copy_thumb.jpg","galleries_id":169236,"server_id":18,"link":"photo_2901445.html","width":130,"caption":"","height":173});
															thumbnails[271217] = clik.newPhoto({"id":271217,"src":"ghadames__thumb.jpg","galleries_id":22609,"server_id":18,"link":"photo_271217.html","width":110,"caption":"","height":161});
															thumbnails[59200] = clik.newPhoto({"id":59200,"src":"Lipari_ferry_crop_thumb.jpg","galleries_id":169236,"server_id":18,"link":"photo_59200.html","width":130,"caption":"","height":195});
															thumbnails[271241] = clik.newPhoto({"id":271241,"src":"roman_fort_libya_thumb.jpg","galleries_id":22609,"server_id":18,"link":"photo_271241.html","width":130,"caption":"","height":86});
															thumbnails[496599] = clik.newPhoto({"id":496599,"src":"libya_dune copy1_thumb.jpg","galleries_id":22609,"server_id":18,"link":"photo_496599.html","width":130,"caption":"","height":195});
															thumbnails[496637] = clik.newPhoto({"id":496637,"src":"grain_store_ copy_thumb.jpg","galleries_id":22609,"server_id":18,"link":"photo_496637.html","width":130,"caption":"","height":86});
															thumbnails[272773] = clik.newPhoto({"id":272773,"src":"leptis_theatre_thumb.jpg","galleries_id":22609,"server_id":18,"link":"photo_272773.html","width":130,"caption":"","height":86});
															thumbnails[3358280] = clik.newPhoto({"id":3358280,"src":"embank_thumb.jpg","galleries_id":438641,"server_id":18,"link":"photo_3358280.html","width":130,"caption":"","height":199});
															thumbnails[3358306] = clik.newPhoto({"id":3358306,"src":"thamewalk_thumb.jpg","galleries_id":438641,"server_id":18,"link":"photo_3358306.html","width":130,"caption":"","height":84});
															thumbnails[3358267] = clik.newPhoto({"id":3358267,"src":"02_ARENA_thumb.jpg","galleries_id":438641,"server_id":18,"link":"photo_3358267.html","width":130,"caption":"","height":83});
															thumbnails[3358301] = clik.newPhoto({"id":3358301,"src":"victoria_thumb.jpg","galleries_id":438641,"server_id":18,"link":"photo_3358301.html","width":130,"caption":"","height":199});
															thumbnails[3358295] = clik.newPhoto({"id":3358295,"src":"millbank_thumb.jpg","galleries_id":438641,"server_id":18,"link":"photo_3358295.html","width":130,"caption":"","height":204});
															thumbnails[3358251] = clik.newPhoto({"id":3358251,"src":"PHILLFIELD_thumb.jpg","galleries_id":438641,"server_id":18,"link":"photo_3358251.html","width":130,"caption":"","height":83});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[169236] = clik.newGallery({"parentGallery":169235,"usePopups":false,"title":"Italy","link":"gallery_169236.html","maxRecords":0.0,"photoIDs":[3358424.0,59208.0,2901445.0,59200.0],"skipIndex":0,"section_code":"gallery","featured_images":"3358424,2901445,59208,59200","id":169236,"singleSection":false});				  						galleries[438641] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"London Wide","link":"gallery_438641.html","maxRecords":0.0,"photoIDs":[3358280.0,3358306.0,3358267.0,3358301.0,3358295.0,3358251.0],"skipIndex":0,"section_code":"gallery","featured_images":"3358306,3358301,3358295,3358280,3358267,3358251","id":438641,"singleSection":false});				  						galleries[169238] = clik.newGallery({"parentGallery":169235,"usePopups":false,"title":"United Kingdom","link":"gallery_169238.html","maxRecords":0.0,"photoIDs":[1234243.0,1568302.0,496639.0,59054.0,59051.0,59049.0,1568377.0,59046.0,59048.0,2073858.0,59052.0,59056.0,348180.0,2073861.0,239815.0],"skipIndex":0,"section_code":"gallery","featured_images":"2073861,2073858,1568377,1568302,1234243,496639,348180,239815,59056,59054","id":169238,"singleSection":false});				  						galleries[169234] = clik.newGallery({"parentGallery":169235,"usePopups":false,"title":"Venice","link":"gallery_169234.html","maxRecords":0.0,"photoIDs":[59203.0,5175128.0,5175103.0,5175087.0,5175136.0,5175061.0],"skipIndex":0,"section_code":"gallery","featured_images":"5175136,5175128,5175103,5175087,5175061,59203","id":169234,"singleSection":false});				  						galleries[22594] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"African Continent","link":"gallery_22594.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"496594,273776,273770,272812,272786,257712,250711,250691,249256,249224,249205,242099","id":22594,"singleSection":false});				  						galleries[84315] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Artwork","link":"gallery_84315.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":273753.0,"id":84315,"singleSection":false});				  						galleries[169235] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Europe","link":"gallery_169235.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"5175136,5175128,5175103,5175087,5175061,3358424,2901445,2073861,2073858,1568377","id":169235,"singleSection":false});				  						galleries[5838] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"India","link":"gallery_5838.html","maxRecords":0.0,"photoIDs":[496562.0,59060.0,59057.0,59070.0,944949.0,61861.0,59066.0,944973.0,59064.0],"skipIndex":0,"section_code":"gallery","featured_images":"944973,944949,496562,61861,59070,59066,59064,59060,59057","id":5838,"singleSection":false});				  						galleries[5839] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Towards the Arctic Circle","link":"gallery_5839.html","maxRecords":0.0,"photoIDs":[659612.0,59177.0,59192.0,59184.0,663363.0,61860.0,59190.0,59187.0,59196.0,59178.0],"skipIndex":0,"section_code":"gallery","featured_images":"663363,659612,61860,59196,59192,59190,59187,59184,59178,59177","id":5839,"singleSection":false});				  						galleries[5842] = clik.newGallery({"parentGallery":169235,"usePopups":false,"title":"Spain","link":"gallery_5842.html","maxRecords":0.0,"photoIDs":[272898.0,1231080.0,59201.0,59199.0,59175.0,59166.0,59171.0,59168.0],"skipIndex":0,"section_code":"gallery","featured_images":"1231080,272898,59201,59199,59175,59171,59168,59166","id":5842,"singleSection":false});				  						galleries[22609] = clik.newGallery({"parentGallery":22594,"usePopups":false,"title":"Libya & Egypt","link":"gallery_22609.html","maxRecords":0.0,"photoIDs":[271208.0,271225.0,496569.0,271217.0,271241.0,496599.0,496637.0,272773.0],"skipIndex":0,"section_code":"gallery","featured_images":"496637,496599,496569,272773,271241,271225,271217,271208","id":22609,"singleSection":false});				  						galleries[21868] = clik.newGallery({"parentGallery":22594,"usePopups":false,"title":"African wildlife","link":"gallery_21868.html","maxRecords":0.0,"photoIDs":[242099.0,249205.0,249224.0,249256.0,249229.0,249278.0,250691.0,250711.0],"skipIndex":0,"section_code":"gallery","featured_images":"250711,250691,249256,249224,249205,242099","id":21868,"singleSection":false});				  						galleries[22612] = clik.newGallery({"parentGallery":22594,"usePopups":false,"title":"Senegal\/Mali","link":"gallery_22612.html","maxRecords":0.0,"photoIDs":[250724.0,250744.0,257712.0],"skipIndex":0,"section_code":"gallery","featured_images":257712.0,"id":22612,"singleSection":false});				  						galleries[22611] = clik.newGallery({"parentGallery":22594,"usePopups":false,"title":"Safari","link":"gallery_22611.html","maxRecords":0.0,"photoIDs":[272779.0,273770.0,272812.0,272786.0,496594.0,273776.0],"skipIndex":0,"section_code":"gallery","featured_images":"496594,273776,273770,272812,272786","id":22611,"singleSection":false});				  						galleries[22613] = clik.newGallery({"parentGallery":84315,"usePopups":false,"title":"Travel sketchbook","link":"gallery_22613.html","maxRecords":0.0,"photoIDs":[249265.0,249273.0,250667.0,273749.0,273753.0,273760.0,1166501.0],"skipIndex":0,"section_code":"gallery","featured_images":273753.0,"id":22613,"singleSection":false});				  						galleries[84316] = clik.newGallery({"parentGallery":84315,"usePopups":false,"title":"Lifestudies","link":"gallery_84316.html","maxRecords":0.0,"photoIDs":[1166497.0,1166492.0,1166499.0,1166500.0,1166494.0,1231091.0],"skipIndex":0,"section_code":"gallery","featured_images":"1231091,1166500,1166499,1166497,1166494,1166492","id":84316,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[239834] = '3358280';
imageSets[1] = '257712,5889985,242099,5889988,249205,5889986,272812,59177,1166500,272786,59049,59187,5889989,1166494,5889997,1231091,250711,271225,3358306,3358251';
imageSets[2] = '273753,257712,242099,273770,249205,272812,249224,272786,249256,496594,273776,250691,250711';
imageSets[3] = '8206805,8206792,8206689,8206679,8206650,8206627,5889997,5889992,5889989,5889988,5889986,5889985,5175136,5175128,5175103,5175087,5175061,3358424,3358306,3358301,3358295,3358286,3358280,3358267,3358251,2901445,2073861,2073858,1568377,1568302,1234243,1231091,1231080,1166501,1166500,1166499,1166497,1166494,1166492,944973,944949,663363,659612,496639,496637,496599,496594,496569,496562,348180';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/DaveCMason/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/DaveCMason/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 = 'DCiMage Photography and artwork: ' + 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>Camera: </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>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </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 item.</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.payment_groups_id !== '') {
		temp += '<p>Place order or this item.</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		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;
	}
}

			

