window.thumbnails = {};
															thumbnails[3005179] = clik.newPhoto({"id":3005179,"src":"Quaich-Trophy-Winner-600-_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":72});
															thumbnails[6264802] = clik.newPhoto({"id":6264802,"src":"Web-Opening-logo-slide-600pixels-_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":72});
															thumbnails[7613769] = clik.newPhoto({"id":7613769,"src":"KPC-Location_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Click for full map","height":91});
															thumbnails[2083774] = clik.newPhoto({"id":2083774,"src":"Turnberry-Light_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Colour Print Section:1st Place ","height":85});
															thumbnails[2973239] = clik.newPhoto({"id":2973239,"src":"Loch-Lomond-Morning_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Colour Print Section:2nd Place","height":59});
															thumbnails[2973241] = clik.newPhoto({"id":2973241,"src":"Kilchurn_Reflections_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Colour Print Section:3rd Place","height":173});
															thumbnails[2083792] = clik.newPhoto({"id":2083792,"src":"Black_Rock_Textures_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Mono Print Section:1st place","height":81});
															thumbnails[2973184] = clik.newPhoto({"id":2973184,"src":"Bothwell_Castle_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Mono Print Section:2nd Place","height":81});
															thumbnails[2973236] = clik.newPhoto({"id":2973236,"src":"Kilchurn-Castle_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Mono Print section:3rd place","height":84});
															thumbnails[2083808] = clik.newPhoto({"id":2083808,"src":"Clydescape_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":" Projected  Image Section:1st Place & Winner of The Rose Urie Trophy","height":75});
															thumbnails[2083810] = clik.newPhoto({"id":2083810,"src":"frostedglen_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":" Projected Image Section: Second place","height":189});
															thumbnails[2079768] = clik.newPhoto({"id":2079768,"src":"Glen-Coe_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":" Projected Image Section: 3rd Equal","height":90});
															thumbnails[4856254] = clik.newPhoto({"id":4856254,"src":"Isle_of_May_Lighthouse_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Projected Image Section: 3rd Equal","height":91});
															thumbnails[4861517] = clik.newPhoto({"id":4861517,"src":"Wrecks_off_Mull_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Projected Image Section: Commended","height":87});
															thumbnails[4861523] = clik.newPhoto({"id":4861523,"src":"009Sept_EdinburghTattoo_4_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Projected Image Section: Commended","height":75});
															thumbnails[4861520] = clik.newPhoto({"id":4861520,"src":"003Mar_Spring_Reflections_87_01_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Projected Image Section: Commended","height":72});
															thumbnails[4861531] = clik.newPhoto({"id":4861531,"src":"Evening-Light--700_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Projected Image Section: Commended","height":74});
															thumbnails[4863777] = clik.newPhoto({"id":4863777,"src":"South_Beach_Ardrossan_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Projected Image Section: Commended","height":81});
															thumbnails[3010910] = clik.newPhoto({"id":3010910,"src":"Asian_Otter_thumb.jpg","galleries_id":137298,"server_id":32,"link":"photo_3010910.html","width":130,"caption":"Asian Otter","height":98});
															thumbnails[3010913] = clik.newPhoto({"id":3010913,"src":"Yawn_thumb.jpg","galleries_id":137298,"server_id":32,"link":"photo_3010913.html","width":130,"caption":"Yawn","height":153});
															thumbnails[3010916] = clik.newPhoto({"id":3010916,"src":"Sliding_Tackle_thumb.jpg","galleries_id":137298,"server_id":32,"link":"photo_3010916.html","width":130,"caption":"Sliding Tackle","height":98});
															thumbnails[3010949] = clik.newPhoto({"id":3010949,"src":"Touchdown_thumb.jpg","galleries_id":137298,"server_id":32,"link":"photo_3010949.html","width":130,"caption":"Touchdown","height":104});
															thumbnails[3010923] = clik.newPhoto({"id":3010923,"src":"Sarah_thumb.jpg","galleries_id":137298,"server_id":32,"link":"photo_3010923.html","width":130,"caption":"Sarah","height":187});
															thumbnails[6816474] = clik.newPhoto({"id":6816474,"src":"Clifftop_Culzean_RJC_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816474.html","width":130,"caption":"Overall Winner<br\/>1st Place (equal)<\/br>Projected Images","height":87});
															thumbnails[3010926] = clik.newPhoto({"id":3010926,"src":"Web-not-available-kilmaurs_thumb.jpg","galleries_id":137298,"server_id":32,"link":"photo_3010926.html","width":130,"caption":"Image Not Available","height":72});
															thumbnails[2079781] = clik.newPhoto({"id":2079781,"src":"Grooming_Time_Web_thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_2079781.html","width":130,"caption":"Projected Images Section: 1st Place and overall winner","height":98});
															thumbnails[5125002] = clik.newPhoto({"id":5125002,"src":"07John_McCusker_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_5125002.html","width":130,"caption":"OVERALL WINNER<br\/>1st Place<br\/>Colour Print Section","height":98});
															thumbnails[5477218] = clik.newPhoto({"id":5477218,"src":"A1_Mono_-_Father_and_Son_Overall_Winner_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5477218.html","width":130,"caption":"Mono Section: 1st Place and Overall Winner","height":184});
															thumbnails[6816419] = clik.newPhoto({"id":6816419,"src":"The-Boathouse_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816419.html","width":130,"caption":"1st Place<br\/>Monochrome","height":98});
															thumbnails[7126387] = clik.newPhoto({"id":7126387,"src":"League2010-11_for_web7001_thumb.jpg","galleries_id":385464,"server_id":32,"link":"photo_7126387.html","width":130,"caption":"League Table (after 1st Open)","height":104});
															thumbnails[2083941] = clik.newPhoto({"id":2083941,"src":"Hang-Tough_Web_thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_2083941.html","width":130,"caption":"Projected Image Section:2nd Place","height":83});
															thumbnails[5125033] = clik.newPhoto({"id":5125033,"src":"08Heron_in_flight_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_5125033.html","width":130,"caption":"2nd Place<br\/>Colour Print Section","height":92});
															thumbnails[5477206] = clik.newPhoto({"id":5477206,"src":"A2_Mono_-_Lighthouse-mono_2nd_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5477206.html","width":130,"caption":"Mono Section: 2nd Place","height":94});
															thumbnails[6816431] = clik.newPhoto({"id":6816431,"src":"Arran_Seascape_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816431.html","width":130,"caption":"2nd Place<br\/>Monochrome","height":79});
															thumbnails[7462286] = clik.newPhoto({"id":7462286,"src":"League_Table_Feb_20111_thumb.jpg","galleries_id":385464,"server_id":32,"link":"photo_7462286.html","width":130,"caption":"League Table (after 2nd Open)","height":91});
															thumbnails[5125121] = clik.newPhoto({"id":5125121,"src":"09Watching_the_ball_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_5125121.html","width":130,"caption":"3rd Place<br\/>Colour Print Section","height":104});
															thumbnails[5477873] = clik.newPhoto({"id":5477873,"src":"A3_Mono_-_Guitar_girl_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5477873.html","width":130,"caption":"Mono Section: 3rd Place","height":195});
															thumbnails[5668084] = clik.newPhoto({"id":5668084,"src":"Projected_3rd_Small-heath-butterfly-S.Strachan_thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_5668084.html","width":130,"caption":"Projected Image Section: 3rd Place","height":195});
															thumbnails[6816438] = clik.newPhoto({"id":6816438,"src":"Cold-Morning_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816438.html","width":130,"caption":"3rd Place<br\/>Monochrome","height":87});
															thumbnails[7663461] = clik.newPhoto({"id":7663461,"src":"League2010-11_for_web_thumb.jpg","galleries_id":385464,"server_id":32,"link":"photo_7663461.html","width":130,"caption":"League Table (after annual open)","height":114});
															thumbnails[5464796] = clik.newPhoto({"id":5464796,"src":"AC_Mono_-_Proud_Dad_Mono_commended_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5464796.html","width":130,"caption":"Mono Section: Commended","height":163});
															thumbnails[5668284] = clik.newPhoto({"id":5668284,"src":"Puffin-portrait_thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_5668284.html","width":130,"caption":"Colour Print Section: 1st Place","height":195});
															thumbnails[6816442] = clik.newPhoto({"id":6816442,"src":"Carrick_in_Infrared_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816442.html","width":130,"caption":"Commended<br\/>Monochrome","height":194});
															thumbnails[7126314] = clik.newPhoto({"id":7126314,"src":"10Sentinal_-_Turnberry_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_7126314.html","width":130,"caption":"Commended<br\/>Colour Print","height":87});
															thumbnails[8763152] = clik.newPhoto({"id":8763152,"src":"14Common_darter_thumb.JPG","galleries_id":137299,"server_id":32,"link":"photo_8763152.html","width":130,"caption":"Commended<br\/>Colour Print","height":87});
															thumbnails[5478503] = clik.newPhoto({"id":5478503,"src":"AC_Mono_-_Steph_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5478503.html","width":130,"caption":"Mono Section: Commended","height":195});
															thumbnails[5668307] = clik.newPhoto({"id":5668307,"src":"Dreaming_of_Sunshine_Web_thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_5668307.html","width":130,"caption":"Colour Print Section: 2nd Place Equal","height":101});
															thumbnails[6816448] = clik.newPhoto({"id":6816448,"src":"Culzean_Sunset_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816448.html","width":130,"caption":"1st Place<br\/>Colour","height":86});
															thumbnails[7126675] = clik.newPhoto({"id":7126675,"src":"11White_wagtail_thumb.JPG","galleries_id":137299,"server_id":32,"link":"photo_7126675.html","width":130,"caption":"Commended<br\/>Colour Print","height":87});
															thumbnails[5478138] = clik.newPhoto({"id":5478138,"src":"B1_Colour_-_Puffin_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5478138.html","width":130,"caption":"Colour Section: 1st Place","height":195});
															thumbnails[5668319] = clik.newPhoto({"id":5668319,"src":"at-home_thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_5668319.html","width":130,"caption":"Colour Print Section: 2nd Place Equal","height":95});
															thumbnails[6816453] = clik.newPhoto({"id":6816453,"src":"Lavender_Field_Provence_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816453.html","width":130,"caption":"2nd Place<br\/>Colour","height":86});
															thumbnails[7126671] = clik.newPhoto({"id":7126671,"src":"12Donegal_Seascape_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_7126671.html","width":130,"caption":"Commended<br\/>Colour Print","height":59});
															thumbnails[5464802] = clik.newPhoto({"id":5464802,"src":"B2_Colour_-Clyde_puffers-colour_2nd_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5464802.html","width":130,"caption":"Colour Section: 2nd Place","height":98});
															thumbnails[5668331] = clik.newPhoto({"id":5668331,"src":"Determined_Paddler__thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_5668331.html","width":130,"caption":"Colour Print Section: 3rd Place","height":104});
															thumbnails[6816456] = clik.newPhoto({"id":6816456,"src":"Loudon_Hill_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816456.html","width":130,"caption":"3rd Place<br\/>Colour","height":87});
															thumbnails[8763037] = clik.newPhoto({"id":8763037,"src":"13Merlin_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_8763037.html","width":130,"caption":"Commended<br\/>Colour Print","height":98});
															thumbnails[5125026] = clik.newPhoto({"id":5125026,"src":"01Giants_Causeway_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_5125026.html","width":130,"caption":"1st Place<br\/>Mono Print Section","height":92});
															thumbnails[5464798] = clik.newPhoto({"id":5464798,"src":"B3_Colour_-_Harmony_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5464798.html","width":130,"caption":"Colour Section: 3rd Place","height":98});
															thumbnails[5668356] = clik.newPhoto({"id":5668356,"src":"Keeping-Warm_Web_thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_5668356.html","width":130,"caption":"Mono Print Section: 1st Place Equal","height":98});
															thumbnails[6816462] = clik.newPhoto({"id":6816462,"src":"Turnberry_Lighthouse_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816462.html","width":130,"caption":"Highly Commended<br\/>Colour","height":87});
															thumbnails[5125038] = clik.newPhoto({"id":5125038,"src":"02Karolina_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_5125038.html","width":130,"caption":"2nd Place<br\/>Mono Print Section","height":154});
															thumbnails[5464830] = clik.newPhoto({"id":5464830,"src":"C1_Proj_-_Purple_sandpiper-projected_1st_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5464830.html","width":130,"caption":"Projected Images Section: 1st Place","height":87});
															thumbnails[5668368] = clik.newPhoto({"id":5668368,"src":"El_Capitan_thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_5668368.html","width":130,"caption":"Mono Print Section: 2nd Place","height":191});
															thumbnails[6816465] = clik.newPhoto({"id":6816465,"src":"Frosted-Trees_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816465.html","width":130,"caption":"Commended<br\/>Colour","height":87});
															thumbnails[5125004] = clik.newPhoto({"id":5125004,"src":"03Horse_Race_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_5125004.html","width":130,"caption":"3rd Place<br\/>Mono Print Section","height":135});
															thumbnails[5464832] = clik.newPhoto({"id":5464832,"src":"C2_Proj_-_Take_off-projected_2nd_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5464832.html","width":130,"caption":"Projected Images Section - 2nd= Place","height":98});
															thumbnails[5668374] = clik.newPhoto({"id":5668374,"src":"Pohbull-fhinn_thumb.jpg","galleries_id":137302,"server_id":32,"link":"photo_5668374.html","width":130,"caption":"Mono Print Section: 3rd Place","height":87});
															thumbnails[6816470] = clik.newPhoto({"id":6816470,"src":"Picture_Postcard_129_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816470.html","width":130,"caption":"Commended<br\/>Colour","height":95});
															thumbnails[5464800] = clik.newPhoto({"id":5464800,"src":"C2_Proj_-_the_happiest_day-projected_2nd_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5464800.html","width":130,"caption":"Projected Images Section: 2nd= Place","height":98});
															thumbnails[8763048] = clik.newPhoto({"id":8763048,"src":"04The_beers_gone_right_through_me_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_8763048.html","width":130,"caption":"Commended<br\/>Mono Print","height":195});
															thumbnails[5477216] = clik.newPhoto({"id":5477216,"src":"C3_Proj_-_Autumn_Morning_Corpach-projected_3rd_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5477216.html","width":130,"caption":"Projected Image Section: 3rd= Place","height":75});
															thumbnails[6816478] = clik.newPhoto({"id":6816478,"src":"Evening-Glow_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816478.html","width":130,"caption":"1st Place (equal)<br\/>Projected Images","height":66});
															thumbnails[8763053] = clik.newPhoto({"id":8763053,"src":"05Palicio_Carlos_V_-_Granada_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_8763053.html","width":130,"caption":"Commended<br\/>Mono Print","height":195});
															thumbnails[5477214] = clik.newPhoto({"id":5477214,"src":"C3_Proj_-_What_goes_up..-projected_3rd_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5477214.html","width":130,"caption":"Projected Image Section: 3rd= Place","height":98});
															thumbnails[6816481] = clik.newPhoto({"id":6816481,"src":"Sheep-in-Winter_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_6816481.html","width":130,"caption":"3rd Place<br\/>Projected Images","height":98});
															thumbnails[8763057] = clik.newPhoto({"id":8763057,"src":"06Bending-Light_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_8763057.html","width":130,"caption":"Commended<br\/>Mono Print","height":66});
															thumbnails[5125041] = clik.newPhoto({"id":5125041,"src":"15Whitby-Piers_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_5125041.html","width":130,"caption":"1st Place<br\/>Projected Image Section","height":80});
															thumbnails[5478148] = clik.newPhoto({"id":5478148,"src":"CC_Proj_-_dreaming_of_sunshine-projected_commended_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5478148.html","width":130,"caption":"Projected Image Section: Commended","height":101});
															thumbnails[8662395] = clik.newPhoto({"id":8662395,"src":"Pre-Dawn-Light_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_8662395.html","width":130,"caption":"Highly Commended<br\/>Projected Images","height":77});
															thumbnails[5125048] = clik.newPhoto({"id":5125048,"src":"16Sliding_Tackle_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_5125048.html","width":130,"caption":"2nd Place<br\/>Projected Image Section","height":98});
															thumbnails[5477209] = clik.newPhoto({"id":5477209,"src":"CC_Proj_-_Eilean_Donan_reflections-projected_commended_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5477209.html","width":130,"caption":"Projected Image Section: Commended","height":86});
															thumbnails[8662397] = clik.newPhoto({"id":8662397,"src":"Venice_Vista_129_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_8662397.html","width":130,"caption":"Highly Commended<br\/>Projected Images","height":97});
															thumbnails[5125117] = clik.newPhoto({"id":5125117,"src":"17Hoverfly_on_Anemone_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_5125117.html","width":130,"caption":"3rd Place<br\/>Projected Image Section","height":92});
															thumbnails[5477210] = clik.newPhoto({"id":5477210,"src":"CC_Proj_-_Kirkmadrine-projected_commended_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5477210.html","width":130,"caption":"Projected Image Section: Commended","height":86});
															thumbnails[8662399] = clik.newPhoto({"id":8662399,"src":"Web-not-available-kilmaurs_368A37A0-1EC9-D45B-1CF829ACB71EDE7A_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_8662399.html","width":130,"caption":"Highly Commended<br\/>Projected Images","height":72});
															thumbnails[5477221] = clik.newPhoto({"id":5477221,"src":"CC_Proj_-_Red_Squirrel_projected_commended_thumb.jpg","galleries_id":137300,"server_id":32,"link":"photo_5477221.html","width":130,"caption":"Projected Image Section: Commended","height":166});
															thumbnails[7126317] = clik.newPhoto({"id":7126317,"src":"18Black-guillemot_thumb.JPG","galleries_id":137299,"server_id":32,"link":"photo_7126317.html","width":130,"caption":"Commended<br\/>Colour Print","height":87});
															thumbnails[8662400] = clik.newPhoto({"id":8662400,"src":"Ancient_Jaws_RJC_thumb.jpg","galleries_id":137301,"server_id":32,"link":"photo_8662400.html","width":130,"caption":"Commended<br\/>Projected Images","height":195});
															thumbnails[7126322] = clik.newPhoto({"id":7126322,"src":"19Gigantic_Roots_129_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_7126322.html","width":130,"caption":"Commended<br\/>Projected Image","height":98});
															thumbnails[7126327] = clik.newPhoto({"id":7126327,"src":"21Prehistoric_Portencross_AKA_Too_Much_Time_on_My_Hands_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_7126327.html","width":130,"caption":"Commended<br\/>Projected Image","height":87});
															thumbnails[7126337] = clik.newPhoto({"id":7126337,"src":"22Puffin-in-flight_thumb.JPG","galleries_id":137299,"server_id":32,"link":"photo_7126337.html","width":130,"caption":"Commended<br\/>Projected Image","height":87});
															thumbnails[8763148] = clik.newPhoto({"id":8763148,"src":"23Yawn_thumb.jpg","galleries_id":137299,"server_id":32,"link":"photo_8763148.html","width":130,"caption":"Commended<br\/>Projected Image","height":153});
															thumbnails[4899287] = clik.newPhoto({"id":4899287,"src":"001Jan_morning_light_by_R_Quig_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899287.html","width":130,"caption":"Sponsor - Barry Devlin Services Ltd","height":89});
															thumbnails[4899410] = clik.newPhoto({"id":4899410,"src":"May_Isle_Lighthouse__01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899410.html","width":130,"caption":"Sponsor - Hector MacDonald & Company","height":67});
															thumbnails[4899427] = clik.newPhoto({"id":4899427,"src":"Spring_reflections_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899427.html","width":130,"caption":"Sponsor - Walkers Cycling","height":80});
															thumbnails[4899623] = clik.newPhoto({"id":4899623,"src":"Oldshoremore_calendar_r_pollock_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899623.html","width":130,"caption":"Sponsor - Jigs & Fixtures","height":86});
															thumbnails[4899630] = clik.newPhoto({"id":4899630,"src":"023_Wrecks_off_Mull_125_01_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899630.html","width":130,"caption":"Sponsor - Francis Hair & Beauty","height":80});
															thumbnails[4899645] = clik.newPhoto({"id":4899645,"src":"Glasgow_Cathedral_from_the_NEC_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899645.html","width":130,"caption":"Sponsor - Weston Tavern Bar & Restaurant","height":85});
															thumbnails[4899654] = clik.newPhoto({"id":4899654,"src":"Edinburgh_Castle_Calendar_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899654.html","width":130,"caption":"Sponsor - Flowers By Karen","height":98});
															thumbnails[4899670] = clik.newPhoto({"id":4899670,"src":"Millers_Boatyard_St_Monans_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899670.html","width":130,"caption":"Sponsor - Caper's of Kilwinning","height":85});
															thumbnails[4899685] = clik.newPhoto({"id":4899685,"src":"Edinburgh_Tattoo_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899685.html","width":130,"caption":"Sponsor - Myrtle Coffee Services Ltd","height":75});
															thumbnails[4899692] = clik.newPhoto({"id":4899692,"src":"Castle_Stalker_Calendar_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899692.html","width":130,"caption":"Sponsor - Dodd's Of Troon","height":84});
															thumbnails[4899700] = clik.newPhoto({"id":4899700,"src":"Tarskavaig_Bay_Isle_of_Skye_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899700.html","width":130,"caption":"Sponsor - The Dutch Maid Company Ltd","height":80});
															thumbnails[4899705] = clik.newPhoto({"id":4899705,"src":"Clydescape_01_01_thumb.JPG","galleries_id":279217,"server_id":32,"link":"photo_4899705.html","width":130,"caption":"Sponsor - Charmeuse Beauty Salon","height":80});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[279217] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Club Calendar 2010","link":"section335318.html","maxRecords":0.0,"photoIDs":[4899287.0,4899410.0,4899427.0,4899623.0,4899630.0,4899645.0,4899654.0,4899670.0,4899685.0,4899692.0,4899700.0,4899705.0],"skipIndex":0,"section_code":"section335318","featured_images":"4899705,4899700,4899692,4899685,4899670,4899654,4899645,4899630,4899623,4899427","id":279217,"singleSection":true});				  						galleries[137301] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Rose Urie Competition<br\/>2011 - 12","link":"gallery_137301.html","maxRecords":0.0,"photoIDs":[6816474.0,6816419.0,6816431.0,6816438.0,6816442.0,6816448.0,6816453.0,6816456.0,6816462.0,6816465.0,6816470.0,6816478.0,6816481.0,8662395.0,8662397.0,8662399.0,8662400.0],"skipIndex":0,"section_code":"gallery","featured_images":6816474,"id":137301,"singleSection":false});				  						galleries[137298] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Quigs Quaich Competition 2011-2012","link":"gallery_137298.html","maxRecords":0.0,"photoIDs":[3010910.0,3010913.0,3010916.0,3010949.0,3010923.0,3010926.0],"skipIndex":0,"section_code":"gallery","featured_images":"3010949,3010926,3010923,3010916,3010913,3010910","id":137298,"singleSection":false});				  						galleries[137299] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"1st Open Nov 2011-12","link":"gallery_137299.html","maxRecords":0.0,"photoIDs":[5125002.0,5125033.0,5125121.0,7126314.0,8763152.0,7126675.0,7126671.0,8763037.0,5125026.0,5125038.0,5125004.0,8763048.0,8763053.0,8763057.0,5125041.0,5125048.0,5125117.0,7126317.0,7126322.0,7126327.0,7126337.0,8763148.0],"skipIndex":0,"section_code":"gallery","featured_images":5125002,"id":137299,"singleSection":false});				  						galleries[137300] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2nd Open 2010 - 2011","link":"gallery_137300.html","maxRecords":0.0,"photoIDs":[5477218.0,5477206.0,5477873.0,5464796.0,5478503.0,5478138.0,5464802.0,5464798.0,5464830.0,5464832.0,5464800.0,5477216.0,5477214.0,5478148.0,5477209.0,5477210.0,5477221.0],"skipIndex":0,"section_code":"gallery","featured_images":"5477218,5477216","id":137300,"singleSection":false});				  						galleries[137302] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Club Annual Competition 2010 -11","link":"gallery_137302.html","maxRecords":0.0,"photoIDs":[2079781.0,2083941.0,5668084.0,5668284.0,5668307.0,5668319.0,5668331.0,5668356.0,5668368.0,5668374.0],"skipIndex":0,"section_code":"gallery","featured_images":2083941.0,"id":137302,"singleSection":false});				  						galleries[385464] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"League Table 2010-11","link":"gallery_385464.html","maxRecords":0.0,"photoIDs":[7126387.0,7462286.0,7663461.0],"skipIndex":0,"section_code":"gallery","featured_images":7462286.0,"id":385464,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7613769,6264802';
imageSets[2] = '3005179,5477218,5125002,7462286,2083941,2083774,2083792,6816462,2083808,5477216';
imageSets[3] = '8763152,8763148,8763057,8763053,8763048,8763037,8662400,8662399,8662397,8662395,7663461,7613769,7462286,7126675,7126671,7126387,7126337,7126327,7126322,7126317,7126314,6816481,6816478,6816474,6816470,6816465,6816462,6816456,6816453,6816448,6816442,6816438,6816431,6816419,6264802,5668374,5668368,5668356,5668331,5668319,5668307,5668284,5668084,5478503,5478148,5478138,5477873,5477221,5477218,5477216';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/johnphoto/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/johnphoto/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 = 'Kilmaurs Photographic Club: ' + 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 !== '' || this.payment_groups_id !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

