window.thumbnails = new Object();
												thumbnails[7353448] = new thumbnail(7353448,'397960','Icefloes at Jokulsarlon No 1','Icebergs_at_Jokulsarlon_No_1_thumb.jpg',130, 87,15,'photo_7353448.html');
												thumbnails[3377646] = new thumbnail(3377646,'206160','Barn at Reed, Hertfordshire','BarnatReed_thumb.gif',130, 93,15,'photo_3377646.html');
												thumbnails[3377763] = new thumbnail(3377763,'206161','Morning Light, Buachaille Etive Mor','_BuachailleEtiveMor_thumb.gif',130, 84,15,'photo_3377763.html');
												thumbnails[3378670] = new thumbnail(3378670,'206376','Figure on Inch Beach','FigureonInchBeach_thumb.gif',130, 130,15,'photo_3378670.html');
												thumbnails[3383844] = new thumbnail(3383844,'206574','Beach at Luskentyre','Luskentyre_thumb.gif',130, 81,15,'photo_3383844.html');
												thumbnails[3385601] = new thumbnail(3385601,'206575','Rock Colours 1- Dunbar','RockColours2_thumb.gif',130, 90,15,'photo_3385601.html');
												thumbnails[4209145] = new thumbnail(4209145,'249924','Frosted fields at Tewin','Mfiap-1_thumb.gif',130, 92,15,'photo_4209145.html');
												thumbnails[3377738] = new thumbnail(3377738,'206573','Black House, South Uist','BlackHouseSouthUist_thumb.gif',130, 92,15,'photo_3377738.html');
												thumbnails[7353453] = new thumbnail(7353453,'397960','Icefloes at Jokulsarlon No 2','Icebergs_at_Jokulsarlon_No_2_thumb.jpg',130, 87,15,'photo_7353453.html');
												thumbnails[3377691] = new thumbnail(3377691,'206573','Croft at Kilmuir, Isle of Skye','CroftatKilmuir_thumb.gif',130, 76,15,'photo_3377691.html');
												thumbnails[3377767] = new thumbnail(3377767,'206161','Black Mount','BlackMount_thumb.gif',130, 90,15,'photo_3377767.html');
												thumbnails[3378672] = new thumbnail(3378672,'206376','Fishermen, Tra Chathail','FishermanTraChathail_thumb.gif',130, 130,15,'photo_3378672.html');
												thumbnails[3383838] = new thumbnail(3383838,'206574','Beach Patterns, Luskentyre','BeachPatternsLuskentyre_thumb.gif',130, 78,15,'photo_3383838.html');
												thumbnails[3385603] = new thumbnail(3385603,'206575','Rock Colours 2 - Dunbar','RockColours3_thumb.gif',130, 90,15,'photo_3385603.html');
												thumbnails[3684062] = new thumbnail(3684062,'225063','Nisabost, Isle of Harris','Nisa-rocks_2508_thumb.gif',130, 87,15,'photo_3684062.html');
												thumbnails[4204811] = new thumbnail(4204811,'206160','Croft at Sligachan','Croft-at-Sligachan2_thumb.gif',130, 91,15,'photo_4204811.html');
												thumbnails[4209147] = new thumbnail(4209147,'249924','Saplings at Whitwell','Mfiap-2_thumb.gif',130, 87,15,'photo_4209147.html');
												thumbnails[7353464] = new thumbnail(7353464,'397960','Snowfield, Iceland','Snowfield_Iceland_thumb.jpg',130, 87,15,'photo_7353464.html');
												thumbnails[3377655] = new thumbnail(3377655,'206160','Buttermere','Buttermere_thumb.gif',130, 92,15,'photo_3377655.html');
												thumbnails[3377772] = new thumbnail(3377772,'206161','Buachaille Etive Mor','BuachailleEtiveMor2_thumb.gif',130, 86,15,'photo_3377772.html');
												thumbnails[3378678] = new thumbnail(3378678,'206376','Surfers at Bamburgh','SurfersBamburgh_thumb.gif',130, 130,15,'photo_3378678.html');
												thumbnails[3383881] = new thumbnail(3383881,'206574','Windblown Sand, Rosamul Beach','WindblownSandRosamul_thumb.gif',130, 90,15,'photo_3383881.html');
												thumbnails[3385607] = new thumbnail(3385607,'206575','Rock Colours 4 - Dunbar','RockColours4_thumb.gif',130, 90,15,'photo_3385607.html');
												thumbnails[3684069] = new thumbnail(3684069,'225063','Nisabost, Isle of Harris','Rocks-2509_thumb.gif',130, 130,15,'photo_3684069.html');
												thumbnails[4209149] = new thumbnail(4209149,'249924','Saplings at Whitwell','Mfiap-3_thumb.gif',130, 87,15,'photo_4209149.html');
												thumbnails[7353468] = new thumbnail(7353468,'397960','Mountain in Snowfield','Mountain_in_Snowfield_thumb.jpg',130, 87,15,'photo_7353468.html');
												thumbnails[3377675] = new thumbnail(3377675,'206160','Fencepost','Fencepost_thumb.gif',130, 92,15,'photo_3377675.html');
												thumbnails[3377775] = new thumbnail(3377775,'206161','Dawn, Rannoch Moor','DawnRannochMoor_thumb.gif',130, 90,15,'photo_3377775.html');
												thumbnails[3378682] = new thumbnail(3378682,'206376','Surfers, Braunton Beach','SurfersBrauntonBeach_thumb.gif',130, 130,15,'photo_3378682.html');
												thumbnails[3383839] = new thumbnail(3383839,'206574','View from Horgabost','Horgabost_thumb.gif',130, 90,15,'photo_3383839.html');
												thumbnails[3684072] = new thumbnail(3684072,'225063','Balcony, Playa Blanca','Playa-Blanca-4005-v2_thumb.gif',130, 86,15,'photo_3684072.html');
												thumbnails[3684082] = new thumbnail(3684082,'225063','Street Detail, Playa Blanca.','Playa-Blanca_4504_thumb.gif',130, 170,15,'photo_3684082.html');
												thumbnails[4209152] = new thumbnail(4209152,'249924','Ashridge Forest','Mfiap-4_thumb.gif',130, 196,15,'photo_4209152.html');
												thumbnails[7353812] = new thumbnail(7353812,'397960','Black Lava Landscape','Black_Landscape_thumb.jpg',130, 87,15,'photo_7353812.html');
												thumbnails[7353479] = new thumbnail(7353479,'397960','Snow on Black Lava Landscape','Snow_on_Black_Lava_Landscape_No_1_thumb.jpg',130, 87,15,'photo_7353479.html');
												thumbnails[3377669] = new thumbnail(3377669,'206160','Road to the Cuillins,','RoadtoCuillins_thumb.gif',130, 93,15,'photo_3377669.html');
												thumbnails[3377779] = new thumbnail(3377779,'206161','Lochan n\'a Stainge','LochnnaStainge_thumb.gif',130, 90,15,'photo_3377779.html');
												thumbnails[3378686] = new thumbnail(3378686,'206376','Surfer, Woolacombe Beach','SurferWoolacombeBeach1_thumb.gif',130, 130,15,'photo_3378686.html');
												thumbnails[3383850] = new thumbnail(3383850,'206574','Luskentyre - Rocks and Sea','Luskentyre2_thumb.gif',130, 90,15,'photo_3383850.html');
												thumbnails[3385609] = new thumbnail(3385609,'206575','Rock Colours 4 - Northumberland','RockColours5_thumb.gif',130, 91,15,'photo_3385609.html');
												thumbnails[3385611] = new thumbnail(3385611,'206575','Rock Colours 5 - Northumberland','RockColours6_thumb.gif',130, 88,15,'photo_3385611.html');
												thumbnails[3684057] = new thumbnail(3684057,'225063','Groynes at Withernsea taken about midday in December using a 10 stop neutral density filter to capture movement and smooth out the white tonality of the waves','Withernsea_3689_thumb.gif',130, 195,15,'photo_3684057.html');
												thumbnails[4209157] = new thumbnail(4209157,'249924','Saplings and Beech','Mfiap-5_thumb.gif',130, 87,15,'photo_4209157.html');
												thumbnails[7353535] = new thumbnail(7353535,'397960','Snow on Black Lava Landscape No 2','Snow_on_Black_Lava_Landscape_No_2_thumb.jpg',130, 87,15,'photo_7353535.html');
												thumbnails[3377671] = new thumbnail(3377671,'206160','Broken Barrier','BrokenBarrier_thumb.gif',130, 91,15,'photo_3377671.html');
												thumbnails[3377782] = new thumbnail(3377782,'206161','Rannoch Moor','RannochMoor_thumb.gif',130, 87,15,'photo_3377782.html');
												thumbnails[3378690] = new thumbnail(3378690,'206376','Luskentyre Colours No !','LuskentyreColours11_thumb.gif',130, 130,15,'photo_3378690.html');
												thumbnails[3383858] = new thumbnail(3383858,'206574','Luskentyre - a stormy day ','Luskentyre3_thumb.gif',130, 90,15,'photo_3383858.html');
												thumbnails[3383866] = new thumbnail(3383866,'206574','Rosamul Beach','Rosamul_thumb.gif',130, 87,15,'photo_3383866.html');
												thumbnails[4209160] = new thumbnail(4209160,'249924','Saplings and Beech','Mfiap-6_thumb.gif',130, 216,15,'photo_4209160.html');
												thumbnails[7353822] = new thumbnail(7353822,'397960','Hverir Landscape No 1','Hverir_Landscape_No_1_thumb.jpg',130, 87,15,'photo_7353822.html');
												thumbnails[3377678] = new thumbnail(3377678,'206160','The White Hut','TheWhiteHut_thumb.gif',130, 88,15,'photo_3377678.html');
												thumbnails[3377680] = new thumbnail(3377680,'206573','Gazebo at Ware','GazeboatWare_thumb.gif',130, 183,15,'photo_3377680.html');
												thumbnails[3377787] = new thumbnail(3377787,'206161','Tree and Mist, Rannoch Moor','TreeandMist_thumb.gif',130, 67,15,'photo_3377787.html');
												thumbnails[3378691] = new thumbnail(3378691,'206376','Luskentyre Colours No 2','LuskentyreColours2_thumb.gif',130, 130,15,'photo_3378691.html');
												thumbnails[3383873] = new thumbnail(3383873,'206574','Scarista Bay','ScarastaBay_thumb.gif',130, 60,15,'photo_3383873.html');
												thumbnails[3385615] = new thumbnail(3385615,'206575','Rock Colours - Widemouth','RockColours8_thumb.gif',130, 90,15,'photo_3385615.html');
												thumbnails[4209163] = new thumbnail(4209163,'249924','Beeches at Ilam','Mfiap-7_thumb.gif',130, 87,15,'photo_4209163.html');
												thumbnails[3377770] = new thumbnail(3377770,'206161','Black Rock Cottage','BlackRockCottage_thumb.gif',130, 90,15,'photo_3377770.html');
												thumbnails[7353846] = new thumbnail(7353846,'397960','Hverir Fumarole No 1','Hverir_Fumarole_No_1_thumb.jpg',130, 87,15,'photo_7353846.html');
												thumbnails[3377668] = new thumbnail(3377668,'206160','Lochan n\'a Stainge','LochannaStainge_thumb.gif',130, 93,15,'photo_3377668.html');
												thumbnails[3377791] = new thumbnail(3377791,'206161','Tree on Rannoch Moor','TreeonRannochMoor_thumb.gif',130, 90,15,'photo_3377791.html');
												thumbnails[3377795] = new thumbnail(3377795,'206161','The Grazings, Glenelg','GrazingsGlenelg_thumb.gif',130, 90,15,'photo_3377795.html');
												thumbnails[3378693] = new thumbnail(3378693,'206376','Luskentyre Colours No 3','LuskentyreColours3_thumb.gif',130, 130,15,'photo_3378693.html');
												thumbnails[3378696] = new thumbnail(3378696,'206376','Luskentyre Colours No 4','LuskentyreColours4_thumb.gif',130, 130,15,'photo_3378696.html');
												thumbnails[3383828] = new thumbnail(3383828,'206574','High Tide at Seilebost','233-Luskentyre-1_thumb.gif',130, 90,15,'photo_3383828.html');
												thumbnails[3385621] = new thumbnail(3385621,'206575','Rock Colours - Cornwall','RockColours9_thumb.gif',130, 130,15,'photo_3385621.html');
												thumbnails[3684086] = new thumbnail(3684086,'225063','Rock Sculptures, Lanzarote','Lava-Rock-Sculptures-4392_thumb.gif',130, 87,15,'photo_3684086.html');
												thumbnails[4209167] = new thumbnail(4209167,'249924','Stonewall and Copse','Mfiap-8_thumb.gif',130, 87,15,'photo_4209167.html');
												thumbnails[3684095] = new thumbnail(3684095,'225063','Black Landscape, Iceland','Black-Landscape_0243-2_thumb.gif',130, 87,15,'photo_3684095.html');
												thumbnails[7353857] = new thumbnail(7353857,'397960','','Hverir_Fumarole_No_2_thumb.jpg',130, 85,15,'photo_7353857.html');
												thumbnails[3377688] = new thumbnail(3377688,'206160','Croft Interior, Isle of Harris','DesertedCroftHarris_thumb.gif',130, 92,15,'photo_3377688.html');
												thumbnails[3377798] = new thumbnail(3377798,'206161','Sunset at Glenelg','SunsetGlenelg_thumb.gif',130, 90,15,'photo_3377798.html');
												thumbnails[3385623] = new thumbnail(3385623,'206575','Rock Colours - Howick','RockColours7_thumb.gif',130, 182,15,'photo_3385623.html');
												thumbnails[4209173] = new thumbnail(4209173,'249924','Reflections','Mfiap-9_thumb.gif',130, 87,15,'photo_4209173.html');
												thumbnails[7353868] = new thumbnail(7353868,'397960','Industrial Landscape, Mount Krafla','Industrial_Landscape_near_Mount_Krafla_thumb.jpg',130, 87,15,'photo_7353868.html');
												thumbnails[3377729] = new thumbnail(3377729,'206160','Hedge and Fence, Edale','HedgeandFenceEdale_thumb.gif',130, 65,15,'photo_3377729.html');
												thumbnails[3378707] = new thumbnail(3378707,'206376','Scarasta Beach','ScarastaBeach_thumb.gif',130, 130,15,'photo_3378707.html');
												thumbnails[4205220] = new thumbnail(4205220,'206574','Northton Bay','264-Harris-9-cropped_thumb.gif',130, 70,15,'photo_4205220.html');
												thumbnails[4209174] = new thumbnail(4209174,'249924','Tree at Newsells','Mfiap-10_thumb.gif',130, 198,15,'photo_4209174.html');
												thumbnails[7353883] = new thumbnail(7353883,'397960','Thermal Landscape','Thermal_Landscape_thumb.jpg',130, 87,15,'photo_7353883.html');
												thumbnails[3377697] = new thumbnail(3377697,'206573','Cottage, Isle of Eigg','CottageIsleofEigg_thumb.gif',130, 94,15,'photo_3377697.html');
												thumbnails[3377708] = new thumbnail(3377708,'206160','Sand Patterns, Laig Bay','LaigBay_thumb.gif',130, 52,15,'photo_3377708.html');
												thumbnails[4205232] = new thumbnail(4205232,'206574','Watercolours at Luskentyre','Luskentyre-3104_thumb.gif',130, 87,15,'photo_4205232.html');
												thumbnails[4209176] = new thumbnail(4209176,'249924','Split Tree, Hatfield Forest','Mfiap-11_thumb.gif',130, 87,15,'photo_4209176.html');
												thumbnails[7353909] = new thumbnail(7353909,'397960','Lower Geyser Basin, Yellowstone, USA','Lower_Geyser_Basin_Yellowstone_thumb.gif',130, 87,15,'photo_7353909.html');
												thumbnails[4205152] = new thumbnail(4205152,'206160','Winter in Edale','Sheep--Trees-Edale_thumb.gif',130, 77,15,'photo_4205152.html');
												thumbnails[4205228] = new thumbnail(4205228,'206574','Watercolours, Seilebost','luskentyre_0910_thumb.gif',130, 90,15,'photo_4205228.html');
												thumbnails[4209177] = new thumbnail(4209177,'249924','Beech, Epping Forest','Mfiap-12_thumb.gif',130, 87,15,'photo_4209177.html');
												thumbnails[7353959] = new thumbnail(7353959,'397960','','Lower_Geyser_Basin_Yellowstone_No2_thumb.gif',130, 87,15,'photo_7353959.html');
												thumbnails[3377714] = new thumbnail(3377714,'206573','Pathways','Pathways_thumb.gif',130, 80,15,'photo_3377714.html');
												thumbnails[4205160] = new thumbnail(4205160,'206160','Dunstanburgh Castle','Dunstanburgh_7865-3-fp_thumb.gif',130, 130,15,'photo_4205160.html');
												thumbnails[4205240] = new thumbnail(4205240,'206574','Wave Patterns at Rosamul','Rosamul-Waves_2741_thumb.gif',130, 130,15,'photo_4205240.html');
												thumbnails[4209178] = new thumbnail(4209178,'249924','Deformed Birch, Epping Forest','Mfiap-13_thumb.gif',130, 87,15,'photo_4209178.html');
												thumbnails[7353966] = new thumbnail(7353966,'397960','Lodge Pole Pines','Lodge_Pole_Pines_thumb.jpg',130, 87,15,'photo_7353966.html');
												thumbnails[4211552] = new thumbnail(4211552,'206573','Barn and Barleyfield','Barn--Barleyfield_thumb.gif',130, 93,15,'photo_4211552.html');
												thumbnails[4211556] = new thumbnail(4211556,'206573','Harvest time, Therfield','Harvest-Therfield_thumb.gif',130, 92,15,'photo_4211556.html');
												thumbnails[4211563] = new thumbnail(4211563,'206573','Pathways','Pathways_1_thumb.gif',130, 80,15,'photo_4211563.html');
												thumbnails[7354001] = new thumbnail(7354001,'397960','Thermal Runoff, Yellowstone','Thermal_Runoff_thumb.jpg',130, 87,15,'photo_7354001.html');
												thumbnails[4204798] = new thumbnail(4204798,'206160','Welcombe Mouth','Welcombe-Mouth_7013_thumb.gif',130, 130,15,'photo_4204798.html');
												thumbnails[4205224] = new thumbnail(4205224,'206574','Blowing Sand at Seilebost','Blowing-Sand-Seilebost_2255-cropped_thumb.gif',130, 87,15,'photo_4205224.html');
												thumbnails[4209179] = new thumbnail(4209179,'249924','Willow at Grantchester','Mfiap-14_thumb.gif',130, 87,15,'photo_4209179.html');
												thumbnails[7354008] = new thumbnail(7354008,'397960','Thermal Run Off, Grand Prismatic Spring','Thermal_run_off_Grand_Prismatic_Spring_Yellowstone_thumb.jpg',130, 87,15,'photo_7354008.html');
												thumbnails[4205162] = new thumbnail(4205162,'206160','Newton Bay','Newton-Bay_1197-sq_1_thumb.gif',130, 130,15,'photo_4205162.html');
												thumbnails[4205225] = new thumbnail(4205225,'206574','Dunes at Rosamul Bay','Dunes-at-Rosamul_2760_thumb.gif',130, 130,15,'photo_4205225.html');
												thumbnails[4209180] = new thumbnail(4209180,'249924','Willows by the River Cam','Mfiap-15_thumb.gif',130, 87,15,'photo_4209180.html');
												thumbnails[4211553] = new thumbnail(4211553,'206573','Ferns and Rock','Ferns--Rock_thumb.gif',130, 92,15,'photo_4211553.html');
												thumbnails[7357761] = new thumbnail(7357761,'397960','Grand Prismatic Spring No 1','Prismatic_Spring_No_1_thumb.jpg',130, 87,15,'photo_7357761.html');
												thumbnails[4205148] = new thumbnail(4205148,'206160','Waterfall at Ingleton','waterfall-9264_thumb.gif',130, 188,15,'photo_4205148.html');
												thumbnails[4209181] = new thumbnail(4209181,'249924','Willow and Fence','Mfiap-16_thumb.gif',130, 87,15,'photo_4209181.html');
												thumbnails[4211560] = new thumbnail(4211560,'206573','Lone Tree, Alport','Lone-Tree-Alport_thumb.gif',130, 99,15,'photo_4211560.html');
												thumbnails[7357773] = new thumbnail(7357773,'397960','Grand Prismatic Spring No 2','Prismatic_Spring_No_2_thumb.jpg',130, 87,15,'photo_7357773.html');
												thumbnails[3377722] = new thumbnail(3377722,'206160','Snowlines','Snowlines_thumb.gif',130, 93,15,'photo_3377722.html');
												thumbnails[4205244] = new thumbnail(4205244,'206574','Storm at Rosamul','Rosamul_2765_thumb.gif',130, 50,15,'photo_4205244.html');
												thumbnails[4209182] = new thumbnail(4209182,'249924','Reeds and Tree, Snape','Mfiap-17_thumb.gif',130, 87,15,'photo_4209182.html');
												thumbnails[7357784] = new thumbnail(7357784,'397960','Travertine Terrace','Travertine_Terrace_Mammoth_Spring_thumb.jpg',130, 87,15,'photo_7357784.html');
												thumbnails[4204818] = new thumbnail(4204818,'206160','West Burton Falls','WestBurtonFalls1_thumb.gif',130, 222,15,'photo_4204818.html');
												thumbnails[4209185] = new thumbnail(4209185,'249924','Decayed Trees  ','Mfiap-18_thumb.gif',130, 87,15,'photo_4209185.html');
												thumbnails[7357800] = new thumbnail(7357800,'397960','Orange Spring Mound No 1','Orange_Spring_Mound_Yellowstone_No2_thumb.gif',130, 87,15,'photo_7357800.html');
												thumbnails[4209214] = new thumbnail(4209214,'249924','Reeds and tree stump ','Mfiap-19_thumb.gif',130, 87,15,'photo_4209214.html');
												thumbnails[7357807] = new thumbnail(7357807,'397960','Orange Spring Mound No 2','Orange_Spring_Mound_Yellowstone_No_1_thumb.gif',130, 87,15,'photo_7357807.html');
												thumbnails[4209215] = new thumbnail(4209215,'249924','Reeds and mudflats','Mfiap-20_thumb.gif',130, 87,15,'photo_4209215.html');
												thumbnails[7357863] = new thumbnail(7357863,'397960','Textures, Mesquite Dunes No 1','Textures_Mesquite_Dunes_No_1_thumb.jpg',130, 87,15,'photo_7357863.html');
												thumbnails[7357870] = new thumbnail(7357870,'397960','Textures, Mesquite Dunes N0 2','Textures_Mesquite_Dunes_No_2_thumb.jpg',130, 87,15,'photo_7357870.html');
												thumbnails[7357876] = new thumbnail(7357876,'397960','Textures, Mesquite Dunes No 3','Textures_Mesquite_Dunes_No_3_thumb.jpg',130, 87,15,'photo_7357876.html');
												thumbnails[7357815] = new thumbnail(7357815,'397960','Dune Shapes No 1','Dune_Shapes_No_1_thumb.jpg',130, 87,15,'photo_7357815.html');
												thumbnails[7357820] = new thumbnail(7357820,'397960','Dune Shapes No 2','Dune_Shapes_No2_thumb.jpg',130, 87,15,'photo_7357820.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[206575] = new gallery(206575,'3385623,3385621,3385615,3385611,3385609,3385607,3385603,3385601','The Intimate Landscape - Rock Colours','gallery',[3385601,3385603,3385607,3385609,3385611,3385615,3385621,3385623],0, 0, '', 'gallery_206575.html',0,0);
				  					galleries[206160] = new gallery(206160,'4205162,4205160,4205152,4205148,4204818,4204811,4204798,3377729,3377722,3377708',' Classic Monochrome','gallery',[3377646,4204811,3377655,3377675,3377669,3377671,3377678,3377668,3377688,3377729,3377708,4205152,4205160,4204798,4205162,4205148,3377722,4204818],0, 0, '', 'gallery_206160.html',0,0);
				  					galleries[206573] = new gallery(206573,'4211563,4211560,4211556,4211553,4211552,3377738,3377714,3377697,3377691,3377680','Infrared photography','gallery',[3377738,3377691,3377680,3377697,3377714,4211552,4211556,4211563,4211553,4211560],0, 0, '', 'gallery_206573.html',0,0);
				  					galleries[206161] = new gallery(206161,'3377798,3377795,3377791,3377787,3377782,3377779,3377775,3377772,3377770,3377767','Mountains and Moorlands','gallery',[3377763,3377767,3377772,3377775,3377779,3377782,3377787,3377770,3377791,3377795,3377798],0, 0, '', 'gallery_206161.html',0,0);
				  					galleries[206376] = new gallery(206376,'3378707,3378696,3378693,3378691,3378690,3378686,3378682,3378678,3378672,3378670','Beaches - Impressions','gallery',[3378670,3378672,3378678,3378682,3378686,3378690,3378691,3378693,3378696,3378707],0, 0, '', 'gallery_206376.html',0,0);
				  					galleries[206574] = new gallery(206574,'4205244,4205240,4205232,4205228,4205225,4205224,4205220,3383881,3383873,3383866','Isle of Harris','gallery',[3383844,3383838,3383881,3383839,3383850,3383858,3383866,3383873,3383828,4205220,4205232,4205228,4205240,4205224,4205225,4205244],0, 0, '', 'gallery_206574.html',0,0);
				  					galleries[249924] = new gallery(249924,'4209215,4209214,4209185,4209182,4209181,4209180,4209179,4209178,4209177,4209176','Theme on Trees','gallery',[4209145,4209147,4209149,4209152,4209157,4209160,4209163,4209167,4209173,4209174,4209176,4209177,4209178,4209179,4209180,4209181,4209182,4209185,4209214,4209215],0, 0, '', 'gallery_249924.html',0,0);
				  					galleries[225063] = new gallery(225063,'3684095,3684086,3684082,3684072,3684069,3684062,3684057','Recent Images','gallery',[3684062,3684069,3684072,3684082,3684057,3684086,3684095],0, 0, '', 'gallery_225063.html',0,0);
				  					galleries[397960] = new gallery(397960,'7357876,7357870,7357863,7357820,7357815,7357807,7357800,7357784,7357773,7357761','Extreme Landscapes','gallery',[7353448,7353453,7353464,7353468,7353812,7353479,7353535,7353822,7353846,7353857,7353868,7353883,7353909,7353959,7353966,7354001,7354008,7357761,7357773,7357784,7357800,7357807,7357863,7357870,7357876,7357815,7357820],0, 0, '', 'gallery_397960.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7357876,7357870,7357863,7357820,7357815,7357807,7357800,7357784,7357773,7357761,7354008,7354001,7353966,7353959,7353909,7353883,7353868,7353857,7353846,7353822,7353812,7353535,7353479,7353468,7353464,7353453,7353448,4211563,4211560,4211556,4211553,4211552,4209215,4209214,4209185,4209182,4209181,4209180,4209179,4209178,4209177,4209176,4209174,4209173,4209167,4209163,4209160,4209157,4209152,4209149';
imageSets[3] = '7357876,7357870,7357863,7357820,7357815,7357807,7357800,7357784,7357773,7357761,7354008,7354001,7353966,7353959,7353909,7353883,7353868,7353857,7353846,7353822,7353812,7353535,7353479,7353468,7353464,7353453,7353448,4211563,4211560,4211556,4211553,4211552,4209215,4209214,4209185,4209182,4209181,4209180,4209179,4209178,4209177,4209176,4209174,4209173,4209167,4209163,4209160,4209157,4209152,4209149';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/hughmilsom/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/hughmilsom/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 = 'hughmilsom.co.uk: ' + 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>';
	}
					
				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>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (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="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		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 + '<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;
	}
}

			

