window.thumbnails = {};
															thumbnails[1119805] = clik.newPhoto({"id":1119805,"src":"web451.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Alone on the loch.","height":130});
															thumbnails[3543884] = clik.newPhoto({"id":3543884,"src":"Janesmall_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":60,"caption":"","height":60});
															thumbnails[1119013] = clik.newPhoto({"id":1119013,"src":"web252.jpg","galleries_id":125368,"server_id":18,"link":"photo_1119013.html","width":130,"caption":"Abndoned mine","height":130});
															thumbnails[1119018] = clik.newPhoto({"id":1119018,"src":"web321.jpg","galleries_id":125322,"server_id":18,"link":"photo_1119018.html","width":130,"caption":"The jurassic coast","height":130});
															thumbnails[1119114] = clik.newPhoto({"id":1119114,"src":"web391.jpg","galleries_id":81834,"server_id":18,"link":"photo_1119114.html","width":130,"caption":"Reach to the light","height":130});
															thumbnails[1119796] = clik.newPhoto({"id":1119796,"src":"web211.jpg","galleries_id":81900,"server_id":18,"link":"photo_1119796.html","width":130,"caption":"Trees in the mist","height":130});
															thumbnails[1119801] = clik.newPhoto({"id":1119801,"src":"web20_thumb.jpg","galleries_id":81900,"server_id":18,"link":"photo_1119801.html","width":130,"caption":"Haley wood","height":126});
															thumbnails[1119803] = clik.newPhoto({"id":1119803,"src":"Lesser stitchwort_thumb.jpg","galleries_id":81900,"server_id":18,"link":"photo_1119803.html","width":130,"caption":"Lesser Stitchwort","height":130});
															thumbnails[1119841] = clik.newPhoto({"id":1119841,"src":"web411.jpg","galleries_id":81834,"server_id":18,"link":"photo_1119841.html","width":130,"caption":"The Crofter's view","height":130});
															thumbnails[1119882] = clik.newPhoto({"id":1119882,"src":"web441.jpg","galleries_id":81834,"server_id":18,"link":"photo_1119882.html","width":130,"caption":"Gearranan pebbles","height":130});
															thumbnails[1119892] = clik.newPhoto({"id":1119892,"src":"web241.jpg","galleries_id":81904,"server_id":18,"link":"photo_1119892.html","width":130,"caption":"The secret","height":130});
															thumbnails[1119894] = clik.newPhoto({"id":1119894,"src":"web231.jpg","galleries_id":81904,"server_id":18,"link":"photo_1119894.html","width":130,"caption":"Feet in the sand","height":130});
															thumbnails[1119899] = clik.newPhoto({"id":1119899,"src":"web221.jpg","galleries_id":81904,"server_id":18,"link":"photo_1119899.html","width":130,"caption":"The scream","height":130});
															thumbnails[1119915] = clik.newPhoto({"id":1119915,"src":"web301.jpg","galleries_id":81903,"server_id":18,"link":"photo_1119915.html","width":130,"caption":"Moving rock","height":130});
															thumbnails[1119970] = clik.newPhoto({"id":1119970,"src":"web501.jpg","galleries_id":81903,"server_id":18,"link":"photo_1119970.html","width":130,"caption":"Racetrack valley","height":130});
															thumbnails[1120148] = clik.newPhoto({"id":1120148,"src":"web161.jpg","galleries_id":81904,"server_id":18,"link":"photo_1120148.html","width":130,"caption":"On the rocks","height":130});
															thumbnails[1120170] = clik.newPhoto({"id":1120170,"src":"web332.jpg","galleries_id":81904,"server_id":18,"link":"photo_1120170.html","width":130,"caption":"The rockpool","height":130});
															thumbnails[1123099] = clik.newPhoto({"id":1123099,"src":"web401.jpg","galleries_id":81834,"server_id":18,"link":"photo_1123099.html","width":130,"caption":"In the shadow of the mountain","height":130});
															thumbnails[1123210] = clik.newPhoto({"id":1123210,"src":"web262.jpg","galleries_id":125368,"server_id":18,"link":"photo_1123210.html","width":130,"caption":"Lanyon quoit","height":130});
															thumbnails[1161742] = clik.newPhoto({"id":1161742,"src":"flower11.jpg","galleries_id":81900,"server_id":18,"link":"photo_1161742.html","width":130,"caption":"Summer Flower","height":130});
															thumbnails[1176455] = clik.newPhoto({"id":1176455,"src":"CLARE GATES2.jpg","galleries_id":84810,"server_id":18,"link":"photo_1176455.html","width":130,"caption":"Clare college Gates","height":130});
															thumbnails[1177191] = clik.newPhoto({"id":1177191,"src":"wood iron frost1.jpg","galleries_id":84810,"server_id":18,"link":"photo_1177191.html","width":130,"caption":"Wood, iron and frost","height":130});
															thumbnails[1177194] = clik.newPhoto({"id":1177194,"src":"frosty morning1.jpg","galleries_id":84810,"server_id":18,"link":"photo_1177194.html","width":130,"caption":"Frosty morning","height":130});
															thumbnails[1177232] = clik.newPhoto({"id":1177232,"src":"Grumpyoldmen2.jpg","galleries_id":81904,"server_id":18,"link":"photo_1177232.html","width":130,"caption":"Grumpy old men","height":130});
															thumbnails[1196532] = clik.newPhoto({"id":1196532,"src":"house_thumb.jpg","galleries_id":84810,"server_id":18,"link":"photo_1196532.html","width":130,"caption":"Fen cottage","height":130});
															thumbnails[1574533] = clik.newPhoto({"id":1574533,"src":"Hadrians wall thumb.jpg","galleries_id":125368,"server_id":18,"link":"photo_1574533.html","width":130,"caption":"Hadrian's wall sunset","height":130});
															thumbnails[1574536] = clik.newPhoto({"id":1574536,"src":"dunstcastle thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_1574536.html","width":130,"caption":"Dunstanburgh castle","height":130});
															thumbnails[1574555] = clik.newPhoto({"id":1574555,"src":"sycamore thumb.jpg","galleries_id":125368,"server_id":18,"link":"photo_1574555.html","width":130,"caption":"Sycamore gap","height":130});
															thumbnails[1574559] = clik.newPhoto({"id":1574559,"src":"tree and hardrian  thumb.jpg","galleries_id":125368,"server_id":18,"link":"photo_1574559.html","width":130,"caption":"Steel rig view","height":130});
															thumbnails[1862034] = clik.newPhoto({"id":1862034,"src":"Dune_thumb.jpg","galleries_id":81903,"server_id":18,"link":"photo_1862034.html","width":130,"caption":"Dune","height":130});
															thumbnails[1862039] = clik.newPhoto({"id":1862039,"src":"glove on sculpture in progress flattened no 2_thumb.jpg","galleries_id":125321,"server_id":18,"link":"photo_1862039.html","width":130,"caption":"Hand in sculpture","height":130});
															thumbnails[1862040] = clik.newPhoto({"id":1862040,"src":"pinnacles_thumb.jpg","galleries_id":81903,"server_id":18,"link":"photo_1862040.html","width":130,"caption":"The pinnacles","height":130});
															thumbnails[1862042] = clik.newPhoto({"id":1862042,"src":"death drive_thumb.jpg","galleries_id":81903,"server_id":18,"link":"photo_1862042.html","width":130,"caption":"Drive into death valley","height":130});
															thumbnails[1862056] = clik.newPhoto({"id":1862056,"src":"napa and gwen_thumb.jpg","galleries_id":125321,"server_id":18,"link":"photo_1862056.html","width":130,"caption":"2 figures","height":130});
															thumbnails[1862061] = clik.newPhoto({"id":1862061,"src":"JT4_thumb.jpg","galleries_id":81903,"server_id":18,"link":"photo_1862061.html","width":130,"caption":"Keys view","height":130});
															thumbnails[1863147] = clik.newPhoto({"id":1863147,"src":"Goodall no  5_thumb.jpg","galleries_id":81903,"server_id":18,"link":"photo_1863147.html","width":130,"caption":"Death valley dune study","height":130});
															thumbnails[1863151] = clik.newPhoto({"id":1863151,"src":"daffodil_thumb.jpg","galleries_id":81900,"server_id":18,"link":"photo_1863151.html","width":130,"caption":"Daffodil","height":130});
															thumbnails[1863158] = clik.newPhoto({"id":1863158,"src":"The Whirlpool_thumb.jpg","galleries_id":125321,"server_id":18,"link":"photo_1863158.html","width":130,"caption":"The whirl pool","height":130});
															thumbnails[1863160] = clik.newPhoto({"id":1863160,"src":"Bug on the flower PI_thumb.jpg","galleries_id":81900,"server_id":18,"link":"photo_1863160.html","width":130,"caption":"Bug on the flower<br>\r\n","height":130});
															thumbnails[1863205] = clik.newPhoto({"id":1863205,"src":"treeplanet_thumb.jpg","galleries_id":125321,"server_id":18,"link":"photo_1863205.html","width":130,"caption":"Planet wood","height":130});
															thumbnails[1927881] = clik.newPhoto({"id":1927881,"src":"harry puddles_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_1927881.html","width":130,"caption":"Sunny day on the beach","height":130});
															thumbnails[2087565] = clik.newPhoto({"id":2087565,"src":"harryyeo_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_2087565.html","width":130,"caption":"Harry in the wood.","height":130});
															thumbnails[2254745] = clik.newPhoto({"id":2254745,"src":"2G1I2998_thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_2254745.html","width":130,"caption":"LLanddwyn Island, Anglesey","height":130});
															thumbnails[2255021] = clik.newPhoto({"id":2255021,"src":"2G1I2449a_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_2255021.html","width":130,"caption":"In the laundry room","height":130});
															thumbnails[2255205] = clik.newPhoto({"id":2255205,"src":"web49_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_2255205.html","width":130,"caption":"On the beach","height":130});
															thumbnails[3049387] = clik.newPhoto({"id":3049387,"src":"rocks for clik pic_thumb.JPG","galleries_id":125322,"server_id":18,"link":"photo_3049387.html","width":130,"caption":"Rocks","height":130});
															thumbnails[3059689] = clik.newPhoto({"id":3059689,"src":"logon rocktwilight_thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_3059689.html","width":130,"caption":"Logon rock at twilight","height":130});
															thumbnails[3059698] = clik.newPhoto({"id":3059698,"src":"Horse cliff Bay_thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_3059698.html","width":130,"caption":"Horse Cliff bay","height":130});
															thumbnails[3063337] = clik.newPhoto({"id":3063337,"src":"is it still raining_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_3063337.html","width":130,"caption":"Is it still raining?","height":130});
															thumbnails[3063339] = clik.newPhoto({"id":3063339,"src":"Porth Nanven_thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_3063339.html","width":130,"caption":"Porth Nanven","height":130});
															thumbnails[3216571] = clik.newPhoto({"id":3216571,"src":"in the laundry room_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_3216571.html","width":130,"caption":"In the laundry room","height":130});
															thumbnails[3726731] = clik.newPhoto({"id":3726731,"src":"2G1I8798website_thumb.jpg","galleries_id":125368,"server_id":18,"link":"photo_3726731.html","width":130,"caption":"Limestone Pavement","height":130});
															thumbnails[3726884] = clik.newPhoto({"id":3726884,"src":"2G1I8933webjpg_thumb.jpg","galleries_id":125368,"server_id":18,"link":"photo_3726884.html","width":130,"caption":"Pecca Falls","height":130});
															thumbnails[3774030] = clik.newPhoto({"id":3774030,"src":"2G1I6013_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774030.html","width":130,"caption":"Iceland","height":130});
															thumbnails[3774044] = clik.newPhoto({"id":3774044,"src":"2G1I6442_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774044.html","width":130,"caption":"Iceland","height":130});
															thumbnails[3774048] = clik.newPhoto({"id":3774048,"src":"2G1I7357_copy_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774048.html","width":130,"caption":"Herring factory","height":130});
															thumbnails[3774051] = clik.newPhoto({"id":3774051,"src":"2G1I7504_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774051.html","width":130,"caption":"","height":130});
															thumbnails[3774053] = clik.newPhoto({"id":3774053,"src":"2G1I8014_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774053.html","width":130,"caption":"","height":130});
															thumbnails[3774055] = clik.newPhoto({"id":3774055,"src":"2G1I8057_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774055.html","width":130,"caption":"","height":130});
															thumbnails[3774057] = clik.newPhoto({"id":3774057,"src":"2G1I9769_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774057.html","width":130,"caption":"","height":130});
															thumbnails[3774062] = clik.newPhoto({"id":3774062,"src":"2G1I9877_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774062.html","width":130,"caption":"","height":130});
															thumbnails[3774066] = clik.newPhoto({"id":3774066,"src":"11_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774066.html","width":130,"caption":"","height":130});
															thumbnails[3774069] = clik.newPhoto({"id":3774069,"src":"12_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774069.html","width":130,"caption":"","height":130});
															thumbnails[3774073] = clik.newPhoto({"id":3774073,"src":"Iceland_reflection_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774073.html","width":130,"caption":"","height":130});
															thumbnails[3774080] = clik.newPhoto({"id":3774080,"src":"IN_the_pool_thumb.jpg","galleries_id":230214,"server_id":18,"link":"photo_3774080.html","width":130,"caption":"","height":130});
															thumbnails[4046124] = clik.newPhoto({"id":4046124,"src":"Copy_of_The_dying_sun_thumb.jpg","galleries_id":81834,"server_id":18,"link":"photo_4046124.html","width":130,"caption":"The dying sun","height":130});
															thumbnails[4046127] = clik.newPhoto({"id":4046127,"src":"IMG_0647_thumb.jpg","galleries_id":81834,"server_id":18,"link":"photo_4046127.html","width":130,"caption":"Two stones","height":130});
															thumbnails[4046135] = clik.newPhoto({"id":4046135,"src":"IMG_0827_thumb.jpg","galleries_id":81834,"server_id":18,"link":"photo_4046135.html","width":130,"caption":"Wild Garlic study","height":130});
															thumbnails[4046137] = clik.newPhoto({"id":4046137,"src":"Laig_Bay_thumb.jpg","galleries_id":81834,"server_id":18,"link":"photo_4046137.html","width":130,"caption":"The herd","height":130});
															thumbnails[4046143] = clik.newPhoto({"id":4046143,"src":"The_last_light_thumb.jpg","galleries_id":81834,"server_id":18,"link":"photo_4046143.html","width":130,"caption":"The last light","height":130});
															thumbnails[4046149] = clik.newPhoto({"id":4046149,"src":"The_rift_thumb.jpg","galleries_id":81834,"server_id":18,"link":"photo_4046149.html","width":130,"caption":"The rift","height":130});
															thumbnails[4188578] = clik.newPhoto({"id":4188578,"src":"The_dance_website_thumb.jpg","galleries_id":81900,"server_id":18,"link":"photo_4188578.html","width":130,"caption":"The Dance","height":130});
															thumbnails[4607387] = clik.newPhoto({"id":4607387,"src":"for_website_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_4607387.html","width":130,"caption":"The wedding guests","height":130});
															thumbnails[4607898] = clik.newPhoto({"id":4607898,"src":"2G1I8904for_web_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_4607898.html","width":130,"caption":"A little rest","height":130});
															thumbnails[4607908] = clik.newPhoto({"id":4607908,"src":"2G1I9256_for_website_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_4607908.html","width":130,"caption":"","height":130});
															thumbnails[4693314] = clik.newPhoto({"id":4693314,"src":"2G1I0296for_web_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_4693314.html","width":120,"caption":"Great Grandma's house","height":120});
															thumbnails[4693316] = clik.newPhoto({"id":4693316,"src":"The_futureof_mans_children_for_web_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_4693316.html","width":130,"caption":"The future of Man's children","height":130});
															thumbnails[4693320] = clik.newPhoto({"id":4693320,"src":"Copy_of_2G1I0217for_webl_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_4693320.html","width":130,"caption":"Ellis","height":130});
															thumbnails[4693357] = clik.newPhoto({"id":4693357,"src":"IMG_2603dfor_web_thumb.jpg","galleries_id":81900,"server_id":18,"link":"photo_4693357.html","width":130,"caption":"Fungi & Driftwood","height":130});
															thumbnails[4879198] = clik.newPhoto({"id":4879198,"src":"Ellis_for_website_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_4879198.html","width":130,"caption":"Ellis","height":130});
															thumbnails[4879221] = clik.newPhoto({"id":4879221,"src":"After_the_sleep_website_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_4879221.html","width":130,"caption":"After the sleep-over.","height":130});
															thumbnails[5063919] = clik.newPhoto({"id":5063919,"src":"Godrevy_lighthouse_website_thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_5063919.html","width":130,"caption":"","height":130});
															thumbnails[5063920] = clik.newPhoto({"id":5063920,"src":"coombe_martin_website_thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_5063920.html","width":130,"caption":"","height":130});
															thumbnails[5836333] = clik.newPhoto({"id":5836333,"src":"LIMESTONE_PAVMENTS_THUMB.jpg","galleries_id":125368,"server_id":18,"link":"photo_5836333.html","width":130,"caption":"","height":130});
															thumbnails[5836349] = clik.newPhoto({"id":5836349,"src":"hARRY_AND_DOORr_thumb.jpg","galleries_id":81904,"server_id":18,"link":"photo_5836349.html","width":130,"caption":"The door","height":130});
															thumbnails[5836475] = clik.newPhoto({"id":5836475,"src":"IMG_2641b_for_qimage_version_2_thumb.jpg","galleries_id":125321,"server_id":18,"link":"photo_5836475.html","width":130,"caption":"The stairs","height":130});
															thumbnails[5836485] = clik.newPhoto({"id":5836485,"src":"2G1I5178_no_2_thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_5836485.html","width":130,"caption":"First light","height":130});
															thumbnails[5836488] = clik.newPhoto({"id":5836488,"src":"2G1I5974_CA_light_house_moved_thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_5836488.html","width":130,"caption":"The Golden hour<br>\r\n","height":130});
															thumbnails[5836500] = clik.newPhoto({"id":5836500,"src":"Porth_naven_sunset_cloned_no_2_thumb.jpg","galleries_id":125322,"server_id":18,"link":"photo_5836500.html","width":130,"caption":"","height":130});
															thumbnails[1116885] = clik.newPhoto({"id":1116885,"src":"web110.jpg","galleries_id":81834,"server_id":18,"link":"photo_1116885.html","width":130,"caption":"Last sun on marram grass.","height":130});
															thumbnails[1119971] = clik.newPhoto({"id":1119971,"src":"web432.jpg","galleries_id":81834,"server_id":18,"link":"photo_1119971.html","width":130,"caption":"Landscape in a window","height":130});
															thumbnails[1117236] = clik.newPhoto({"id":1117236,"src":"Dweb21.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117236.html","width":130,"caption":"Tolstadh morning view.","height":130});
															thumbnails[1117238] = clik.newPhoto({"id":1117238,"src":"web38.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117238.html","width":130,"caption":"The crofter's cottage.","height":130});
															thumbnails[1117241] = clik.newPhoto({"id":1117241,"src":"Dweb6.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117241.html","width":130,"caption":"Green on Black.","height":130});
															thumbnails[1119815] = clik.newPhoto({"id":1119815,"src":"web421.jpg","galleries_id":81834,"server_id":18,"link":"photo_1119815.html","width":130,"caption":"Saltmarsh","height":130});
															thumbnails[1117250] = clik.newPhoto({"id":1117250,"src":"web101.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117250.html","width":130,"caption":"Callanish Stones","height":130});
															thumbnails[1117240] = clik.newPhoto({"id":1117240,"src":"Dweb5.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117240.html","width":130,"caption":"Rainbow Stones.","height":130});
															thumbnails[1117243] = clik.newPhoto({"id":1117243,"src":"web71.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117243.html","width":130,"caption":"Luminous Light.","height":130});
															thumbnails[1117239] = clik.newPhoto({"id":1117239,"src":"web46.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117239.html","width":130,"caption":"Stones in the marsh.","height":130});
															thumbnails[1117244] = clik.newPhoto({"id":1117244,"src":"web81.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117244.html","width":130,"caption":"Before the storm.","height":130});
															thumbnails[1117352] = clik.newPhoto({"id":1117352,"src":"web141.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117352.html","width":130,"caption":"Dalbeg Coast in twilight.","height":130});
															thumbnails[1117247] = clik.newPhoto({"id":1117247,"src":"web91.jpg","galleries_id":81834,"server_id":18,"link":"photo_1117247.html","width":130,"caption":"Seilabost Twilight.","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[82088] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_82088.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"5836500,5836488,5836485,5836333,5063920,5063919,4046149,4046143,4046137,4046135","id":82088,"singleSection":false});				  						galleries[125321] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pictorial","link":"gallery_125321.html","maxRecords":0.0,"photoIDs":[1862039.0,1862056.0,1863158.0,1863205.0,5836475.0],"skipIndex":0,"section_code":"gallery","featured_images":"5836475,1863205,1863158,1862056,1862039","id":125321,"singleSection":false});				  						galleries[81834] = clik.newGallery({"parentGallery":82088,"usePopups":false,"title":"Scottish landscapes","link":"gallery_81834.html","maxRecords":0.0,"photoIDs":[1119114.0,1119841.0,1119882.0,1123099.0,4046124.0,4046127.0,4046135.0,4046137.0,4046143.0,4046149.0,1116885.0,1119971.0,1117236.0,1117238.0,1117241.0,1119815.0,1117250.0,1117240.0,1117243.0,1117239.0,1117244.0,1117352.0,1117247.0],"skipIndex":0,"section_code":"gallery","featured_images":"4046149,4046143,4046137,4046135,4046127,4046124,1123099,1119971,1119882,1119841","id":81834,"singleSection":false});				  						galleries[125322] = clik.newGallery({"parentGallery":82088,"usePopups":false,"title":"British island coastal images","link":"gallery_125322.html","maxRecords":0.0,"photoIDs":[1119018.0,1574536.0,2254745.0,3049387.0,3059689.0,3059698.0,3063339.0,5063919.0,5063920.0,5836485.0,5836488.0,5836500.0],"skipIndex":0,"section_code":"gallery","featured_images":"5836500,5836488,5836485,5063920,5063919,3063339,3059698,3059689,3049387,2254745","id":125322,"singleSection":false});				  						galleries[81900] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fauna and Flora","link":"gallery_81900.html","maxRecords":0.0,"photoIDs":[1119796.0,1119801.0,1119803.0,1161742.0,1863151.0,1863160.0,4188578.0,4693357.0],"skipIndex":0,"section_code":"gallery","featured_images":"4693357,4188578,1863160,1863151,1161742,1119803,1119801,1119796","id":81900,"singleSection":false});				  						galleries[81903] = clik.newGallery({"parentGallery":82088,"usePopups":false,"title":"Deserts of U.S.A","link":"gallery_81903.html","maxRecords":0.0,"photoIDs":[1119915.0,1119970.0,1862034.0,1862040.0,1862042.0,1862061.0,1863147.0],"skipIndex":0,"section_code":"gallery","featured_images":"1863147,1862061,1862042,1862040,1862034,1119970,1119915","id":81903,"singleSection":false});				  						galleries[125368] = clik.newGallery({"parentGallery":82088,"usePopups":false,"title":"English landscapes","link":"gallery_125368.html","maxRecords":0.0,"photoIDs":[1119013.0,1123210.0,1574533.0,1574555.0,1574559.0,3726731.0,3726884.0,5836333.0],"skipIndex":0,"section_code":"gallery","featured_images":"5836333,3726884,3726731,1574559,1574555,1574533,1123210,1119013","id":125368,"singleSection":false});				  						galleries[81904] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Children","link":"gallery_81904.html","maxRecords":0.0,"photoIDs":[1119892.0,1119894.0,1119899.0,1120148.0,1120170.0,1177232.0,1927881.0,2087565.0,2255021.0,2255205.0,3063337.0,3216571.0,4607387.0,4607898.0,4607908.0,4693314.0,4693316.0,4693320.0,4879198.0,4879221.0,5836349.0],"skipIndex":0,"section_code":"gallery","featured_images":"5836349,4879221,4879198,4693320,4693316,4693314,4607908,4607898,4607387,3216571","id":81904,"singleSection":false});				  						galleries[84810] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cambridge, town and country","link":"gallery_84810.html","maxRecords":0.0,"photoIDs":[1176455.0,1177191.0,1177194.0,1196532.0],"skipIndex":0,"section_code":"gallery","featured_images":"1196532,1177194,1177191,1176455","id":84810,"singleSection":false});				  						galleries[230214] = clik.newGallery({"parentGallery":82088,"usePopups":false,"title":"Iceland","link":"gallery_230214.html","maxRecords":0.0,"photoIDs":[3774030.0,3774044.0,3774048.0,3774051.0,3774053.0,3774055.0,3774057.0,3774062.0,3774066.0,3774069.0,3774073.0,3774080.0],"skipIndex":0,"section_code":"gallery","featured_images":"3774080,3774073,3774069,3774066,3774062,3774057,3774055,3774053,3774051,3774048","id":230214,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '1116885';
imageSets[3] = '5836500,5836488,5836485,5836475,5836349,5836333,5063920,5063919,4879221,4879198,4693357,4693320,4693316,4693314,4607908,4607898,4607387,4188578,4046149,4046143,4046137,4046135,4046127,4046124,3774080,3774073,3774069,3774066,3774062,3774057,3774055,3774053,3774051,3774048,3774044,3774030,3726884,3726731,3543884,3216571,3063339,3063337,3059698,3059689,3049387,2255205,2255021,2254745,2087565,1927881';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'www.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jcg23/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jcg23/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jcg23/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jcg23/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jcg23/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jcg23/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jcg23/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 += '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 = 'The Beautiful Light: ' + 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> &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>Buy this print online:</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 += '<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;
	}
}

			

