window.thumbnails = {};
															thumbnails[4681409] = clik.newPhoto({"id":4681409,"src":"Geaenuk_and_Calf_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Geaenuk and calf","height":87});
															thumbnails[2760535] = clik.newPhoto({"id":2760535,"src":"SwallowFeedingYoung_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_2760535.html","width":130,"caption":"Swallow (hirundo rustica) feeding young on the wing","height":96});
															thumbnails[581401] = clik.newPhoto({"id":581401,"src":"Magpies2_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_581401.html","width":130,"caption":"Magpies Fighting","height":83});
															thumbnails[511723] = clik.newPhoto({"id":511723,"src":"BlueTit2jpg_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_511723.html","width":130,"caption":"Blue Tit","height":175});
															thumbnails[513626] = clik.newPhoto({"id":513626,"src":"Cormerantsinthemist_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_513626.html","width":130,"caption":"Cormorants in the Mist","height":197});
															thumbnails[513631] = clik.newPhoto({"id":513631,"src":"BumbleBeeinFlight2_thumb.jpg","galleries_id":39680,"server_id":18,"link":"photo_513631.html","width":130,"caption":"Bumble Bee in Flight","height":88});
															thumbnails[513672] = clik.newPhoto({"id":513672,"src":"LighteningoverLaunceston2_thumb.jpg","galleries_id":39827,"server_id":18,"link":"photo_513672.html","width":130,"caption":"Lightening over Launceston","height":87});
															thumbnails[513679] = clik.newPhoto({"id":513679,"src":"Saltsburg_thumb.jpg","galleries_id":39827,"server_id":18,"link":"photo_513679.html","width":130,"caption":"Salzburg","height":64});
															thumbnails[513689] = clik.newPhoto({"id":513689,"src":"Hornet_thumb.jpg","galleries_id":39680,"server_id":18,"link":"photo_513689.html","width":130,"caption":"Hornet Feeding","height":87});
															thumbnails[513692] = clik.newPhoto({"id":513692,"src":"OrangeLadybirds_thumb.jpg","galleries_id":39680,"server_id":18,"link":"photo_513692.html","width":130,"caption":"Orange Ladybirds ","height":130});
															thumbnails[513706] = clik.newPhoto({"id":513706,"src":"PussMothLarvae_thumb.jpg","galleries_id":39680,"server_id":18,"link":"photo_513706.html","width":130,"caption":"Puss Moth Larvae","height":123});
															thumbnails[513708] = clik.newPhoto({"id":513708,"src":"RedKite_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_513708.html","width":130,"caption":"Red Kite","height":100});
															thumbnails[513721] = clik.newPhoto({"id":513721,"src":"Swallow_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_513721.html","width":130,"caption":"Swallow with Feather","height":158});
															thumbnails[513726] = clik.newPhoto({"id":513726,"src":"TawnyOwlreturningtonest3_thumb.jpg","galleries_id":269465,"server_id":18,"link":"photo_513726.html","width":130,"caption":"Tawny Owl returning to the nest","height":89});
															thumbnails[515199] = clik.newPhoto({"id":515199,"src":"WoodMousejunping2_thumb.jpg","galleries_id":39939,"server_id":18,"link":"photo_515199.html","width":130,"caption":"Wood Mouse Jumping","height":83});
															thumbnails[515201] = clik.newPhoto({"id":515201,"src":"CommonShrew2_thumb.jpg","galleries_id":39939,"server_id":18,"link":"photo_515201.html","width":130,"caption":"Common Shrew","height":194});
															thumbnails[518547] = clik.newPhoto({"id":518547,"src":"Buzzardatnest_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_518547.html","width":130,"caption":"Common Buzzard at the nest","height":177});
															thumbnails[520446] = clik.newPhoto({"id":520446,"src":"Widemouthsunset_thumb.jpg","galleries_id":39827,"server_id":18,"link":"photo_520446.html","width":130,"caption":"Sunset at Widemouth Bay","height":87});
															thumbnails[522399] = clik.newPhoto({"id":522399,"src":"Buzzardfeeding_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_522399.html","width":130,"caption":"Common Buzzard Feeding","height":85});
															thumbnails[525132] = clik.newPhoto({"id":525132,"src":"Derdildor_thumb.jpg","galleries_id":39827,"server_id":18,"link":"photo_525132.html","width":130,"caption":"Durdle Door","height":86});
															thumbnails[526719] = clik.newPhoto({"id":526719,"src":"Red_Fox_thumb.jpg","galleries_id":39939,"server_id":18,"link":"photo_526719.html","width":130,"caption":"Fox","height":122});
															thumbnails[526722] = clik.newPhoto({"id":526722,"src":"PipistrelleBat_thumb.jpg","galleries_id":39939,"server_id":18,"link":"photo_526722.html","width":130,"caption":"Pipistrelle Bat","height":117});
															thumbnails[543434] = clik.newPhoto({"id":543434,"src":"Badger_thumb.jpg","galleries_id":39939,"server_id":18,"link":"photo_543434.html","width":130,"caption":"Badgers","height":84});
															thumbnails[630493] = clik.newPhoto({"id":630493,"src":"GreatSpottedWoodpecker_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_630493.html","width":130,"caption":"Great Spotteed Woodpecker","height":158});
															thumbnails[4670625] = clik.newPhoto({"id":4670625,"src":"Dance_thumb.jpg","galleries_id":269465,"server_id":18,"link":"photo_4670625.html","width":130,"caption":"Dance","height":205});
															thumbnails[4670648] = clik.newPhoto({"id":4670648,"src":"Otter_thumb.jpg","galleries_id":269465,"server_id":18,"link":"photo_4670648.html","width":130,"caption":"Otter Leaping","height":87});
															thumbnails[4670763] = clik.newPhoto({"id":4670763,"src":"Beach_Ballerina2_thumb.jpg","galleries_id":269465,"server_id":18,"link":"photo_4670763.html","width":130,"caption":"Beach Ballerina","height":74});
															thumbnails[4679519] = clik.newPhoto({"id":4679519,"src":"_MG_9813_copy_thumb.jpg","galleries_id":269465,"server_id":18,"link":"photo_4679519.html","width":130,"caption":"Surf Dude","height":83});
															thumbnails[4679520] = clik.newPhoto({"id":4679520,"src":"05M10_Race_to_the_Finish_Line_thumb.jpg","galleries_id":269465,"server_id":18,"link":"photo_4679520.html","width":130,"caption":"Race to the Finish Line","height":120});
															thumbnails[4679526] = clik.newPhoto({"id":4679526,"src":"4The_Cross_Road_thumb.jpg","galleries_id":39827,"server_id":18,"link":"photo_4679526.html","width":130,"caption":"The Cross Road","height":56});
															thumbnails[4679528] = clik.newPhoto({"id":4679528,"src":"Geese_Montage_1_copy_thumb.jpg","galleries_id":39827,"server_id":18,"link":"photo_4679528.html","width":130,"caption":"The Copse on the Hill","height":84});
															thumbnails[4679530] = clik.newPhoto({"id":4679530,"src":"M10Brown_Rat_thumb.jpg","galleries_id":39939,"server_id":18,"link":"photo_4679530.html","width":130,"caption":"Brown Rat","height":86});
															thumbnails[4679533] = clik.newPhoto({"id":4679533,"src":"IMG_8928-02_copy_thumb.jpg","galleries_id":269465,"server_id":18,"link":"photo_4679533.html","width":130,"caption":"Greenfinches Sparring","height":92});
															thumbnails[4679535] = clik.newPhoto({"id":4679535,"src":"ROBBINS-C-4259-C3_thumb.jpg","galleries_id":85569,"server_id":18,"link":"photo_4679535.html","width":130,"caption":"Indian Street Scene","height":170});
															thumbnails[4679536] = clik.newPhoto({"id":4679536,"src":"Washing_On_The_Ghats_thumb.jpg","galleries_id":85569,"server_id":18,"link":"photo_4679536.html","width":130,"caption":"Washing on the Ghats","height":86});
															thumbnails[4679537] = clik.newPhoto({"id":4679537,"src":"TheOldSchoolHouseCanada_thumb.jpg","galleries_id":39827,"server_id":18,"link":"photo_4679537.html","width":130,"caption":"The Old School House-Canada","height":87});
															thumbnails[4681286] = clik.newPhoto({"id":4681286,"src":"076_copy_thumb.jpg","galleries_id":85569,"server_id":18,"link":"photo_4681286.html","width":130,"caption":"Indian Children","height":126});
															thumbnails[4681288] = clik.newPhoto({"id":4681288,"src":"Bengal_Tiger_copy_thumb.jpg","galleries_id":85569,"server_id":18,"link":"photo_4681288.html","width":130,"caption":"Bengal Tiger","height":87});
															thumbnails[5317083] = clik.newPhoto({"id":5317083,"src":"Water_Shrew2_copy_thumb.jpg","galleries_id":39939,"server_id":18,"link":"photo_5317083.html","width":130,"caption":"Water Shrew","height":87});
															thumbnails[5928271] = clik.newPhoto({"id":5928271,"src":"Water_Vole_in_Pipe_thumb.jpg","galleries_id":39939,"server_id":18,"link":"photo_5928271.html","width":130,"caption":"Water Vole in old pipe","height":87});
															thumbnails[6919012] = clik.newPhoto({"id":6919012,"src":"img008_thumb.jpg","galleries_id":39996,"server_id":18,"link":"photo_6919012.html","width":130,"caption":"Image used in the August 2010 Field Magazine","height":180});
															thumbnails[6919028] = clik.newPhoto({"id":6919028,"src":"_MG_4675_thumb.jpg","galleries_id":39996,"server_id":18,"link":"photo_6919028.html","width":130,"caption":"Used for a web site for a west country Bed and Breackfast","height":87});
															thumbnails[6919036] = clik.newPhoto({"id":6919036,"src":"IMG_5021_thumb.jpg","galleries_id":39996,"server_id":18,"link":"photo_6919036.html","width":130,"caption":" Interior taken for a commercial shoot.","height":87});
															thumbnails[6919051] = clik.newPhoto({"id":6919051,"src":"_MG_7646_thumb.jpg","galleries_id":39996,"server_id":18,"link":"photo_6919051.html","width":130,"caption":"Cameo shot for a local B&B ","height":195});
															thumbnails[6919061] = clik.newPhoto({"id":6919061,"src":"St_Agnes-Isles_of_Scilly_thumb.jpg","galleries_id":39996,"server_id":18,"link":"photo_6919061.html","width":130,"caption":"This Image was used in a national Magazine with a readership of 500,000","height":87});
															thumbnails[6919080] = clik.newPhoto({"id":6919080,"src":"European_Beaver2_thumb.jpg","galleries_id":39996,"server_id":18,"link":"photo_6919080.html","width":130,"caption":"This Image was used in a national News Paper with a readership of 500,000","height":87});
															thumbnails[6920217] = clik.newPhoto({"id":6920217,"src":"2_thumb.jpg","galleries_id":39680,"server_id":18,"link":"photo_6920217.html","width":130,"caption":"Hornet in Flight,Returning to the nest.","height":85});
															thumbnails[6920237] = clik.newPhoto({"id":6920237,"src":"Twisted_Stemed_Wine_Glasses_thumb.jpg","galleries_id":39996,"server_id":18,"link":"photo_6920237.html","width":130,"caption":"This image was taken as part of a portfolio for a glass blowing web site","height":85});
															thumbnails[7750121] = clik.newPhoto({"id":7750121,"src":"207_Tiff_Stack2_copy_2_thumb.jpg","galleries_id":419042,"server_id":18,"link":"photo_7750121.html","width":130,"caption":"Star Trails","height":87});
															thumbnails[7750136] = clik.newPhoto({"id":7750136,"src":"RS0218_thumb.jpg","galleries_id":419042,"server_id":18,"link":"photo_7750136.html","width":130,"caption":"Creatures that come out at night","height":87});
															thumbnails[7750146] = clik.newPhoto({"id":7750146,"src":"RS0219_thumb.jpg","galleries_id":419042,"server_id":18,"link":"photo_7750146.html","width":130,"caption":"Star trails over Rough Tor","height":55});
															thumbnails[7750161] = clik.newPhoto({"id":7750161,"src":"RS0220_thumb.jpg","galleries_id":419042,"server_id":18,"link":"photo_7750161.html","width":130,"caption":"Wind Turbine ","height":87});
															thumbnails[7750170] = clik.newPhoto({"id":7750170,"src":"RS0223_thumb.jpg","galleries_id":419042,"server_id":18,"link":"photo_7750170.html","width":130,"caption":"Night time at Widemouth Bay","height":195});
															thumbnails[7750181] = clik.newPhoto({"id":7750181,"src":"RS0226_thumb.jpg","galleries_id":419042,"server_id":18,"link":"photo_7750181.html","width":130,"caption":"Brentor Church","height":87});
															thumbnails[7767964] = clik.newPhoto({"id":7767964,"src":"M10_Winter_Scene_thumb.jpg","galleries_id":39827,"server_id":18,"link":"photo_7767964.html","width":130,"caption":"The Copse on the Hill in Winter","height":98});
															thumbnails[7855498] = clik.newPhoto({"id":7855498,"src":"_MG_2431_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_7855498.html","width":130,"caption":"Blue Tit in Flight","height":87});
															thumbnails[8262408] = clik.newPhoto({"id":8262408,"src":"_MG_7655_thumb.jpg","galleries_id":439981,"server_id":18,"link":"photo_8262408.html","width":130,"caption":"Eating out in Denia","height":195});
															thumbnails[8262414] = clik.newPhoto({"id":8262414,"src":"Group_1-_MG_7436__MG_7460-25_images_thumb.jpg","galleries_id":439981,"server_id":18,"link":"photo_8262414.html","width":130,"caption":"Up in the Mountains","height":23});
															thumbnails[8262419] = clik.newPhoto({"id":8262419,"src":"_MG_7814_thumb.jpg","galleries_id":439981,"server_id":18,"link":"photo_8262419.html","width":130,"caption":"Bulls to the Sea festival Denia July 2011","height":83});
															thumbnails[8262420] = clik.newPhoto({"id":8262420,"src":"_MG_8104_thumb.jpg","galleries_id":439981,"server_id":18,"link":"photo_8262420.html","width":130,"caption":"Bulls to the Sea festival Denia July 2011","height":77});
															thumbnails[8262428] = clik.newPhoto({"id":8262428,"src":"_MG_8125_thumb.jpg","galleries_id":439981,"server_id":18,"link":"photo_8262428.html","width":130,"caption":"Bulls to the Sea festival Denia July 2011","height":87});
															thumbnails[8262433] = clik.newPhoto({"id":8262433,"src":"_MG_8464_thumb.jpg","galleries_id":439981,"server_id":18,"link":"photo_8262433.html","width":130,"caption":"Bulls to the Sea festival Denia July 2011","height":87});
															thumbnails[8262438] = clik.newPhoto({"id":8262438,"src":"_MG_8469_thumb.jpg","galleries_id":439981,"server_id":18,"link":"photo_8262438.html","width":130,"caption":"Bulls to the Sea festival Denia July 2011","height":86});
															thumbnails[8262448] = clik.newPhoto({"id":8262448,"src":"_MG_8542_thumb.jpg","galleries_id":439981,"server_id":18,"link":"photo_8262448.html","width":130,"caption":"Bulls to the Sea festival Denia July 2011","height":87});
															thumbnails[8514547] = clik.newPhoto({"id":8514547,"src":"_MG_8586_thumb.jpg","galleries_id":419042,"server_id":18,"link":"photo_8514547.html","width":130,"caption":"Trafalgar Square,London","height":98});
															thumbnails[8803308] = clik.newPhoto({"id":8803308,"src":"_MG_2880_copy2_thumb.jpg","galleries_id":39680,"server_id":18,"link":"photo_8803308.html","width":130,"caption":"Honey Bee fighting back at a wasp raids the hive","height":129});
															thumbnails[8803354] = clik.newPhoto({"id":8803354,"src":"M10_Stoat_thumb.jpg","galleries_id":39939,"server_id":18,"link":"photo_8803354.html","width":130,"caption":"Stoat (Mustela erminea)","height":86});
															thumbnails[9068390] = clik.newPhoto({"id":9068390,"src":"new_from_raw_2010_thumb_74B688DB-1EC9-DFB6-09D7DC64C9AD7B07.jpg","galleries_id":85569,"server_id":18,"link":"photo_9068390.html","width":130,"caption":"Seven Sisters","height":56});
															thumbnails[538848] = clik.newPhoto({"id":538848,"src":"TheStarligSwarm-copy_thumb.jpg","galleries_id":39674,"server_id":18,"link":"photo_538848.html","width":130,"caption":"The Starling Swarm.","height":57});
															thumbnails[5288471] = clik.newPhoto({"id":5288471,"src":"8BEW2103_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_5288471.html","width":130,"caption":"Evie 2","height":195});
															thumbnails[518544] = clik.newPhoto({"id":518544,"src":"BirchsawflyLarvae_thumb.jpg","galleries_id":39680,"server_id":18,"link":"photo_518544.html","width":130,"caption":"Birch Sawfly Larvae","height":124});
															thumbnails[4679525] = clik.newPhoto({"id":4679525,"src":"3Reclining_in_Solitude_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4679525.html","width":130,"caption":"Reclining in Solitude","height":47});
															thumbnails[4670615] = clik.newPhoto({"id":4670615,"src":"Going_Underground_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4670615.html","width":130,"caption":"Going Underground<br>\r\nWon a Silver Medal in the WCPF(Western Counties Photographic Federation 2009","height":87});
															thumbnails[5288358] = clik.newPhoto({"id":5288358,"src":"8BEW2075_copy_thumb.jpg","galleries_id":39996,"server_id":18,"link":"photo_5288358.html","width":130,"caption":"Fashion","height":86});
															thumbnails[4670621] = clik.newPhoto({"id":4670621,"src":"My_two_old_girls_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4670621.html","width":130,"caption":"Knitting for Charity","height":105});
															thumbnails[4679531] = clik.newPhoto({"id":4679531,"src":"M10Eveie_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4679531.html","width":130,"caption":"Evie","height":99});
															thumbnails[1197794] = clik.newPhoto({"id":1197794,"src":"Cheetah_thumb.jpg","galleries_id":85831,"server_id":18,"link":"photo_1197794.html","width":130,"caption":"Cheetah","height":201});
															thumbnails[4679538] = clik.newPhoto({"id":4679538,"src":"JohnBetty8Bit_copy_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4679538.html","width":130,"caption":"Long Term Love","height":87});
															thumbnails[1197796] = clik.newPhoto({"id":1197796,"src":"SecretaryBirdStampingMice_thumb.jpg","galleries_id":85831,"server_id":18,"link":"photo_1197796.html","width":130,"caption":"Secretary Bird Hunting Mice","height":87});
															thumbnails[4679523] = clik.newPhoto({"id":4679523,"src":"1Summer_Time_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4679523.html","width":130,"caption":"Summer Time","height":94});
															thumbnails[4679524] = clik.newPhoto({"id":4679524,"src":"2Limbering_Up_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4679524.html","width":130,"caption":"Limbering up","height":195});
															thumbnails[1191652] = clik.newPhoto({"id":1191652,"src":"TribeGirl_thumb.jpg","galleries_id":85569,"server_id":18,"link":"photo_1191652.html","width":130,"caption":"Tribe Girl","height":86});
															thumbnails[1194322] = clik.newPhoto({"id":1194322,"src":"ZebraRolling_thumb.jpg","galleries_id":85831,"server_id":18,"link":"photo_1194322.html","width":130,"caption":"Zebra Rolling","height":76});
															thumbnails[1198771] = clik.newPhoto({"id":1198771,"src":"KenyianKids_thumb.jpg","galleries_id":85831,"server_id":18,"link":"photo_1198771.html","width":130,"caption":"Kenyan Kids","height":87});
															thumbnails[5288480] = clik.newPhoto({"id":5288480,"src":"Girl_at_sunset_copy_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_5288480.html","width":130,"caption":"Girl at sunset","height":194});
															thumbnails[1191673] = clik.newPhoto({"id":1191673,"src":"FamilyWorship_thumb.jpg","galleries_id":85569,"server_id":18,"link":"photo_1191673.html","width":130,"caption":"Family Worship","height":187});
															thumbnails[4681285] = clik.newPhoto({"id":4681285,"src":"_MG_9791_copy_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4681285.html","width":130,"caption":"","height":87});
															thumbnails[4670776] = clik.newPhoto({"id":4670776,"src":"SeaBreeze_1_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4670776.html","width":130,"caption":"Sea Breeze","height":84});
															thumbnails[5288474] = clik.newPhoto({"id":5288474,"src":"8BEW2220_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_5288474.html","width":130,"caption":"Evie 3","height":195});
															thumbnails[4679529] = clik.newPhoto({"id":4679529,"src":"4Elegance_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_4679529.html","width":130,"caption":"Elegance","height":52});
															thumbnails[516698] = clik.newPhoto({"id":516698,"src":"Feedtheimaginatoin2_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_516698.html","width":130,"caption":"Feed the Imagination","height":199});
															thumbnails[513703] = clik.newPhoto({"id":513703,"src":"Throughtheholeintheglass_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_513703.html","width":130,"caption":"Through the hole in the glass","height":86});
															thumbnails[513635] = clik.newPhoto({"id":513635,"src":"Disabled_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_513635.html","width":130,"caption":"Disabled","height":126});
															thumbnails[1194330] = clik.newPhoto({"id":1194330,"src":"Lionfromballoon_thumb.jpg","galleries_id":85831,"server_id":18,"link":"photo_1194330.html","width":130,"caption":"Young Male Lion","height":87});
															thumbnails[513727] = clik.newPhoto({"id":513727,"src":"Youarethe_thumb.jpg","galleries_id":39676,"server_id":18,"link":"photo_513727.html","width":130,"caption":"Romance","height":194});
															thumbnails[1191659] = clik.newPhoto({"id":1191659,"src":"HenryFordHospital_thumb.jpg","galleries_id":85569,"server_id":18,"link":"photo_1191659.html","width":130,"caption":"Henry Ford Hospital","height":87});
															thumbnails[1194334] = clik.newPhoto({"id":1194334,"src":"Elephant_thumb.jpg","galleries_id":85831,"server_id":18,"link":"photo_1194334.html","width":130,"caption":"Elephant","height":87});
															thumbnails[1191661] = clik.newPhoto({"id":1191661,"src":"Shoecleaner_thumb.jpg","galleries_id":85569,"server_id":18,"link":"photo_1191661.html","width":130,"caption":"Shoe Cleaner","height":93});
															thumbnails[1194336] = clik.newPhoto({"id":1194336,"src":"Flamingoes_thumb.jpg","galleries_id":85831,"server_id":18,"link":"photo_1194336.html","width":130,"caption":"Flamingoes","height":94});
															thumbnails[1194341] = clik.newPhoto({"id":1194341,"src":"Mombasa_thumb.jpg","galleries_id":85831,"server_id":18,"link":"photo_1194341.html","width":130,"caption":"Mombasa","height":50});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[269465] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Action","link":"gallery_269465.html","maxRecords":0.0,"photoIDs":[513726.0,4670625.0,4670648.0,4670763.0,4679519.0,4679520.0,4679533.0],"skipIndex":0,"section_code":"gallery","featured_images":"4679533,4679520,4679519,4670763,4670648,4670625,513726","id":269465,"singleSection":false});				  						galleries[419042] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Night Photography","link":"gallery_419042.html","maxRecords":0.0,"photoIDs":[7750121.0,7750136.0,7750146.0,7750161.0,7750170.0,7750181.0,8514547.0],"skipIndex":0,"section_code":"gallery","featured_images":7750146.0,"id":419042,"singleSection":false});				  						galleries[39674] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Birds","link":"gallery_39674.html","maxRecords":0.0,"photoIDs":[2760535.0,581401.0,511723.0,513626.0,513708.0,513721.0,518547.0,522399.0,630493.0,7855498.0,538848.0],"skipIndex":0,"section_code":"gallery","featured_images":"2760535,513721","id":39674,"singleSection":false});				  						galleries[39939] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mammals","link":"gallery_39939.html","maxRecords":0.0,"photoIDs":[515199.0,515201.0,526719.0,526722.0,543434.0,4679530.0,5317083.0,5928271.0,8803354.0],"skipIndex":0,"section_code":"gallery","featured_images":"5928271,5317083,515201","id":39939,"singleSection":false});				  						galleries[39680] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Insects","link":"gallery_39680.html","maxRecords":0.0,"photoIDs":[513631.0,513689.0,513692.0,513706.0,6920217.0,8803308.0,518544.0],"skipIndex":0,"section_code":"gallery","featured_images":"8803308,6920217,518544,513706","id":39680,"singleSection":false});				  						galleries[39996] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commercial","link":"gallery_39996.html","maxRecords":0.0,"photoIDs":[6919012.0,6919028.0,6919036.0,6919051.0,6919061.0,6919080.0,6920237.0,5288358.0],"skipIndex":0,"section_code":"gallery","featured_images":"6919012,5288358","id":39996,"singleSection":false});				  						galleries[39676] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_39676.html","maxRecords":0.0,"photoIDs":[5288471.0,4679525.0,4670615.0,4670621.0,4679531.0,4679538.0,4679523.0,4679524.0,5288480.0,4681285.0,4670776.0,5288474.0,4679529.0,516698.0,513703.0,513635.0,513727.0],"skipIndex":0,"section_code":"gallery","featured_images":"5288480,5288474,5288471,4681285,4679538,4679531,4679529,4679525,4679524,4679523","id":39676,"singleSection":false});				  						galleries[39827] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_39827.html","maxRecords":0.0,"photoIDs":[513672.0,513679.0,520446.0,525132.0,4679526.0,4679528.0,4679537.0,7767964.0],"skipIndex":0,"section_code":"gallery","featured_images":"520446,513672","id":39827,"singleSection":false});				  						galleries[85569] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"India","link":"gallery_85569.html","maxRecords":0.0,"photoIDs":[4679535.0,4679536.0,4681286.0,4681288.0,9068390.0,1191652.0,1191673.0,1191659.0,1191661.0],"skipIndex":0,"section_code":"gallery","featured_images":"9068390,4681288,4681286,4679536,4679535,1191673,1191661,1191659,1191652","id":85569,"singleSection":false});				  						galleries[85831] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Africa","link":"gallery_85831.html","maxRecords":0.0,"photoIDs":[1197794.0,1197796.0,1194322.0,1198771.0,1194330.0,1194334.0,1194336.0,1194341.0],"skipIndex":0,"section_code":"gallery","featured_images":"1198771,1197796,1197794,1194341,1194336,1194334,1194330,1194322","id":85831,"singleSection":false});				  						galleries[439981] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Spain","link":"gallery_439981.html","maxRecords":0.0,"photoIDs":[8262408.0,8262414.0,8262419.0,8262420.0,8262428.0,8262433.0,8262438.0,8262448.0],"skipIndex":0,"section_code":"gallery","featured_images":"8262448,8262438,8262433,8262428,8262420,8262419,8262414,8262408","id":439981,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8803308,7750136,6920217,2760535,513721,511723,518544,4670615,1191673';
imageSets[2] = '8803308,7750146,6920217,6919012,5928271,5317083,2760535,520446,515201,513721,513706,513672,518544,5288358';
imageSets[3] = '9068390,8803354,8803308,8514547,8262448,8262438,8262433,8262428,8262420,8262419,8262414,8262408,7855498,7767964,7750181,7750170,7750161,7750146,7750136,7750121,6920237,6920217,6919080,6919061,6919051,6919036,6919028,6919012,5928271,5317083,5288480,5288474,5288471,5288358,4681409,4681288,4681286,4681285,4679538,4679537,4679536,4679535,4679533,4679531,4679530,4679529,4679528,4679526,4679525,4679524';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/ChrisR/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/ChrisR/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 = 'Chris Robbins 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;
	}
}

			

