window.thumbnails = {};
															thumbnails[8649309] = clik.newPhoto({"id":8649309,"src":"hemmick_sunset_1_thumb.jpg","galleries_id":456781,"server_id":37,"link":"photo_8649309.html","width":130,"caption":"Hemmick Bay","height":172});
															thumbnails[7845339] = clik.newPhoto({"id":7845339,"src":"a_barn_3_thumb.jpg","galleries_id":105837,"server_id":18,"link":"photo_7845339.html","width":130,"caption":"Dales Barn","height":166});
															thumbnails[7486893] = clik.newPhoto({"id":7486893,"src":"mountain_stream_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_7486893.html","width":130,"caption":"Mountain Fresh","height":181});
															thumbnails[5741096] = clik.newPhoto({"id":5741096,"src":"sunset_over_longshaw_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_5741096.html","width":130,"caption":"Last Light","height":87});
															thumbnails[5037942] = clik.newPhoto({"id":5037942,"src":"hope_valley_view__thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_5037942.html","width":130,"caption":"Expansive View","height":87});
															thumbnails[3864915] = clik.newPhoto({"id":3864915,"src":"lumsdale_flows_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_3864915.html","width":130,"caption":"Lumsdale in Spring","height":167});
															thumbnails[3610373] = clik.newPhoto({"id":3610373,"src":"peak_tors_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_3610373.html","width":130,"caption":"Peak District Tors","height":91});
															thumbnails[2964483] = clik.newPhoto({"id":2964483,"src":"under tryfan_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_2964483.html","width":130,"caption":"Under Tryfan","height":173});
															thumbnails[2924204] = clik.newPhoto({"id":2924204,"src":"autumns coming_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_2924204.html","width":130,"caption":"Autumns approach","height":186});
															thumbnails[2924201] = clik.newPhoto({"id":2924201,"src":"big bogeys_thumb.jpg","galleries_id":94370,"server_id":18,"link":"photo_2924201.html","width":130,"caption":"Big Bogeys","height":110});
															thumbnails[2924212] = clik.newPhoto({"id":2924212,"src":"minutes to go_thumb.jpg","galleries_id":105837,"server_id":18,"link":"photo_2924212.html","width":130,"caption":"Minutes to go","height":87});
															thumbnails[2924222] = clik.newPhoto({"id":2924222,"src":"sentinels colour_thumb.jpg","galleries_id":105837,"server_id":18,"link":"photo_2924222.html","width":130,"caption":"The Sentinels","height":170});
															thumbnails[2413282] = clik.newPhoto({"id":2413282,"src":"Bamburgh beach dog walk_thumb.jpg","galleries_id":94350,"server_id":18,"link":"photo_2413282.html","width":130,"caption":"Bamburgh Castle","height":68});
															thumbnails[2413266] = clik.newPhoto({"id":2413266,"src":"alma 5_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_2413266.html","width":130,"caption":"My Tern","height":135});
															thumbnails[2413300] = clik.newPhoto({"id":2413300,"src":"Paffin best_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_2413300.html","width":130,"caption":"Farnes Puffin","height":176});
															thumbnails[2746795] = clik.newPhoto({"id":2746795,"src":"stag_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_2746795.html","width":130,"caption":"Red Deer Stag","height":152});
															thumbnails[2166187] = clik.newPhoto({"id":2166187,"src":"loch etive 3 sq crop_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_2166187.html","width":130,"caption":"Loch Etive Shallows","height":132});
															thumbnails[1902523] = clik.newPhoto({"id":1902523,"src":"foreshore detail_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1902523.html","width":130,"caption":"Foreshore","height":60});
															thumbnails[1902522] = clik.newPhoto({"id":1902522,"src":"buchaille 2_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1902522.html","width":130,"caption":"Buchaille Etive Mor","height":150});
															thumbnails[1706932] = clik.newPhoto({"id":1706932,"src":"gate post 1_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1706932.html","width":130,"caption":"The Gate","height":99});
															thumbnails[1706934] = clik.newPhoto({"id":1706934,"src":"big digger 1_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1706934.html","width":130,"caption":"","height":163});
															thumbnails[1706933] = clik.newPhoto({"id":1706933,"src":"3 stones above castleton_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1706933.html","width":130,"caption":"","height":186});
															thumbnails[1633705] = clik.newPhoto({"id":1633705,"src":"sunlit morning_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1633705.html","width":130,"caption":"Sunlit Gritstone","height":61});
															thumbnails[1343711] = clik.newPhoto({"id":1343711,"src":"Sunset over Moidart_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1343711.html","width":130,"caption":"Sunset over Moidart","height":41});
															thumbnails[1339845] = clik.newPhoto({"id":1339845,"src":"winter storms_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1339845.html","width":130,"caption":"Winter Storms","height":161});
															thumbnails[1633711] = clik.newPhoto({"id":1633711,"src":"In for the night_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_1633711.html","width":130,"caption":"In for the Night","height":167});
															thumbnails[1339836] = clik.newPhoto({"id":1339836,"src":"achtriochtan_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1339836.html","width":130,"caption":"Loch Achtriochtan before sunrise","height":250});
															thumbnails[1339846] = clik.newPhoto({"id":1339846,"src":"memorial cross_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1339846.html","width":130,"caption":"Remembered ","height":180});
															thumbnails[1334867] = clik.newPhoto({"id":1334867,"src":"ardgour from  glencoe_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1334867.html","width":130,"caption":"Ardgour From Glencoe","height":48});
															thumbnails[1334856] = clik.newPhoto({"id":1334856,"src":"monumental_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1334856.html","width":130,"caption":"Monumental View","height":156});
															thumbnails[1633700] = clik.newPhoto({"id":1633700,"src":"jewel in the crown_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_1633700.html","width":130,"caption":"Jewel in the Crown","height":116});
															thumbnails[1544522] = clik.newPhoto({"id":1544522,"src":"Dawn at Castlerigg Stone Circle_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_1544522.html","width":130,"caption":"Castlerigg Stone Circle","height":48});
															thumbnails[1578082] = clik.newPhoto({"id":1578082,"src":"crummock water log_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_1578082.html","width":130,"caption":"Crummock Water","height":65});
															thumbnails[1440903] = clik.newPhoto({"id":1440903,"src":"Robin best_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1440903.html","width":130,"caption":"Mr. Robin","height":143});
															thumbnails[1440904] = clik.newPhoto({"id":1440904,"src":"nowhere to chomp to _thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1440904.html","width":130,"caption":"Nowhere to Chomp to !","height":233});
															thumbnails[1428080] = clik.newPhoto({"id":1428080,"src":"fallen few_thumb.jpg","galleries_id":94370,"server_id":18,"link":"photo_1428080.html","width":130,"caption":"The Fallen Few","height":144});
															thumbnails[1428093] = clik.newPhoto({"id":1428093,"src":"waiting for the light_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1428093.html","width":130,"caption":"Waiting for the Light","height":80});
															thumbnails[1428083] = clik.newPhoto({"id":1428083,"src":"llyn idwal_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1428083.html","width":130,"caption":"Llyn Idwal","height":91});
															thumbnails[1400070] = clik.newPhoto({"id":1400070,"src":"tryfan _thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1400070.html","width":130,"caption":"Bathed in Light","height":75});
															thumbnails[1400095] = clik.newPhoto({"id":1400095,"src":"Y Garn_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1400095.html","width":130,"caption":"Y Garn","height":89});
															thumbnails[1400063] = clik.newPhoto({"id":1400063,"src":"lonesome _thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1400063.html","width":130,"caption":"Lonesome","height":175});
															thumbnails[1334193] = clik.newPhoto({"id":1334193,"src":"pastoral derbyshire_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1334193.html","width":130,"caption":"Patoral Derbyshire","height":94});
															thumbnails[1334228] = clik.newPhoto({"id":1334228,"src":"burbage moor_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1334228.html","width":130,"caption":"Burbage dawn","height":88});
															thumbnails[1331412] = clik.newPhoto({"id":1331412,"src":"evening at langdale_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_1331412.html","width":130,"caption":"Evening at Langdale","height":70});
															thumbnails[1334173] = clik.newPhoto({"id":1334173,"src":"footpath_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1334173.html","width":130,"caption":"Follow the footpath","height":173});
															thumbnails[1194008] = clik.newPhoto({"id":1194008,"src":"about turn _thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1194008.html","width":130,"caption":"About Turn","height":104});
															thumbnails[1334596] = clik.newPhoto({"id":1334596,"src":"Llyn ogwen sunset_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1334596.html","width":130,"caption":"Llyn Ogwen at dusk","height":164});
															thumbnails[1334600] = clik.newPhoto({"id":1334600,"src":"mountain stream_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1334600.html","width":130,"caption":"Mountain Waters","height":94});
															thumbnails[1334303] = clik.newPhoto({"id":1334303,"src":"baby blue_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1334303.html","width":130,"caption":"Baby Blue","height":115});
															thumbnails[1194000] = clik.newPhoto({"id":1194000,"src":"buttermere reflections_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_1194000.html","width":130,"caption":"Buttermere Reflections","height":152});
															thumbnails[1334182] = clik.newPhoto({"id":1334182,"src":"glory days_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1334182.html","width":130,"caption":"Glory days","height":177});
															thumbnails[1195209] = clik.newPhoto({"id":1195209,"src":"afterglow_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1195209.html","width":130,"caption":"Afterglow","height":157});
															thumbnails[1194014] = clik.newPhoto({"id":1194014,"src":"I can see you_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1194014.html","width":130,"caption":"I Can See You","height":198});
															thumbnails[1195204] = clik.newPhoto({"id":1195204,"src":"this way_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1195204.html","width":130,"caption":"Sunset over Fox House","height":171});
															thumbnails[1339895] = clik.newPhoto({"id":1339895,"src":"Tal y lyn valley_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1339895.html","width":130,"caption":"Down in the Valley","height":85});
															thumbnails[1339853] = clik.newPhoto({"id":1339853,"src":"down to aberystwith_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1339853.html","width":130,"caption":"Down to Aberystwyth","height":75});
															thumbnails[1340468] = clik.newPhoto({"id":1340468,"src":"berwyn moors_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1340468.html","width":130,"caption":"Berwyn Moors","height":90});
															thumbnails[1343503] = clik.newPhoto({"id":1343503,"src":"dawn reworked_thumb.jpg","galleries_id":94350,"server_id":18,"link":"photo_1343503.html","width":130,"caption":"Dawn at Sandsend","height":86});
															thumbnails[1343505] = clik.newPhoto({"id":1343505,"src":"groyne posts sandsend_thumb.jpg","galleries_id":94350,"server_id":18,"link":"photo_1343505.html","width":130,"caption":"Old Groynes","height":168});
															thumbnails[1343510] = clik.newPhoto({"id":1343510,"src":"scarborough lighthouse_thumb.jpg","galleries_id":94350,"server_id":18,"link":"photo_1343510.html","width":130,"caption":"Scarborough Lighthouse","height":96});
															thumbnails[1334589] = clik.newPhoto({"id":1334589,"src":"a beautiful day_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1334589.html","width":130,"caption":"A Beautiful Day","height":93});
															thumbnails[1343566] = clik.newPhoto({"id":1343566,"src":"Eilan Donan castle_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1343566.html","width":130,"caption":"Eilan Donan Castle","height":155});
															thumbnails[1334487] = clik.newPhoto({"id":1334487,"src":"old barn tryfan_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1334487.html","width":130,"caption":"Old Barn under Tryfan","height":99});
															thumbnails[1334245] = clik.newPhoto({"id":1334245,"src":"3 shires head_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1334245.html","width":130,"caption":"Three Shires Head","height":83});
															thumbnails[1334251] = clik.newPhoto({"id":1334251,"src":"guess who_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1334251.html","width":130,"caption":"The loner","height":67});
															thumbnails[1334840] = clik.newPhoto({"id":1334840,"src":"wildboarclough 2_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1334840.html","width":130,"caption":"Autumnal Riverbank","height":185});
															thumbnails[1343459] = clik.newPhoto({"id":1343459,"src":"red portrait 2_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1343459.html","width":130,"caption":"Hold Still","height":137});
															thumbnails[1343467] = clik.newPhoto({"id":1343467,"src":"come to daddy_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1343467.html","width":130,"caption":"Come to Daddy !","height":142});
															thumbnails[1343496] = clik.newPhoto({"id":1343496,"src":"patterns in the sand_thumb.jpg","galleries_id":94350,"server_id":18,"link":"photo_1343496.html","width":130,"caption":"Patterns in the Sand","height":206});
															thumbnails[1343576] = clik.newPhoto({"id":1343576,"src":"ainsdale beach sunset_thumb.jpg","galleries_id":94350,"server_id":18,"link":"photo_1343576.html","width":130,"caption":"Ainsdale Beach Sunset","height":163});
															thumbnails[1343750] = clik.newPhoto({"id":1343750,"src":"Contemplation_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1343750.html","width":130,"caption":"Contemplation","height":173});
															thumbnails[1343752] = clik.newPhoto({"id":1343752,"src":"moon 3 composite copy_thumb.jpg","galleries_id":94370,"server_id":18,"link":"photo_1343752.html","width":130,"caption":"First Quarter Moon","height":141});
															thumbnails[1343753] = clik.newPhoto({"id":1343753,"src":"stand out from the srowd_thumb.jpg","galleries_id":94370,"server_id":18,"link":"photo_1343753.html","width":130,"caption":"Stand out from the Crowd","height":186});
															thumbnails[1343754] = clik.newPhoto({"id":1343754,"src":"rained off again_thumb.jpg","galleries_id":94370,"server_id":18,"link":"photo_1343754.html","width":130,"caption":"Rained off again","height":78});
															thumbnails[1349369] = clik.newPhoto({"id":1349369,"src":"hope sunset_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1349369.html","width":130,"caption":"Hope Sunset","height":179});
															thumbnails[1349385] = clik.newPhoto({"id":1349385,"src":"deep in thought_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1349385.html","width":130,"caption":"Deep Thought","height":181});
															thumbnails[1349396] = clik.newPhoto({"id":1349396,"src":"Ghosts in the machine_thumb.jpg","galleries_id":94370,"server_id":18,"link":"photo_1349396.html","width":130,"caption":"Ghosts in the Machine","height":101});
															thumbnails[1349402] = clik.newPhoto({"id":1349402,"src":"raffe chops_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_1349402.html","width":130,"caption":"Hello ! ","height":115});
															thumbnails[1350631] = clik.newPhoto({"id":1350631,"src":"Hen CLoud 2_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1350631.html","width":130,"caption":"Hen Cloud ","height":93});
															thumbnails[1350637] = clik.newPhoto({"id":1350637,"src":"riverside walk_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1350637.html","width":130,"caption":"Riverside Walk","height":94});
															thumbnails[1351808] = clik.newPhoto({"id":1351808,"src":"outcrop_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1351808.html","width":130,"caption":"Outcrop","height":93});
															thumbnails[1428121] = clik.newPhoto({"id":1428121,"src":"Stonefall_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_1428121.html","width":130,"caption":"Stonefall","height":182});
															thumbnails[1561282] = clik.newPhoto({"id":1561282,"src":"tryfan and ogwen valley_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_1561282.html","width":130,"caption":"Tryfan and the Ogwen Valley","height":94});
															thumbnails[1633354] = clik.newPhoto({"id":1633354,"src":"aira beck_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_1633354.html","width":130,"caption":"Aira Beck","height":76});
															thumbnails[1941876] = clik.newPhoto({"id":1941876,"src":"swan loch_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1941876.html","width":130,"caption":"Loch Linnhe","height":87});
															thumbnails[1966812] = clik.newPhoto({"id":1966812,"src":"tioram wide_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_1966812.html","width":130,"caption":"Castle Tioram","height":84});
															thumbnails[2057137] = clik.newPhoto({"id":2057137,"src":"castlerigg at dusk_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_2057137.html","width":130,"caption":"","height":83});
															thumbnails[2057138] = clik.newPhoto({"id":2057138,"src":"glen nevis stream_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_2057138.html","width":130,"caption":"","height":169});
															thumbnails[2057140] = clik.newPhoto({"id":2057140,"src":"tioram 2_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_2057140.html","width":130,"caption":"","height":162});
															thumbnails[2166155] = clik.newPhoto({"id":2166155,"src":"3 shires head_1_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_2166155.html","width":130,"caption":"","height":163});
															thumbnails[2166167] = clik.newPhoto({"id":2166167,"src":"Laluna _thumb.jpg","galleries_id":94370,"server_id":18,"link":"photo_2166167.html","width":130,"caption":"Lunar Dreams","height":120});
															thumbnails[2166199] = clik.newPhoto({"id":2166199,"src":"simple scene_thumb.jpg","galleries_id":94350,"server_id":18,"link":"photo_2166199.html","width":130,"caption":"A Simple Scene","height":89});
															thumbnails[2166204] = clik.newPhoto({"id":2166204,"src":"shell beach_thumb.jpg","galleries_id":94350,"server_id":18,"link":"photo_2166204.html","width":130,"caption":"Shell Beach","height":162});
															thumbnails[2166207] = clik.newPhoto({"id":2166207,"src":"sandsend 07_thumb.jpg","galleries_id":94350,"server_id":18,"link":"photo_2166207.html","width":130,"caption":"Sandsend Sunrise","height":156});
															thumbnails[2166221] = clik.newPhoto({"id":2166221,"src":"tmapped higgar 2_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_2166221.html","width":130,"caption":"Higgar Tor","height":104});
															thumbnails[2413291] = clik.newPhoto({"id":2413291,"src":"lumsdale main falls_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_2413291.html","width":130,"caption":"Lumsdale Falls","height":168});
															thumbnails[2583509] = clik.newPhoto({"id":2583509,"src":"pen y ghent 1_thumb.jpg","galleries_id":105837,"server_id":18,"link":"photo_2583509.html","width":130,"caption":"Pen Y Ghent","height":204});
															thumbnails[2583513] = clik.newPhoto({"id":2583513,"src":"lawrence birch copy_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_2583513.html","width":130,"caption":"Lawrence Field","height":122});
															thumbnails[2583537] = clik.newPhoto({"id":2583537,"src":"over broken ground_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_2583537.html","width":130,"caption":"Over Broken Ground","height":99});
															thumbnails[2733939] = clik.newPhoto({"id":2733939,"src":"mountain reflections_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_2733939.html","width":130,"caption":"Mountain Reflections","height":82});
															thumbnails[2733942] = clik.newPhoto({"id":2733942,"src":"the head of the glen_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_2733942.html","width":130,"caption":"The Head of the Glen","height":125});
															thumbnails[2733943] = clik.newPhoto({"id":2733943,"src":"castle tioram_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_2733943.html","width":130,"caption":"Castle Tioram","height":82});
															thumbnails[2746770] = clik.newPhoto({"id":2746770,"src":"whitby Lighthouse_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_2746770.html","width":130,"caption":"Whitby Lighthouse","height":141});
															thumbnails[2746889] = clik.newPhoto({"id":2746889,"src":"Loch Arkaig _thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_2746889.html","width":130,"caption":"Loch Arkaig","height":169});
															thumbnails[2746891] = clik.newPhoto({"id":2746891,"src":"Loch Linne sunset _thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_2746891.html","width":130,"caption":"Linnhe Sunset","height":164});
															thumbnails[2746947] = clik.newPhoto({"id":2746947,"src":"On Reflection_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_2746947.html","width":130,"caption":"On Reflection","height":86});
															thumbnails[2747013] = clik.newPhoto({"id":2747013,"src":"Water abstract_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_2747013.html","width":130,"caption":"Blue Water","height":102});
															thumbnails[2924232] = clik.newPhoto({"id":2924232,"src":"the flows in the gorge_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_2924232.html","width":130,"caption":"Flows in the Gorge","height":89});
															thumbnails[3289894] = clik.newPhoto({"id":3289894,"src":"Hen Cloud sunburst_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_3289894.html","width":130,"caption":"Morning Has Broken","height":68});
															thumbnails[3289896] = clik.newPhoto({"id":3289896,"src":"onwards and upwards_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_3289896.html","width":130,"caption":"Onwards & Upwards","height":182});
															thumbnails[3289897] = clik.newPhoto({"id":3289897,"src":"baby seal 2_thumb.jpg","galleries_id":105837,"server_id":18,"link":"photo_3289897.html","width":130,"caption":"Baby Face","height":178});
															thumbnails[3456789] = clik.newPhoto({"id":3456789,"src":"etive launch_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_3456789.html","width":130,"caption":"Etive Launch","height":174});
															thumbnails[3456797] = clik.newPhoto({"id":3456797,"src":"llanberis brooding_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_3456797.html","width":130,"caption":"The Brooding Pass","height":189});
															thumbnails[3456804] = clik.newPhoto({"id":3456804,"src":"ruined shack 2_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_3456804.html","width":130,"caption":"Ruined Shack","height":168});
															thumbnails[3456811] = clik.newPhoto({"id":3456811,"src":"tmap buttermere shore_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_3456811.html","width":130,"caption":"Buttermere Shoreline","height":169});
															thumbnails[3456823] = clik.newPhoto({"id":3456823,"src":"Sanna bay 1_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_3456823.html","width":130,"caption":"Sanna Bay","height":60});
															thumbnails[3610371] = clik.newPhoto({"id":3610371,"src":"higgar_puddles_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_3610371.html","width":130,"caption":"Higgar Puddles","height":159});
															thumbnails[3610376] = clik.newPhoto({"id":3610376,"src":"resting_up_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_3610376.html","width":130,"caption":"Resting Up","height":70});
															thumbnails[3610382] = clik.newPhoto({"id":3610382,"src":"justa_munchin_away_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_3610382.html","width":130,"caption":"Just Munchin Away","height":105});
															thumbnails[3817072] = clik.newPhoto({"id":3817072,"src":"lone_boulder_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_3817072.html","width":130,"caption":"","height":88});
															thumbnails[3817082] = clik.newPhoto({"id":3817082,"src":"misty_sunset_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_3817082.html","width":130,"caption":"Misty Sunset","height":43});
															thumbnails[3864929] = clik.newPhoto({"id":3864929,"src":"robin_best_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_3864929.html","width":130,"caption":"Grubs Up ! ","height":169});
															thumbnails[3864938] = clik.newPhoto({"id":3864938,"src":"the_little_feller_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_3864938.html","width":130,"caption":"The Little Feller","height":153});
															thumbnails[3967676] = clik.newPhoto({"id":3967676,"src":"Carnation_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_3967676.html","width":130,"caption":"Soft Pink","height":113});
															thumbnails[3967680] = clik.newPhoto({"id":3967680,"src":"Daffodil_2_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_3967680.html","width":130,"caption":"Yellow on Black","height":96});
															thumbnails[3967686] = clik.newPhoto({"id":3967686,"src":"Autumn_leaves_with_a_twist_2_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_3967686.html","width":130,"caption":"Autumnal Twist","height":111});
															thumbnails[3967690] = clik.newPhoto({"id":3967690,"src":"First_light_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_3967690.html","width":130,"caption":"First Light","height":76});
															thumbnails[3967692] = clik.newPhoto({"id":3967692,"src":"fruit_of_the_rowan_2_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_3967692.html","width":130,"caption":"Fruit of the Rowan","height":96});
															thumbnails[3967696] = clik.newPhoto({"id":3967696,"src":"Infra_red_dandelion_clock_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_3967696.html","width":130,"caption":"Dandelion in Infra Red","height":128});
															thumbnails[3967701] = clik.newPhoto({"id":3967701,"src":"Karessia_yellow_rose_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_3967701.html","width":130,"caption":"Korressia Rose","height":124});
															thumbnails[3967704] = clik.newPhoto({"id":3967704,"src":"Rose_2_thumb.jpg","galleries_id":240290,"server_id":18,"link":"photo_3967704.html","width":130,"caption":"Only a Rose","height":95});
															thumbnails[4382365] = clik.newPhoto({"id":4382365,"src":"lone_coo_thumb.jpg","galleries_id":105837,"server_id":18,"link":"photo_4382365.html","width":130,"caption":"Bolton Abbey","height":83});
															thumbnails[4702990] = clik.newPhoto({"id":4702990,"src":"warmth_of_morning_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_4702990.html","width":130,"caption":"Warming Glow","height":163});
															thumbnails[4750423] = clik.newPhoto({"id":4750423,"src":"Lording_it_up_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_4750423.html","width":130,"caption":"The Old Manor","height":97});
															thumbnails[4750427] = clik.newPhoto({"id":4750427,"src":"old_but_used_thumb.jpg","galleries_id":105837,"server_id":18,"link":"photo_4750427.html","width":130,"caption":"Old But Used","height":88});
															thumbnails[4750444] = clik.newPhoto({"id":4750444,"src":"roach_end_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_4750444.html","width":130,"caption":"","height":86});
															thumbnails[4929815] = clik.newPhoto({"id":4929815,"src":"etive_rocks_1_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_4929815.html","width":130,"caption":"Loch Etive","height":159});
															thumbnails[4929835] = clik.newPhoto({"id":4929835,"src":"single_post_2_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_4929835.html","width":130,"caption":"Between the Posts","height":176});
															thumbnails[4929847] = clik.newPhoto({"id":4929847,"src":"the_glen_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_4929847.html","width":130,"caption":"Three Sisters","height":91});
															thumbnails[5037945] = clik.newPhoto({"id":5037945,"src":"dynamics_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_5037945.html","width":130,"caption":"Dynamics","height":186});
															thumbnails[5037952] = clik.newPhoto({"id":5037952,"src":"lagangarbh_1_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_5037952.html","width":130,"caption":"Lagangarbh","height":64});
															thumbnails[5037971] = clik.newPhoto({"id":5037971,"src":"leven_dawn_no_border__thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_5037971.html","width":130,"caption":"Dawn over the Loch","height":85});
															thumbnails[5037992] = clik.newPhoto({"id":5037992,"src":"silver_linin_no_borderg_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_5037992.html","width":130,"caption":"Silver Lining","height":150});
															thumbnails[5038041] = clik.newPhoto({"id":5038041,"src":"Corpach_and_the_Ben_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_5038041.html","width":130,"caption":"The Ben ","height":90});
															thumbnails[5575557] = clik.newPhoto({"id":5575557,"src":"A_place_to_sit_2_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_5575557.html","width":130,"caption":"Sit and Ponder","height":152});
															thumbnails[5576896] = clik.newPhoto({"id":5576896,"src":"tmapp_loch_11_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_5576896.html","width":130,"caption":"Dunnock","height":135});
															thumbnails[5576912] = clik.newPhoto({"id":5576912,"src":"falling_thumb.jpg","galleries_id":94370,"server_id":18,"link":"photo_5576912.html","width":130,"caption":"Falling","height":93});
															thumbnails[5577103] = clik.newPhoto({"id":5577103,"src":"Bidean_Nam_Bian_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_5577103.html","width":130,"caption":"Bidean Nam Bian","height":160});
															thumbnails[5577118] = clik.newPhoto({"id":5577118,"src":"follow_your_nose_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_5577118.html","width":130,"caption":"Coming Down","height":176});
															thumbnails[6345542] = clik.newPhoto({"id":6345542,"src":"baby_kestrel__thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_6345542.html","width":130,"caption":"Kestrel Chick","height":194});
															thumbnails[6345544] = clik.newPhoto({"id":6345544,"src":"KES_bw_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_6345544.html","width":130,"caption":"Fledging Kestrel","height":147});
															thumbnails[6973865] = clik.newPhoto({"id":6973865,"src":"buchaille-3_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_6973865.html","width":130,"caption":"Buchaille Etive Mor","height":143});
															thumbnails[6973868] = clik.newPhoto({"id":6973868,"src":"Pap_1_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_6973868.html","width":130,"caption":"Loch Leven","height":144});
															thumbnails[6973870] = clik.newPhoto({"id":6973870,"src":"stream_tree_glencoe_2_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_6973870.html","width":130,"caption":"A Fine Viewpoint","height":188});
															thumbnails[6973871] = clik.newPhoto({"id":6973871,"src":"arctic_fox_thumb.jpg","galleries_id":85817,"server_id":18,"link":"photo_6973871.html","width":130,"caption":"Arctic Fox","height":87});
															thumbnails[6973873] = clik.newPhoto({"id":6973873,"src":"serenity_thumb.jpg","galleries_id":93917,"server_id":18,"link":"photo_6973873.html","width":130,"caption":"Serenity","height":173});
															thumbnails[7486903] = clik.newPhoto({"id":7486903,"src":"loveheart_llyn_thumb.jpg","galleries_id":93889,"server_id":18,"link":"photo_7486903.html","width":130,"caption":"Valentines Surprise","height":45});
															thumbnails[7620032] = clik.newPhoto({"id":7620032,"src":"3_stones_bw_thumb.jpg","galleries_id":93884,"server_id":18,"link":"photo_7620032.html","width":130,"caption":"Three of Many","height":59});
															thumbnails[7815664] = clik.newPhoto({"id":7815664,"src":"roaches_ridge_d200_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_7815664.html","width":130,"caption":"Roaches Ridge","height":78});
															thumbnails[7815673] = clik.newPhoto({"id":7815673,"src":"flash_of_light_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_7815673.html","width":130,"caption":"","height":190});
															thumbnails[7815677] = clik.newPhoto({"id":7815677,"src":"Eyam_church_thumb.jpg","galleries_id":85809,"server_id":18,"link":"photo_7815677.html","width":130,"caption":"Eyam Church","height":159});
															thumbnails[8649310] = clik.newPhoto({"id":8649310,"src":"hemmick_sunset_2_thumb.jpg","galleries_id":456781,"server_id":37,"link":"photo_8649310.html","width":130,"caption":"","height":191});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[85817] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Animals ","link":"gallery_85817.html","maxRecords":0.0,"photoIDs":[2413266.0,2413300.0,1440903.0,1440904.0,1400063.0,1194008.0,1334303.0,1194014.0,1343459.0,1343467.0,1349385.0,1349402.0,3610382.0,3864929.0,3864938.0,5576896.0,6345542.0,6345544.0,6973871.0],"skipIndex":0,"section_code":"gallery","featured_images":1194008.0,"id":85817,"singleSection":false});				  						galleries[105837] = clik.newGallery({"parentGallery":93882,"usePopups":false,"title":"Around Yorkshire","link":"gallery_105837.html","maxRecords":0.0,"photoIDs":[7845339.0,2924212.0,2924222.0,2583509.0,3289897.0,4382365.0,4750427.0],"skipIndex":0,"section_code":"gallery","featured_images":"7845339,4750427,4382365,3289897,2924222,2924212,2583509","id":105837,"singleSection":false});				  						galleries[94350] = clik.newGallery({"parentGallery":93882,"usePopups":false,"title":"Coastal","link":"gallery_94350.html","maxRecords":0.0,"photoIDs":[2413282.0,1343503.0,1343505.0,1343510.0,1343496.0,1343576.0,2166199.0,2166204.0,2166207.0],"skipIndex":0,"section_code":"gallery","featured_images":"2413282,2166207,2166204,2166199,1343576,1343510,1343505,1343503,1343496","id":94350,"singleSection":false});				  						galleries[456781] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cornwall and Devon","link":"gallery_456781.html","maxRecords":0.0,"photoIDs":[8649309.0,8649310.0],"skipIndex":0,"section_code":"gallery","featured_images":"8649310,8649309","id":456781,"singleSection":false});				  						galleries[93882] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_93882.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"5037952,1902522","id":93882,"singleSection":false});				  						galleries[94370] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Odds and Sods","link":"gallery_94370.html","maxRecords":0.0,"photoIDs":[2924201.0,1428080.0,1343752.0,1343753.0,1343754.0,1349396.0,2166167.0,5576912.0],"skipIndex":0,"section_code":"gallery","featured_images":2924201.0,"id":94370,"singleSection":false});				  						galleries[93917] = clik.newGallery({"parentGallery":93882,"usePopups":false,"title":"Scotland","link":"gallery_93917.html","maxRecords":0.0,"photoIDs":[2166187.0,1902523.0,1902522.0,1343711.0,1339845.0,1339836.0,1339846.0,1334867.0,1334856.0,1343566.0,1941876.0,1966812.0,2057138.0,2057140.0,2733939.0,2733942.0,2733943.0,3456789.0,3456823.0,3610376.0,3817082.0,4929815.0,4929835.0,4929847.0,5037945.0,5037952.0,5037971.0,5037992.0,5038041.0,5577103.0,6973865.0,6973868.0,6973870.0,6973873.0],"skipIndex":0,"section_code":"gallery","featured_images":"5037952,1902522","id":93917,"singleSection":false});				  						galleries[93884] = clik.newGallery({"parentGallery":93882,"usePopups":false,"title":"The Lake District","link":"gallery_93884.html","maxRecords":0.0,"photoIDs":[1633711.0,1633700.0,1578082.0,1331412.0,1194000.0,1633354.0,2057137.0,3456804.0,3456811.0,7620032.0],"skipIndex":0,"section_code":"gallery","featured_images":"7620032,3456811,3456804,2057137,1633711,1633700,1633354,1578082,1331412,1194000","id":93884,"singleSection":false});				  						galleries[93889] = clik.newGallery({"parentGallery":93882,"usePopups":false,"title":"Wales","link":"gallery_93889.html","maxRecords":0.0,"photoIDs":[7486893.0,2964483.0,1428083.0,1400070.0,1400095.0,1334596.0,1334600.0,1339895.0,1339853.0,1340468.0,1334487.0,1561282.0,3289896.0,3456797.0,7486903.0],"skipIndex":0,"section_code":"gallery","featured_images":"7486903,7486893,3456797,3289896,2964483,1561282,1428083,1400095,1400070,1340468","id":93889,"singleSection":false});				  						galleries[240290] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wendys pictures","link":"gallery_240290.html","maxRecords":0.0,"photoIDs":[2746795.0,1544522.0,2746770.0,2746889.0,2746891.0,2746947.0,2747013.0,3967676.0,3967680.0,3967686.0,3967690.0,3967692.0,3967696.0,3967701.0,3967704.0],"skipIndex":0,"section_code":"gallery","featured_images":3967676.0,"id":240290,"singleSection":false});				  						galleries[85809] = clik.newGallery({"parentGallery":93882,"usePopups":false,"title":"Peak District","link":"gallery_85809.html","maxRecords":0.0,"photoIDs":[5741096.0,5037942.0,3864915.0,3610373.0,2924204.0,1706932.0,1706934.0,1706933.0,1633705.0,1428093.0,1334193.0,1334228.0,1334173.0,1334182.0,1195209.0,1195204.0,1334589.0,1334245.0,1334251.0,1334840.0,1343750.0,1349369.0,1350631.0,1350637.0,1351808.0,1428121.0,2166155.0,2166221.0,2413291.0,2583513.0,2583537.0,2924232.0,3289894.0,3610371.0,3817072.0,4702990.0,4750423.0,4750444.0,5575557.0,5577118.0,7815664.0,7815673.0,7815677.0],"skipIndex":0,"section_code":"gallery","featured_images":"7815677,7815673,7815664,5741096,5577118,5575557,5037942,4750444,4750423,4702990","id":85809,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5577118,5577103,5038041,5037992,5037971,5037945,5037942,4929815,4750444,4750427,4750423,4702990,3817082,3817072,3610382,3610376,3610373,3610371,3289897,3289896,3289894,2924222,2747013,2746947,2746891,2746889,2746795,2746770,2733943,2733942,2733939,2583537,2583513,2413291,2166221,2166207,2166204,2166187,2166155,1902522,1706933,1706932,1633705,1578082,1561282,1544522,1440903,1428093,1428083,1428080,1400095,1400070,1351808,1350637,1350631,1349402,1349369,1343753,1343752,1343750,1343711,1343576,1343566,1343510,1343503,1340468,1339895,1334840,1334589,1334487,1334193,1334182,1334173,1331412,1195209,1195204';
imageSets[2] = '5037952,3967676,2924201,1902522,1194008';
imageSets[3] = '8649310,8649309,7845339,7815677,7815673,7815664,7620032,7486903,7486893,6973873,6973871,6973870,6973868,6973865,6345544,6345542,5741096,5577118,5577103,5576912,5576896,5575557,5038041,5037992,5037971,5037952,5037945,5037942,4929847,4929835,4929815,4750444,4750427,4750423,4702990,4382365,3967704,3967701,3967696,3967692,3967690,3967686,3967680,3967676,3864938,3864929,3864915,3817082,3817072,3610382';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'www.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/richpeck/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/richpeck/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/richpeck/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/richpeck/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/richpeck/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/richpeck/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/richpeck/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 = 'Richard  & Wendy Peck 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>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="RICHPECK">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

