window.thumbnails = new Object();
												thumbnails[7408123] = new thumbnail(7408123,'160033','Birling Gap Beach','BirlingGapBeach1_thumb.jpg',130, 88,5,'photo_7408123.html');
												thumbnails[7408140] = new thumbnail(7408140,'160033','Severn Sisters Cliffs','Birling_Gap_BeachEvening_thumb.jpg',130, 87,5,'photo_7408140.html');
												thumbnails[7340981] = new thumbnail(7340981,'160033','Bath at dusk','BathAtDusk_thumb.jpg',130, 90,5,'photo_7340981.html');
												thumbnails[7341048] = new thumbnail(7341048,'160033','Circus at Bath','BathCircus_thumb.jpg',130, 87,5,'photo_7341048.html');
												thumbnails[7341182] = new thumbnail(7341182,'160033','Circus at Bath - sepia tones','Circus2_thumb.jpg',130, 87,5,'photo_7341182.html');
												thumbnails[7341271] = new thumbnail(7341271,'160033','Royal Crescent - Bath','RoyalCrescent_thumb.jpg',130, 87,5,'photo_7341271.html');
												thumbnails[7341274] = new thumbnail(7341274,'160033','Roman Baths and Pump Room at Bath','RomanBaths_thumb.jpg',130, 87,5,'photo_7341274.html');
												thumbnails[7341259] = new thumbnail(7341259,'160033','News Woods in Winter','NewsWood_thumb.jpg',130, 87,5,'photo_7341259.html');
												thumbnails[7341262] = new thumbnail(7341262,'160033','News Woods in Winter 2','NewsWoodSnow2_thumb.jpg',130, 87,5,'photo_7341262.html');
												thumbnails[7446491] = new thumbnail(7446491,'160044','Snowy Sunset over the Malverns','WinterMalvernsSunset_thumb.jpg',130, 87,5,'photo_7446491.html');
												thumbnails[7360586] = new thumbnail(7360586,'160033','Ragged Stone Hill in winter','RaggedStoneIce_thumb.jpg',130, 87,5,'photo_7360586.html');
												thumbnails[7408038] = new thumbnail(7408038,'160029','Sgwd Y Pannwr in spate (1)','SgwdYPannwr1_thumb.jpg',130, 90,5,'photo_7408038.html');
												thumbnails[7360361] = new thumbnail(7360361,'160033','Hollybush Sunset','HollybushSunset_thumb.jpg',130, 82,5,'photo_7360361.html');
												thumbnails[7407292] = new thumbnail(7407292,'160033','Sgwd Gwladus - Lady Falls','Sgwd_Gwladus_-_Lady_Falls_2_thumb.jpg',130, 194,5,'photo_7407292.html');
												thumbnails[7360485] = new thumbnail(7360485,'160033','Sgwd Isaf Clun Gwyn','SgwdIsafClunGwynUpper_thumb.jpg',130, 87,5,'photo_7360485.html');
												thumbnails[7364478] = new thumbnail(7364478,'160033','Great Langdale','LangdaleFromAtop_thumb.jpg',130, 194,5,'photo_7364478.html');
												thumbnails[7407270] = new thumbnail(7407270,'160033','Great Langdale in early Autumn','LangdalePano2_thumb.jpg',130, 58,5,'photo_7407270.html');
												thumbnails[7408066] = new thumbnail(7408066,'160033','Stormy Langdale','Langdale2_thumb.jpg',130, 75,5,'photo_7408066.html');
												thumbnails[7446556] = new thumbnail(7446556,'215726','Great Langdale from the Crinkle Crags','Wide_Langdale_and_Crinkles_BW_thumb.jpg',130, 58,5,'photo_7446556.html');
												thumbnails[7360224] = new thumbnail(7360224,'160029','A bothy in Dentdale','BothyNearDent_thumb.jpg',130, 83,5,'photo_7360224.html');
												thumbnails[6806257] = new thumbnail(6806257,'160043','Herefordshire Summer Storm','SummerStormNearKnightwick_thumb.jpg',130, 193,5,'photo_6806257.html');
												thumbnails[6806258] = new thumbnail(6806258,'160097','Hampshire Wheat Fields','SummerWheat_thumb.jpg',130, 88,5,'photo_6806258.html');
												thumbnails[7364473] = new thumbnail(7364473,'160033','Beach board walk in Skiathos','SkiathosBoardWalkSepia_thumb.jpg',130, 194,5,'photo_7364473.html');
												thumbnails[6828403] = new thumbnail(6828403,'160033','Beachy Head','BeachyHeadInSummer_thumb.jpg',130, 88,5,'photo_6828403.html');
												thumbnails[6799411] = new thumbnail(6799411,'160041','Venetian building in Fiskardo, Kefalonia','Fiskardo1_thumb.jpg',130, 88,5,'photo_6799411.html');
												thumbnails[6828329] = new thumbnail(6828329,'160097','Beauty and a (mini) beast','BeautyAndTheBug_thumb.jpg',130, 88,5,'photo_6828329.html');
												thumbnails[6828352] = new thumbnail(6828352,'160097','Bluebells on the North Downs','BluebellStudy1_thumb.jpg',130, 100,5,'photo_6828352.html');
												thumbnails[6806259] = new thumbnail(6806259,'215726','Bowfell Buttress','BowfellButress1_thumb.jpg',130, 189,5,'photo_6806259.html');
												thumbnails[7360541] = new thumbnail(7360541,'160033','Pike o\' Blisco','PikeOBlisco_E3458227-1EC9-D45B-1C601857C8094EB9_thumb.jpg',130, 83,5,'photo_7360541.html');
												thumbnails[7360694] = new thumbnail(7360694,'160033','Gulfoss - Golden Falls','GulfossSpectaculor_thumb.jpg',130, 85,5,'photo_7360694.html');
												thumbnails[6828414] = new thumbnail(6828414,'160033','Eyjafjallajokull volcano starts to erupt!','Eyjafjallajokull_thumb.jpg',130, 86,5,'photo_6828414.html');
												thumbnails[6828425] = new thumbnail(6828425,'160033','Eyjafjallajokull ice cap and surrounding glacial streams','Eyjafjallajokull_Icecap_thumb.jpg',130, 88,5,'photo_6828425.html');
												thumbnails[6828431] = new thumbnail(6828431,'160033','Eyjafjallajokull volcano erupting 1','EyjafjallajokullEruption1_thumb.jpg',130, 87,5,'photo_6828431.html');
												thumbnails[6828381] = new thumbnail(6828381,'160097','Dymock\'s Daffodils','DymockDaffs_thumb.jpg',130, 194,5,'photo_6828381.html');
												thumbnails[6828343] = new thumbnail(6828343,'160097','Crocuses near to Coddington','CoddingtonCrocusDisplay_thumb.jpg',130, 84,5,'photo_6828343.html');
												thumbnails[5633966] = new thumbnail(5633966,'160097','Snowdrops','Snowdrops_thumb.jpg',130, 110,5,'photo_5633966.html');
												thumbnails[6828395] = new thumbnail(6828395,'160044','Herefordshire Heaven','HerefordshireHeaven_thumb.jpg',130, 88,5,'photo_6828395.html');
												thumbnails[5374657] = new thumbnail(5374657,'160029','Box Hill Snow','BoxHillSnow_thumb.jpg',130, 86,5,'photo_5374657.html');
												thumbnails[5382511] = new thumbnail(5382511,'160029','Norbury Park snow','NorburyParkSnow1_thumb.jpg',130, 88,5,'photo_5382511.html');
												thumbnails[5374684] = new thumbnail(5374684,'215726','Ice in Langdale','IcyLangdale1_thumb.jpg',130, 86,5,'photo_5374684.html');
												thumbnails[5374696] = new thumbnail(5374696,'215726','Winter on Kirkstone Pass','KirkstonePassSnow1_thumb.jpg',130, 88,5,'photo_5374696.html');
												thumbnails[5374698] = new thumbnail(5374698,'215726','Cumbrian Snow','KirkstonePassSnow2_thumb.jpg',130, 88,5,'photo_5374698.html');
												thumbnails[5382449] = new thumbnail(5382449,'215726','Wispy skies at Langdale','LangdaleCirrus_thumb.jpg',130, 88,5,'photo_5382449.html');
												thumbnails[5382456] = new thumbnail(5382456,'215726','Snow-topped Pikes','LangdalePikeSnow1_thumb.jpg',130, 84,5,'photo_5382456.html');
												thumbnails[5382472] = new thumbnail(5382472,'215726','Langdale Pikes covered in snow.','LangdalePikeSnow2_thumb.jpg',130, 88,5,'photo_5382472.html');
												thumbnails[5382525] = new thumbnail(5382525,'215726','Snow in Great Langdale.','SnowyLangdale1_thumb.jpg',130, 88,5,'photo_5382525.html');
												thumbnails[5374679] = new thumbnail(5374679,'160044','Icy sunset from the Malverns','HerefordshireBeaconSunsetWinter_thumb.jpg',130, 88,5,'photo_5374679.html');
												thumbnails[5382495] = new thumbnail(5382495,'160475','Malvern Hills snow shower.','MalvernSnowShower_thumb.jpg',130, 88,5,'photo_5382495.html');
												thumbnails[5374660] = new thumbnail(5374660,'160029','Broadway Tower in Winter','BroadwayTower_thumb.jpg',130, 86,5,'photo_5374660.html');
												thumbnails[5634095] = new thumbnail(5634095,'160041','Imminent Departure','ImmientDeparture_thumb.jpg',130, 190,5,'photo_5634095.html');
												thumbnails[5374671] = new thumbnail(5374671,'369650','Fan Y Big','FanYBigNov09_thumb.jpg',130, 196,5,'photo_5374671.html');
												thumbnails[5382506] = new thumbnail(5382506,'369650','Crepuscular rays over the Brecon Beacons.','NeuaddCrepsNov09_thumb.jpg',130, 85,5,'photo_5382506.html');
												thumbnails[5382519] = new thumbnail(5382519,'369650','Pen Y Fan following a severe autumn hailstorm.','SnowandHailPenYFan_thumb.jpg',130, 88,5,'photo_5382519.html');
												thumbnails[5374651] = new thumbnail(5374651,'160029','Blowy at Brighton!','BlowyBrighton1_thumb.jpg',130, 81,5,'photo_5374651.html');
												thumbnails[5634043] = new thumbnail(5634043,'160029','Autumn Sunburst','AutumnSunburst_thumb.jpg',130, 193,5,'photo_5634043.html');
												thumbnails[6799417] = new thumbnail(6799417,'215726','Honister Pass, near Buttermere','HonisterPassSunset_thumb.jpg',130, 88,5,'photo_6799417.html');
												thumbnails[6799412] = new thumbnail(6799412,'160475','Lenticular Clouds at Sunset over Brecon Beacons','BreconLenticulars_thumb.jpg',130, 88,5,'photo_6799412.html');
												thumbnails[5633979] = new thumbnail(5633979,'160029','Sgwd Ddwli Uchaf','Sgwd_Ddwli_Uchaf_thumb.jpg',130, 87,5,'photo_5633979.html');
												thumbnails[5634038] = new thumbnail(5634038,'160029','Waterfall at Clovelly','ClovellyFalls_thumb.jpg',130, 199,5,'photo_5634038.html');
												thumbnails[5634040] = new thumbnail(5634040,'160029','Croyde at Sunset','CroydeSunsetCouple_thumb.jpg',130, 86,5,'photo_5634040.html');
												thumbnails[5634035] = new thumbnail(5634035,'160029','Saunton Sands','SautonSands_thumb.jpg',130, 84,5,'photo_5634035.html');
												thumbnails[6806252] = new thumbnail(6806252,'160044','Harlyn Sunset','HarlynSunset1_thumb.jpg',130, 85,5,'photo_6806252.html');
												thumbnails[6806254] = new thumbnail(6806254,'160475','Cornish Castellanus','CastellanusOverCornwall_thumb.jpg',130, 193,5,'photo_6806254.html');
												thumbnails[6806253] = new thumbnail(6806253,'160041','Tintagel Castle, Cornwall','Tintagel_thumb.jpg',130, 184,5,'photo_6806253.html');
												thumbnails[7364446] = new thumbnail(7364446,'160033','Worcestershire Summer Sunrise','WorcestershireOrange_thumb.jpg',130, 88,5,'photo_7364446.html');
												thumbnails[4126127] = new thumbnail(4126127,'160044','Mid-June sunrise over south Worcestershire.','SummerSun_thumb.jpg',130, 90,5,'photo_4126127.html');
												thumbnails[7364453] = new thumbnail(7364453,'160033','Petani Beach, north-west Kefalonia','PentaniBay_thumb.jpg',130, 85,5,'photo_7364453.html');
												thumbnails[6799415] = new thumbnail(6799415,'160041','Myrtos Bay Blue','MyrtosBeach2_thumb.jpg',130, 79,5,'photo_6799415.html');
												thumbnails[6806255] = new thumbnail(6806255,'160041','Assos, Kefalonia','AssosBay_thumb.jpg',130, 90,5,'photo_6806255.html');
												thumbnails[6799418] = new thumbnail(6799418,'160041','Anti Samos beach, Kefalonia','AntisamosBeach2_thumb.jpg',130, 85,5,'photo_6799418.html');
												thumbnails[4125995] = new thumbnail(4125995,'160044','Sun rising over Bredon Hill','BredonHillSunrise_thumb.jpg',130, 82,5,'photo_4125995.html');
												thumbnails[4126024] = new thumbnail(4126024,'160044','Spectacular April Sunrise over the Severn Valley','LightFantastic_thumb.jpg',130, 87,5,'photo_4126024.html');
												thumbnails[4126086] = new thumbnail(4126086,'160044','Long misty shadows across the Severn Valley.','Mistyshadows_thumb.jpg',130, 87,5,'photo_4126086.html');
												thumbnails[3487442] = new thumbnail(3487442,'215726','Cumbria in the snow, from Blencathra','SnowyCumbria_thumb.jpg',130, 88,5,'photo_3487442.html');
												thumbnails[3487443] = new thumbnail(3487443,'215726','A paraglider on Blencathra','ParagliderAboveKeswick_thumb.jpg',130, 87,5,'photo_3487443.html');
												thumbnails[3487445] = new thumbnail(3487445,'215726','Low cloud across the Cumbrian Fells.','CumbriaCloudTops1_thumb.jpg',130, 57,5,'photo_3487445.html');
												thumbnails[3487451] = new thumbnail(3487451,'215726','View from top of Blencathra','BlencathraView1_thumb.jpg',130, 88,5,'photo_3487451.html');
												thumbnails[3487465] = new thumbnail(3487465,'215726','View looking south close to Halls Fell.','BlencathraView3_thumb.jpg',130, 88,5,'photo_3487465.html');
												thumbnails[3487469] = new thumbnail(3487469,'215726','Skiddaw covered in snow.','SkiddawInSnow_thumb.jpg',130, 70,5,'photo_3487469.html');
												thumbnails[3487471] = new thumbnail(3487471,'215726','Blencathra\'s snow capped summit.','BlencathraSnow_thumb.jpg',130, 81,5,'photo_3487471.html');
												thumbnails[3487473] = new thumbnail(3487473,'215726','Paraglider takes off over a snow covered Cumbria.','ParaglideVista_thumb.jpg',130, 80,5,'photo_3487473.html');
												thumbnails[3487482] = new thumbnail(3487482,'215726','Helvellyn range, beneath cirrus cloud.','CirrusVista_thumb.jpg',130, 88,5,'photo_3487482.html');
												thumbnails[3640458] = new thumbnail(3640458,'215726','Black and white version of Blencathra summit in the snow.','BlencathraBW_thumb.jpg',130, 87,5,'photo_3640458.html');
												thumbnails[3640492] = new thumbnail(3640492,'215726','Borrowdale in summer.','Borrowdale2_thumb.jpg',130, 85,5,'photo_3640492.html');
												thumbnails[3640501] = new thumbnail(3640501,'215726','Skiddaw in snow.','SkiddawAllPeaks_thumb.jpg',130, 88,5,'photo_3640501.html');
												thumbnails[7364455] = new thumbnail(7364455,'160044','Winter sunset across Lake Windermere','WindemereSunset_thumb.jpg',130, 88,5,'photo_7364455.html');
												thumbnails[3607956] = new thumbnail(3607956,'160029','Eastnor Obelisk in the snow.','MonumentalSnow_edited-1_thumb.jpg',130, 85,5,'photo_3607956.html');
												thumbnails[3525612] = new thumbnail(3525612,'160029','A cold seat','AColdSeat_thumb.jpg',130, 85,5,'photo_3525612.html');
												thumbnails[3525625] = new thumbnail(3525625,'160029','A frosty start in Richmond Park','RichmondParkFrost_thumb.jpg',130, 89,5,'photo_3525625.html');
												thumbnails[3525627] = new thumbnail(3525627,'160029','A still winter\'s morning.','WintryStillness_thumb.jpg',130, 90,5,'photo_3525627.html');
												thumbnails[3525771] = new thumbnail(3525771,'160031','Three of Richmond Park\'s Deer','OnTheAlert_thumb.jpg',130, 79,5,'photo_3525771.html');
												thumbnails[3459915] = new thumbnail(3459915,'160475','Snow close to the summit of Leith Hill','LeithHillSnow_thumb.jpg',130, 88,5,'photo_3459915.html');
												thumbnails[3487136] = new thumbnail(3487136,'160044','Sunset close to Leith Hill','LeithHillSunset_thumb.jpg',130, 201,5,'photo_3487136.html');
												thumbnails[3636874] = new thumbnail(3636874,'369650','A fine day in the Beacons.','BreconSunshine_thumb.jpg',130, 83,5,'photo_3636874.html');
												thumbnails[3636878] = new thumbnail(3636878,'369650','Southern flank of the Cribyn.','CribbynSouthernSide_thumb.jpg',130, 88,5,'photo_3636878.html');
												thumbnails[3636892] = new thumbnail(3636892,'369650','Evening light across Pen Y Fan/Corn Du.','EveningWithPenYFan_thumb.jpg',130, 84,5,'photo_3636892.html');
												thumbnails[3636918] = new thumbnail(3636918,'369650','A fine morning across Neuadd Valley','NeuaddValleySunshine_thumb.jpg',130, 88,5,'photo_3636918.html');
												thumbnails[3636807] = new thumbnail(3636807,'160044','Wintry sunset from the Ragged Stone','RaggedStoneDusk_thumb.jpg',130, 87,5,'photo_3636807.html');
												thumbnails[3636817] = new thumbnail(3636817,'160044','Wintry sunset.','DendriticSunset2_thumb.jpg',130, 186,5,'photo_3636817.html');
												thumbnails[3459883] = new thumbnail(3459883,'160041','The ruined Abbey at the Palace of Hollyrood House.','Hollyrood1_thumb.jpg',130, 88,5,'photo_3459883.html');
												thumbnails[3459879] = new thumbnail(3459879,'160041','Edinburgh Castle','EdinburghCastleBW_thumb.jpg',130, 83,5,'photo_3459879.html');
												thumbnails[3459893] = new thumbnail(3459893,'160041','Christmas Markets in Edinburgh','EdinburghXmas2_thumb.jpg',130, 90,5,'photo_3459893.html');
												thumbnails[3459895] = new thumbnail(3459895,'160041','Ruined Abbey at the Palace of Hollyrood House.','Hollyrood2_thumb.jpg',130, 193,5,'photo_3459895.html');
												thumbnails[2631487] = new thumbnail(2631487,'160041','Edinburgh Castle by night','EdinburghCastle_thumb.jpg',130, 89,5,'photo_2631487.html');
												thumbnails[3525632] = new thumbnail(3525632,'369650','Corn Du with a snowy top.','CornDuSnow_thumb.jpg',130, 88,5,'photo_3525632.html');
												thumbnails[3525663] = new thumbnail(3525663,'369650','A wintry route up Corn Du.','WintryRoute_thumb.jpg',130, 88,5,'photo_3525663.html');
												thumbnails[3525670] = new thumbnail(3525670,'369650','View of the Cribyn from the summit of Pen Y Fan.','CribbynFromPenYFan1_thumb.jpg',130, 81,5,'photo_3525670.html');
												thumbnails[3525692] = new thumbnail(3525692,'369650','Icy path, heading up the slopes of Corn Du','Icy_Path_thumb.jpg',130, 187,5,'photo_3525692.html');
												thumbnails[3525763] = new thumbnail(3525763,'369650','The Neuadd Valley in snow.','NeuaddValleySnow_thumb.jpg',130, 85,5,'photo_3525763.html');
												thumbnails[3525785] = new thumbnail(3525785,'369650','Sharp edge of Pen Y Fan and the Cribyn','PenYFanEdgeSnow_thumb.jpg',130, 85,5,'photo_3525785.html');
												thumbnails[3525796] = new thumbnail(3525796,'369650','Pen Y Fan in snow (potrait)','PenYFanSnow1_thumb.jpg',130, 187,5,'photo_3525796.html');
												thumbnails[3525809] = new thumbnail(3525809,'369650','Pen Y Fan in snow (landscape)','PenYFanSnow2_thumb.jpg',130, 80,5,'photo_3525809.html');
												thumbnails[3525812] = new thumbnail(3525812,'369650','The Corn Du in snow.','SnowyBeacons_thumb.jpg',130, 85,5,'photo_3525812.html');
												thumbnails[3525815] = new thumbnail(3525815,'369650','Icy summit path of Corn Du.','Wintry_Summit1_thumb.jpg',130, 193,5,'photo_3525815.html');
												thumbnails[3487160] = new thumbnail(3487160,'160029','Autumn at Richmond Park','AutumnGlow_thumb.jpg',130, 88,5,'photo_3487160.html');
												thumbnails[2939438] = new thumbnail(2939438,'160029','Eastnor Park Obelisk and part of the Eastnor Estate.','MonumentalEvening_thumb.jpg',130, 88,5,'photo_2939438.html');
												thumbnails[2939471] = new thumbnail(2939471,'160475','Autumnal Rainbow from the Malverns','AutumnBow_thumb.jpg',130, 84,5,'photo_2939471.html');
												thumbnails[2939408] = new thumbnail(2939408,'160029','Tracks in the corn','CornTracks_thumb.jpg',130, 195,5,'photo_2939408.html');
												thumbnails[2624186] = new thumbnail(2624186,'160043','Bowing Gust Front approaches.','BowingGustFront1_thumb.jpg',130, 88,5,'photo_2624186.html');
												thumbnails[2624206] = new thumbnail(2624206,'160043','Thunderstorm approaches.','ThunderstormApproach_thumb.jpg',130, 88,5,'photo_2624206.html');
												thumbnails[3487107] = new thumbnail(3487107,'160043','Gust front near Reading','GustFront_thumb.jpg',130, 88,5,'photo_3487107.html');
												thumbnails[2624143] = new thumbnail(2624143,'160043','Sunlit Anvil Cloud','SunlitAnvilCloud_thumb.jpg',130, 88,5,'photo_2624143.html');
												thumbnails[2624167] = new thumbnail(2624167,'160044','Sultry evening.','Sunburst_thumb.jpg',130, 193,5,'photo_2624167.html');
												thumbnails[2631516] = new thumbnail(2631516,'160041','Cathedral Sagrada Familia','SagradaFamilia_thumb.jpg',130, 192,5,'photo_2631516.html');
												thumbnails[2631525] = new thumbnail(2631525,'160041','Stained Glass window inside the Santa Maria del Mar','StainedGlassBarca_thumb.jpg',130, 90,5,'photo_2631525.html');
												thumbnails[2544566] = new thumbnail(2544566,'160041','Meldon Viaduct.','MaldonViaduct_thumb.jpg',130, 86,5,'photo_2544566.html');
												thumbnails[2544564] = new thumbnail(2544564,'160029','Lulworth, Dorset','PathtoLulworth_thumb.jpg',130, 88,5,'photo_2544564.html');
												thumbnails[2544518] = new thumbnail(2544518,'160029','St Oswald\'s Bay, looking east.','Beach2_thumb.jpg',130, 87,5,'photo_2544518.html');
												thumbnails[2544525] = new thumbnail(2544525,'160029','Durdle Door','DurdleDoor1_thumb.jpg',130, 85,5,'photo_2544525.html');
												thumbnails[2544533] = new thumbnail(2544533,'160029','Moody Rocks, St Oswald\'s Bay','RocksWest_thumb.jpg',130, 193,5,'photo_2544533.html');
												thumbnails[2502162] = new thumbnail(2502162,'160029','Summer on the Chilterns','ChilternsSummer_thumb.jpg',130, 88,5,'photo_2502162.html');
												thumbnails[2502169] = new thumbnail(2502169,'160043','Thames thunderstorms.','Thamesshowers_thumb.jpg',130, 193,5,'photo_2502169.html');
												thumbnails[2503982] = new thumbnail(2503982,'160029','Lulworth Cove','Lulworth_thumb.jpg',130, 192,5,'photo_2503982.html');
												thumbnails[2502175] = new thumbnail(2502175,'160097','Red Rose','RedRose_thumb.jpg',130, 193,5,'photo_2502175.html');
												thumbnails[2502148] = new thumbnail(2502148,'215726','Crinkle Crags, Cumbria','CrinkleCrags_thumb.jpg',130, 83,5,'photo_2502148.html');
												thumbnails[2502137] = new thumbnail(2502137,'160031','A friendly Chaffinch','Chaffinch_thumb.jpg',130, 92,5,'photo_2502137.html');
												thumbnails[2504027] = new thumbnail(2504027,'160045','Late evening Supercell.','NighttimeSupercell_thumb.jpg',130, 88,5,'photo_2504027.html');
												thumbnails[2504002] = new thumbnail(2504002,'160045','Mesocyclone near Kearney, Nebraska.','Mesocyclone_thumb.jpg',130, 87,5,'photo_2504002.html');
												thumbnails[3607938] = new thumbnail(3607938,'160045','Supercell close to Kearney, Nebraska.','NebraskaSupercell2_thumb.jpg',130, 85,5,'photo_3607938.html');
												thumbnails[3611444] = new thumbnail(3611444,'160045','Chaser Circus and Wall Cloud.','TheChaserCircus_thumb.jpg',130, 92,5,'photo_3611444.html');
												thumbnails[2504007] = new thumbnail(2504007,'160045','Supercell sunset.','SupercellSunset1_thumb.jpg',130, 88,5,'photo_2504007.html');
												thumbnails[3588990] = new thumbnail(3588990,'160045','Supercell near Pratt, Kansas.','HPSupercell_thumb.jpg',130, 88,5,'photo_3588990.html');
												thumbnails[3607928] = new thumbnail(3607928,'160045','Supercell Sunset 2.','SupercellSunset2_thumb.jpg',130, 86,5,'photo_3607928.html');
												thumbnails[3611435] = new thumbnail(3611435,'160045','EF2 Tornado NW of Hoxie, Kansas','HoxieTornado_thumb.jpg',130, 73,5,'photo_3611435.html');
												thumbnails[3611440] = new thumbnail(3611440,'160045','The Hoxie Tornado slowly ropes out','HoxieTornado2_thumb.jpg',130, 83,5,'photo_3611440.html');
												thumbnails[2504036] = new thumbnail(2504036,'160041','Chevy Trailblazer','Trailblazer_thumb.jpg',130, 82,5,'photo_2504036.html');
												thumbnails[3607934] = new thumbnail(3607934,'160045','Calm before the storms!','CalmBeforeStorms1_thumb.jpg',130, 88,5,'photo_3607934.html');
												thumbnails[2502123] = new thumbnail(2502123,'160475','Aprils showers','AprilShowers_thumb.jpg',130, 87,5,'photo_2502123.html');
												thumbnails[3525963] = new thumbnail(3525963,'160475','April showers at end of road','AprilShowerAndRoad_thumb.jpg',130, 193,5,'photo_3525963.html');
												thumbnails[3525950] = new thumbnail(3525950,'160029','A fine, spring day on the Malvern Hills.','EarlySpringOnMalverns_thumb.jpg',130, 83,5,'photo_3525950.html');
												thumbnails[2502165] = new thumbnail(2502165,'160043','January cold front.','JanuaryColdfront_thumb.jpg',130, 88,5,'photo_2502165.html');
												thumbnails[2502173] = new thumbnail(2502173,'160475','Double rainbow','JanuaryRainbow_thumb.jpg',130, 189,5,'photo_2502173.html');
												thumbnails[3525958] = new thumbnail(3525958,'160029','Frost and fog across the Malvern Hills.','MalvernFrostandFog1_thumb.jpg',130, 88,5,'photo_3525958.html');
												thumbnails[2502125] = new thumbnail(2502125,'369650','Beacons reservoir.','BeconsReservoir_thumb.jpg',130, 180,5,'photo_2502125.html');
												thumbnails[2631509] = new thumbnail(2631509,'160041','Barcelona Cathedral','BarcelonaCathedral_thumb.jpg',130, 193,5,'photo_2631509.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[215726] = new gallery(215726,'7446556,6806259,6799417,5382525,5382472,5382456,5382449,5374698,5374696,5374684','Cumbria','gallery',[7446556,6806259,5374684,5374696,5374698,5382449,5382456,5382472,5382525,6799417,3487442,3487443,3487445,3487451,3487465,3487469,3487471,3487473,3487482,3640458,3640492,3640501,2502148],0, 0, '369649', 'gallery_215726.html',0,0);
				  					galleries[160475] = new gallery(160475,'6806254,6799412,5382495,3525963,3459915,2939471,2502173,2502123','General Weather Photographs','gallery',[5382495,6799412,6806254,3459915,2939471,2502123,3525963,2502173],0, 0, '156748', 'gallery_160475.html',0,0);
				  					galleries[160043] = new gallery(160043,'6806257,3487107,2624206,2624186,2624143,2502169,2502165','Storms','gallery',[6806257,2624186,2624206,3487107,2624143,2502169,2502165],0, 0, '156748', 'gallery_160043.html',0,0);
				  					galleries[160044] = new gallery(160044,'7446491,7364455,6828395,6806252,5374679,4126127,4126086,4126024,4125995,3636817','Sunrises/Sunsets','gallery',[7446491,6828395,5374679,6806252,4126127,4125995,4126024,4126086,7364455,3487136,3636807,3636817,2624167],0, 0, '156748', 'gallery_160044.html',0,0);
				  					galleries[160045] = new gallery(160045,'3611444,3611440,3611435,3607938,3607934,3607928,3588990,2504027,2504007,2504002','USA Storm Chasing 2008','gallery',[2504027,2504002,3607938,3611444,2504007,3588990,3607928,3611435,3611440,3607934],0, 0, '156748', 'gallery_160045.html',0,0);
				  					galleries[369650] = new gallery(369650,'5382519,5382506,5374671,3636918,3636892,3636878,3636874,3525815,3525812,3525809','Welsh Mountains','gallery',[5374671,5382506,5382519,3636874,3636878,3636892,3636918,3525632,3525663,3525670,3525692,3525763,3525785,3525796,3525809,3525812,3525815,2502125],0, 0, '369649', 'gallery_369650.html',0,0);
				  					galleries[160033] = new gallery(160033,'7408140,7408123,7408066,7407292,7407270,7364478,7364473,7364453,7364446,7360694','Latest Work','gallery',[7408123,7408140,7340981,7341048,7341182,7341271,7341274,7341259,7341262,7360586,7360361,7407292,7360485,7364478,7407270,7408066,7364473,6828403,7360541,7360694,6828414,6828425,6828431,7364446,7364453],0, 0, '', 'gallery_160033.html',0,0);
				  					galleries[156748] = new gallery(156748,'7446491,7364455,6828395,6806257,6806254,6806252,6799412,5382495,5374679,4126127','Weather','gallery',[],0, 0, '', 'gallery_156748.html',0,0);
				  					galleries[160029] = new gallery(160029,'7408038,7360224,5634043,5634040,5634038,5634035,5633979,5382511,5374660,5374657','Landscapes','gallery',[7408038,7360224,5374657,5382511,5374660,5374651,5634043,5633979,5634038,5634040,5634035,3607956,3525612,3525625,3525627,3487160,2939438,2939408,2544564,2544518,2544525,2544533,2502162,2503982,3525950,3525958],0, 0, '', 'gallery_160029.html',0,0);
				  					galleries[369649] = new gallery(369649,'7446556,6806259,6799417,5382525,5382519,5382506,5382472,5382456,5382449,5374698','Mountains','gallery',[],0, 0, '', 'gallery_369649.html',0,0);
				  					galleries[160031] = new gallery(160031,'3525771,2502137','Wildlife','gallery',[3525771,2502137],0, 0, '', 'gallery_160031.html',0,0);
				  					galleries[160041] = new gallery(160041,'6806255,6806253,6799418,6799415,6799411,5634095,3459895,3459893,3459883,3459879','Travel','gallery',[6799411,5634095,6806253,6799415,6806255,6799418,3459883,3459879,3459893,3459895,2631487,2631516,2631525,2544566,2504036,2631509],0, 0, '', 'gallery_160041.html',0,0);
				  					galleries[160097] = new gallery(160097,'6828381,6828352,6828343,6828329,6806258,5633966,2502175','Flowers/Plants','gallery',[6806258,6828329,6828352,6828381,6828343,5633966,2502175],0, 0, '', 'gallery_160097.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7446556,7446491,7408140,7408123,7408066,7408038,7407292,7407270,7364478,7364473,7364455,7364453,7364446,7360694,7360586,7360541,7360485,7360361,7360224,7341274,7341271,7341262,7341259,7341182,7341048,7340981,6828431,6828425,6828414,6828403,6828395,6828381,6828352,6828343,6828329,6806259,6806258,6806257,6806255,6806254,6806253,6806252,6799418,6799417,6799415,6799412,6799411,5634095,5634043,5634040';
imageSets[3] = '7446556,7446491,7408140,7408123,7408066,7408038,7407292,7407270,7364478,7364473,7364455,7364453,7364446,7360694,7360586,7360541,7360485,7360361,7360224,7341274,7341271,7341262,7341259,7341182,7341048,7340981,6828431,6828425,6828414,6828403,6828395,6828381,6828352,6828343,6828329,6806259,6806258,6806257,6806255,6806254,6806253,6806252,6799418,6799417,6799415,6799412,6799411,5634095,5634043,5634040';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/MattD/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/MattD/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/MattD/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/MattD/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/MattD/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/MattD/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('');
		if (!basic) {
	img.src = photos[imageID].src;
	img.width = photos[imageID].width;
	img.height = photos[imageID].height;
  img.parentNode.title = img.alt = photos[imageID].caption;
	}
	else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
				
	}
			}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}
/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
  var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
		if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
    
  updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
  var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',
                    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 (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    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));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Matt Dobson Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object' || array == undefined) {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			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').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
	temp = temp + this.fnGetPaymentInfo();
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp = temp + '<p>Buy now using PayPal:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
									temp = temp + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
	temp = temp + '	<input type="hidden" name="item_option" value="' + item_option + '">';
	temp = temp + '	<input type="hidden" name="site" value="MATTD">';
		temp = temp + '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp = temp + '	<input type="hidden" name="quantity" value="1">';
								temp = temp + '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
			temp = temp + '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
	temp = temp + '</form>';
		temp = temp + '<div class="clearing">&nbsp;</div>';
	temp = temp + '<div id="confirmContainer">';
	temp = temp + '<div id="paymentConfirm">Item added to cart</div>';
	temp = temp + '</div>';
			temp = 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({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* 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 + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

