window.thumbnails = {};
															thumbnails[7520675] = clik.newPhoto({"id":7520675,"src":"Welsh-Ploughing-Match-at-Netherwent_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Heavy Horse Ploughing Netherwent","height":89});
															thumbnails[7520639] = clik.newPhoto({"id":7520639,"src":"Welsh_Ploughing_Match_at_Netherwent_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Welsh Ploughing Match Netherwent","height":89});
															thumbnails[4964349] = clik.newPhoto({"id":4964349,"src":"Angel-of-the-North-1_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_4964349.html","width":130,"caption":"Angel of the North","height":190});
															thumbnails[6794578] = clik.newPhoto({"id":6794578,"src":"Vintage-Ploughing-_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_6794578.html","width":130,"caption":"Vintage Ploughing","height":79});
															thumbnails[6856880] = clik.newPhoto({"id":6856880,"src":"Abergavenny-Market-1_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_6856880.html","width":130,"caption":"Sheep Sale","height":80});
															thumbnails[6856941] = clik.newPhoto({"id":6856941,"src":"L1005198_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_6856941.html","width":130,"caption":"The Big One","height":74});
															thumbnails[6823943] = clik.newPhoto({"id":6823943,"src":"Jeff-Mitchell_thumb.jpg","galleries_id":369485,"server_id":15,"link":"photo_6823943.html","width":130,"caption":"Jeff Mitchell","height":88});
															thumbnails[6823970] = clik.newPhoto({"id":6823970,"src":"Graham-Hickson_thumb.jpg","galleries_id":369485,"server_id":15,"link":"photo_6823970.html","width":130,"caption":"Graham Hickson","height":83});
															thumbnails[6823981] = clik.newPhoto({"id":6823981,"src":"Steve-Clarke_thumb.jpg","galleries_id":369485,"server_id":15,"link":"photo_6823981.html","width":130,"caption":"Steve Clarke","height":88});
															thumbnails[6823945] = clik.newPhoto({"id":6823945,"src":"Rod-Wadley_thumb.jpg","galleries_id":369485,"server_id":15,"link":"photo_6823945.html","width":130,"caption":"Rod Wadley","height":88});
															thumbnails[6823946] = clik.newPhoto({"id":6823946,"src":"Gregory--Russell_thumb.jpg","galleries_id":369485,"server_id":15,"link":"photo_6823946.html","width":130,"caption":"Gregory and Russell","height":88});
															thumbnails[6794270] = clik.newPhoto({"id":6794270,"src":"Steve--Prego_thumb.jpg","galleries_id":369485,"server_id":15,"link":"photo_6794270.html","width":130,"caption":"Steve ","height":91});
															thumbnails[6794339] = clik.newPhoto({"id":6794339,"src":"Brian-Williams_thumb.jpg","galleries_id":369485,"server_id":15,"link":"photo_6794339.html","width":130,"caption":"Brian Williams","height":92});
															thumbnails[6794411] = clik.newPhoto({"id":6794411,"src":"Phil-Munday_thumb.jpg","galleries_id":369485,"server_id":15,"link":"photo_6794411.html","width":130,"caption":"Phil Munday","height":156});
															thumbnails[6794493] = clik.newPhoto({"id":6794493,"src":"Daniel-Rosser_thumb.jpg","galleries_id":369485,"server_id":15,"link":"photo_6794493.html","width":130,"caption":"Daniel Rosser","height":193});
															thumbnails[6155963] = clik.newPhoto({"id":6155963,"src":"Ebbw-Vale-MVC1_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6155963.html","width":130,"caption":"Ebbw Vale Male Voice Choir 1","height":193});
															thumbnails[6155965] = clik.newPhoto({"id":6155965,"src":"Ebbw-Vale-MVC3_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6155965.html","width":130,"caption":"Ebbw Vale Male Voice Choir 3","height":87});
															thumbnails[6155979] = clik.newPhoto({"id":6155979,"src":"Ebbw-Vale-MVC2_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6155979.html","width":130,"caption":"Ebbw Vale Male voice Choir 2","height":85});
															thumbnails[6155988] = clik.newPhoto({"id":6155988,"src":"The-Ship-Open-Mic_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6155988.html","width":130,"caption":"Open Mic","height":141});
															thumbnails[6156230] = clik.newPhoto({"id":6156230,"src":"Dr-Feelgood1_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6156230.html","width":130,"caption":"Dr Feelgood","height":89});
															thumbnails[6156417] = clik.newPhoto({"id":6156417,"src":"Nine-Below-Zero-2_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6156417.html","width":130,"caption":"Lead Guitarist Nine Below Zero","height":170});
															thumbnails[6156423] = clik.newPhoto({"id":6156423,"src":"Nine-Below-Zero1_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6156423.html","width":130,"caption":"Nine Below Zero","height":178});
															thumbnails[6156428] = clik.newPhoto({"id":6156428,"src":"Simon1_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6156428.html","width":130,"caption":"Dr Feelgood Fan","height":77});
															thumbnails[6156448] = clik.newPhoto({"id":6156448,"src":"The-Beatles-Experience2_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6156448.html","width":130,"caption":"The Beatle Experience 2","height":68});
															thumbnails[6139215] = clik.newPhoto({"id":6139215,"src":"Usk-Youth-Band-1_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6139215.html","width":130,"caption":"Usk Youth Brass Band","height":99});
															thumbnails[6139219] = clik.newPhoto({"id":6139219,"src":"Usk-Youth-Band-2_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6139219.html","width":130,"caption":"Usk Youth Brass Band","height":85});
															thumbnails[6139223] = clik.newPhoto({"id":6139223,"src":"Rev-Robert-Atkins_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6139223.html","width":130,"caption":"Rev Robert Atkins","height":161});
															thumbnails[6139226] = clik.newPhoto({"id":6139226,"src":"Dragon-Pageant-Red_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6139226.html","width":130,"caption":"Dragon Carnival","height":92});
															thumbnails[6139229] = clik.newPhoto({"id":6139229,"src":"Dragon-Pageant-White_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6139229.html","width":130,"caption":"Dragon Carnival","height":87});
															thumbnails[6143341] = clik.newPhoto({"id":6143341,"src":"Clarinet--String-Ensemble_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6143341.html","width":130,"caption":"Jimmy Stuttard, Clarinet & String Ensemble","height":97});
															thumbnails[6143342] = clik.newPhoto({"id":6143342,"src":"GD-Friends-2_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6143342.html","width":130,"caption":"Singer with Geoff Downes Band","height":170});
															thumbnails[6143347] = clik.newPhoto({"id":6143347,"src":"JD-Friends-1_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6143347.html","width":130,"caption":"Lead Guitarist with Geoff Downes Band","height":90});
															thumbnails[6143349] = clik.newPhoto({"id":6143349,"src":"Jimmy-Stuttard_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6143349.html","width":130,"caption":"Jimmy Stuttard Clarinet","height":179});
															thumbnails[6143353] = clik.newPhoto({"id":6143353,"src":"The-Col-Knight-Band_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6143353.html","width":130,"caption":"The Col Knight Band","height":61});
															thumbnails[6143359] = clik.newPhoto({"id":6143359,"src":"Zenyth_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6143359.html","width":130,"caption":"Lead Singer - Zenyth","height":98});
															thumbnails[6137467] = clik.newPhoto({"id":6137467,"src":"Busking_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6137467.html","width":130,"caption":"Baptist Church 11\/06\/2010","height":80});
															thumbnails[6137500] = clik.newPhoto({"id":6137500,"src":"Owen-Farr_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6137500.html","width":130,"caption":"Owen Farr ","height":88});
															thumbnails[6137541] = clik.newPhoto({"id":6137541,"src":"Lead-Singer-The-Elizans_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_6137541.html","width":130,"caption":"Lead Singer - The Elizans","height":161});
															thumbnails[5365193] = clik.newPhoto({"id":5365193,"src":"Raglan-High-Street_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5365193.html","width":130,"caption":"Raglan High Street ","height":78});
															thumbnails[5332713] = clik.newPhoto({"id":5332713,"src":"Road-to-the-Castle_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5332713.html","width":130,"caption":"Road to Raglan Castle ","height":176});
															thumbnails[5332719] = clik.newPhoto({"id":5332719,"src":"Castle-Street_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5332719.html","width":130,"caption":"Castle Street in the Snow","height":86});
															thumbnails[5095493] = clik.newPhoto({"id":5095493,"src":"The-Vicar-at-Armistice_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5095493.html","width":130,"caption":"Raglan Armistice 2009","height":81});
															thumbnails[5122490] = clik.newPhoto({"id":5122490,"src":"Rev-Joan-Wakelin-Armistice-2009_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5122490.html","width":130,"caption":"The Rev Joan Wakelin ","height":92});
															thumbnails[5066691] = clik.newPhoto({"id":5066691,"src":"Apple-Harvest_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_5066691.html","width":130,"caption":"Apple Harvest ","height":181});
															thumbnails[5066783] = clik.newPhoto({"id":5066783,"src":"Apple-Picking-2_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_5066783.html","width":130,"caption":"Apple Harvest ","height":191});
															thumbnails[5066593] = clik.newPhoto({"id":5066593,"src":"Raglan-Castle-in-Storm_D46B7BBC-2219-B5B5-4CFB1E526093C906_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5066593.html","width":130,"caption":"Raglan Castle in Autumn Storm","height":52});
															thumbnails[4090978] = clik.newPhoto({"id":4090978,"src":"L1001301_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4090978.html","width":130,"caption":"ABBA Gold","height":93});
															thumbnails[4107567] = clik.newPhoto({"id":4107567,"src":"L1001384_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4107567.html","width":130,"caption":"ABBA GOLD 2","height":91});
															thumbnails[4107743] = clik.newPhoto({"id":4107743,"src":"L1001403_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4107743.html","width":130,"caption":"Rob Atkins  Chairman of Raglan Music Festival","height":78});
															thumbnails[4113690] = clik.newPhoto({"id":4113690,"src":"L1001320_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113690.html","width":130,"caption":"Thyrd Eye at The Ship","height":171});
															thumbnails[4113726] = clik.newPhoto({"id":4113726,"src":"L1001314_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113726.html","width":130,"caption":"Thyrd Eye at The Ship","height":82});
															thumbnails[4113888] = clik.newPhoto({"id":4113888,"src":"L1001304_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113888.html","width":130,"caption":"Tiny Spark at The Ship","height":146});
															thumbnails[4090426] = clik.newPhoto({"id":4090426,"src":"L1001108_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4090426.html","width":130,"caption":"Caribbean Musician","height":180});
															thumbnails[4101231] = clik.newPhoto({"id":4101231,"src":"L1001189_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4101231.html","width":130,"caption":"John Tribe at The Ship","height":82});
															thumbnails[4101295] = clik.newPhoto({"id":4101295,"src":"L1001223_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4101295.html","width":130,"caption":"Jackie","height":191});
															thumbnails[4107352] = clik.newPhoto({"id":4107352,"src":"L1001163_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4107352.html","width":130,"caption":"Lounging About","height":98});
															thumbnails[4107481] = clik.newPhoto({"id":4107481,"src":"L1001173_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4107481.html","width":130,"caption":"Steel Drummers","height":176});
															thumbnails[4113613] = clik.newPhoto({"id":4113613,"src":"L1001230_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113613.html","width":130,"caption":"Abercapella at The Castle Courtyard","height":73});
															thumbnails[4113616] = clik.newPhoto({"id":4113616,"src":"L1001186_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113616.html","width":130,"caption":"John Tribe at The Ship 2","height":105});
															thumbnails[4113791] = clik.newPhoto({"id":4113791,"src":"L1001199_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113791.html","width":130,"caption":"Simon Enjoying the Vibes!","height":81});
															thumbnails[4113818] = clik.newPhoto({"id":4113818,"src":"L1001257_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113818.html","width":130,"caption":"Dave Swarbrick at The Baptist Church","height":213});
															thumbnails[4113869] = clik.newPhoto({"id":4113869,"src":"L1001202_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113869.html","width":130,"caption":"Busker at The Ship","height":246});
															thumbnails[4119300] = clik.newPhoto({"id":4119300,"src":"L1001176_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4119300.html","width":130,"caption":"WHo Needs a Mic?","height":179});
															thumbnails[4119345] = clik.newPhoto({"id":4119345,"src":"L1001250_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4119345.html","width":130,"caption":"Choir at Castle Mews","height":88});
															thumbnails[5066538] = clik.newPhoto({"id":5066538,"src":"Ferret-Man_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5066538.html","width":130,"caption":"Raglan Music Festival 2009","height":173});
															thumbnails[4089689] = clik.newPhoto({"id":4089689,"src":"L1000917_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4089689.html","width":130,"caption":"Welcome","height":161});
															thumbnails[4089969] = clik.newPhoto({"id":4089969,"src":"L1001028_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4089969.html","width":130,"caption":"Half light","height":83});
															thumbnails[4090041] = clik.newPhoto({"id":4090041,"src":"L1000958_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4090041.html","width":130,"caption":"Col Knight Band","height":74});
															thumbnails[4090101] = clik.newPhoto({"id":4090101,"src":"L1001005_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4090101.html","width":130,"caption":"Colwyn Knight","height":182});
															thumbnails[4090213] = clik.newPhoto({"id":4090213,"src":"L1001041_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4090213.html","width":130,"caption":"Smerins Anti-Social Club","height":173});
															thumbnails[4107785] = clik.newPhoto({"id":4107785,"src":"L1001040_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4107785.html","width":130,"caption":"Smerins Anti-Social Club 2","height":85});
															thumbnails[4113653] = clik.newPhoto({"id":4113653,"src":"L1000970_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113653.html","width":130,"caption":"Robert Randall (Without Alex) at The Ship","height":90});
															thumbnails[4113833] = clik.newPhoto({"id":4113833,"src":"L1000908_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4113833.html","width":130,"caption":"Steven Sproat at The Baptist Church","height":178});
															thumbnails[4119316] = clik.newPhoto({"id":4119316,"src":"L1000993_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4119316.html","width":130,"caption":"Rikki Knight 2","height":137});
															thumbnails[4119330] = clik.newPhoto({"id":4119330,"src":"L1000999_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4119330.html","width":130,"caption":"Col Knight Band","height":126});
															thumbnails[4200548] = clik.newPhoto({"id":4200548,"src":"L1000968_thumb.jpg","galleries_id":371294,"server_id":15,"link":"photo_4200548.html","width":130,"caption":"Without Alex at The Ship","height":87});
															thumbnails[5141294] = clik.newPhoto({"id":5141294,"src":"Geoff-Downes_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5141294.html","width":130,"caption":"Geoff Downes ","height":89});
															thumbnails[6834314] = clik.newPhoto({"id":6834314,"src":"Autumn-Mist_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_6834314.html","width":130,"caption":"Misty Morning","height":63});
															thumbnails[3469537] = clik.newPhoto({"id":3469537,"src":"Llantony-Abbey1_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_3469537.html","width":130,"caption":"Llantony Abbey","height":191});
															thumbnails[5066355] = clik.newPhoto({"id":5066355,"src":"St-Cadocs-Raglan_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5066355.html","width":130,"caption":"St Cadocs Church","height":174});
															thumbnails[3499785] = clik.newPhoto({"id":3499785,"src":"Huntsman-Mono-Photo_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_3499785.html","width":130,"caption":"Monmouthshire Hunt","height":89});
															thumbnails[3469186] = clik.newPhoto({"id":3469186,"src":"Hedgelayer-in-Mono_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_3469186.html","width":130,"caption":"Hedge Laying","height":101});
															thumbnails[3469522] = clik.newPhoto({"id":3469522,"src":"Ken-and-Rosemary-Key-Beekeepers_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_3469522.html","width":130,"caption":"Ken and Rosemary ","height":90});
															thumbnails[3499738] = clik.newPhoto({"id":3499738,"src":"Tim stephens 21_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_3499738.html","width":130,"caption":"Tim Stephens","height":182});
															thumbnails[3499751] = clik.newPhoto({"id":3499751,"src":"Blacksmith-Llangibby_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_3499751.html","width":130,"caption":"Blacksmith","height":162});
															thumbnails[3500174] = clik.newPhoto({"id":3500174,"src":"Tarn-Waterfall_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_3500174.html","width":130,"caption":"Waterfall","height":191});
															thumbnails[3500196] = clik.newPhoto({"id":3500196,"src":"Gwent-Levels-_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_3500196.html","width":130,"caption":"Sunset","height":191});
															thumbnails[3500257] = clik.newPhoto({"id":3500257,"src":"Bill-&-Ben_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_3500257.html","width":130,"caption":"Bill and Ben","height":195});
															thumbnails[3674177] = clik.newPhoto({"id":3674177,"src":"Jean-Mono-File14-Film42-Fr27_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_3674177.html","width":130,"caption":"Jean Flytying","height":178});
															thumbnails[4964237] = clik.newPhoto({"id":4964237,"src":"Susie-Vaughan-and-GK_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_4964237.html","width":130,"caption":"Susie Vaughan and GK","height":185});
															thumbnails[4964294] = clik.newPhoto({"id":4964294,"src":"40-Winks-at-Monmouth-Show_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_4964294.html","width":130,"caption":"40 Winks","height":179});
															thumbnails[4964322] = clik.newPhoto({"id":4964322,"src":"Hedgelayer-Tregare1_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_4964322.html","width":130,"caption":"Hedgelaying","height":93});
															thumbnails[5365235] = clik.newPhoto({"id":5365235,"src":"St-Cadocs-Raglan-in-the-Snow_thumb.jpg","galleries_id":283138,"server_id":15,"link":"photo_5365235.html","width":130,"caption":"St Cadoc's ","height":87});
															thumbnails[7185367] = clik.newPhoto({"id":7185367,"src":"Frosted-Tree1_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_7185367.html","width":130,"caption":"Frosted Tree ","height":179});
															thumbnails[7186024] = clik.newPhoto({"id":7186024,"src":"Llandenny-Church_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_7186024.html","width":130,"caption":"View of Llandenny Church","height":193});
															thumbnails[7487564] = clik.newPhoto({"id":7487564,"src":"Gwent-Levels-_870D2D51-1E4F-37DC-715DB29B38D4BA43_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7487564.html","width":130,"caption":"Sunset Gwent levels","height":191});
															thumbnails[7487587] = clik.newPhoto({"id":7487587,"src":"Lacock-Cat-2_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7487587.html","width":130,"caption":"Lacock Cat","height":159});
															thumbnails[7520773] = clik.newPhoto({"id":7520773,"src":"Milly--Millbrook_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7520773.html","width":130,"caption":"Milly","height":194});
															thumbnails[7520985] = clik.newPhoto({"id":7520985,"src":"Spanish-Cat-11a_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7520985.html","width":130,"caption":"Spanish Cat","height":178});
															thumbnails[7520991] = clik.newPhoto({"id":7520991,"src":"Sam_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7520991.html","width":130,"caption":"Sam","height":195});
															thumbnails[7521095] = clik.newPhoto({"id":7521095,"src":"Auctioneer_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_7521095.html","width":130,"caption":"The Auctioneer","height":167});
															thumbnails[7521108] = clik.newPhoto({"id":7521108,"src":"Hedge-Laying-New-Ordenn-Farm-Whitecastle_thumb.jpg","galleries_id":212053,"server_id":15,"link":"photo_7521108.html","width":130,"caption":"Hedgelaying in February ","height":81});
															thumbnails[9074764] = clik.newPhoto({"id":9074764,"src":"Whitestone_Horse_Trail_Launch_CEF299D6-1EC9-DFB6-09C318E379588022_thumb.jpg","galleries_id":478628,"server_id":15,"link":"photo_9074764.html","width":130,"caption":"Whitestone Horse Trail Launch","height":90});
															thumbnails[9074765] = clik.newPhoto({"id":9074765,"src":"Penterry_Church_CEF30FCF-1EC9-DFB6-094F37DE8AC3C8CA_thumb.jpg","galleries_id":478628,"server_id":15,"link":"photo_9074765.html","width":130,"caption":"Penterry Church","height":204});
															thumbnails[9074766] = clik.newPhoto({"id":9074766,"src":"Adventa_Salmon_Bench_Launch_-Whitebrook_CEF3A5D1-1EC9-DFB6-0929D3A993BC15C4_thumb.jpg","galleries_id":478628,"server_id":15,"link":"photo_9074766.html","width":130,"caption":"Adventa Salmon Bench Launch -Whitebrook","height":178});
															thumbnails[6856709] = clik.newPhoto({"id":6856709,"src":"Riano_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_6856709.html","width":130,"caption":"Riano","height":81});
															thumbnails[6856704] = clik.newPhoto({"id":6856704,"src":"Cosgaya_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_6856704.html","width":130,"caption":"Hay Harvest","height":88});
															thumbnails[6856723] = clik.newPhoto({"id":6856723,"src":"Bluebells-Clytha-Hill_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_6856723.html","width":130,"caption":"Bluebells","height":85});
															thumbnails[4964345] = clik.newPhoto({"id":4964345,"src":"Raglan-Castle-in-Storm_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_4964345.html","width":130,"caption":"Storm over Raglan Castle","height":52});
															thumbnails[3500157] = clik.newPhoto({"id":3500157,"src":"Welsh-Ploughing-Championship_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_3500157.html","width":130,"caption":"Welsh Ploughing Championship","height":89});
															thumbnails[3500185] = clik.newPhoto({"id":3500185,"src":"Pigs-In-The-Lake-District_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_3500185.html","width":130,"caption":"Pigs","height":89});
															thumbnails[3500209] = clik.newPhoto({"id":3500209,"src":"Highlanders-on-Skye_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_3500209.html","width":130,"caption":"Highland Cattle","height":89});
															thumbnails[3500231] = clik.newPhoto({"id":3500231,"src":"Ponies-eye_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_3500231.html","width":130,"caption":"Ponies Eye","height":96});
															thumbnails[3500242] = clik.newPhoto({"id":3500242,"src":"Oyster-Boats_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_3500242.html","width":130,"caption":"Oyster Boats","height":72});
															thumbnails[7186013] = clik.newPhoto({"id":7186013,"src":"Tintern-Abbey1_thumb.jpg","galleries_id":212003,"server_id":15,"link":"photo_7186013.html","width":130,"caption":"Tintern Abbey","height":77});
															thumbnails[7485497] = clik.newPhoto({"id":7485497,"src":"Bluebells-Clytha-Hill_82A5FCF2-1E4F-37DC-71767CD7B4026B5D_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7485497.html","width":130,"caption":"Bluebells : Coed-y-Bwynydd ","height":85});
															thumbnails[7520752] = clik.newPhoto({"id":7520752,"src":"Billy_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7520752.html","width":130,"caption":"Billy Lerryn Cornwall","height":64});
															thumbnails[7520763] = clik.newPhoto({"id":7520763,"src":"Spanish-Siesta-1_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7520763.html","width":130,"caption":"Siesta","height":69});
															thumbnails[7520769] = clik.newPhoto({"id":7520769,"src":"Cattle-on-the-Monnow_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7520769.html","width":130,"caption":"Summer - Vauxhall Fields ","height":85});
															thumbnails[7520782] = clik.newPhoto({"id":7520782,"src":"Welsh-Ploughing-Match-at-Netherwent1_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7520782.html","width":130,"caption":"Heavy Horses ","height":89});
															thumbnails[7520791] = clik.newPhoto({"id":7520791,"src":"Raglan-Castle--1_thumb.jpg","galleries_id":404335,"server_id":15,"link":"photo_7520791.html","width":130,"caption":"Raglan Castle","height":77});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[478628] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commissions","link":"gallery_478628.html","maxRecords":0.0,"photoIDs":[9074764.0,9074765.0,9074766.0],"skipIndex":0,"section_code":"gallery","featured_images":"9074766,9074765,9074764","id":478628,"singleSection":false});				  						galleries[404335] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Greetings Cards","link":"gallery_404335.html","maxRecords":0.0,"photoIDs":[7487564.0,7487587.0,7520773.0,7520985.0,7520991.0,7485497.0,7520752.0,7520763.0,7520769.0,7520782.0,7520791.0],"skipIndex":0,"section_code":"gallery","featured_images":"7520991,7520985,7520791,7520782,7520773,7520769,7520763,7520752,7487587,7487564","id":404335,"singleSection":false});				  						galleries[369485] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Monmouth at Work","link":"gallery_369485.html","maxRecords":0.0,"photoIDs":[6823943.0,6823970.0,6823981.0,6823945.0,6823946.0,6794270.0,6794339.0,6794411.0,6794493.0],"skipIndex":0,"section_code":"gallery","featured_images":"6823981,6823970,6823946,6823945,6823943,6794493,6794411,6794339,6794270","id":369485,"singleSection":false});				  						galleries[371294] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Raglan Music Festival ","link":"gallery_371294.html","maxRecords":0.0,"photoIDs":[6155963.0,6155965.0,6155979.0,6155988.0,6156230.0,6156417.0,6156423.0,6156428.0,6156448.0,6139215.0,6139219.0,6139223.0,6139226.0,6139229.0,6143341.0,6143342.0,6143347.0,6143349.0,6143353.0,6143359.0,6137467.0,6137500.0,6137541.0,4090978.0,4107567.0,4107743.0,4113690.0,4113726.0,4113888.0,4090426.0,4101231.0,4101295.0,4107352.0,4107481.0,4113613.0,4113616.0,4113791.0,4113818.0,4113869.0,4119300.0,4119345.0,4089689.0,4089969.0,4090041.0,4090101.0,4090213.0,4107785.0,4113653.0,4113833.0,4119316.0,4119330.0,4200548.0],"skipIndex":0,"section_code":"gallery","featured_images":"6156448,6156428,6156423,6156417,6156230,6155988,6155979,6155965,6155963,6143359","id":371294,"singleSection":false});				  						galleries[212053] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Rural Monmouthshire","link":"gallery_212053.html","maxRecords":0.0,"photoIDs":[6794578.0,6856880.0,6856941.0,5066691.0,5066783.0,6834314.0,3499785.0,3469186.0,3469522.0,3499738.0,3499751.0,3674177.0,4964237.0,4964294.0,4964322.0,7521095.0,7521108.0],"skipIndex":0,"section_code":"gallery","featured_images":"7521108,7521095,6856941,6856880,6834314,6794578,5066783,5066691,4964322,4964294","id":212053,"singleSection":false});				  						galleries[212003] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Colour Images","link":"gallery_212003.html","maxRecords":0.0,"photoIDs":[4964349.0,3469537.0,3500174.0,3500196.0,3500257.0,7185367.0,7186024.0,6856709.0,6856704.0,6856723.0,4964345.0,3500157.0,3500185.0,3500209.0,3500231.0,3500242.0,7186013.0],"skipIndex":0,"section_code":"gallery","featured_images":"7186024,7186013,7185367,6856723,6856709,6856704,4964349,4964345,3500257,3500242","id":212003,"singleSection":false});				  						galleries[283138] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Raglan Parish","link":"gallery_283138.html","maxRecords":0.0,"photoIDs":[5365193.0,5332713.0,5332719.0,5095493.0,5122490.0,5066593.0,5066538.0,5141294.0,5066355.0,5365235.0],"skipIndex":0,"section_code":"gallery","featured_images":"5365235,5365193,5332719,5332713,5141294,5122490,5095493,5066593,5066538,5066355","id":283138,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7520675';
imageSets[3] = '4200548,4119345,4119330,4119316,4119300,4113888,4113869,4113833,4113818,4113791,4113726,4113690,4113653,4113616,4113613,4107785,4107743,4107567,4107481,4107352,4101295,4101231,4090978,4090426,4090213';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/roberthughes/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/roberthughes/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Celtic Eye Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="ROBERTHUGHES">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

