window.thumbnails = {};
															thumbnails[4766460] = clik.newPhoto({"id":4766460,"src":"Leica_Lenscap_Trophy_2008_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Leica Lens Cap Tropy 2008","height":95});
															thumbnails[4838776] = clik.newPhoto({"id":4838776,"src":"Oskar_Barnack_M6_Trophy_Winner_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Leica Fellowship M6 Trophy 2009 and Print","height":123});
															thumbnails[7949084] = clik.newPhoto({"id":7949084,"src":"Back_to_MumDS_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_7949084.html","width":130,"caption":"Back to Mum","height":88});
															thumbnails[7949112] = clik.newPhoto({"id":7949112,"src":"Zambian_Boy_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_7949112.html","width":117,"caption":"Zambian Boy","height":176});
															thumbnails[5428064] = clik.newPhoto({"id":5428064,"src":"The_CleanerDS_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_5428064.html","width":88,"caption":"The Cleaner ","height":176});
															thumbnails[5428070] = clik.newPhoto({"id":5428070,"src":"Caribbean_Sailor_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_5428070.html","width":117,"caption":"\"Caribbean Sailor\". ","height":176});
															thumbnails[5428236] = clik.newPhoto({"id":5428236,"src":"Fisherman_of_St_Lucia_DS_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_5428236.html","width":130,"caption":"Fisherman of St. Lucia<br>\r\n","height":101});
															thumbnails[847382] = clik.newPhoto({"id":847382,"src":"Nodding Off_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_847382.html","width":130,"caption":"Nodding Off","height":173});
															thumbnails[4746999] = clik.newPhoto({"id":4746999,"src":"Brief-Encounter1_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_4746999.html","width":117,"caption":"\"Brief Encounter\"  ","height":176});
															thumbnails[842832] = clik.newPhoto({"id":842832,"src":"Young Kim copy_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_842832.html","width":130,"caption":"Young Kim","height":168});
															thumbnails[848761] = clik.newPhoto({"id":848761,"src":"Seat of Studies_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_848761.html","width":111,"caption":"Seat of Study","height":176});
															thumbnails[5428163] = clik.newPhoto({"id":5428163,"src":"Ralph_Flight_Lieutenant_RAF_DS_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_5428163.html","width":117,"caption":"Ralph<br>\r\n","height":176});
															thumbnails[1410519] = clik.newPhoto({"id":1410519,"src":"Boy-Band[dhs-web]_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_1410519.html","width":130,"caption":"\"Boy Band\"","height":173});
															thumbnails[4099851] = clik.newPhoto({"id":4099851,"src":"Winnie_arrives_by_trainDS_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_4099851.html","width":124,"caption":"Winnie arrives by train.","height":176});
															thumbnails[888810] = clik.newPhoto({"id":888810,"src":"Doug Gregory - Veteran Aviator_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_888810.html","width":130,"caption":"Doug Gregory - Veteran Aviator and Octagenarian","height":98});
															thumbnails[4099828] = clik.newPhoto({"id":4099828,"src":"Anglo-American_relations_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_4099828.html","width":111,"caption":"Anglo-American relations","height":176});
															thumbnails[848790] = clik.newPhoto({"id":848790,"src":"The Skipper_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_848790.html","width":130,"caption":"The Skipper","height":98});
															thumbnails[4391503] = clik.newPhoto({"id":4391503,"src":"Silver_Handsds_thumb.jpg","galleries_id":65088,"server_id":18,"link":"photo_4391503.html","width":130,"caption":"\"Silver Hands\"","height":93});
															thumbnails[7042994] = clik.newPhoto({"id":7042994,"src":"Sika_Deer_Fawn_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_7042994.html","width":130,"caption":"Sika Deer Fawn","height":98});
															thumbnails[7949003] = clik.newPhoto({"id":7949003,"src":"Thirsty_LeopardessDS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_7949003.html","width":130,"caption":"Thirsty Leopardess","height":87});
															thumbnails[7949020] = clik.newPhoto({"id":7949020,"src":"Hungry_Male_LionDS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_7949020.html","width":130,"caption":"Hungry Male Lion","height":93});
															thumbnails[7949069] = clik.newPhoto({"id":7949069,"src":"Male_Honduras_IguanaDS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_7949069.html","width":130,"caption":"Male Honduras Iguana","height":87});
															thumbnails[7954524] = clik.newPhoto({"id":7954524,"src":"Perky_RobinDS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_7954524.html","width":130,"caption":"Perky Robin","height":160});
															thumbnails[5425585] = clik.newPhoto({"id":5425585,"src":"Blue_HeronDS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_5425585.html","width":117,"caption":"South American Blue Heron.   <br>\r\n","height":176});
															thumbnails[6070134] = clik.newPhoto({"id":6070134,"src":"Alert_NuthatchDHS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_6070134.html","width":130,"caption":"Alert Nuthatch","height":98});
															thumbnails[1853179] = clik.newPhoto({"id":1853179,"src":"Cow-sea-Lion-with-pup-and-f_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_1853179.html","width":130,"caption":"\"Cow Sea Lion with Pup and Foster Pup\"","height":93});
															thumbnails[5428239] = clik.newPhoto({"id":5428239,"src":"White_Fallow_Deer_BuckDS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_5428239.html","width":130,"caption":"White Fallow Deer Buck<br>\r\n","height":95});
															thumbnails[6070167] = clik.newPhoto({"id":6070167,"src":"Forest_NuthatchDHS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_6070167.html","width":130,"caption":"Forest Nuthatch","height":130});
															thumbnails[5428058] = clik.newPhoto({"id":5428058,"src":"Scarlet_Ibis_Eudicimus_ruberDS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_5428058.html","width":130,"caption":"Scarlet Ibis[Eudocimus Ruber]<br>\r\n<br>\r\n","height":87});
															thumbnails[1945549] = clik.newPhoto({"id":1945549,"src":"Bull Sea Lion selecting Mate_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_1945549.html","width":130,"caption":"Bull Sea Lion selecting Mate","height":93});
															thumbnails[853004] = clik.newPhoto({"id":853004,"src":"Female Barbary (Rock) Ape with Infant2_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_853004.html","width":130,"caption":"Mature Female Barbary Ape with Infant","height":166});
															thumbnails[1853191] = clik.newPhoto({"id":1853191,"src":"Old Salt Water Crocodile_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_1853191.html","width":130,"caption":"Old Salt Water Crocodile","height":98});
															thumbnails[1853186] = clik.newPhoto({"id":1853186,"src":"Salt-water-Crocodile-jumpin_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_1853186.html","width":126,"caption":"Young Salt Water Crocodile jumping for Prey","height":176});
															thumbnails[1853205] = clik.newPhoto({"id":1853205,"src":"South-Australian-Pelicans_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_1853205.html","width":117,"caption":"South Australian Pelicans","height":176});
															thumbnails[961613] = clik.newPhoto({"id":961613,"src":"Marwell Tiger_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_961613.html","width":130,"caption":"Marwell Tiger","height":87});
															thumbnails[3536359] = clik.newPhoto({"id":3536359,"src":"Aggressive_Eagle_Owl_Dweb_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_3536359.html","width":130,"caption":"\"Aggressive Eagle Owl\" <br>\r\n","height":152});
															thumbnails[4926810] = clik.newPhoto({"id":4926810,"src":"Fallow_Deer_at_the_Rut_Stand_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_4926810.html","width":117,"caption":"Fallow Deer at the Rut ","height":176});
															thumbnails[1945598] = clik.newPhoto({"id":1945598,"src":"Koala Contemplation_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_1945598.html","width":113,"caption":"Koala Contemplation","height":176});
															thumbnails[4926833] = clik.newPhoto({"id":4926833,"src":"Fallow_Deer_in_Autumn_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_4926833.html","width":130,"caption":"Fallow Deer in Autumn","height":87});
															thumbnails[4926823] = clik.newPhoto({"id":4926823,"src":"Togetherness_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_4926823.html","width":130,"caption":"Young Fallow Deer","height":87});
															thumbnails[4503623] = clik.newPhoto({"id":4503623,"src":"Elderly_Painted_Lady_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_4503623.html","width":130,"caption":"Elderly Painted Lady","height":108});
															thumbnails[4928140] = clik.newPhoto({"id":4928140,"src":"Fallow_Deer_Buck_at_Rut_timeDS_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_4928140.html","width":130,"caption":"White Fallow Deer Buck","height":91});
															thumbnails[2438908] = clik.newPhoto({"id":2438908,"src":"East-Mediterranean-Gull_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_2438908.html","width":130,"caption":"East Mediterranean Gull","height":102});
															thumbnails[848954] = clik.newPhoto({"id":848954,"src":"Female Barbary Ape_thumb.jpg","galleries_id":64965,"server_id":18,"link":"photo_848954.html","width":123,"caption":"Young Female Barbary Ape","height":176});
															thumbnails[5435673] = clik.newPhoto({"id":5435673,"src":"West_Indies_sailing_schoonerDS_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_5435673.html","width":130,"caption":"Traditional West Indies Schooner","height":87});
															thumbnails[845009] = clik.newPhoto({"id":845009,"src":"Pit Stop at 10,000ft_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_845009.html","width":130,"caption":"Pit Stop at 10,000 feet<br>\r\n<br>\r\n","height":97});
															thumbnails[3361866] = clik.newPhoto({"id":3361866,"src":"Wide Boy!_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_3361866.html","width":130,"caption":"Wide Boy!  ","height":69});
															thumbnails[845015] = clik.newPhoto({"id":845015,"src":"Jaguar Fighter1_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_845015.html","width":130,"caption":"RAF Jaguar Interceptor Fighter","height":93});
															thumbnails[845024] = clik.newPhoto({"id":845024,"src":"Escort Agency!_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_845024.html","width":130,"caption":"Escort Agency!","height":92});
															thumbnails[890380] = clik.newPhoto({"id":890380,"src":"Tornado ground attack fighter_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_890380.html","width":130,"caption":"RAF Tornado at 22,000 feet","height":92});
															thumbnails[890406] = clik.newPhoto({"id":890406,"src":"Sopwith Triplane (Replica)_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_890406.html","width":130,"caption":" 1917 Sopwith Triplane (flying replica)","height":93});
															thumbnails[866783] = clik.newPhoto({"id":866783,"src":"Tornado in flight re-fuelling_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_866783.html","width":130,"caption":"R.A.F.Tornado re-fuelling in flight","height":92});
															thumbnails[890287] = clik.newPhoto({"id":890287,"src":"America's Cup Winner, Auckland_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_890287.html","width":130,"caption":"America's Cup Winner ","height":173});
															thumbnails[1115633] = clik.newPhoto({"id":1115633,"src":"Wing-Walking-Duet_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_1115633.html","width":130,"caption":"Wing Walking Duet","height":93});
															thumbnails[6070149] = clik.newPhoto({"id":6070149,"src":"Antonov_AN2_on_finalsDHS_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_6070149.html","width":130,"caption":"Antonov AN2 on Finals at Kemble","height":87});
															thumbnails[6070157] = clik.newPhoto({"id":6070157,"src":"Re-fuelling_the_Antonov_AN2_at_KembleDHS_thumb.jpg","galleries_id":64966,"server_id":18,"link":"photo_6070157.html","width":130,"caption":"Re-fuelling the AN2 at Kemble","height":87});
															thumbnails[4049263] = clik.newPhoto({"id":4049263,"src":"Salisbury_CathedralDS_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_4049263.html","width":130,"caption":"Salisbury Cathedral","height":139});
															thumbnails[7043980] = clik.newPhoto({"id":7043980,"src":"Canyon_Tree_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_7043980.html","width":117,"caption":"Canyon Tree","height":176});
															thumbnails[2746276] = clik.newPhoto({"id":2746276,"src":"The Empty Beach!_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_2746276.html","width":130,"caption":"The Empty Beach<br>\r\n","height":85});
															thumbnails[3361919] = clik.newPhoto({"id":3361919,"src":"The Grand Canyon1_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_3361919.html","width":117,"caption":"The Grand Canyon1<br>\r\n","height":176});
															thumbnails[2966964] = clik.newPhoto({"id":2966964,"src":"Canyon Roots_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_2966964.html","width":130,"caption":"\"Canyon Roots\"<br>\r\n","height":52});
															thumbnails[3923340] = clik.newPhoto({"id":3923340,"src":"Medieval_CloistersDS_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_3923340.html","width":130,"caption":"\"Medieval Cloisters\"","height":87});
															thumbnails[1410291] = clik.newPhoto({"id":1410291,"src":"Autumn-in-Snowdonia1_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_1410291.html","width":130,"caption":"\"Autumn in Snowdonia\"","height":95});
															thumbnails[1645205] = clik.newPhoto({"id":1645205,"src":"Cradle Mountain, Tasmania_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_1645205.html","width":130,"caption":"Cradle Mountain","height":87});
															thumbnails[3361927] = clik.newPhoto({"id":3361927,"src":"The Grand Canyon2_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_3361927.html","width":130,"caption":"The Grand Canyon2","height":76});
															thumbnails[851917] = clik.newPhoto({"id":851917,"src":"Sky Tower, Aukland, New Zealand_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_851917.html","width":130,"caption":"Sky Tower","height":173});
															thumbnails[851850] = clik.newPhoto({"id":851850,"src":"Douro River, Oporto_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_851850.html","width":130,"caption":"Douro River","height":81});
															thumbnails[1000340] = clik.newPhoto({"id":1000340,"src":"Spinnaker-Web1_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_1000340.html","width":130,"caption":"Spinnaker Web","height":173});
															thumbnails[1947002] = clik.newPhoto({"id":1947002,"src":"Pioneering Wagon Wheel_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_1947002.html","width":130,"caption":"\"Pioneer's Wagon Wheel\"","height":174});
															thumbnails[851825] = clik.newPhoto({"id":851825,"src":"Early Morning Slipway_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_851825.html","width":130,"caption":"Early Morning Slipway","height":99});
															thumbnails[3330040] = clik.newPhoto({"id":3330040,"src":"River Test in Winter_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_3330040.html","width":130,"caption":"Wintry River Test","height":83});
															thumbnails[1945561] = clik.newPhoto({"id":1945561,"src":"Retired but not Forgotten_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_1945561.html","width":130,"caption":"Retired but not Forgotten","height":102});
															thumbnails[2565678] = clik.newPhoto({"id":2565678,"src":"Gone-and-Forgotten_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_2565678.html","width":130,"caption":"\"Gone and Forgotten\"","height":87});
															thumbnails[1000356] = clik.newPhoto({"id":1000356,"src":"Venice-Street-Light_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_1000356.html","width":130,"caption":"Venetian Street Light","height":173});
															thumbnails[844113] = clik.newPhoto({"id":844113,"src":"Crossing Venice Lagoon3_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_844113.html","width":130,"caption":"Crossing the Lagoon","height":98});
															thumbnails[4391481] = clik.newPhoto({"id":4391481,"src":"For_Queen_and_Country_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_4391481.html","width":130,"caption":"\"For Queen and Country\"","height":93});
															thumbnails[4391485] = clik.newPhoto({"id":4391485,"src":"Winchester_Cathedral_BWC_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_4391485.html","width":130,"caption":"Winchester Cathedral","height":163});
															thumbnails[1000483] = clik.newPhoto({"id":1000483,"src":"Bridge-of-Sighs_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_1000483.html","width":130,"caption":"Bridge of Sigh's, Venice, Italy","height":98});
															thumbnails[1000414] = clik.newPhoto({"id":1000414,"src":"BuranoHouse_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_1000414.html","width":115,"caption":"A Burano House","height":176});
															thumbnails[3010451] = clik.newPhoto({"id":3010451,"src":"Bridge of Sighs, Oxford U_thumb.K..jpg","galleries_id":64967,"server_id":18,"link":"photo_3010451.html","width":130,"caption":"\"Bridge of Sigh's\", Oxford, U.K.","height":93});
															thumbnails[1115651] = clik.newPhoto({"id":1115651,"src":"Amelfi-Coast-from-Ravello_thumb.jpg","galleries_id":64967,"server_id":18,"link":"photo_1115651.html","width":130,"caption":"The Amelfi Coast from Ravello","height":96});
															thumbnails[3923358] = clik.newPhoto({"id":3923358,"src":"Tulip_FantasyDS_thumb.jpg","galleries_id":226965,"server_id":18,"link":"photo_3923358.html","width":130,"caption":"\"Tulip Fantasy\"<br>\r\n","height":169});
															thumbnails[1115618] = clik.newPhoto({"id":1115618,"src":"Australian-Red-Bottle-Brush_thumb.jpg","galleries_id":226965,"server_id":18,"link":"photo_1115618.html","width":129,"caption":"Australian Red Bottlebrush Flower","height":176});
															thumbnails[6383439] = clik.newPhoto({"id":6383439,"src":"Seating_PlanDHS_thumb.jpg","galleries_id":226965,"server_id":18,"link":"photo_6383439.html","width":117,"caption":"\"Seating Plan\"","height":176});
															thumbnails[961566] = clik.newPhoto({"id":961566,"src":"Magnolia_thumb.jpg","galleries_id":226965,"server_id":18,"link":"photo_961566.html","width":118,"caption":"Magnolia","height":176});
															thumbnails[6383460] = clik.newPhoto({"id":6383460,"src":"Summer_SheenDHS_thumb.jpg","galleries_id":226965,"server_id":18,"link":"photo_6383460.html","width":130,"caption":"\"Summer Sheen\"","height":105});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[64966] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Air, Sea & Land Transport","link":"section94036.html","maxRecords":0.0,"photoIDs":[5435673.0,845009.0,3361866.0,845015.0,845024.0,890380.0,890406.0,866783.0,890287.0,1115633.0,6070149.0,6070157.0],"skipIndex":0,"section_code":"section94036","featured_images":"6070157,6070149,5435673,3361866,1115633,890406,890380,890287,866783,845024","id":64966,"singleSection":false});				  						galleries[64967] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"City, Sea and Landscapes","link":"section94046.html","maxRecords":0.0,"photoIDs":[4049263.0,7043980.0,2746276.0,3361919.0,2966964.0,3923340.0,1410291.0,1645205.0,3361927.0,851917.0,851850.0,1000340.0,1947002.0,851825.0,3330040.0,1945561.0,2565678.0,1000356.0,844113.0,4391481.0,4391485.0,1000483.0,1000414.0,3010451.0,1115651.0],"skipIndex":0,"section_code":"section94046","featured_images":844113.0,"id":64967,"singleSection":false});				  						galleries[226965] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gardens & Flowers","link":"section277681.html","maxRecords":0.0,"photoIDs":[3923358.0,1115618.0,6383439.0,961566.0,6383460.0],"skipIndex":0,"section_code":"section277681","featured_images":"6383460,6383439,3923358,1115618,961566","id":226965,"singleSection":false});				  						galleries[65088] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"section94244.html","maxRecords":0.0,"photoIDs":[7949084.0,7949112.0,5428064.0,5428070.0,5428236.0,847382.0,4746999.0,842832.0,848761.0,5428163.0,1410519.0,4099851.0,888810.0,4099828.0,848790.0,4391503.0],"skipIndex":0,"section_code":"section94244","featured_images":"7949112,7949084,5428236,5428163,5428070,5428064,4746999,4391503,4099851,4099828","id":65088,"singleSection":false});				  						galleries[64965] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The Natural World","link":"section94045.html","maxRecords":0.0,"photoIDs":[7042994.0,7949003.0,7949020.0,7949069.0,7954524.0,5425585.0,6070134.0,1853179.0,5428239.0,6070167.0,5428058.0,1945549.0,853004.0,1853191.0,1853186.0,1853205.0,961613.0,3536359.0,4926810.0,1945598.0,4926833.0,4926823.0,4503623.0,4928140.0,2438908.0,848954.0],"skipIndex":0,"section_code":"section94045","featured_images":"7954524,7949069,7949020,7949003,7042994,6070167,6070134,5428239,5428058,5425585","id":64965,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7954524,7949112,7949084,7949069,7949020,7949003,7043980,7042994,6383460,6383439,6070167,6070157,6070149,6070134,5435673,5428239,5428236,5428163,5428070,5428064,5428058,5425585,4928140,4926833,4926823,4926810,4838776,4766460,4746999,4503623,4391503,4391485,4391481,4099851,4099828,4049263,3923358,3923340,3536359,3361927,3361919,3361866,3330040,3010451,2966964,2746276,2565678,2438908,1947002,1945598';
imageSets[2] = '844113';
imageSets[3] = '7954524,7949112,7949084,7949069,7949020,7949003,7043980,7042994,6383460,6383439,6070167,6070157,6070149,6070134,5435673,5428239,5428236,5428163,5428070,5428064,5428058,5425585,4928140,4926833,4926823,4926810,4838776,4766460,4746999,4503623,4391503,4391485,4391481,4099851,4099828,4049263,3923358,3923340,3536359,3361927,3361919,3361866,3330040,3010451,2966964,2746276,2565678,2438908,1947002,1945598';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/dhsimmonds/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/dhsimmonds/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 && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'section94244.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 && 'section94244' != '') {
					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 = 'David Simmonds Photography: ' + 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>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>David H Simmonds </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 !== '' || 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;
	}
}

			

