window.thumbnails = {};
															thumbnails[509600] = clik.newPhoto({"id":509600,"src":"Colin_thumb.jpg","galleries_id":50591,"server_id":18,"link":"photo_509600.html","width":130,"caption":"Dr. Colin J. Smith","height":188});
															thumbnails[665768] = clik.newPhoto({"id":665768,"src":"stonekirk_thumb.JPG","galleries_id":50592,"server_id":18,"link":"photo_665768.html","width":130,"caption":"What's With the Logo?","height":198});
															thumbnails[1715330] = clik.newPhoto({"id":1715330,"src":"Loch Faskally_thumb.jpg","galleries_id":115271,"server_id":18,"link":"photo_1715330.html","width":130,"caption":"Loch Faskally","height":98});
															thumbnails[1715345] = clik.newPhoto({"id":1715345,"src":"Port na Craig_thumb.jpg","galleries_id":115271,"server_id":18,"link":"photo_1715345.html","width":130,"caption":"The hamlet of Port na Craig","height":98});
															thumbnails[1715351] = clik.newPhoto({"id":1715351,"src":"Shop window_thumb.jpg","galleries_id":115271,"server_id":18,"link":"photo_1715351.html","width":130,"caption":"Whisky town!","height":98});
															thumbnails[1715364] = clik.newPhoto({"id":1715364,"src":"Aboyne Victory Hall_thumb.jpg","galleries_id":115273,"server_id":18,"link":"photo_1715364.html","width":130,"caption":"Aboyne Victory Hall","height":98});
															thumbnails[1715366] = clik.newPhoto({"id":1715366,"src":"posters_thumb.jpg","galleries_id":115273,"server_id":18,"link":"photo_1715366.html","width":130,"caption":"Posters for local events in Deeside","height":98});
															thumbnails[1715377] = clik.newPhoto({"id":1715377,"src":"ssa_logo_thumb.jpg","galleries_id":115274,"server_id":18,"link":"photo_1715377.html","width":130,"caption":"The Scottish Style Awards 2007 event logo","height":42});
															thumbnails[1715385] = clik.newPhoto({"id":1715385,"src":"SatHerald2_141006_thumb.jpg","galleries_id":115274,"server_id":18,"link":"photo_1715385.html","width":130,"caption":"The Herald press coverage","height":172});
															thumbnails[1715395] = clik.newPhoto({"id":1715395,"src":"Mercat Cross 2_thumb.jpg","galleries_id":115276,"server_id":18,"link":"photo_1715395.html","width":130,"caption":"The Mercat Cross, Culross","height":202});
															thumbnails[1715404] = clik.newPhoto({"id":1715404,"src":"Culross Town House_thumb.jpg","galleries_id":115276,"server_id":18,"link":"photo_1715404.html","width":130,"caption":"Culross Town House","height":98});
															thumbnails[1716683] = clik.newPhoto({"id":1716683,"src":"Dunagoil_thumb.jpg","galleries_id":115337,"server_id":18,"link":"photo_1716683.html","width":130,"caption":"Dunagoil Hillfort, Bute","height":98});
															thumbnails[1716684] = clik.newPhoto({"id":1716684,"src":"Ettrick Bay General_thumb.jpg","galleries_id":115337,"server_id":18,"link":"photo_1716684.html","width":130,"caption":"Ettrick Bay, Isle of Bute","height":98});
															thumbnails[1716688] = clik.newPhoto({"id":1716688,"src":"LPS Team small_thumb.jpg","galleries_id":115337,"server_id":18,"link":"photo_1716688.html","width":130,"caption":"The Discover Bute LPS Team","height":86});
															thumbnails[1716713] = clik.newPhoto({"id":1716713,"src":"Palace_thumb.jpg","galleries_id":115276,"server_id":18,"link":"photo_1716713.html","width":130,"caption":"Culross Palace","height":98});
															thumbnails[1718139] = clik.newPhoto({"id":1718139,"src":"fashion2_thumb.jpg","galleries_id":115274,"server_id":18,"link":"photo_1718139.html","width":130,"caption":"Catwalk shows for 2007","height":192});
															thumbnails[1718147] = clik.newPhoto({"id":1718147,"src":"Pipe Majors_thumb.jpg","galleries_id":115273,"server_id":18,"link":"photo_1718147.html","width":130,"caption":"Pipe Majors at the Braemar Gathering","height":81});
															thumbnails[1718148] = clik.newPhoto({"id":1718148,"src":"Pitlochry Festival Theatre2_thumb.jpg","galleries_id":115271,"server_id":18,"link":"photo_1718148.html","width":130,"caption":"Pitlochry Festival Theatre","height":97});
															thumbnails[1718256] = clik.newPhoto({"id":1718256,"src":"UEFA_thumb.jpg","galleries_id":115436,"server_id":18,"link":"photo_1718256.html","width":130,"caption":"UEFA Cup Final banners, George Square","height":173});
															thumbnails[1718263] = clik.newPhoto({"id":1718263,"src":"hampden-park_thumb.jpg","galleries_id":115436,"server_id":18,"link":"photo_1718263.html","width":130,"caption":"The National Stadium, Hampden Park, a venue for the 2014 Commonwealth Games","height":73});
															thumbnails[1820334] = clik.newPhoto({"id":1820334,"src":"Caird_thumb.jpg","galleries_id":115338,"server_id":18,"link":"photo_1820334.html","width":130,"caption":"Caird Hall","height":202});
															thumbnails[1820344] = clik.newPhoto({"id":1820344,"src":"Discovery_thumb.jpg","galleries_id":115338,"server_id":18,"link":"photo_1820344.html","width":130,"caption":"Royal Research Ship \"Discovery\" at Dundee","height":83});
															thumbnails[3203480] = clik.newPhoto({"id":3203480,"src":"stroller_thumb.jpg","galleries_id":195842,"server_id":18,"link":"photo_3203480.html","width":130,"caption":"Stroller ticket","height":49});
															thumbnails[3203481] = clik.newPhoto({"id":3203481,"src":"BJF Logo_thumb.jpg","galleries_id":195842,"server_id":18,"link":"photo_3203481.html","width":130,"caption":"The logo of the HSBC Brecon Jazz Festival","height":91});
															thumbnails[3206241] = clik.newPhoto({"id":3206241,"src":"Banffshire Coast oneline logo_thumb.jpg","galleries_id":195841,"server_id":18,"link":"photo_3206241.html","width":130,"caption":"The logo of the Banffshire Coast Tourism Partnership.","height":49});
															thumbnails[3206248] = clik.newPhoto({"id":3206248,"src":"Cullen_thumb.jpg","galleries_id":195841,"server_id":18,"link":"photo_3206248.html","width":130,"caption":"Cycling at Cullen","height":87});
															thumbnails[3206251] = clik.newPhoto({"id":3206251,"src":"Banff_thumb.jpg","galleries_id":195841,"server_id":18,"link":"photo_3206251.html","width":130,"caption":"Surf up at Banff Links","height":87});
															thumbnails[3206340] = clik.newPhoto({"id":3206340,"src":"Melrose sevens_thumb.jpg","galleries_id":195843,"server_id":18,"link":"photo_3206340.html","width":130,"caption":"The Melrose Sevens","height":86});
															thumbnails[3206467] = clik.newPhoto({"id":3206467,"src":"castle_thumb.jpg","galleries_id":195854,"server_id":18,"link":"photo_3206467.html","width":130,"caption":"Braemar Castle","height":87});
															thumbnails[3206530] = clik.newPhoto({"id":3206530,"src":"room1_thumb.jpg","galleries_id":195854,"server_id":18,"link":"photo_3206530.html","width":130,"caption":"Restored bedroom in Braemar Castle","height":87});
															thumbnails[3206547] = clik.newPhoto({"id":3206547,"src":"GlamisPO_thumb.jpg","galleries_id":195855,"server_id":18,"link":"photo_3206547.html","width":130,"caption":"Glamis Post Office and Corner Shop","height":195});
															thumbnails[3245706] = clik.newPhoto({"id":3245706,"src":"cairngorm-logo_thumb.jpg","galleries_id":198062,"server_id":18,"link":"photo_3245706.html","width":130,"caption":"Logo of Deeside & The Cairngorms Ltd","height":79});
															thumbnails[3245707] = clik.newPhoto({"id":3245707,"src":"Balmoral2_thumb.jpg","galleries_id":198062,"server_id":18,"link":"photo_3245707.html","width":130,"caption":"Balmoral Castle","height":84});
															thumbnails[3245717] = clik.newPhoto({"id":3245717,"src":"audience_thumb.jpg","galleries_id":198062,"server_id":18,"link":"photo_3245717.html","width":130,"caption":"Launch of Deeside DMO","height":87});
															thumbnails[3245720] = clik.newPhoto({"id":3245720,"src":"Destination Dundee Logo_thumb.jpg","galleries_id":198063,"server_id":18,"link":"photo_3245720.html","width":130,"caption":"The Destination Dundee logo ","height":45});
															thumbnails[3245725] = clik.newPhoto({"id":3245725,"src":"Dundee group guide2_thumb.jpg","galleries_id":198063,"server_id":18,"link":"photo_3245725.html","width":130,"caption":"Destination Dundee Group Guide","height":182});
															thumbnails[3245732] = clik.newPhoto({"id":3245732,"src":"Discovery1_thumb.jpg","galleries_id":198063,"server_id":18,"link":"photo_3245732.html","width":130,"caption":"RRS Discovery - Dundee's main attraction","height":195});
															thumbnails[3246484] = clik.newPhoto({"id":3246484,"src":"1_thumb.JPG","galleries_id":195845,"server_id":18,"link":"photo_3246484.html","width":130,"caption":"Loch Lomond at dusk","height":81});
															thumbnails[3246494] = clik.newPhoto({"id":3246494,"src":"2_thumb.JPG","galleries_id":195845,"server_id":18,"link":"photo_3246494.html","width":130,"caption":"Stirling Castle","height":84});
															thumbnails[3246503] = clik.newPhoto({"id":3246503,"src":"3_thumb.JPG","galleries_id":195845,"server_id":18,"link":"photo_3246503.html","width":130,"caption":"Stirling Old Town","height":83});
															thumbnails[3257534] = clik.newPhoto({"id":3257534,"src":"SENSATION colour2_thumb.jpg","galleries_id":195849,"server_id":18,"link":"photo_3257534.html","width":130,"caption":"Sensation logo","height":30});
															thumbnails[3257537] = clik.newPhoto({"id":3257537,"src":"Science Centre_thumb.jpg","galleries_id":195849,"server_id":18,"link":"photo_3257537.html","width":130,"caption":"Kids love Science","height":98});
															thumbnails[3257544] = clik.newPhoto({"id":3257544,"src":"Sensationpic_thumb.jpg","galleries_id":195849,"server_id":18,"link":"photo_3257544.html","width":130,"caption":"Sensation - Dundee Science Centre","height":98});
															thumbnails[3257627] = clik.newPhoto({"id":3257627,"src":"sbclogo_thumb.gif","galleries_id":195843,"server_id":18,"link":"photo_3257627.html","width":130,"caption":"Scottish Borders Council logo","height":45});
															thumbnails[3257636] = clik.newPhoto({"id":3257636,"src":"reivers_thumb.jpg","galleries_id":195843,"server_id":18,"link":"photo_3257636.html","width":130,"caption":"The Hawick Reivers","height":53});
															thumbnails[3257794] = clik.newPhoto({"id":3257794,"src":"Theatr Brycheiniog_thumb.jpg","galleries_id":195842,"server_id":18,"link":"photo_3257794.html","width":130,"caption":"Theatr Brycheiniog, Brecon","height":106});
															thumbnails[3258156] = clik.newPhoto({"id":3258156,"src":"tv24_thumb.jpg","galleries_id":148461,"server_id":18,"link":"photo_3258156.html","width":130,"caption":"Linlithgow","height":201});
															thumbnails[3258181] = clik.newPhoto({"id":3258181,"src":"hampden-park1_thumb.jpg","galleries_id":198675,"server_id":18,"link":"photo_3258181.html","width":130,"caption":"The National Stadium, Glasgow","height":73});
															thumbnails[3258205] = clik.newPhoto({"id":3258205,"src":"Piping Live_thumb.jpg","galleries_id":198675,"server_id":18,"link":"photo_3258205.html","width":130,"caption":"Piping Live! Glasgow International Piping Festival","height":92});
															thumbnails[5241036] = clik.newPhoto({"id":5241036,"src":"Former_ferry2_thumb.jpg","galleries_id":295376,"server_id":18,"link":"photo_5241036.html","width":130,"caption":"Cramond Ferry in the 19th Century","height":83});
															thumbnails[5241040] = clik.newPhoto({"id":5241040,"src":"Former_ferry11_thumb.jpg","galleries_id":295376,"server_id":18,"link":"photo_5241040.html","width":130,"caption":"Cramond Ferry 20th Century style","height":88});
															thumbnails[5241048] = clik.newPhoto({"id":5241048,"src":"New_ferry12_thumb.jpg","galleries_id":295376,"server_id":18,"link":"photo_5241048.html","width":130,"caption":"The future at Cramond - Scotland's only chain ferry","height":89});
															thumbnails[5284080] = clik.newPhoto({"id":5284080,"src":"Glen_Clova_thumb.jpg","galleries_id":295372,"server_id":18,"link":"photo_5284080.html","width":130,"caption":"Glen Clova, Angus","height":87});
															thumbnails[5284087] = clik.newPhoto({"id":5284087,"src":"Loch_Tay_thumb.jpg","galleries_id":295372,"server_id":18,"link":"photo_5284087.html","width":130,"caption":"Loch Tay, Perthshire","height":87});
															thumbnails[5284089] = clik.newPhoto({"id":5284089,"src":"Survey_logo_final_thumb.jpg","galleries_id":295372,"server_id":18,"link":"photo_5284089.html","width":130,"caption":"","height":63});
															thumbnails[5284115] = clik.newPhoto({"id":5284115,"src":"Pittenweem_thumb.jpg","galleries_id":297195,"server_id":18,"link":"photo_5284115.html","width":130,"caption":"Pittenweem, Fife","height":87});
															thumbnails[5300508] = clik.newPhoto({"id":5300508,"src":"CCAG_Concept_2_A4_smallish1_thumb.jpg","galleries_id":295374,"server_id":18,"link":"photo_5300508.html","width":130,"caption":"Plan for the proposed Carnoustie Centre","height":93});
															thumbnails[5300513] = clik.newPhoto({"id":5300513,"src":"REPORT_PRESENTATION_small1_thumb.jpg","galleries_id":295374,"server_id":18,"link":"photo_5300513.html","width":130,"caption":"Job done!","height":88});
															thumbnails[5300519] = clik.newPhoto({"id":5300519,"src":"47_High_St_thumb.jpg","galleries_id":297195,"server_id":18,"link":"photo_5300519.html","width":130,"caption":"The Venue!","height":87});
															thumbnails[5317436] = clik.newPhoto({"id":5317436,"src":"Castle1_thumb.jpg","galleries_id":295370,"server_id":18,"link":"photo_5317436.html","width":130,"caption":"Edinburgh Castle","height":87});
															thumbnails[5317444] = clik.newPhoto({"id":5317444,"src":"easyJet_thumb.jpg","galleries_id":295370,"server_id":18,"link":"photo_5317444.html","width":130,"caption":"Air Services","height":87});
															thumbnails[5317483] = clik.newPhoto({"id":5317483,"src":"St_Andrews_thumb.jpg","galleries_id":295373,"server_id":18,"link":"photo_5317483.html","width":130,"caption":"The Old Course, St Andrews","height":85});
															thumbnails[5317489] = clik.newPhoto({"id":5317489,"src":"Dysart_thumb.jpg","galleries_id":295373,"server_id":18,"link":"photo_5317489.html","width":130,"caption":"Dysart, Fife","height":87});
															thumbnails[5317523] = clik.newPhoto({"id":5317523,"src":"frb_thumb.jpg","galleries_id":295373,"server_id":18,"link":"photo_5317523.html","width":130,"caption":"The Forth Road Bridge","height":87});
															thumbnails[5317567] = clik.newPhoto({"id":5317567,"src":"Loch_Leven_thumb.jpg","galleries_id":295378,"server_id":18,"link":"photo_5317567.html","width":130,"caption":"The Highlands of Scotland","height":87});
															thumbnails[5317636] = clik.newPhoto({"id":5317636,"src":"Rhodes_Old_Town_thumb.jpg","galleries_id":295378,"server_id":18,"link":"photo_5317636.html","width":130,"caption":"The Old Town, Rhodes, Greece","height":87});
															thumbnails[5317715] = clik.newPhoto({"id":5317715,"src":"picture_thumb.jpg","galleries_id":297195,"server_id":18,"link":"photo_5317715.html","width":130,"caption":"\"Drifter\" by More Horsburgh (courtesy of Pittenweem Arts Festival)","height":63});
															thumbnails[5317819] = clik.newPhoto({"id":5317819,"src":"SE_Logo_thumb.jpg","galleries_id":299333,"server_id":18,"link":"photo_5317819.html","width":130,"caption":"","height":94});
															thumbnails[5320943] = clik.newPhoto({"id":5320943,"src":"Salzburg0002_thumb.JPG","galleries_id":295378,"server_id":18,"link":"photo_5320943.html","width":130,"caption":"Salzburg, Austria","height":85});
															thumbnails[5995574] = clik.newPhoto({"id":5995574,"src":"Revised_Floor_Plan_2sm_thumb.jpg","galleries_id":337787,"server_id":18,"link":"photo_5995574.html","width":130,"caption":"Proposed Murton reserve visitor centre","height":69});
															thumbnails[5995611] = clik.newPhoto({"id":5995611,"src":"SP_A0736small_thumb.jpg","galleries_id":337787,"server_id":18,"link":"photo_5995611.html","width":130,"caption":"A hard winter at Murton","height":98});
															thumbnails[5995626] = clik.newPhoto({"id":5995626,"src":"SP_A0723small_thumb.jpg","galleries_id":337787,"server_id":18,"link":"photo_5995626.html","width":130,"caption":"The loch at Murton Reserve","height":98});
															thumbnails[5995891] = clik.newPhoto({"id":5995891,"src":"wind-turbine_thumb.jpg","galleries_id":195855,"server_id":18,"link":"photo_5995891.html","width":130,"caption":"How will a wind farm affect my business?","height":204});
															thumbnails[5996222] = clik.newPhoto({"id":5996222,"src":"ETAG-Logo_thumb.jpg","galleries_id":295370,"server_id":18,"link":"photo_5996222.html","width":130,"caption":"ETAG Logo","height":43});
															thumbnails[5996893] = clik.newPhoto({"id":5996893,"src":"logo_glasgow_thumb.jpg","galleries_id":198675,"server_id":18,"link":"photo_5996893.html","width":130,"caption":"Glasgow - Scotland with Style","height":66});
															thumbnails[6112668] = clik.newPhoto({"id":6112668,"src":"Longtown-Memorial-Hall_thumb.jpg","galleries_id":342568,"server_id":18,"link":"photo_6112668.html","width":130,"caption":"Longtown Memorial Hall","height":50});
															thumbnails[6112669] = clik.newPhoto({"id":6112669,"src":"borderlands_thumb.jpg","galleries_id":342568,"server_id":18,"link":"photo_6112669.html","width":130,"caption":"Carlisle and the Borderlands","height":87});
															thumbnails[6112672] = clik.newPhoto({"id":6112672,"src":"Longtown_small_thumb.jpg","galleries_id":342568,"server_id":18,"link":"photo_6112672.html","width":130,"caption":"A centre for the borderlands","height":87});
															thumbnails[6668444] = clik.newPhoto({"id":6668444,"src":"SL381860small_thumb.jpg","galleries_id":364469,"server_id":18,"link":"photo_6668444.html","width":130,"caption":"CARLISLE OLD TOWN HALL","height":98});
															thumbnails[6668446] = clik.newPhoto({"id":6668446,"src":"SP_A0702_small1_thumb.jpg","galleries_id":364469,"server_id":18,"link":"photo_6668446.html","width":130,"caption":"CARLISLE OLD TOWN HALL","height":98});
															thumbnails[6668454] = clik.newPhoto({"id":6668454,"src":"cutaway_small_thumb.jpg","galleries_id":364469,"server_id":18,"link":"photo_6668454.html","width":130,"caption":"The project included detailed assessment of the historic fabric of the building","height":92});
															thumbnails[6940046] = clik.newPhoto({"id":6940046,"src":"STB_Plaque1_thumb.jpg","galleries_id":195855,"server_id":18,"link":"photo_6940046.html","width":130,"caption":"Assistance with planning applications","height":173});
															thumbnails[7313092] = clik.newPhoto({"id":7313092,"src":"SP_A0834_thumb.jpg","galleries_id":395557,"server_id":18,"link":"photo_7313092.html","width":130,"caption":"A Prominent City Landmark","height":173});
															thumbnails[7313108] = clik.newPhoto({"id":7313108,"src":"SP_A0835_thumb.jpg","galleries_id":395557,"server_id":18,"link":"photo_7313108.html","width":130,"caption":"Logo of the Tron Theatre","height":98});
															thumbnails[7313128] = clik.newPhoto({"id":7313128,"src":"SP_A0838_thumb.jpg","galleries_id":395557,"server_id":18,"link":"photo_7313128.html","width":130,"caption":"A popular venue","height":98});
															thumbnails[7313170] = clik.newPhoto({"id":7313170,"src":"birthday_cake_-_resized_thumb.jpg","galleries_id":395565,"server_id":18,"link":"photo_7313170.html","width":130,"caption":"Let them eat Cake!","height":98});
															thumbnails[7313175] = clik.newPhoto({"id":7313175,"src":"bressay_lighthouse_thumb.jpg","galleries_id":395565,"server_id":18,"link":"photo_7313175.html","width":130,"caption":"A Rich Maritime Heritage","height":78});
															thumbnails[7313179] = clik.newPhoto({"id":7313179,"src":"vikings-homepage_thumb.jpg","galleries_id":395565,"server_id":18,"link":"photo_7313179.html","width":130,"caption":"Vikings!","height":99});
															thumbnails[7335556] = clik.newPhoto({"id":7335556,"src":"church_thumb.jpg","galleries_id":396966,"server_id":18,"link":"photo_7335556.html","width":130,"caption":"A rich rural heritage","height":97});
															thumbnails[7335637] = clik.newPhoto({"id":7335637,"src":"coast_thumb.jpg","galleries_id":396966,"server_id":18,"link":"photo_7335637.html","width":130,"caption":"The Black Sea Coast near Yalta","height":93});
															thumbnails[7335687] = clik.newPhoto({"id":7335687,"src":"battle_thumb.jpg","galleries_id":396966,"server_id":18,"link":"photo_7335687.html","width":130,"caption":"The Site of the Battle of Alma (1854)","height":91});
															thumbnails[7336093] = clik.newPhoto({"id":7336093,"src":"SP_A0870_thumb.jpg","galleries_id":395578,"server_id":18,"link":"photo_7336093.html","width":130,"caption":"Aberdeen Exhibition and Conference Centre","height":98});
															thumbnails[7336119] = clik.newPhoto({"id":7336119,"src":"ACB_Logo_thumb.jpg","galleries_id":395578,"server_id":18,"link":"photo_7336119.html","width":130,"caption":"Graphic from the website of Aberdeen Convention Bureau","height":32});
															thumbnails[7336142] = clik.newPhoto({"id":7336142,"src":"union_square_thumb.jpg","galleries_id":395578,"server_id":18,"link":"photo_7336142.html","width":130,"caption":"New Developments","height":85});
															thumbnails[7336705] = clik.newPhoto({"id":7336705,"src":"Perth_thumb.jpg","galleries_id":397046,"server_id":18,"link":"photo_7336705.html","width":130,"caption":"The Fair City","height":84});
															thumbnails[7336711] = clik.newPhoto({"id":7336711,"src":"Dunkeld_thumb.jpg","galleries_id":397046,"server_id":18,"link":"photo_7336711.html","width":130,"caption":"The Heart of Scotland","height":87});
															thumbnails[7336715] = clik.newPhoto({"id":7336715,"src":"Dewars_thumb.jpg","galleries_id":397046,"server_id":18,"link":"photo_7336715.html","width":130,"caption":"Perthshire Amber","height":87});
															thumbnails[7336766] = clik.newPhoto({"id":7336766,"src":"AC_logo_small_thumb.jpg","galleries_id":195855,"server_id":18,"link":"photo_7336766.html","width":130,"caption":"Logo of Angus Council","height":125});
															thumbnails[8952294] = clik.newPhoto({"id":8952294,"src":"image_thumb.gif","galleries_id":195855,"server_id":18,"link":"photo_8952294.html","width":130,"caption":"ASVA Logo","height":99});
															thumbnails[8952300] = clik.newPhoto({"id":8952300,"src":"Gateway_thumb.jpg","galleries_id":471112,"server_id":18,"link":"photo_8952300.html","width":130,"caption":"Gateway Building, St. Andrews","height":92});
															thumbnails[8952311] = clik.newPhoto({"id":8952311,"src":"Younger_Hall_thumb.jpg","galleries_id":471112,"server_id":18,"link":"photo_8952311.html","width":130,"caption":"Younger Hall, St. Andrews","height":98});
															thumbnails[8952350] = clik.newPhoto({"id":8952350,"src":"carnegie_thumb.jpg","galleries_id":471112,"server_id":18,"link":"photo_8952350.html","width":130,"caption":"Carnegie Conference Centre, Dunfermline","height":90});
															thumbnails[8952433] = clik.newPhoto({"id":8952433,"src":"GEL_Logo_thumb.jpg","galleries_id":471118,"server_id":18,"link":"photo_8952433.html","width":130,"caption":"Golf East Lothian","height":28});
															thumbnails[8952456] = clik.newPhoto({"id":8952456,"src":"Golf_course_thumb.jpg","galleries_id":471118,"server_id":18,"link":"photo_8952456.html","width":130,"caption":"East Lothian coastline","height":91});
															thumbnails[8964389] = clik.newPhoto({"id":8964389,"src":"The_Binks_thumb.jpg","galleries_id":471110,"server_id":18,"link":"photo_8964389.html","width":130,"caption":"The Binks, Queensferry","height":118});
															thumbnails[8964393] = clik.newPhoto({"id":8964393,"src":"Town_thumb.jpg","galleries_id":471110,"server_id":18,"link":"photo_8964393.html","width":130,"caption":"High Street, South Queensferry","height":87});
															thumbnails[8964394] = clik.newPhoto({"id":8964394,"src":"Harbour_thumb.jpg","galleries_id":471110,"server_id":18,"link":"photo_8964394.html","width":130,"caption":"Queensferry Harbour and Forth Bridge","height":82});
															thumbnails[8964414] = clik.newPhoto({"id":8964414,"src":"Angus_thumb.jpg","galleries_id":471115,"server_id":18,"link":"photo_8964414.html","width":130,"caption":"Walking in Glen Esk","height":77});
															thumbnails[8964415] = clik.newPhoto({"id":8964415,"src":"kayak_thumb.jpg","galleries_id":471115,"server_id":18,"link":"photo_8964415.html","width":130,"caption":"White Water Kayaking in Angus","height":32});
															thumbnails[8964418] = clik.newPhoto({"id":8964418,"src":"OA_logo_thumb.jpg","galleries_id":471115,"server_id":18,"link":"photo_8964418.html","width":130,"caption":"The logo of Outdoor Angus","height":48});
															thumbnails[8964487] = clik.newPhoto({"id":8964487,"src":"Montage_5_thumb.jpg","galleries_id":471113,"server_id":18,"link":"photo_8964487.html","width":130,"caption":"Traditions abound!","height":52});
															thumbnails[8964492] = clik.newPhoto({"id":8964492,"src":"Montage_3_thumb.jpg","galleries_id":471113,"server_id":18,"link":"photo_8964492.html","width":130,"caption":"Scenery and Splendour!","height":38});
															thumbnails[8964502] = clik.newPhoto({"id":8964502,"src":"Destination_Life_Cycle_small_thumb_657EE567-1EC9-D45B-1C8F7403A449164A.gif","galleries_id":471113,"server_id":18,"link":"photo_8964502.html","width":130,"caption":"...but what does the future hold?","height":110});
															thumbnails[8964645] = clik.newPhoto({"id":8964645,"src":"Beach_thumb.jpg","galleries_id":471118,"server_id":18,"link":"photo_8964645.html","width":130,"caption":"Spectacular East Lothian","height":87});
															thumbnails[5300554] = clik.newPhoto({"id":5300554,"src":"Carnoustie_Hotel_thumb.jpg","galleries_id":295374,"server_id":18,"link":"photo_5300554.html","width":130,"caption":"Golf!","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[50591] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"About The Glamis Consultancy","link":"section49774_50591.html","maxRecords":0.0,"photoIDs":[509600.0],"skipIndex":0,"section_code":"section49774","featured_images":509600.0,"id":50591,"singleSection":false});				  						galleries[195841] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Activity Tourism on the Banffshire Coast","link":"section380864_195841.html","maxRecords":0.0,"photoIDs":[3206241.0,3206248.0,3206251.0],"skipIndex":0,"section_code":"section380864","featured_images":"3206251,3206248,3206241","id":195841,"singleSection":false});				  						galleries[195854] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Braemar Castle - Review of Development Plan","link":"section380865_195854.html","maxRecords":0.0,"photoIDs":[3206467.0,3206530.0],"skipIndex":0,"section_code":"section380865","featured_images":"3206530,3206467","id":195854,"singleSection":false});				  						galleries[471112] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Business & Cultural Tourism in St Andrews and Fife","link":"section380864_471112.html","maxRecords":0.0,"photoIDs":[8952300.0,8952311.0,8952350.0],"skipIndex":0,"section_code":"section380864","featured_images":"8952350,8952311,8952300","id":471112,"singleSection":false});				  						galleries[364469] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Carlisle Old Town Hall Redevelopment","link":"section380873_364469.html","maxRecords":0.0,"photoIDs":[6668444.0,6668446.0,6668454.0],"skipIndex":0,"section_code":"section380873","featured_images":"6668446,6668444","id":364469,"singleSection":false});				  						galleries[295374] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Carnoustie Centre Feasibility Study","link":"section380865_295374.html","maxRecords":0.0,"photoIDs":[5300508.0,5300513.0,5300554.0],"skipIndex":0,"section_code":"section380865","featured_images":"5300554,5300513,5300508","id":295374,"singleSection":false});				  						galleries[195845] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"City of Stirling Visitor Survey","link":"section380864_195845.html","maxRecords":0.0,"photoIDs":[3246484.0,3246494.0,3246503.0],"skipIndex":0,"section_code":"section380864","featured_images":"3246503,3246494,3246484","id":195845,"singleSection":false});				  						galleries[115276] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Culross","link":"section380864_115276.html","maxRecords":0.0,"photoIDs":[1715395.0,1715404.0,1716713.0],"skipIndex":0,"section_code":"section380864","featured_images":"1716713,1715404,1715395","id":115276,"singleSection":false});				  						galleries[198062] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Deeside & The Cairngorms DMO","link":"section380864_198062.html","maxRecords":0.0,"photoIDs":[3245706.0,3245707.0,3245717.0],"skipIndex":0,"section_code":"section380864","featured_images":"3245717,3245707,3245706","id":198062,"singleSection":false});				  						galleries[115337] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Discover Bute Landscape Partnership Scheme","link":"section380864_115337.html","maxRecords":0.0,"photoIDs":[1716683.0,1716684.0,1716688.0],"skipIndex":0,"section_code":"section380864","featured_images":"1716684,1716683","id":115337,"singleSection":false});				  						galleries[115338] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dundee & Angus Convention Bureau","link":"section380873_115338.html","maxRecords":0.0,"photoIDs":[1820334.0,1820344.0],"skipIndex":0,"section_code":"section380873","featured_images":"1820344,1820334","id":115338,"singleSection":false});				  						galleries[195849] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dundee Science Learning Centre","link":"section380873_195849.html","maxRecords":0.0,"photoIDs":[3257534.0,3257537.0,3257544.0],"skipIndex":0,"section_code":"section380873","featured_images":"3257544,3257537,3257534","id":195849,"singleSection":false});				  						galleries[195842] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Evaluating the Brecon Jazz Festival","link":"section380872_195842.html","maxRecords":0.0,"photoIDs":[3203480.0,3203481.0,3257794.0],"skipIndex":0,"section_code":"section380872","featured_images":"3257794,3203481,3203480","id":195842,"singleSection":false});				  						galleries[198063] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Evaluation of Destination Dundee","link":"section380872_198063.html","maxRecords":0.0,"photoIDs":[3245720.0,3245725.0,3245732.0],"skipIndex":0,"section_code":"section380872","featured_images":"3245732,3245725,3245720","id":198063,"singleSection":false});				  						galleries[115273] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Events in the Eastern Cairngorms","link":"section380877_115273.html","maxRecords":0.0,"photoIDs":[1715364.0,1715366.0,1718147.0],"skipIndex":0,"section_code":"section380877","featured_images":1718147.0,"id":115273,"singleSection":false});				  						galleries[295376] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Feasibility Study for a Chain Ferry at Cramond","link":"section380873_295376.html","maxRecords":0.0,"photoIDs":[5241036.0,5241040.0,5241048.0],"skipIndex":0,"section_code":"section380873","featured_images":"5241048,5241040,5241036","id":295376,"singleSection":false});				  						galleries[51140] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"For the Private Sector ....","link":"section75675_51140.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section75675","featured_images":"","id":51140,"singleSection":false});				  						galleries[51129] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"For the Public Sector ....","link":"section75675_51129.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section75675","featured_images":"","id":51129,"singleSection":false});				  						galleries[295370] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Funding for Tourism in Edinburgh","link":"section380864_295370.html","maxRecords":0.0,"photoIDs":[5317436.0,5317444.0,5996222.0],"skipIndex":0,"section_code":"section380864","featured_images":"5996222,5317444,5317436","id":295370,"singleSection":false});				  						galleries[115436] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Glasgow City Marketing Bureau Events Plan","link":"section380877_115436.html","maxRecords":0.0,"photoIDs":[1718256.0,1718263.0],"skipIndex":0,"section_code":"section380877","featured_images":1718256.0,"id":115436,"singleSection":false});				  						galleries[198675] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Glasgow Strategic Major Events Forum","link":"section380877_198675.html","maxRecords":0.0,"photoIDs":[3258181.0,3258205.0,5996893.0],"skipIndex":0,"section_code":"section380877","featured_images":"5996893,3258205,3258181","id":198675,"singleSection":false});				  						galleries[342568] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Longtown Heritage Centre","link":"section380865_342568.html","maxRecords":0.0,"photoIDs":[6112668.0,6112669.0,6112672.0],"skipIndex":0,"section_code":"section380865","featured_images":"6112672,6112669,6112668","id":342568,"singleSection":false});				  						galleries[471118] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Making the Most of the 2013 Open Championship","link":"section380864_471118.html","maxRecords":0.0,"photoIDs":[8952433.0,8952456.0,8964645.0],"skipIndex":0,"section_code":"section380864","featured_images":"8964645,8952456,8952433","id":471118,"singleSection":false});				  						galleries[337787] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Murton Wildlife Reserve","link":"section380865_337787.html","maxRecords":0.0,"photoIDs":[5995574.0,5995611.0,5995626.0],"skipIndex":0,"section_code":"section380865","featured_images":"5995626,5995611,5995574","id":337787,"singleSection":false});				  						galleries[295378] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"National Geographic Destinations Survey 2009","link":"section380864_295378.html","maxRecords":0.0,"photoIDs":[5317567.0,5317636.0,5320943.0],"skipIndex":0,"section_code":"section380864","featured_images":"5320943,5317636,5317567","id":295378,"singleSection":false});				  						galleries[471115] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Outdoor Angus","link":"section380873_471115.html","maxRecords":0.0,"photoIDs":[8964414.0,8964415.0,8964418.0],"skipIndex":0,"section_code":"section380873","featured_images":"8964418,8964415,8964414","id":471115,"singleSection":false});				  						galleries[115271] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pitlochry Partnership","link":"section380864_115271.html","maxRecords":0.0,"photoIDs":[1715330.0,1715345.0,1715351.0,1718148.0],"skipIndex":0,"section_code":"section380864","featured_images":"1718148,1715351,1715330","id":115271,"singleSection":false});				  						galleries[297195] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pittenweem Arts Festival","link":"section380873_297195.html","maxRecords":0.0,"photoIDs":[5284115.0,5300519.0,5317715.0],"skipIndex":0,"section_code":"section380873","featured_images":"5317715,5300519,5284115","id":297195,"singleSection":false});				  						galleries[471110] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Queensferry Ambition","link":"section380873_471110.html","maxRecords":0.0,"photoIDs":[8964389.0,8964393.0,8964394.0],"skipIndex":0,"section_code":"section380873","featured_images":"8964394,8964393,8964389","id":471110,"singleSection":false});				  						galleries[395578] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Review of Aberdeen Convention Bureau","link":"section380872_395578.html","maxRecords":0.0,"photoIDs":[7336093.0,7336119.0,7336142.0],"skipIndex":0,"section_code":"section380872","featured_images":"7336142,7336119,7336093","id":395578,"singleSection":false});				  						galleries[395565] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Review of Johnsmas Foy","link":"section380877_395565.html","maxRecords":0.0,"photoIDs":[7313170.0,7313175.0,7313179.0],"skipIndex":0,"section_code":"section380877","featured_images":"7313179,7313175,7313170","id":395565,"singleSection":false});				  						galleries[295373] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Review of the Fife Tourism Alliance","link":"section380872_295373.html","maxRecords":0.0,"photoIDs":[5317483.0,5317489.0,5317523.0],"skipIndex":0,"section_code":"section380872","featured_images":"5317523,5317489,5317483","id":295373,"singleSection":false});				  						galleries[397046] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Review of the Perthshire Area Tourism Partnership","link":"section380872_397046.html","maxRecords":0.0,"photoIDs":[7336705.0,7336711.0,7336715.0],"skipIndex":0,"section_code":"section380872","featured_images":"7336715,7336711,7336705","id":397046,"singleSection":false});				  						galleries[471113] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Review of the Scottish Tourism Strategy","link":"section380872_471113.html","maxRecords":0.0,"photoIDs":[8964487.0,8964492.0,8964502.0],"skipIndex":0,"section_code":"section380872","featured_images":"8964502,8964492,8964487","id":471113,"singleSection":false});				  						galleries[396966] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Rural Tourism in Crimea ","link":"section380864_396966.html","maxRecords":0.0,"photoIDs":[7335556.0,7335637.0,7335687.0],"skipIndex":0,"section_code":"section380864","featured_images":"7335687,7335637,7335556","id":396966,"singleSection":false});				  						galleries[195843] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scottish Borders Strategic Events Programme","link":"section380872_195843.html","maxRecords":0.0,"photoIDs":[3206340.0,3257627.0,3257636.0],"skipIndex":0,"section_code":"section380872","featured_images":"3257636,3257627,3206340","id":195843,"singleSection":false});				  						galleries[115274] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scottish Style Awards","link":"section380877_115274.html","maxRecords":0.0,"photoIDs":[1715377.0,1715385.0,1718139.0],"skipIndex":0,"section_code":"section380877","featured_images":"1718139,1715385,1715377","id":115274,"singleSection":false});				  						galleries[195855] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"SMALL BUSINESSES AND COMMUNITIES","link":"section404497.html","maxRecords":0.0,"photoIDs":[3206547.0,5995891.0,6940046.0,7336766.0,8952294.0],"skipIndex":0,"section_code":"section404497","featured_images":"8952294,7336766,6940046,5995891,3206547","id":195855,"singleSection":true});				  						galleries[295372] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Tourism in Angus and Rural Perthshire","link":"section380864_295372.html","maxRecords":0.0,"photoIDs":[5284080.0,5284087.0,5284089.0],"skipIndex":0,"section_code":"section380864","featured_images":"5284089,5284087,5284080","id":295372,"singleSection":false});				  						galleries[299333] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"TOURISM INNOVATION","link":"section380874.html","maxRecords":0.0,"photoIDs":[5317819.0],"skipIndex":0,"section_code":"section380874","featured_images":5317819.0,"id":299333,"singleSection":true});				  						galleries[395557] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Tron Theatre","link":"section380873_395557.html","maxRecords":0.0,"photoIDs":[7313092.0,7313108.0,7313128.0],"skipIndex":0,"section_code":"section380873","featured_images":"7313128,7313108,7313092","id":395557,"singleSection":false});				  						galleries[148461] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"West Lothian Tourism Strategy","link":"section380864_148461.html","maxRecords":0.0,"photoIDs":[3258156.0],"skipIndex":0,"section_code":"section380864","featured_images":3258156.0,"id":148461,"singleSection":false});				  						galleries[50592] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"What's with the  Logo?","link":"section49774_50592.html","maxRecords":0.0,"photoIDs":[665768.0],"skipIndex":0,"section_code":"section49774","featured_images":665768.0,"id":50592,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8952311,7336711,7313170,6668446,5284087,5284080,3206248,1820344,1716713,1715404,1715395,1715351';
imageSets[2] = '6668446,6668444,1820344,1820334,1718256,1718148,1718147,1716713,1716684,1716683,1715404,1715395,1715351,1715330';
imageSets[3] = '5317636,5317523';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/theglamisconsultancy/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/theglamisconsultancy/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'section49774.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 && 'section49774' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'The Glamis Consultancy: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

