window.thumbnails = {};
															thumbnails[5688188] = clik.newPhoto({"id":5688188,"src":"GA004_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":195});
															thumbnails[5819990] = clik.newPhoto({"id":5819990,"src":"honeymoon_sunset_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":163});
															thumbnails[7090516] = clik.newPhoto({"id":7090516,"src":"LochVoil_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":46});
															thumbnails[5688196] = clik.newPhoto({"id":5688196,"src":"GA001_thumb.JPG","galleries_id":322157,"server_id":32,"link":"photo_5688196.html","width":130,"caption":"Red-crested pochard","height":87});
															thumbnails[5688241] = clik.newPhoto({"id":5688241,"src":"GB002_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688241.html","width":130,"caption":"Spring flowers","height":87});
															thumbnails[5688258] = clik.newPhoto({"id":5688258,"src":"GC001_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688258.html","width":130,"caption":"Aups","height":89});
															thumbnails[5700136] = clik.newPhoto({"id":5700136,"src":"GD002_thumb.JPG","galleries_id":322173,"server_id":32,"link":"photo_5700136.html","width":130,"caption":"Ladies Day","height":195});
															thumbnails[5700178] = clik.newPhoto({"id":5700178,"src":"GE001_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700178.html","width":130,"caption":"Harrogate skyline","height":87});
															thumbnails[5700228] = clik.newPhoto({"id":5700228,"src":"GF013_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700228.html","width":130,"caption":"Nile sunset","height":87});
															thumbnails[6531229] = clik.newPhoto({"id":6531229,"src":"GG001_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531229.html","width":130,"caption":"Storm over Waddington Fell","height":87});
															thumbnails[7359782] = clik.newPhoto({"id":7359782,"src":"GH011_thumb.jpg","galleries_id":398220,"server_id":32,"link":"photo_7359782.html","width":130,"caption":"Elephant portrait","height":86});
															thumbnails[5688198] = clik.newPhoto({"id":5688198,"src":"GA003_thumb.JPG","galleries_id":322157,"server_id":32,"link":"photo_5688198.html","width":130,"caption":"Nuthatch","height":87});
															thumbnails[5688243] = clik.newPhoto({"id":5688243,"src":"GB003_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688243.html","width":130,"caption":"Wood sorrel","height":87});
															thumbnails[5688259] = clik.newPhoto({"id":5688259,"src":"GC002_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688259.html","width":130,"caption":"Langstrothdale","height":87});
															thumbnails[5700137] = clik.newPhoto({"id":5700137,"src":"GD003_thumb.JPG","galleries_id":322173,"server_id":32,"link":"photo_5700137.html","width":130,"caption":"Alabaster craftsman","height":195});
															thumbnails[5700179] = clik.newPhoto({"id":5700179,"src":"GE002_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700179.html","width":130,"caption":"Locomotive detail","height":87});
															thumbnails[5700207] = clik.newPhoto({"id":5700207,"src":"GF002_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700207.html","width":130,"caption":"Fresh crab","height":87});
															thumbnails[6531242] = clik.newPhoto({"id":6531242,"src":"GG002_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531242.html","width":130,"caption":"Futuroscope","height":87});
															thumbnails[7359784] = clik.newPhoto({"id":7359784,"src":"GH012_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359784.html","width":130,"caption":"Elephant browsing","height":195});
															thumbnails[5688253] = clik.newPhoto({"id":5688253,"src":"GB009_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688253.html","width":130,"caption":"Cyclamen","height":87});
															thumbnails[5688266] = clik.newPhoto({"id":5688266,"src":"GC003_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688266.html","width":130,"caption":"Lighthouse at dusk","height":87});
															thumbnails[5700139] = clik.newPhoto({"id":5700139,"src":"GD004_thumb.JPG","galleries_id":322173,"server_id":32,"link":"photo_5700139.html","width":130,"caption":"Vegetable farmer","height":195});
															thumbnails[5700184] = clik.newPhoto({"id":5700184,"src":"GE004_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700184.html","width":130,"caption":"Island of Gozo","height":87});
															thumbnails[5700210] = clik.newPhoto({"id":5700210,"src":"GF003_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700210.html","width":130,"caption":"Afternoon tea","height":87});
															thumbnails[6531243] = clik.newPhoto({"id":6531243,"src":"GG003_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531243.html","width":130,"caption":"Lancashire countryside","height":87});
															thumbnails[7361559] = clik.newPhoto({"id":7361559,"src":"GH010_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361559.html","width":130,"caption":"The old blind tusker soldiers on","height":86});
															thumbnails[7428585] = clik.newPhoto({"id":7428585,"src":"Sri_Lanka_2011_193_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428585.html","width":130,"caption":"Blue-tailed bee-eater","height":87});
															thumbnails[5688200] = clik.newPhoto({"id":5688200,"src":"GA0041_thumb.JPG","galleries_id":322157,"server_id":32,"link":"photo_5688200.html","width":130,"caption":"Mandarin duck","height":195});
															thumbnails[5688247] = clik.newPhoto({"id":5688247,"src":"GB005_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688247.html","width":130,"caption":"Falls of Falloch","height":195});
															thumbnails[5688249] = clik.newPhoto({"id":5688249,"src":"GB006_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688249.html","width":130,"caption":"Pine and lichen","height":195});
															thumbnails[5688268] = clik.newPhoto({"id":5688268,"src":"GC004_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688268.html","width":130,"caption":"Newton Hall","height":195});
															thumbnails[5700147] = clik.newPhoto({"id":5700147,"src":"GD005_thumb.JPG","galleries_id":322173,"server_id":32,"link":"photo_5700147.html","width":130,"caption":"Nannies","height":87});
															thumbnails[5700187] = clik.newPhoto({"id":5700187,"src":"GE006_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700187.html","width":130,"caption":"Tiger Moth","height":87});
															thumbnails[5700212] = clik.newPhoto({"id":5700212,"src":"GF004_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700212.html","width":130,"caption":"Blickling Hall","height":87});
															thumbnails[6531250] = clik.newPhoto({"id":6531250,"src":"GG004_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531250.html","width":130,"caption":"Valley Gardens, Harrogate","height":87});
															thumbnails[7361558] = clik.newPhoto({"id":7361558,"src":"GH004_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361558.html","width":130,"caption":"Locking away the sacred relic","height":195});
															thumbnails[5688245] = clik.newPhoto({"id":5688245,"src":"GB004_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688245.html","width":130,"caption":"Winter sun and shadows","height":87});
															thumbnails[5688270] = clik.newPhoto({"id":5688270,"src":"GC005_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688270.html","width":130,"caption":"Lake of Menteith","height":195});
															thumbnails[5700153] = clik.newPhoto({"id":5700153,"src":"GD006_thumb.JPG","galleries_id":322173,"server_id":32,"link":"photo_5700153.html","width":130,"caption":"Sir Stirling Moss (left)","height":87});
															thumbnails[5700195] = clik.newPhoto({"id":5700195,"src":"GE014_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700195.html","width":130,"caption":"Flying fish","height":87});
															thumbnails[5700214] = clik.newPhoto({"id":5700214,"src":"GF005_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700214.html","width":130,"caption":"Hot dog stand. Winner of Calumet","height":87});
															thumbnails[6531263] = clik.newPhoto({"id":6531263,"src":"GG005_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531263.html","width":130,"caption":"Ripley Castle, Yorkshire","height":87});
															thumbnails[7359768] = clik.newPhoto({"id":7359768,"src":"GH005_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359768.html","width":130,"caption":"Carved panel","height":188});
															thumbnails[7428594] = clik.newPhoto({"id":7428594,"src":"Sri_Lanka_2011_073_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428594.html","width":130,"caption":"White-bellied sea eagle uttering its alarm call","height":104});
															thumbnails[5688201] = clik.newPhoto({"id":5688201,"src":"GA005_thumb.JPG","galleries_id":322157,"server_id":32,"link":"photo_5688201.html","width":130,"caption":"White-cheeked pintail","height":195});
															thumbnails[5688240] = clik.newPhoto({"id":5688240,"src":"GB001_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688240.html","width":130,"caption":"Marshaw Wyre","height":87});
															thumbnails[5688272] = clik.newPhoto({"id":5688272,"src":"GC006_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688272.html","width":130,"caption":"Surf's up","height":195});
															thumbnails[5700157] = clik.newPhoto({"id":5700157,"src":"GD007_thumb.JPG","galleries_id":322173,"server_id":32,"link":"photo_5700157.html","width":130,"caption":"Her Majesty The Queen","height":87});
															thumbnails[5700194] = clik.newPhoto({"id":5700194,"src":"GE013_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700194.html","width":130,"caption":"Supermarine Spitfires","height":87});
															thumbnails[5700226] = clik.newPhoto({"id":5700226,"src":"GF011_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700226.html","width":130,"caption":"Wroxham Broad","height":87});
															thumbnails[6531266] = clik.newPhoto({"id":6531266,"src":"GG006_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531266.html","width":130,"caption":"Gardens, Jersey Lavender","height":87});
															thumbnails[7359769] = clik.newPhoto({"id":7359769,"src":"GH006_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359769.html","width":130,"caption":"Local resident","height":195});
															thumbnails[5688218] = clik.newPhoto({"id":5688218,"src":"GA010_thumb.JPG","galleries_id":322157,"server_id":32,"link":"photo_5688218.html","width":130,"caption":"Martin Mere sunset","height":87});
															thumbnails[5688276] = clik.newPhoto({"id":5688276,"src":"GC007_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688276.html","width":130,"caption":"Summer scene","height":87});
															thumbnails[5700166] = clik.newPhoto({"id":5700166,"src":"GD009_thumb.JPG","galleries_id":322173,"server_id":32,"link":"photo_5700166.html","width":130,"caption":"Bus station meeting point","height":195});
															thumbnails[5700190] = clik.newPhoto({"id":5700190,"src":"GE009_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700190.html","width":130,"caption":"Medieval cobbled pavement","height":195});
															thumbnails[5700220] = clik.newPhoto({"id":5700220,"src":"GF007_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700220.html","width":130,"caption":"Vineyard","height":195});
															thumbnails[7359771] = clik.newPhoto({"id":7359771,"src":"GH007_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359771.html","width":130,"caption":"Dug out canoe and lagoon","height":195});
															thumbnails[5688208] = clik.newPhoto({"id":5688208,"src":"GA007_thumb.JPG","galleries_id":322157,"server_id":32,"link":"photo_5688208.html","width":130,"caption":"Pied kingfisher and felucca","height":87});
															thumbnails[5688250] = clik.newPhoto({"id":5688250,"src":"GB007_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688250.html","width":130,"caption":"Snow and ice","height":87});
															thumbnails[5688279] = clik.newPhoto({"id":5688279,"src":"GC008_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688279.html","width":130,"caption":"Coastal architecture","height":87});
															thumbnails[5700169] = clik.newPhoto({"id":5700169,"src":"GD010_thumb.JPG","galleries_id":322173,"server_id":32,"link":"photo_5700169.html","width":130,"caption":"Suzie Kennedy","height":195});
															thumbnails[5700189] = clik.newPhoto({"id":5700189,"src":"GE008_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700189.html","width":130,"caption":"Goodwood's famous clock","height":195});
															thumbnails[5700222] = clik.newPhoto({"id":5700222,"src":"GF009_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700222.html","width":130,"caption":"Ladies Day","height":195});
															thumbnails[6531269] = clik.newPhoto({"id":6531269,"src":"GG008_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531269.html","width":130,"caption":"Horse and carriage, France","height":87});
															thumbnails[7359772] = clik.newPhoto({"id":7359772,"src":"GH008_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359772.html","width":130,"caption":"Pair of white-bellied sea eagles","height":195});
															thumbnails[5688215] = clik.newPhoto({"id":5688215,"src":"GA008_thumb.JPG","galleries_id":322157,"server_id":32,"link":"photo_5688215.html","width":130,"caption":"Grey crowned crane","height":87});
															thumbnails[5688255] = clik.newPhoto({"id":5688255,"src":"GB010_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688255.html","width":130,"caption":"Grasses","height":87});
															thumbnails[5688281] = clik.newPhoto({"id":5688281,"src":"GC009_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688281.html","width":130,"caption":"Loch Voil","height":87});
															thumbnails[5700175] = clik.newPhoto({"id":5700175,"src":"GD012_thumb.JPG","galleries_id":322173,"server_id":32,"link":"photo_5700175.html","width":130,"caption":"Venetian Carnival","height":195});
															thumbnails[5700191] = clik.newPhoto({"id":5700191,"src":"GE010_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700191.html","width":130,"caption":"Stained glass","height":195});
															thumbnails[5700224] = clik.newPhoto({"id":5700224,"src":"GF010_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700224.html","width":130,"caption":"Bowland Wild Boar Park","height":195});
															thumbnails[7359774] = clik.newPhoto({"id":7359774,"src":"GH009_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359774.html","width":130,"caption":"White-bellied sea eagle","height":195});
															thumbnails[5688252] = clik.newPhoto({"id":5688252,"src":"GB008_thumb.JPG","galleries_id":322172,"server_id":32,"link":"photo_5688252.html","width":130,"caption":"Hottentot fig on sand dunes","height":87});
															thumbnails[5688284] = clik.newPhoto({"id":5688284,"src":"GC010_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_5688284.html","width":130,"caption":"Forest of Bowland AONB","height":87});
															thumbnails[5700188] = clik.newPhoto({"id":5700188,"src":"GE007_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700188.html","width":130,"caption":"Lamps & obelisk","height":87});
															thumbnails[5700205] = clik.newPhoto({"id":5700205,"src":"GF001_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700205.html","width":130,"caption":"Theatre & Convention Centre","height":87});
															thumbnails[5700217] = clik.newPhoto({"id":5700217,"src":"GF006_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700217.html","width":130,"caption":"Reflection","height":195});
															thumbnails[7428761] = clik.newPhoto({"id":7428761,"src":"Sri_Lanka_2011_508_BW_thumb.jpg","galleries_id":322173,"server_id":32,"link":"photo_7428761.html","width":130,"caption":"Tea picker, Sri Lanka","height":195});
															thumbnails[6531272] = clik.newPhoto({"id":6531272,"src":"GG011_thumb.jpg","galleries_id":358998,"server_id":32,"link":"photo_6531272.html","width":130,"caption":"Chateau de Tanlay","height":93});
															thumbnails[6536693] = clik.newPhoto({"id":6536693,"src":"GA011_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_6536693.html","width":130,"caption":"If looks could kill...","height":87});
															thumbnails[6660581] = clik.newPhoto({"id":6660581,"src":"GB011_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_6660581.html","width":130,"caption":"Virgina creeper","height":86});
															thumbnails[6822046] = clik.newPhoto({"id":6822046,"src":"GC011_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_6822046.html","width":130,"caption":"Entering Glencoe","height":87});
															thumbnails[7428763] = clik.newPhoto({"id":7428763,"src":"Sri_Lanka_2011_623_BW_thumb.jpg","galleries_id":322173,"server_id":32,"link":"photo_7428763.html","width":130,"caption":"Buddhist monk by Kandy Lake","height":87});
															thumbnails[5700182] = clik.newPhoto({"id":5700182,"src":"GE003_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700182.html","width":130,"caption":"Medieval England today","height":87});
															thumbnails[5700230] = clik.newPhoto({"id":5700230,"src":"GF014_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700230.html","width":130,"caption":"Valley Gardens","height":87});
															thumbnails[6531273] = clik.newPhoto({"id":6531273,"src":"GG012_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531273.html","width":130,"caption":"The Broadsman, Bure Valley Railway","height":87});
															thumbnails[6660573] = clik.newPhoto({"id":6660573,"src":"GA012_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_6660573.html","width":130,"caption":"See no evil...","height":87});
															thumbnails[6681204] = clik.newPhoto({"id":6681204,"src":"GB012_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_6681204.html","width":130,"caption":"Peacock butterfly","height":195});
															thumbnails[7428750] = clik.newPhoto({"id":7428750,"src":"Sri_Lanka_2011_559_BW_thumb.jpg","galleries_id":322158,"server_id":32,"link":"photo_7428750.html","width":130,"caption":"Agricultural landscape","height":86});
															thumbnails[5700203] = clik.newPhoto({"id":5700203,"src":"GE017_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700203.html","width":130,"caption":"Theatre of Dreams","height":87});
															thumbnails[5700293] = clik.newPhoto({"id":5700293,"src":"GF015_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700293.html","width":130,"caption":"Falconry display","height":87});
															thumbnails[6531274] = clik.newPhoto({"id":6531274,"src":"GG013_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531274.html","width":130,"caption":"Graveyard, Yorkshire","height":87});
															thumbnails[6681205] = clik.newPhoto({"id":6681205,"src":"GB013_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_6681205.html","width":130,"caption":"Small Tortoiseshell","height":87});
															thumbnails[6822049] = clik.newPhoto({"id":6822049,"src":"GC013_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_6822049.html","width":130,"caption":"Mountain stream","height":87});
															thumbnails[7428599] = clik.newPhoto({"id":7428599,"src":"Sri_Lanka_2011_362_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428599.html","width":130,"caption":"Scaly-breasted munia","height":130});
															thumbnails[5700227] = clik.newPhoto({"id":5700227,"src":"GF012_thumb.JPG","galleries_id":322174,"server_id":32,"link":"photo_5700227.html","width":130,"caption":"Flower Show exhibit with","height":87});
															thumbnails[6531276] = clik.newPhoto({"id":6531276,"src":"GG014_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531276.html","width":130,"caption":"Rural scene, France","height":87});
															thumbnails[6673860] = clik.newPhoto({"id":6673860,"src":"GA014_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_6673860.html","width":130,"caption":"Barn Owl","height":87});
															thumbnails[6822050] = clik.newPhoto({"id":6822050,"src":"GC014_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_6822050.html","width":130,"caption":"Loch Na Keal","height":87});
															thumbnails[7361561] = clik.newPhoto({"id":7361561,"src":"GH014_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361561.html","width":130,"caption":"Spotted deer","height":86});
															thumbnails[7428770] = clik.newPhoto({"id":7428770,"src":"Sri_Lanka_2011_336_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_7428770.html","width":130,"caption":"Crocodile","height":86});
															thumbnails[5700193] = clik.newPhoto({"id":5700193,"src":"GE012_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700193.html","width":130,"caption":"Graphic design","height":87});
															thumbnails[6531277] = clik.newPhoto({"id":6531277,"src":"GG015_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531277.html","width":130,"caption":"Door and alley, France","height":87});
															thumbnails[6673862] = clik.newPhoto({"id":6673862,"src":"GA015_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_6673862.html","width":130,"caption":"European eagle owl","height":195});
															thumbnails[6822051] = clik.newPhoto({"id":6822051,"src":"GC015_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_6822051.html","width":130,"caption":"Reflection, Tobermory harbour","height":87});
															thumbnails[7428771] = clik.newPhoto({"id":7428771,"src":"Sri_Lanka_2011_745_BW_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_7428771.html","width":130,"caption":"Entangled","height":87});
															thumbnails[5700185] = clik.newPhoto({"id":5700185,"src":"GE005_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700185.html","width":130,"caption":"Architectural abstract","height":87});
															thumbnails[6822052] = clik.newPhoto({"id":6822052,"src":"GC016_thumb.JPG","galleries_id":322158,"server_id":32,"link":"photo_6822052.html","width":130,"caption":"Sunset and sea loch","height":87});
															thumbnails[7428604] = clik.newPhoto({"id":7428604,"src":"Sri_Lanka_2011_457_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428604.html","width":130,"caption":"Shikra","height":163});
															thumbnails[7428772] = clik.newPhoto({"id":7428772,"src":"Sri_Lanka_2011_185_BW_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_7428772.html","width":130,"caption":"Land monitor","height":87});
															thumbnails[5700192] = clik.newPhoto({"id":5700192,"src":"GE011_thumb.JPG","galleries_id":322175,"server_id":32,"link":"photo_5700192.html","width":130,"caption":"River Clyde","height":87});
															thumbnails[6531282] = clik.newPhoto({"id":6531282,"src":"GG017_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6531282.html","width":130,"caption":"Windblown tree","height":87});
															thumbnails[7428707] = clik.newPhoto({"id":7428707,"src":"Sri_Lanka_2011_249_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428707.html","width":130,"caption":"Painted stork and Grey heron","height":86});
															thumbnails[7428753] = clik.newPhoto({"id":7428753,"src":"Sri_Lanka_2011_295_thumb.jpg","galleries_id":322158,"server_id":32,"link":"photo_7428753.html","width":130,"caption":"Diganwala water hole","height":86});
															thumbnails[7428773] = clik.newPhoto({"id":7428773,"src":"Sri_Lanka_2011_290_BW_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_7428773.html","width":130,"caption":"Grey langur monkey","height":195});
															thumbnails[6660712] = clik.newPhoto({"id":6660712,"src":"GG0181_thumb.jpg","galleries_id":358998,"server_id":32,"link":"photo_6660712.html","width":130,"caption":"Astley Park, Chorley","height":87});
															thumbnails[7428720] = clik.newPhoto({"id":7428720,"src":"Sri_Lanka_2011_410_BW_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428720.html","width":130,"caption":"Spot-billed pelican & Asian openbills","height":130});
															thumbnails[7428755] = clik.newPhoto({"id":7428755,"src":"Sri_Lanka_2011_322_thumb.jpg","galleries_id":322158,"server_id":32,"link":"photo_7428755.html","width":130,"caption":"Beach scene","height":86});
															thumbnails[7428774] = clik.newPhoto({"id":7428774,"src":"Sri_Lanka_2011_655_BW_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_7428774.html","width":130,"caption":"Fruit bats","height":163});
															thumbnails[6664810] = clik.newPhoto({"id":6664810,"src":"GG019_thumb.jpg","galleries_id":358998,"server_id":32,"link":"photo_6664810.html","width":130,"caption":"Sawley Abbey ruins","height":86});
															thumbnails[7361615] = clik.newPhoto({"id":7361615,"src":"GH019B_thumb.jpg","galleries_id":398220,"server_id":32,"link":"photo_7361615.html","width":130,"caption":"Asian openbill","height":86});
															thumbnails[7428725] = clik.newPhoto({"id":7428725,"src":"Sri_Lanka_2011_139_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428725.html","width":130,"caption":"Black-crowned night heron","height":163});
															thumbnails[7428776] = clik.newPhoto({"id":7428776,"src":"Sri_Lanka_2011_666_BW_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_7428776.html","width":130,"caption":"Buttressed tree roots","height":86});
															thumbnails[7359804] = clik.newPhoto({"id":7359804,"src":"GH020_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359804.html","width":130,"caption":"Shikra","height":195});
															thumbnails[7428734] = clik.newPhoto({"id":7428734,"src":"Sri_Lanka_2011_631_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428734.html","width":130,"caption":"Brahminy kite","height":195});
															thumbnails[7428777] = clik.newPhoto({"id":7428777,"src":"Sri_Lanka_2011_415_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_7428777.html","width":130,"caption":"Ruddy mongoose","height":86});
															thumbnails[6664822] = clik.newPhoto({"id":6664822,"src":"GG021_thumb.jpg","galleries_id":358998,"server_id":32,"link":"photo_6664822.html","width":130,"caption":"Cottage wall, Bolton by Bowland","height":86});
															thumbnails[7428738] = clik.newPhoto({"id":7428738,"src":"Sri_Lanka_2011_149_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428738.html","width":130,"caption":"Black-headed ibis","height":87});
															thumbnails[7428779] = clik.newPhoto({"id":7428779,"src":"Sri_Lanka_2011_068_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_7428779.html","width":130,"caption":"Spotted deer","height":86});
															thumbnails[6673747] = clik.newPhoto({"id":6673747,"src":"GG022_thumb.jpg","galleries_id":358998,"server_id":32,"link":"photo_6673747.html","width":130,"caption":"Crocosmia","height":86});
															thumbnails[7359808] = clik.newPhoto({"id":7359808,"src":"GH022_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359808.html","width":130,"caption":"Temple of the Tooth","height":130});
															thumbnails[7428745] = clik.newPhoto({"id":7428745,"src":"Sri_Lanka_2011_102_thumb.jpg","galleries_id":322157,"server_id":32,"link":"photo_7428745.html","width":130,"caption":"Orange-breasted green pigeon","height":87});
															thumbnails[7428781] = clik.newPhoto({"id":7428781,"src":"Sri_Lanka_2011_108_BW_thumb.jpg","galleries_id":322172,"server_id":32,"link":"photo_7428781.html","width":130,"caption":"Water buffalo & Indian pond heron","height":46});
															thumbnails[6673748] = clik.newPhoto({"id":6673748,"src":"GG023_thumb.jpg","galleries_id":358998,"server_id":32,"link":"photo_6673748.html","width":130,"caption":"Cobble Hey Farm garden","height":86});
															thumbnails[7359810] = clik.newPhoto({"id":7359810,"src":"GH023_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359810.html","width":130,"caption":"Bride on her wedding day","height":130});
															thumbnails[6673751] = clik.newPhoto({"id":6673751,"src":"GG024_thumb.jpg","galleries_id":358998,"server_id":32,"link":"photo_6673751.html","width":130,"caption":"Persicaria & alstroemaria","height":86});
															thumbnails[6673753] = clik.newPhoto({"id":6673753,"src":"GG025_thumb.jpg","galleries_id":358998,"server_id":32,"link":"photo_6673753.html","width":130,"caption":"Phlox, wicker & crocosmia lucifer","height":196});
															thumbnails[7359814] = clik.newPhoto({"id":7359814,"src":"GH025_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7359814.html","width":130,"caption":"Tea picker","height":195});
															thumbnails[6673754] = clik.newPhoto({"id":6673754,"src":"GG026_thumb.jpg","galleries_id":358998,"server_id":32,"link":"photo_6673754.html","width":130,"caption":"Garden seat & bamboo","height":86});
															thumbnails[6822026] = clik.newPhoto({"id":6822026,"src":"GG027_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6822026.html","width":130,"caption":"Loch Na Keal, Mull","height":87});
															thumbnails[7361579] = clik.newPhoto({"id":7361579,"src":"GH027_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361579.html","width":130,"caption":"Tea picker","height":86});
															thumbnails[6822027] = clik.newPhoto({"id":6822027,"src":"GG028_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6822027.html","width":130,"caption":"The island of Inch Kenneth","height":87});
															thumbnails[6822030] = clik.newPhoto({"id":6822030,"src":"GG029_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6822030.html","width":130,"caption":"Loch Peallach","height":87});
															thumbnails[6822032] = clik.newPhoto({"id":6822032,"src":"GG030_thumb.JPG","galleries_id":358998,"server_id":32,"link":"photo_6822032.html","width":130,"caption":"Salen Bay, Sound of Mull","height":87});
															thumbnails[7361581] = clik.newPhoto({"id":7361581,"src":"GH032_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361581.html","width":130,"caption":"Queen's Bath House, Kandy","height":86});
															thumbnails[7361582] = clik.newPhoto({"id":7361582,"src":"GH033_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361582.html","width":130,"caption":"Indian peafowl","height":87});
															thumbnails[7361583] = clik.newPhoto({"id":7361583,"src":"GH034_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361583.html","width":130,"caption":"St Andrew's Hotel","height":86});
															thumbnails[7361584] = clik.newPhoto({"id":7361584,"src":"GH035_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361584.html","width":130,"caption":"Horticultural landscape in hill country","height":86});
															thumbnails[7361585] = clik.newPhoto({"id":7361585,"src":"GH036_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361585.html","width":130,"caption":"Ruwana Ella Falls","height":86});
															thumbnails[7361587] = clik.newPhoto({"id":7361587,"src":"GH037_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361587.html","width":130,"caption":"View south from Ella Gap","height":86});
															thumbnails[7361588] = clik.newPhoto({"id":7361588,"src":"GH038_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361588.html","width":130,"caption":"Tropical colour","height":86});
															thumbnails[7361589] = clik.newPhoto({"id":7361589,"src":"GH039_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361589.html","width":130,"caption":"Chestnut-headed bee-eater","height":195});
															thumbnails[7361590] = clik.newPhoto({"id":7361590,"src":"GH040_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361590.html","width":130,"caption":"Blue-tailed bee-eater","height":86});
															thumbnails[7361592] = clik.newPhoto({"id":7361592,"src":"GH042_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361592.html","width":130,"caption":"Golden jackal","height":87});
															thumbnails[7361593] = clik.newPhoto({"id":7361593,"src":"GH043_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361593.html","width":130,"caption":"Land monitor","height":86});
															thumbnails[7361596] = clik.newPhoto({"id":7361596,"src":"GH045_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361596.html","width":130,"caption":"Painted stork","height":87});
															thumbnails[7361597] = clik.newPhoto({"id":7361597,"src":"GH046_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361597.html","width":130,"caption":"Tsunami memorial at rail tragedy site","height":87});
															thumbnails[7361599] = clik.newPhoto({"id":7361599,"src":"GH048_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361599.html","width":130,"caption":"Shell fishermen off-shore","height":86});
															thumbnails[7361600] = clik.newPhoto({"id":7361600,"src":"GH049_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361600.html","width":130,"caption":"Lagoon by Yala Village Hotel","height":86});
															thumbnails[7361603] = clik.newPhoto({"id":7361603,"src":"GH051_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361603.html","width":130,"caption":"Indian peafowl in flight","height":87});
															thumbnails[7361606] = clik.newPhoto({"id":7361606,"src":"GH053_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361606.html","width":130,"caption":"Ramboda Falls","height":195});
															thumbnails[7361607] = clik.newPhoto({"id":7361607,"src":"GH054_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361607.html","width":130,"caption":"Wetlands scene","height":86});
															thumbnails[7361610] = clik.newPhoto({"id":7361610,"src":"GH056_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361610.html","width":130,"caption":"Dredging river by hand","height":86});
															thumbnails[7361613] = clik.newPhoto({"id":7361613,"src":"GH058_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361613.html","width":130,"caption":"Horticultural landscape","height":86});
															thumbnails[7361614] = clik.newPhoto({"id":7361614,"src":"GH059_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361614.html","width":130,"caption":"Red-wattled lapwing","height":86});
															thumbnails[7361621] = clik.newPhoto({"id":7361621,"src":"GH063_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361621.html","width":130,"caption":"Lesser whistling ducks","height":87});
															thumbnails[7361625] = clik.newPhoto({"id":7361625,"src":"GH065_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361625.html","width":130,"caption":"Black-winged stilt","height":87});
															thumbnails[7361627] = clik.newPhoto({"id":7361627,"src":"GH066_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361627.html","width":130,"caption":"Baya weaver bird & nests","height":87});
															thumbnails[7361628] = clik.newPhoto({"id":7361628,"src":"GH067_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361628.html","width":130,"caption":"Black-naped hare (usually nocturnal)","height":87});
															thumbnails[7361631] = clik.newPhoto({"id":7361631,"src":"GH068_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361631.html","width":130,"caption":"Buttressed tree roots","height":86});
															thumbnails[7361632] = clik.newPhoto({"id":7361632,"src":"GH069_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361632.html","width":130,"caption":"Macaque monkeys","height":86});
															thumbnails[7361639] = clik.newPhoto({"id":7361639,"src":"GH070_thumb.JPG","galleries_id":398220,"server_id":32,"link":"photo_7361639.html","width":130,"caption":"Tusker","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[322157] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Birds","link":"gallery_322157.html","maxRecords":0.0,"photoIDs":[5688196.0,5688198.0,7428585.0,5688200.0,7428594.0,5688201.0,5688218.0,5688208.0,5688215.0,6536693.0,6660573.0,7428599.0,6673860.0,6673862.0,7428604.0,7428707.0,7428720.0,7428725.0,7428734.0,7428738.0,7428745.0],"skipIndex":0,"section_code":"gallery","featured_images":"5688218,5688215","id":322157,"singleSection":false});				  						galleries[322158] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_322158.html","maxRecords":0.0,"photoIDs":[5688258.0,5688259.0,5688266.0,5688268.0,5688270.0,5688272.0,5688276.0,5688279.0,5688281.0,5688284.0,6822046.0,7428750.0,6822049.0,6822050.0,6822051.0,6822052.0,7428753.0,7428755.0],"skipIndex":0,"section_code":"gallery","featured_images":5688272.0,"id":322158,"singleSection":false});				  						galleries[322172] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nature","link":"gallery_322172.html","maxRecords":0.0,"photoIDs":[5688241.0,5688243.0,5688253.0,5688247.0,5688249.0,5688245.0,5688240.0,5688250.0,5688255.0,5688252.0,6660581.0,6681204.0,6681205.0,7428770.0,7428771.0,7428772.0,7428773.0,7428774.0,7428776.0,7428777.0,7428779.0,7428781.0],"skipIndex":0,"section_code":"gallery","featured_images":5688241.0,"id":322172,"singleSection":false});				  						galleries[322174] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Tourism","link":"gallery_322174.html","maxRecords":0.0,"photoIDs":[5700228.0,5700207.0,5700210.0,5700212.0,5700214.0,5700226.0,5700220.0,5700222.0,5700224.0,5700205.0,5700217.0,5700230.0,5700293.0,5700227.0],"skipIndex":0,"section_code":"gallery","featured_images":5700217.0,"id":322174,"singleSection":false});				  						galleries[322175] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Structures & machines","link":"gallery_322175.html","maxRecords":0.0,"photoIDs":[5700178.0,5700179.0,5700184.0,5700187.0,5700195.0,5700194.0,5700190.0,5700189.0,5700191.0,5700188.0,5700182.0,5700203.0,5700193.0,5700185.0,5700192.0],"skipIndex":0,"section_code":"gallery","featured_images":5700187.0,"id":322175,"singleSection":false});				  						galleries[322173] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_322173.html","maxRecords":0.0,"photoIDs":[5700136.0,5700137.0,5700139.0,5700147.0,5700153.0,5700157.0,5700166.0,5700169.0,5700175.0,7428761.0,7428763.0],"skipIndex":0,"section_code":"gallery","featured_images":5700169.0,"id":322173,"singleSection":false});				  						galleries[358998] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Infra red","link":"gallery_358998.html","maxRecords":0.0,"photoIDs":[6531229.0,6531242.0,6531243.0,6531250.0,6531263.0,6531266.0,6531269.0,6531272.0,6531273.0,6531274.0,6531276.0,6531277.0,6531282.0,6660712.0,6664810.0,6664822.0,6673747.0,6673748.0,6673751.0,6673753.0,6673754.0,6822026.0,6822027.0,6822030.0,6822032.0],"skipIndex":0,"section_code":"gallery","featured_images":6531250.0,"id":358998,"singleSection":false});				  						galleries[398220] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sri Lanka","link":"gallery_398220.html","maxRecords":0.0,"photoIDs":[7359782.0,7359784.0,7361559.0,7361558.0,7359768.0,7359769.0,7359771.0,7359772.0,7359774.0,7361561.0,7361615.0,7359804.0,7359808.0,7359810.0,7359814.0,7361579.0,7361581.0,7361582.0,7361583.0,7361584.0,7361585.0,7361587.0,7361588.0,7361589.0,7361590.0,7361592.0,7361593.0,7361596.0,7361597.0,7361599.0,7361600.0,7361603.0,7361606.0,7361607.0,7361610.0,7361613.0,7361614.0,7361621.0,7361625.0,7361627.0,7361628.0,7361631.0,7361632.0,7361639.0],"skipIndex":0,"section_code":"gallery","featured_images":7359782.0,"id":398220,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5688188,5688200';
imageSets[2] = '7359782,5688241,6531250,5700187,5688272,5688218,5700169,5688215,5700217';
imageSets[3] = '7090516,5819990,6531229,5700228,5700178,6531242,5700207,5700179,6531243,5700210,5700184,6531250,5700212,5700187,6531263,5700214,5700195,5700153,6531266,5700226,5700194,5700157,5700220,5700190,5700166,6531269,5700222,5700189,5700169,5700224,5700191,5700175,5700217,5700205,5700188,6531272,6531273,5700230,5700182,6531274,5700293,5700203,6531276,5700227,6531277,5700193,5700185,6531282,5700192';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/andystansfield/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/andystansfield/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 = 'Andy Stansfield Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

