window.thumbnails = {};
															thumbnails[3369420] = clik.newPhoto({"id":3369420,"src":"Puffin_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3369420.html","width":130,"caption":"Puffin with sand eels","height":140});
															thumbnails[6608922] = clik.newPhoto({"id":6608922,"src":"beach_copy_thumb.jpg","galleries_id":464133,"server_id":15,"link":"photo_6608922.html","width":130,"caption":"Sunset at Rhosneigr","height":98});
															thumbnails[7279679] = clik.newPhoto({"id":7279679,"src":"Fishing_pond_thumb.jpg","galleries_id":464133,"server_id":15,"link":"photo_7279679.html","width":130,"caption":"Fishing Pond","height":104});
															thumbnails[7614059] = clik.newPhoto({"id":7614059,"src":"REDPOINTBEACH_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_7614059.html","width":130,"caption":"Golden dunes and cotton wool clouds","height":87});
															thumbnails[4821407] = clik.newPhoto({"id":4821407,"src":"ridges_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_4821407.html","width":130,"caption":"Ripples in the Sand","height":86});
															thumbnails[6702251] = clik.newPhoto({"id":6702251,"src":"parrys_thumb.jpg","galleries_id":464133,"server_id":15,"link":"photo_6702251.html","width":130,"caption":"Parry's Mountain","height":85});
															thumbnails[3623215] = clik.newPhoto({"id":3623215,"src":"dunstanburgh-from-craster_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_3623215.html","width":130,"caption":"Dunstanburgh from Craster","height":81});
															thumbnails[3626926] = clik.newPhoto({"id":3626926,"src":"puffin-flying_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3626926.html","width":130,"caption":"Puffin returning with sand eels","height":113});
															thumbnails[7279702] = clik.newPhoto({"id":7279702,"src":"Snowdonia_thumb.jpg","galleries_id":464133,"server_id":15,"link":"photo_7279702.html","width":130,"caption":"Snowdonia","height":70});
															thumbnails[3401623] = clik.newPhoto({"id":3401623,"src":"Lift-Off_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3401623.html","width":130,"caption":"Lift Off","height":71});
															thumbnails[4821404] = clik.newPhoto({"id":4821404,"src":"embleton_beach_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_4821404.html","width":130,"caption":"Wow !!","height":86});
															thumbnails[4821405] = clik.newPhoto({"id":4821405,"src":"Skye-blue2_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_4821405.html","width":130,"caption":"Skye Blue","height":87});
															thumbnails[3364559] = clik.newPhoto({"id":3364559,"src":"SunriseDunstanburgh_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_3364559.html","width":130,"caption":"Sunrise Dunstanburgh Castle","height":86});
															thumbnails[8820225] = clik.newPhoto({"id":8820225,"src":"Elgol_pebbles_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820225.html","width":130,"caption":"Pink pebbles of Elgol","height":98});
															thumbnails[4827114] = clik.newPhoto({"id":4827114,"src":"Quiraing_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_4827114.html","width":130,"caption":"On the Edge","height":86});
															thumbnails[4827122] = clik.newPhoto({"id":4827122,"src":"Tallisker-bay_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_4827122.html","width":130,"caption":"Sunset Sands","height":87});
															thumbnails[6609214] = clik.newPhoto({"id":6609214,"src":"sandwich_tern_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_6609214.html","width":130,"caption":"Sandwich Tern","height":85});
															thumbnails[7279694] = clik.newPhoto({"id":7279694,"src":"Poppy_fields_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_7279694.html","width":130,"caption":"Poppy fields","height":130});
															thumbnails[4827117] = clik.newPhoto({"id":4827117,"src":"Elgol_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_4827117.html","width":130,"caption":"Elgol","height":87});
															thumbnails[6653521] = clik.newPhoto({"id":6653521,"src":"gannet_preening_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_6653521.html","width":130,"caption":"Gannet preening","height":178});
															thumbnails[7333576] = clik.newPhoto({"id":7333576,"src":"Guardian_Angel_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_7333576.html","width":130,"caption":"Guardian Angel","height":119});
															thumbnails[4827120] = clik.newPhoto({"id":4827120,"src":"Rannock-Moor_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_4827120.html","width":130,"caption":"Blue and Gold","height":87});
															thumbnails[6462117] = clik.newPhoto({"id":6462117,"src":"gannets_bass_rock_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_6462117.html","width":130,"caption":"Gannets, Bass Rock","height":130});
															thumbnails[5729953] = clik.newPhoto({"id":5729953,"src":"Loch_Ard_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_5729953.html","width":130,"caption":"Showers over Loch Ard","height":98});
															thumbnails[6608985] = clik.newPhoto({"id":6608985,"src":"Menai_thumb.jpg","galleries_id":464133,"server_id":15,"link":"photo_6608985.html","width":130,"caption":"Menai","height":178});
															thumbnails[6659804] = clik.newPhoto({"id":6659804,"src":"gannet_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_6659804.html","width":130,"caption":"Gannet in flight","height":87});
															thumbnails[3600185] = clik.newPhoto({"id":3600185,"src":"rocks-and-swirling-sea_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_3600185.html","width":130,"caption":"Rocks and swirling sea","height":123});
															thumbnails[5069637] = clik.newPhoto({"id":5069637,"src":"button_mushrooms_thumb.jpg","galleries_id":205152,"server_id":15,"link":"photo_5069637.html","width":130,"caption":"Button Mushrooms","height":174});
															thumbnails[8820273] = clik.newPhoto({"id":8820273,"src":"Newborough_beach_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820273.html","width":130,"caption":"Snowdonia from Newborough beach","height":87});
															thumbnails[4243168] = clik.newPhoto({"id":4243168,"src":"_MG_6806_NNUS_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_4243168.html","width":130,"caption":"High Tide","height":122});
															thumbnails[4848705] = clik.newPhoto({"id":4848705,"src":"Loch-Shiel_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_4848705.html","width":130,"caption":"Autumn Loch","height":152});
															thumbnails[5069360] = clik.newPhoto({"id":5069360,"src":"incoming_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_5069360.html","width":130,"caption":"Incoming","height":163});
															thumbnails[3425634] = clik.newPhoto({"id":3425634,"src":"Siesta-Time-!_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3425634.html","width":130,"caption":"Siesta Time !","height":94});
															thumbnails[4261734] = clik.newPhoto({"id":4261734,"src":"Alnmouth-fisheye_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_4261734.html","width":130,"caption":"Alnmouth - fisheye view","height":95});
															thumbnails[5729962] = clik.newPhoto({"id":5729962,"src":"Rockpool2_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_5729962.html","width":130,"caption":"Life in Slow Motion","height":178});
															thumbnails[7279674] = clik.newPhoto({"id":7279674,"src":"Budle_Bay_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_7279674.html","width":130,"caption":"Budle Bay","height":86});
															thumbnails[5069518] = clik.newPhoto({"id":5069518,"src":"Morar_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_5069518.html","width":130,"caption":"Silver Sands","height":163});
															thumbnails[7333581] = clik.newPhoto({"id":7333581,"src":"Dunst_castle_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_7333581.html","width":130,"caption":"On a pastel sea","height":85});
															thumbnails[3600172] = clik.newPhoto({"id":3600172,"src":"Boulders_thumb.jpg","galleries_id":205152,"server_id":15,"link":"photo_3600172.html","width":130,"caption":"Boulders","height":106});
															thumbnails[4221161] = clik.newPhoto({"id":4221161,"src":"Caw-Gap_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_4221161.html","width":130,"caption":"The Wall","height":195});
															thumbnails[7893610] = clik.newPhoto({"id":7893610,"src":"Beinn_Eighe_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_7893610.html","width":130,"caption":"Beinn Eighe & Allt a Chuirn","height":178});
															thumbnails[8820283] = clik.newPhoto({"id":8820283,"src":"Puffin_04F0D09D-1E4F-37DC-718CAAC69770B264_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820283.html","width":130,"caption":"Puffin drying wings","height":87});
															thumbnails[5729966] = clik.newPhoto({"id":5729966,"src":"Sea_Fret_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_5729966.html","width":130,"caption":"Sea Fret","height":193});
															thumbnails[3401557] = clik.newPhoto({"id":3401557,"src":"Wildflower-wave_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3401557.html","width":130,"caption":"Wildflower Wave","height":149});
															thumbnails[3626956] = clik.newPhoto({"id":3626956,"src":"autumn-leaves_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_3626956.html","width":130,"caption":"Autumn Leaves","height":195});
															thumbnails[3401582] = clik.newPhoto({"id":3401582,"src":"shell-fan_thumb.jpg","galleries_id":205152,"server_id":15,"link":"photo_3401582.html","width":130,"caption":"Shell Fan","height":100});
															thumbnails[3430704] = clik.newPhoto({"id":3430704,"src":"Surge_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_3430704.html","width":130,"caption":"Time and Tide","height":196});
															thumbnails[3430712] = clik.newPhoto({"id":3430712,"src":"First-Light_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_3430712.html","width":130,"caption":"First Light","height":196});
															thumbnails[5380598] = clik.newPhoto({"id":5380598,"src":"Dancers_in_the_mist_thumb.jpg","galleries_id":464130,"server_id":15,"link":"photo_5380598.html","width":130,"caption":"Dancers in the mist","height":163});
															thumbnails[8820301] = clik.newPhoto({"id":8820301,"src":"Royal_Forest_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820301.html","width":130,"caption":"The Royal Forest","height":81});
															thumbnails[3401619] = clik.newPhoto({"id":3401619,"src":"Another-blue-day_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_3401619.html","width":130,"caption":"Another Blue Day","height":170});
															thumbnails[3528802] = clik.newPhoto({"id":3528802,"src":"The-Path-to-Helvellyn_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_3528802.html","width":130,"caption":"On the Path to Helvellyn","height":203});
															thumbnails[5729936] = clik.newPhoto({"id":5729936,"src":"_MG_3618_copy3_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_5729936.html","width":130,"caption":"Blakeney","height":195});
															thumbnails[5729933] = clik.newPhoto({"id":5729933,"src":"_MG_3274_copy_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_5729933.html","width":130,"caption":"Talisker Sands","height":195});
															thumbnails[8820304] = clik.newPhoto({"id":8820304,"src":"Skye_sunset_copy_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820304.html","width":130,"caption":"Skye sunset","height":99});
															thumbnails[3364714] = clik.newPhoto({"id":3364714,"src":"Gridlock_thumb.jpg","galleries_id":205152,"server_id":15,"link":"photo_3364714.html","width":130,"caption":"Behind Bars","height":65});
															thumbnails[4848736] = clik.newPhoto({"id":4848736,"src":"sILVER-BIRCH_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_4848736.html","width":130,"caption":"Silver and Gold","height":195});
															thumbnails[5729951] = clik.newPhoto({"id":5729951,"src":"Blea_Tarn_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_5729951.html","width":130,"caption":"Blea Tarn","height":163});
															thumbnails[8820309] = clik.newPhoto({"id":8820309,"src":"Mute_swan_pair_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820309.html","width":130,"caption":"Mute swans","height":95});
															thumbnails[3770364] = clik.newPhoto({"id":3770364,"src":"Just-blue_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_3770364.html","width":130,"caption":"Just Blue","height":162});
															thumbnails[4827123] = clik.newPhoto({"id":4827123,"src":"bw_thumb.jpg","galleries_id":464131,"server_id":15,"link":"photo_4827123.html","width":130,"caption":"Dusting","height":163});
															thumbnails[3565745] = clik.newPhoto({"id":3565745,"src":"Clumber-Park_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_3565745.html","width":130,"caption":"The Limetree Avenue, Clumber Park","height":134});
															thumbnails[5380581] = clik.newPhoto({"id":5380581,"src":"winter-trees_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_5380581.html","width":130,"caption":"Winter sunset","height":106});
															thumbnails[7279690] = clik.newPhoto({"id":7279690,"src":"Penmom_lighthouse_thumb.jpg","galleries_id":464133,"server_id":15,"link":"photo_7279690.html","width":130,"caption":"Penmon Lighthouse","height":104});
															thumbnails[7279671] = clik.newPhoto({"id":7279671,"src":"3_trees_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_7279671.html","width":130,"caption":"3 trees","height":86});
															thumbnails[3364509] = clik.newPhoto({"id":3364509,"src":"WainWathForceSwaledale_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_3364509.html","width":130,"caption":"Wain Wath Force Swaledale","height":87});
															thumbnails[8820313] = clik.newPhoto({"id":8820313,"src":"Torridon_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820313.html","width":130,"caption":"Torridon Twilight","height":87});
															thumbnails[3430691] = clik.newPhoto({"id":3430691,"src":"Autumn-in-Snowdonia_thumb.jpg","galleries_id":464133,"server_id":15,"link":"photo_3430691.html","width":130,"caption":"Autumn in Snowdonia","height":92});
															thumbnails[7893556] = clik.newPhoto({"id":7893556,"src":"Derbyshire_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_7893556.html","width":130,"caption":"Evening Light","height":87});
															thumbnails[3633612] = clik.newPhoto({"id":3633612,"src":"Symonds-Yat_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_3633612.html","width":130,"caption":"View of River Wye from Symonds Yat Rock","height":87});
															thumbnails[3430588] = clik.newPhoto({"id":3430588,"src":"hay-bales_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_3430588.html","width":130,"caption":"Hay Bales","height":70});
															thumbnails[3516568] = clik.newPhoto({"id":3516568,"src":"wales_thumb.jpg","galleries_id":464133,"server_id":15,"link":"photo_3516568.html","width":130,"caption":"Light on the Lleyn Penisular","height":72});
															thumbnails[3430592] = clik.newPhoto({"id":3430592,"src":"Muker_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_3430592.html","width":130,"caption":"Wild Flower Meadows Muker Swaledale","height":60});
															thumbnails[8820318] = clik.newPhoto({"id":8820318,"src":"Elgol_053C1BE8-1E4F-37DC-719C1293C64677BB_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820318.html","width":130,"caption":"Elgol and the Cullins","height":85});
															thumbnails[4002488] = clik.newPhoto({"id":4002488,"src":"Swan-Solo_thumb.jpg","galleries_id":464130,"server_id":15,"link":"photo_4002488.html","width":130,"caption":"Swan Art : Swan Solo","height":130});
															thumbnails[5084981] = clik.newPhoto({"id":5084981,"src":"Dune_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_5084981.html","width":130,"caption":"On the Dunes","height":104});
															thumbnails[4002587] = clik.newPhoto({"id":4002587,"src":"Swan-Duet_thumb.jpg","galleries_id":464130,"server_id":15,"link":"photo_4002587.html","width":130,"caption":"Swan Art : Swan Duet","height":54});
															thumbnails[5729943] = clik.newPhoto({"id":5729943,"src":"_MG_6856-copyUS_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_5729943.html","width":130,"caption":"Gertrude Jekyll Garden, Lindisfarne","height":87});
															thumbnails[6739902] = clik.newPhoto({"id":6739902,"src":"_MG_8907_copy_filtered_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_6739902.html","width":130,"caption":"Dawn's reflected light","height":87});
															thumbnails[8820323] = clik.newPhoto({"id":8820323,"src":"Gannet_Bass_Rock_copy_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820323.html","width":130,"caption":"Gannet","height":217});
															thumbnails[3396867] = clik.newPhoto({"id":3396867,"src":"Alnmouth2_thumb.jpg","galleries_id":205797,"server_id":15,"link":"photo_3396867.html","width":130,"caption":"Low Tide at Alnmouth","height":61});
															thumbnails[3401589] = clik.newPhoto({"id":3401589,"src":"Swan-Quartet_thumb.jpg","galleries_id":464130,"server_id":15,"link":"photo_3401589.html","width":130,"caption":"Swan Art : Swan Quartet","height":35});
															thumbnails[3770375] = clik.newPhoto({"id":3770375,"src":"Ducpic_thumb.jpg","galleries_id":464130,"server_id":15,"link":"photo_3770375.html","width":130,"caption":"Ducpic","height":94});
															thumbnails[4261810] = clik.newPhoto({"id":4261810,"src":"on-the-wing_thumb.jpg","galleries_id":464130,"server_id":15,"link":"photo_4261810.html","width":130,"caption":"On the wing","height":86});
															thumbnails[4368400] = clik.newPhoto({"id":4368400,"src":"Lake-bw_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_4368400.html","width":130,"caption":"Crags and Dodds, Thirlmere Reservoir","height":57});
															thumbnails[8820327] = clik.newPhoto({"id":8820327,"src":"Clamaig_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820327.html","width":130,"caption":"Clamaig sunset","height":172});
															thumbnails[7216685] = clik.newPhoto({"id":7216685,"src":"Happy_Christmas_thumb.jpg","galleries_id":464134,"server_id":15,"link":"photo_7216685.html","width":130,"caption":"-12C","height":53});
															thumbnails[8820331] = clik.newPhoto({"id":8820331,"src":"Gull_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820331.html","width":130,"caption":"Having a well earned rest","height":195});
															thumbnails[8820334] = clik.newPhoto({"id":8820334,"src":"Love_in_the_mist_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820334.html","width":130,"caption":"Love in the Mist","height":163});
															thumbnails[8820336] = clik.newPhoto({"id":8820336,"src":"Red_Point_beach_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820336.html","width":130,"caption":"Red Point beach, Torridon","height":167});
															thumbnails[8820343] = clik.newPhoto({"id":8820343,"src":"Gannet_landing_Bempton_Cliffs_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820343.html","width":130,"caption":"Gannet landing","height":130});
															thumbnails[8820348] = clik.newPhoto({"id":8820348,"src":"river_copy_thumb.jpg","galleries_id":464138,"server_id":15,"link":"photo_8820348.html","width":130,"caption":"Fast forward","height":149});
															thumbnails[3435668] = clik.newPhoto({"id":3435668,"src":"Clematis-dawn_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3435668.html","width":130,"caption":"Clematis Dawn","height":170});
															thumbnails[6609224] = clik.newPhoto({"id":6609224,"src":"tree_buds_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_6609224.html","width":130,"caption":"New Shoots","height":150});
															thumbnails[6609226] = clik.newPhoto({"id":6609226,"src":"tulip_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_6609226.html","width":130,"caption":"Tulip","height":158});
															thumbnails[6609206] = clik.newPhoto({"id":6609206,"src":"rushes_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_6609206.html","width":130,"caption":"Golden Rushes","height":146});
															thumbnails[3401499] = clik.newPhoto({"id":3401499,"src":"agapanthus_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3401499.html","width":130,"caption":"Agapanthus","height":115});
															thumbnails[3401546] = clik.newPhoto({"id":3401546,"src":"Iceberg_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3401546.html","width":130,"caption":"Iceberg","height":104});
															thumbnails[3438654] = clik.newPhoto({"id":3438654,"src":"Aquilegea_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3438654.html","width":130,"caption":"Aquilegia Nora Barlow","height":106});
															thumbnails[3401523] = clik.newPhoto({"id":3401523,"src":"poppies_thumb.jpg","galleries_id":205157,"server_id":15,"link":"photo_3401523.html","width":130,"caption":"Opium Poppies","height":73});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[464138] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New Images","link":"gallery_464138.html","maxRecords":0.0,"photoIDs":[8820225.0,8820273.0,8820283.0,8820301.0,8820304.0,8820309.0,8820313.0,8820318.0,8820323.0,8820327.0,8820331.0,8820334.0,8820336.0,8820343.0,8820348.0],"skipIndex":0,"section_code":"gallery","featured_images":8820273.0,"id":464138,"singleSection":false});				  						galleries[205797] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Northumberland","link":"gallery_205797.html","maxRecords":0.0,"photoIDs":[4821407.0,3623215.0,4821404.0,3364559.0,7279694.0,7333576.0,3600185.0,4243168.0,5069360.0,4261734.0,7279674.0,7333581.0,4221161.0,5729966.0,3430712.0,3401619.0,5084981.0,5729943.0,6739902.0,3396867.0],"skipIndex":0,"section_code":"gallery","featured_images":5084981.0,"id":205797,"singleSection":false});				  						galleries[464131] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scotland","link":"gallery_464131.html","maxRecords":0.0,"photoIDs":[7614059.0,4821405.0,4827114.0,4827122.0,4827117.0,4827120.0,5729953.0,4848705.0,5069518.0,7893610.0,5729933.0,4848736.0,4827123.0],"skipIndex":0,"section_code":"gallery","featured_images":7614059.0,"id":464131,"singleSection":false});				  						galleries[464133] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wales","link":"gallery_464133.html","maxRecords":0.0,"photoIDs":[6608922.0,7279679.0,6702251.0,7279702.0,6608985.0,7279690.0,3430691.0,3516568.0],"skipIndex":0,"section_code":"gallery","featured_images":7279690.0,"id":464133,"singleSection":false});				  						galleries[464134] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"England","link":"gallery_464134.html","maxRecords":0.0,"photoIDs":[3626956.0,3430704.0,3528802.0,5729936.0,5729951.0,3770364.0,3565745.0,5380581.0,7279671.0,3364509.0,7893556.0,3633612.0,3430588.0,3430592.0,4368400.0,7216685.0],"skipIndex":0,"section_code":"gallery","featured_images":3633612.0,"id":464134,"singleSection":false});				  						galleries[205152] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Up close","link":"gallery_205152.html","maxRecords":0.0,"photoIDs":[5069637.0,3600172.0,3401582.0,3364714.0],"skipIndex":0,"section_code":"gallery","featured_images":3401582.0,"id":205152,"singleSection":false});				  						galleries[205157] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nature","link":"gallery_205157.html","maxRecords":0.0,"photoIDs":[3369420.0,3626926.0,3401623.0,6609214.0,6653521.0,6462117.0,6659804.0,3425634.0,5729962.0,3401557.0,3435668.0,6609224.0,6609226.0,6609206.0,3401499.0,3401546.0,3438654.0,3401523.0],"skipIndex":0,"section_code":"gallery","featured_images":3626926.0,"id":205157,"singleSection":false});				  						galleries[464130] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Swan Art","link":"gallery_464130.html","maxRecords":0.0,"photoIDs":[5380598.0,4002488.0,4002587.0,3401589.0,3770375.0,4261810.0],"skipIndex":0,"section_code":"gallery","featured_images":"5380598,4261810,4002587,4002488,3770375,3401589","id":464130,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8820225,8820273,8820283,8820301,8820304,8820313,8820318';
imageSets[2] = '7614059,3626926,8820273,3401582,7279690,3633612,5084981';
imageSets[3] = '4261734';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/lisadb20sw/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/lisadb20sw/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 = 'Greenglass 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>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;
	}
}

			

