window.thumbnails = {};
															thumbnails[4224405] = clik.newPhoto({"id":4224405,"src":"livepreview_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Calendar 2010","height":66});
															thumbnails[9078326] = clik.newPhoto({"id":9078326,"src":"2012-01-28_12.03.21_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_9078326.html","width":130,"caption":"Ill Bell in Winter","height":98});
															thumbnails[9078397] = clik.newPhoto({"id":9078397,"src":"2012-01-28_15.25.47_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_9078397.html","width":130,"caption":"Thornwaite Crag","height":98});
															thumbnails[9078435] = clik.newPhoto({"id":9078435,"src":"2012-01-28_13.43.50_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_9078435.html","width":130,"caption":"Thornthwaite Beacon","height":173});
															thumbnails[8962075] = clik.newPhoto({"id":8962075,"src":"DSC_3320_3D950EA2-24E8-5EC4-4FC0E9F8B1405C78_thumb.JPG","galleries_id":194890,"server_id":32,"link":"photo_8962075.html","width":130,"caption":"Waterfall Rydale","height":196});
															thumbnails[7305973] = clik.newPhoto({"id":7305973,"src":"P1010159_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_7305973.html","width":130,"caption":"Eiger North Wall","height":173});
															thumbnails[7306026] = clik.newPhoto({"id":7306026,"src":"P1010166_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_7306026.html","width":130,"caption":"Wetterhorn","height":173});
															thumbnails[7306046] = clik.newPhoto({"id":7306046,"src":"P1010162_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_7306046.html","width":130,"caption":"Hotel Bellevue des Alpes","height":98});
															thumbnails[7305951] = clik.newPhoto({"id":7305951,"src":"DSC_0036_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_7305951.html","width":130,"caption":"Eiger Nordwand","height":196});
															thumbnails[7305923] = clik.newPhoto({"id":7305923,"src":"DSC_0008_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_7305923.html","width":130,"caption":"Winter Kliene Scheidegg ","height":196});
															thumbnails[7305933] = clik.newPhoto({"id":7305933,"src":"DSC_0020_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_7305933.html","width":130,"caption":"Eiger in Winter","height":86});
															thumbnails[7207551] = clik.newPhoto({"id":7207551,"src":"DSC_2456_thumb.jpg","galleries_id":194437,"server_id":32,"link":"photo_7207551.html","width":130,"caption":"Dartmoor View ","height":86});
															thumbnails[7124966] = clik.newPhoto({"id":7124966,"src":"Cosdon_Tree_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_7124966.html","width":130,"caption":"Cosdon Tree","height":86});
															thumbnails[7118277] = clik.newPhoto({"id":7118277,"src":"Bow_Fell_Mist_thumb.JPG","galleries_id":194890,"server_id":32,"link":"photo_7118277.html","width":130,"caption":"Bow Fell Mist","height":86});
															thumbnails[7118279] = clik.newPhoto({"id":7118279,"src":"DSC_2398_thumb.JPG","galleries_id":194890,"server_id":32,"link":"photo_7118279.html","width":130,"caption":"Mountain Lake","height":196});
															thumbnails[6833371] = clik.newPhoto({"id":6833371,"src":"My_Little_Friend_2_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_6833371.html","width":130,"caption":"Little Man of Robin Hood Bay","height":159});
															thumbnails[5815387] = clik.newPhoto({"id":5815387,"src":"Fur_Tor_Sunset_640_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_5815387.html","width":130,"caption":"Fur Tor Sunset","height":196});
															thumbnails[5815395] = clik.newPhoto({"id":5815395,"src":"Fur_Tor_Looking_North_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_5815395.html","width":130,"caption":"Fur Tor Spring Sunshine","height":86});
															thumbnails[5815507] = clik.newPhoto({"id":5815507,"src":"Hare_Tor_Sunset_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_5815507.html","width":130,"caption":"Sunset over Hare Tor","height":196});
															thumbnails[5815265] = clik.newPhoto({"id":5815265,"src":"DSC_0609_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_5815265.html","width":130,"caption":"Late Night moon Light","height":86});
															thumbnails[5471684] = clik.newPhoto({"id":5471684,"src":"The_Big_Chair_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_5471684.html","width":130,"caption":"The Big Chair","height":169});
															thumbnails[5306769] = clik.newPhoto({"id":5306769,"src":"newland_valley_2_thumb.JPG","galleries_id":194890,"server_id":32,"link":"photo_5306769.html","width":130,"caption":"Newland Valley","height":82});
															thumbnails[5306818] = clik.newPhoto({"id":5306818,"src":"Helvellyn_Ridge_thumb.JPG","galleries_id":194890,"server_id":32,"link":"photo_5306818.html","width":130,"caption":"Helvellyn Ridge","height":77});
															thumbnails[5306783] = clik.newPhoto({"id":5306783,"src":"Winter_Mountain_thumb.JPG","galleries_id":194890,"server_id":32,"link":"photo_5306783.html","width":130,"caption":"Winter Mountain","height":174});
															thumbnails[5306816] = clik.newPhoto({"id":5306816,"src":"Whiteless_Pike_thumb.JPG","galleries_id":194890,"server_id":32,"link":"photo_5306816.html","width":130,"caption":"Whiteless Pike","height":77});
															thumbnails[4761532] = clik.newPhoto({"id":4761532,"src":"DSC_0274_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_4761532.html","width":130,"caption":"North Face Eiger","height":86});
															thumbnails[4761676] = clik.newPhoto({"id":4761676,"src":"DSC_0284_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_4761676.html","width":130,"caption":"Schreckhorn","height":86});
															thumbnails[4761617] = clik.newPhoto({"id":4761617,"src":"Hotels_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_4761617.html","width":130,"caption":"Hotels Eiger","height":160});
															thumbnails[4761657] = clik.newPhoto({"id":4761657,"src":"DSC_0163_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_4761657.html","width":130,"caption":"Wetterhorn","height":86});
															thumbnails[4131360] = clik.newPhoto({"id":4131360,"src":"Evening_Sun_Great_Gable_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_4131360.html","width":130,"caption":"Evening Sun Great Gable","height":196});
															thumbnails[4131427] = clik.newPhoto({"id":4131427,"src":"Lost_Mountaineers_Wasdale_Church_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_4131427.html","width":130,"caption":"Lost Mountaineers in Wasdale","height":196});
															thumbnails[4131436] = clik.newPhoto({"id":4131436,"src":"Mid_Summer_Wasdale_thumb.JPG","galleries_id":194890,"server_id":32,"link":"photo_4131436.html","width":130,"caption":"Great Gable in Mid Summer","height":86});
															thumbnails[4131440] = clik.newPhoto({"id":4131440,"src":"Napes_Window_Glass_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_4131440.html","width":130,"caption":"Window Glass Wasdale Church","height":196});
															thumbnails[4131446] = clik.newPhoto({"id":4131446,"src":"Skelwith_Force_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_4131446.html","width":130,"caption":"Skelwith Force","height":196});
															thumbnails[4131420] = clik.newPhoto({"id":4131420,"src":"Langdale_Valley_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_4131420.html","width":130,"caption":"Langdale Valley","height":196});
															thumbnails[3752957] = clik.newPhoto({"id":3752957,"src":"Cosdon_19_April_number_6_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3752957.html","width":130,"caption":"Cosdon Spring Morning","height":174});
															thumbnails[3753036] = clik.newPhoto({"id":3753036,"src":"Pixes_Pool_01_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3753036.html","width":130,"caption":"Pixies Pool","height":173});
															thumbnails[3753074] = clik.newPhoto({"id":3753074,"src":"Buckland_Beacon_10_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3753074.html","width":130,"caption":"Buckland Beacon ","height":170});
															thumbnails[3753083] = clik.newPhoto({"id":3753083,"src":"Gateway_to_the_Moor_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3753083.html","width":130,"caption":"Gateway to Moor","height":173});
															thumbnails[3483490] = clik.newPhoto({"id":3483490,"src":"REV 2_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3483490.html","width":130,"caption":"West Dart River <br>\r\nMorning Sunshine","height":91});
															thumbnails[3483499] = clik.newPhoto({"id":3483499,"src":"REV 3_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3483499.html","width":130,"caption":"Dartmoor Bridge<br>\r\nWest Dart River","height":82});
															thumbnails[3483530] = clik.newPhoto({"id":3483530,"src":"REV 4_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3483530.html","width":130,"caption":"Prince Hall<br>\r\nWest Dart River","height":86});
															thumbnails[3424649] = clik.newPhoto({"id":3424649,"src":"North Tawton Snow Feb 09 120_thumb.jpg","galleries_id":194437,"server_id":32,"link":"photo_3424649.html","width":130,"caption":"North Dartmoor <br>\r\nNr Oke Tor ","height":98});
															thumbnails[3401142] = clik.newPhoto({"id":3401142,"src":"Dartmoor View_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3401142.html","width":130,"caption":"North Dartmoor View","height":41});
															thumbnails[3362686] = clik.newPhoto({"id":3362686,"src":"DSC_0018_thumb.JPG","galleries_id":194890,"server_id":32,"link":"photo_3362686.html","width":130,"caption":"ST Sunday & Fairfield","height":86});
															thumbnails[3326935] = clik.newPhoto({"id":3326935,"src":"P1010027_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3326935.html","width":130,"caption":"Winter Morning <br>\r\nNew Bridge","height":173});
															thumbnails[3320133] = clik.newPhoto({"id":3320133,"src":"Winter Ice Tavy Cleave_thumb.jpg","galleries_id":194437,"server_id":32,"link":"photo_3320133.html","width":130,"caption":"Winter Ice Tavy Cleave","height":196});
															thumbnails[3178069] = clik.newPhoto({"id":3178069,"src":"Everest 02_thumb.JPG","galleries_id":194438,"server_id":32,"link":"photo_3178069.html","width":130,"caption":"View of Everest","height":86});
															thumbnails[3178106] = clik.newPhoto({"id":3178106,"src":"Ama dabler_thumb.JPG","galleries_id":194438,"server_id":32,"link":"photo_3178106.html","width":130,"caption":"Ama Dablam","height":196});
															thumbnails[3178109] = clik.newPhoto({"id":3178109,"src":"Everest West Face_thumb.JPG","galleries_id":194438,"server_id":32,"link":"photo_3178109.html","width":130,"caption":"West Face of Everest","height":86});
															thumbnails[3178175] = clik.newPhoto({"id":3178175,"src":"Easton Tor view towards Haytor_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3178175.html","width":130,"caption":"View of Haytor","height":86});
															thumbnails[3178180] = clik.newPhoto({"id":3178180,"src":"DSC_0025_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3178180.html","width":130,"caption":"Sheep & Haytor","height":86});
															thumbnails[3178186] = clik.newPhoto({"id":3178186,"src":"Lower Man Haytor_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3178186.html","width":130,"caption":"Lower Man Haytor","height":86});
															thumbnails[3178410] = clik.newPhoto({"id":3178410,"src":"Clear Water_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3178410.html","width":130,"caption":"Clear Water","height":196});
															thumbnails[3178413] = clik.newPhoto({"id":3178413,"src":"Stone Hut View_thumb.JPG","galleries_id":194438,"server_id":32,"link":"photo_3178413.html","width":130,"caption":"Stone Hut in the high mountains of Nepal","height":86});
															thumbnails[3178418] = clik.newPhoto({"id":3178418,"src":"Teign weir_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3178418.html","width":130,"caption":"Teign Weir","height":86});
															thumbnails[3182507] = clik.newPhoto({"id":3182507,"src":"Belstone Winter_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182507.html","width":130,"caption":"Belstone in Winter","height":86});
															thumbnails[3182509] = clik.newPhoto({"id":3182509,"src":"Holne Bridge bluebell_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182509.html","width":130,"caption":"Bluebell River Dart","height":196});
															thumbnails[3182514] = clik.newPhoto({"id":3182514,"src":"Hutchinsons Cross_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182514.html","width":130,"caption":"Hutchinsons Cross","height":51});
															thumbnails[3182519] = clik.newPhoto({"id":3182519,"src":"River Teign_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182519.html","width":130,"caption":"River Teign","height":196});
															thumbnails[3182524] = clik.newPhoto({"id":3182524,"src":"Sandy Hole Pass_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182524.html","width":130,"caption":"Sandy Hole Pass","height":197});
															thumbnails[3182527] = clik.newPhoto({"id":3182527,"src":"Sheep Taw Marsh_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182527.html","width":130,"caption":"Sheep Taw Marsh","height":86});
															thumbnails[3182530] = clik.newPhoto({"id":3182530,"src":"Sleeperton Tor_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182530.html","width":130,"caption":"Steeperton Tor","height":86});
															thumbnails[3182534] = clik.newPhoto({"id":3182534,"src":"Tavy Cleave_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182534.html","width":130,"caption":"Tavy Cleave","height":48});
															thumbnails[3182540] = clik.newPhoto({"id":3182540,"src":"Teign Valley June 08_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182540.html","width":130,"caption":"Teign Valley","height":86});
															thumbnails[3182546] = clik.newPhoto({"id":3182546,"src":"Upper Dart_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182546.html","width":130,"caption":"Upper Dart","height":49});
															thumbnails[3182553] = clik.newPhoto({"id":3182553,"src":"Winter On Belstone_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182553.html","width":130,"caption":"Winter on Belstone","height":87});
															thumbnails[3182607] = clik.newPhoto({"id":3182607,"src":"Haytor Ripon View_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182607.html","width":130,"caption":"Haytor Ripon View","height":86});
															thumbnails[3182644] = clik.newPhoto({"id":3182644,"src":"Dartmoor Cross_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182644.html","width":130,"caption":"Dartmoor Cross","height":196});
															thumbnails[3182651] = clik.newPhoto({"id":3182651,"src":"Dartmoor Window_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182651.html","width":130,"caption":"Dartmoor Window","height":86});
															thumbnails[3182659] = clik.newPhoto({"id":3182659,"src":"Summer Pixies Pool_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182659.html","width":130,"caption":"Summer, Pixies Pool","height":86});
															thumbnails[3182664] = clik.newPhoto({"id":3182664,"src":"Summer Rain_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3182664.html","width":130,"caption":"Summer Rain","height":196});
															thumbnails[3185220] = clik.newPhoto({"id":3185220,"src":"DSC_0250_thumb.JPG","galleries_id":194438,"server_id":32,"link":"photo_3185220.html","width":130,"caption":"Mountain View","height":86});
															thumbnails[3185231] = clik.newPhoto({"id":3185231,"src":"DSC_0108_thumb.JPG","galleries_id":194438,"server_id":32,"link":"photo_3185231.html","width":130,"caption":"High Bridge","height":196});
															thumbnails[3185236] = clik.newPhoto({"id":3185236,"src":"DSC_0317_thumb.JPG","galleries_id":194438,"server_id":32,"link":"photo_3185236.html","width":130,"caption":"Ama Dablam","height":196});
															thumbnails[3185240] = clik.newPhoto({"id":3185240,"src":"DSC_0344_thumb.JPG","galleries_id":194438,"server_id":32,"link":"photo_3185240.html","width":130,"caption":"Everest Magic Mountain","height":86});
															thumbnails[3185845] = clik.newPhoto({"id":3185845,"src":"DSC_0457_thumb.JPG","galleries_id":194438,"server_id":32,"link":"photo_3185845.html","width":130,"caption":"High Mountain","height":86});
															thumbnails[3185905] = clik.newPhoto({"id":3185905,"src":"P1010044_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_3185905.html","width":130,"caption":"Broken Spectre","height":98});
															thumbnails[3185906] = clik.newPhoto({"id":3185906,"src":"P1010067_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_3185906.html","width":130,"caption":"High Water Fall","height":173});
															thumbnails[3185911] = clik.newPhoto({"id":3185911,"src":"sept 05 040_thumb.jpg","galleries_id":194872,"server_id":32,"link":"photo_3185911.html","width":130,"caption":"Slovenia","height":173});
															thumbnails[3185915] = clik.newPhoto({"id":3185915,"src":"sept 05 050_thumb.jpg","galleries_id":194872,"server_id":32,"link":"photo_3185915.html","width":130,"caption":"High Slovenia ","height":98});
															thumbnails[3185920] = clik.newPhoto({"id":3185920,"src":"DSC_0081_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_3185920.html","width":130,"caption":"Corsica","height":86});
															thumbnails[3185924] = clik.newPhoto({"id":3185924,"src":"DSC_0164_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_3185924.html","width":130,"caption":"GR20 ","height":196});
															thumbnails[3185937] = clik.newPhoto({"id":3185937,"src":"DSC_0026_thumb.JPG","galleries_id":194437,"server_id":32,"link":"photo_3185937.html","width":130,"caption":"Dartmoor Cross","height":196});
															thumbnails[3185980] = clik.newPhoto({"id":3185980,"src":"Winter snow_thumb.jpg","galleries_id":194437,"server_id":32,"link":"photo_3185980.html","width":130,"caption":"Dartmoor Snow","height":86});
															thumbnails[3185986] = clik.newPhoto({"id":3185986,"src":"zillataltor 022_thumb.jpg","galleries_id":194872,"server_id":32,"link":"photo_3185986.html","width":130,"caption":"Mountain Hut","height":98});
															thumbnails[3185993] = clik.newPhoto({"id":3185993,"src":"zillataltor 017_thumb.jpg","galleries_id":194872,"server_id":32,"link":"photo_3185993.html","width":130,"caption":"Alpine Meadow","height":98});
															thumbnails[3186028] = clik.newPhoto({"id":3186028,"src":"Castlerigg_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_3186028.html","width":130,"caption":"Castlerigg","height":86});
															thumbnails[3186192] = clik.newPhoto({"id":3186192,"src":"Ashness Bridge_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_3186192.html","width":130,"caption":"Ashness Bridge","height":196});
															thumbnails[3191237] = clik.newPhoto({"id":3191237,"src":"scan0003_thumb.jpg","galleries_id":194872,"server_id":32,"link":"photo_3191237.html","width":130,"caption":"Matterhorn ","height":89});
															thumbnails[3191263] = clik.newPhoto({"id":3191263,"src":"Top Glen Coe_thumb.JPG","galleries_id":195093,"server_id":32,"link":"photo_3191263.html","width":130,"caption":"Top of Glen Coe","height":86});
															thumbnails[3191309] = clik.newPhoto({"id":3191309,"src":"Tirol Austria_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_3191309.html","width":130,"caption":"Tirol Austria","height":86});
															thumbnails[3257929] = clik.newPhoto({"id":3257929,"src":"Cosdon Winter Ice_thumb.jpg","galleries_id":194437,"server_id":32,"link":"photo_3257929.html","width":130,"caption":"Cosdon Winter Ice","height":196});
															thumbnails[4131477] = clik.newPhoto({"id":4131477,"src":"GSG_in_the_cold_Keswick_thumb.jpg","galleries_id":194890,"server_id":32,"link":"photo_4131477.html","width":130,"caption":"GSG cold in FEB 09","height":86});
															thumbnails[7306051] = clik.newPhoto({"id":7306051,"src":"DSC_0025_DBBBDFB8-1EC9-DFB6-09D2B4C0559B0ADB_thumb.JPG","galleries_id":194872,"server_id":32,"link":"photo_7306051.html","width":130,"caption":"","height":86});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[194872] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Alps","link":"gallery_194872.html","maxRecords":0.0,"photoIDs":[7305973.0,7306026.0,7306046.0,7305951.0,7305923.0,7305933.0,4761532.0,4761676.0,4761617.0,4761657.0,3185905.0,3185906.0,3185911.0,3185915.0,3185920.0,3185924.0,3185986.0,3185993.0,3191237.0,3191309.0,7306051.0],"skipIndex":0,"section_code":"gallery","featured_images":"7306051,7306046,7306026,7305973,7305951,7305933,7305923,4761676,4761657,4761617","id":194872,"singleSection":false});				  						galleries[194890] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Lakeland","link":"gallery_194890.html","maxRecords":0.0,"photoIDs":[9078326.0,9078397.0,9078435.0,8962075.0,7118277.0,7118279.0,6833371.0,5306769.0,5306818.0,5306783.0,5306816.0,4131360.0,4131427.0,4131436.0,4131440.0,4131446.0,4131420.0,3362686.0,3186028.0,3186192.0,4131477.0],"skipIndex":0,"section_code":"gallery","featured_images":"4131446,4131440,4131436,4131427,4131420,4131360","id":194890,"singleSection":false});				  						galleries[195093] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scotland","link":"gallery_195093.html","maxRecords":0.0,"photoIDs":[3191263.0],"skipIndex":0,"section_code":"gallery","featured_images":3191263.0,"id":195093,"singleSection":false});				  						galleries[194437] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dartmoor ","link":"gallery_194437.html","maxRecords":0.0,"photoIDs":[7207551.0,7124966.0,5815387.0,5815395.0,5815507.0,5815265.0,5471684.0,3752957.0,3753036.0,3753074.0,3753083.0,3483490.0,3483499.0,3483530.0,3424649.0,3401142.0,3326935.0,3320133.0,3178175.0,3178180.0,3178186.0,3178410.0,3178418.0,3182507.0,3182509.0,3182514.0,3182519.0,3182524.0,3182527.0,3182530.0,3182534.0,3182540.0,3182546.0,3182553.0,3182607.0,3182644.0,3182651.0,3182659.0,3182664.0,3185937.0,3185980.0,3257929.0],"skipIndex":0,"section_code":"gallery","featured_images":"7207551,7124966,5815507,5815395,5815387,5815265,5471684,3753083,3753074,3753036","id":194437,"singleSection":false});				  						galleries[194438] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nepal","link":"gallery_194438.html","maxRecords":0.0,"photoIDs":[3178069.0,3178106.0,3178109.0,3178413.0,3185220.0,3185231.0,3185236.0,3185240.0,3185845.0],"skipIndex":0,"section_code":"gallery","featured_images":"3185845,3185240,3185236,3185231,3185220,3178413,3178109,3178106,3178069","id":194438,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7305933';
imageSets[2] = '4131446,4131440,4131436,4131427,4131420,4131360,4224405';
imageSets[3] = '9078435,9078397,9078326,8962075,7306051,7306046,7306026,7305973,7305951,7305933,7305923,7207551,7124966,7118279,7118277,6833371,5815507,5815395,5815387,5815265,5471684,5306818,5306816,5306783,5306769,4761676,4761657,4761617,4761532,4224405,4131477,4131446,4131440,4131436,4131427,4131420,4131360,3753083,3753074,3753036,3752957,3483530,3483499,3483490,3424649,3401142,3362686,3326935,3320133,3257929';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/gavin84/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/gavin84/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/gavin84/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/gavin84/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/gavin84/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/gavin84/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/gavin84/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/gavin84/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 = 'Images-of-Mountains.co.uk: ' + 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>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 print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (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 += '<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;
	}
}

			

