window.thumbnails = new Object();
												thumbnails[1877839] = new thumbnail(1877839,'47626','Empty seat.','E3240740_thumb.jpg',130, 92,18,'photo_1877839.html');
												thumbnails[1878054] = new thumbnail(1878054,'47627','Leafy Path','XX120006_thumb.jpg',130, 173,18,'photo_1878054.html');
												thumbnails[799063] = new thumbnail(799063,'401197','Valley\'s End, Lauterbrunnen Valley, Switzerland','070126-27 SWITZ RAW 3051515120070126_thumb.jpg',130, 98,18,'photo_799063.html');
												thumbnails[799072] = new thumbnail(799072,'401197','Jungfrau North face and West Flank','070126 SWITZ RAW 1015151520070126 copy copy copy_thumb.jpg',130, 98,18,'photo_799072.html');
												thumbnails[1274906] = new thumbnail(1274906,'47627','Leaf','8_thumb.jpg',130, 173,18,'photo_1274906.html');
												thumbnails[1274909] = new thumbnail(1274909,'47627','Leaves','6_thumb.jpg',130, 98,18,'photo_1274909.html');
												thumbnails[629505] = new thumbnail(629505,'47626','EXTREME LOW TIDE','060910 SOUTHERNDOWN0151_thumb.jpg',130, 174,18,'photo_629505.html');
												thumbnails[7396965] = new thumbnail(7396965,'47626','Three Cliffs Bay, Gower','E3107438_FL_copy_thumb.jpg',160, 160,18,'photo_7396965.html');
												thumbnails[7396973] = new thumbnail(7396973,'47627','Caldey Abbey','Caldey_Abbey_Inset_thumb.jpg',160, 96,18,'photo_7396973.html');
												thumbnails[7396975] = new thumbnail(7396975,'47627','Fontaine de Vaucluse','00012609_Vaucluse_thumb.jpg',160, 160,18,'photo_7396975.html');
												thumbnails[7396977] = new thumbnail(7396977,'47627','Dan-yr-Ogof','Dan-Yr-Ogof_thumb.jpg',160, 160,18,'photo_7396977.html');
												thumbnails[7396979] = new thumbnail(7396979,'47626','Caldey Island Beach','Caldey_Island__Inset_thumb.jpg',160, 96,18,'photo_7396979.html');
												thumbnails[7396981] = new thumbnail(7396981,'47626','Caldey Island','Caldey_Island_thumb.jpg',160, 160,18,'photo_7396981.html');
												thumbnails[7396983] = new thumbnail(7396983,'47627','Caldey Abbey, Caldey Island','Caldey_Abbey_thumb.jpg',160, 160,18,'photo_7396983.html');
												thumbnails[7400026] = new thumbnail(7400026,'47627','Fall','E3072539_copy1_thumb.jpg',160, 110,18,'photo_7400026.html');
												thumbnails[7400028] = new thumbnail(7400028,'47626','Penarth Pier','E3051426_thumb.jpg',160, 90,18,'photo_7400028.html');
												thumbnails[7400029] = new thumbnail(7400029,'47627','Dyffryn House, Vale of Glamorgan','Dyffryn_Gardens_thumb.jpg',160, 160,18,'photo_7400029.html');
												thumbnails[7400031] = new thumbnail(7400031,'47627','Dyffryn Daffodils','E3175069-1_copy_thumb.jpg',160, 107,18,'photo_7400031.html');
												thumbnails[7400032] = new thumbnail(7400032,'47627','Abbey cloisters, Senanque','00012635_cpy_thumb.jpg',160, 102,18,'photo_7400032.html');
												thumbnails[7400049] = new thumbnail(7400049,'47627','Spring Fern','E3085733_copy_copy_thumb.jpg',160, 107,18,'photo_7400049.html');
												thumbnails[7400050] = new thumbnail(7400050,'47626','Goodnight','E3150179_thumb.jpg',160, 211,18,'photo_7400050.html');
												thumbnails[7400051] = new thumbnail(7400051,'401197','Steingletscher, Susten Pass, Switzerland','Steingletscher_4446_thumb.jpg',160, 100,18,'photo_7400051.html');
												thumbnails[7400052] = new thumbnail(7400052,'47626','Needle, Isle of Wight','E3021311_thumb.jpg',160, 120,18,'photo_7400052.html');
												thumbnails[7400053] = new thumbnail(7400053,'47626','The Needles, Isle of Wight','E3021301_thumb.jpg',160, 110,18,'photo_7400053.html');
												thumbnails[7400054] = new thumbnail(7400054,'47626','Caldey Island','E3040526_thumb.jpg',160, 116,18,'photo_7400054.html');
												thumbnails[7400055] = new thumbnail(7400055,'47626','Dunes, Caldey Island','E3040554_thumb.jpg',160, 109,18,'photo_7400055.html');
												thumbnails[7400057] = new thumbnail(7400057,'47626','Storm, Llantwit Major','E3111567HDR_2_copy_thumb.jpg',160, 107,18,'photo_7400057.html');
												thumbnails[7400059] = new thumbnail(7400059,'47626','Black Swan, Knap Lake, Barry','E3180430_thumb.jpg',160, 213,18,'photo_7400059.html');
												thumbnails[7400060] = new thumbnail(7400060,'47627','Autumn trees, Barry','E3127697_FL_copy_copy_thumb.jpg',160, 160,18,'photo_7400060.html');
												thumbnails[7400061] = new thumbnail(7400061,'47627','Perfect Twilight','E3160193_thumb.jpg',160, 213,18,'photo_7400061.html');
												thumbnails[7400062] = new thumbnail(7400062,'47627','Sparkle','E3200781_copy_thumb.jpg',160, 110,18,'photo_7400062.html');
												thumbnails[7400066] = new thumbnail(7400066,'47626','Three Cliffs Bay, Gower','E3107434_FL_copy_thumb.jpg',160, 96,18,'photo_7400066.html');
												thumbnails[7400067] = new thumbnail(7400067,'47626','Barry Island','E3239375_thumb.jpg',160, 110,18,'photo_7400067.html');
												thumbnails[7400068] = new thumbnail(7400068,'47626','Rhoose Point','E3239342_thumb.jpg',160, 120,18,'photo_7400068.html');
												thumbnails[7400070] = new thumbnail(7400070,'47627','Seven Lakes, Michaelston-le-Pit','E3260759_FL_copy_thumb.jpg',160, 160,18,'photo_7400070.html');
												thumbnails[7405886] = new thumbnail(7405886,'47627','Horses','E3130258_thumb.jpg',160, 213,18,'photo_7405886.html');
												thumbnails[7405888] = new thumbnail(7405888,'47627','Dunraven Estate Gatehouse','Dunraven_Estate_Gatehouse_Inset_thumb.jpg',160, 96,18,'photo_7405888.html');
												thumbnails[7405891] = new thumbnail(7405891,'47626','Caldey Island Landing Stage','E3040525_thumb.jpg',160, 105,18,'photo_7405891.html');
												thumbnails[7406827] = new thumbnail(7406827,'47626','Three Cliffs Bay','E3164765_FL_copy_20EA30CC-1E4F-37DC-71EEAAE7F7309BE1_thumb.jpg',160, 160,18,'photo_7406827.html');
												thumbnails[7406839] = new thumbnail(7406839,'47626','Southerndown Beach','Southerndown_Inset_thumb.jpg',160, 64,18,'photo_7406839.html');
												thumbnails[7406850] = new thumbnail(7406850,'47626','Nash Point, Glamorgan Heritage Coast','Nash_Point_thumb.jpg',160, 160,18,'photo_7406850.html');
												thumbnails[7406856] = new thumbnail(7406856,'47627','Pontsticill Reservoir, Merthyr','Pontsticill_Reservoir_Merthyr_Tydfil_thumb.jpg',160, 160,18,'photo_7406856.html');
												thumbnails[7406870] = new thumbnail(7406870,'47626','Nash Point, Glamorgan Heritage Coast','Nash_Point_inset_thumb.jpg',160, 96,18,'photo_7406870.html');
												thumbnails[7406990] = new thumbnail(7406990,'401197','Grimsel Pass and Finsteraarhorn, Switzerland','E3282505_thumb.jpg',160, 213,18,'photo_7406990.html');
												thumbnails[7451663] = new thumbnail(7451663,'47626','Kynance Cove, Cornwall','E3110970_thumb.jpg',160, 100,18,'photo_7451663.html');
												thumbnails[7451665] = new thumbnail(7451665,'47626','Kynance Cove, Cornwall','E3110982_thumb.jpg',160, 100,18,'photo_7451665.html');
												thumbnails[7451666] = new thumbnail(7451666,'47626','Kynance Cove, Cornwall','E3111001_thumb.jpg',160, 213,18,'photo_7451666.html');
												thumbnails[7451669] = new thumbnail(7451669,'47626','Kynance Cove, Cornwall','E3111005_copy_thumb.jpg',160, 90,18,'photo_7451669.html');
												thumbnails[7451670] = new thumbnail(7451670,'47626','Tenby South Beach and Caldey Island','E3040619_thumb.jpg',160, 108,18,'photo_7451670.html');
												thumbnails[7451672] = new thumbnail(7451672,'47626','Three Cliffs Bay, Gower','E3164694_FL_copy_5C10D612-1E4F-37DC-71EA27A8F9924989_thumb.jpg',160, 160,18,'photo_7451672.html');
												thumbnails[7451675] = new thumbnail(7451675,'47626','Storm, Southerndown','_7043098_copy_thumb.jpg',160, 107,18,'photo_7451675.html');
												thumbnails[7451677] = new thumbnail(7451677,'47626','Three Cliffs Bay, Gower','E3164685_FL_copy_thumb.jpg',160, 96,18,'photo_7451677.html');
												thumbnails[7451679] = new thumbnail(7451679,'47626','Three Cliffs Bay, Gower','E3164766_FL_copy_thumb.jpg',160, 96,18,'photo_7451679.html');
												thumbnails[7451681] = new thumbnail(7451681,'47626','PS Waverley model, Knap lake, Barry','E3180215_thumb.jpg',160, 104,18,'photo_7451681.html');
												thumbnails[7451682] = new thumbnail(7451682,'47626','Sunset, Barry Island','E3239367_thumb.jpg',160, 112,18,'photo_7451682.html');
												thumbnails[7451683] = new thumbnail(7451683,'47626','Sunset, Barry Island','E3239388_thumb.jpg',160, 110,18,'photo_7451683.html');
												thumbnails[7451684] = new thumbnail(7451684,'47627','Frozen Knap Lake, Barry','The_Knap_Boating_Lake_Barry_inset_thumb.jpg',160, 96,18,'photo_7451684.html');
												thumbnails[7451685] = new thumbnail(7451685,'401197','Head of the Rhone Valley, Switzerland','E3282560_thumb.jpg',160, 100,18,'photo_7451685.html');
												thumbnails[7451686] = new thumbnail(7451686,'401197','Mountain stream, Furka Pass, Switzerland','E3282478_thumb.jpg',160, 213,18,'photo_7451686.html');
												thumbnails[7451688] = new thumbnail(7451688,'47626','Heritage Coast, from Nash Point, Glamorgan','Heritage_Coast_thumb.jpg',160, 160,18,'photo_7451688.html');
												thumbnails[7451689] = new thumbnail(7451689,'47626','Wave-cut platform, Nash Point, Glamorgan Heritage Coast','Heritage_Coast_Inset_thumb.jpg',160, 96,18,'photo_7451689.html');
												thumbnails[7451690] = new thumbnail(7451690,'47627','Kenfig Pool and Port Talbot Steel works','Kenfig_Pool_inset_thumb.jpg',160, 99,18,'photo_7451690.html');
												thumbnails[7451693] = new thumbnail(7451693,'47627','Wood Anemone','E3190226_copy_thumb.jpg',160, 120,18,'photo_7451693.html');
												thumbnails[7451696] = new thumbnail(7451696,'47626','Caldey Island Beach','E3040552_thumb.jpg',160, 108,18,'photo_7451696.html');
												thumbnails[7451697] = new thumbnail(7451697,'47627','Caldey Abbey','E3040607_thumb.jpg',160, 107,18,'photo_7451697.html');
												thumbnails[7451700] = new thumbnail(7451700,'47626','Burgh Island, South Devon','E3010042_thumb.jpg',160, 212,18,'photo_7451700.html');
												thumbnails[7451702] = new thumbnail(7451702,'47627','Croquet Lawn, Dyffryn House, Vale of Glamorgan','E3200794_thumb.jpg',160, 113,18,'photo_7451702.html');
												thumbnails[7451703] = new thumbnail(7451703,'47627','Croquet Lawn, Dyffryn House, Vale of Glamorgan','E3200795_thumb.jpg',160, 103,18,'photo_7451703.html');
												thumbnails[7451704] = new thumbnail(7451704,'47627','Dyffryn House, Vale of Glamorgan','E3200796_thumb.jpg',160, 113,18,'photo_7451704.html');
												thumbnails[7451707] = new thumbnail(7451707,'47627','Dan-Yr-Ogof','Dan-Yr-Ogof_-_Fan_Gyhirych_Insert_thumb.jpg',160, 96,18,'photo_7451707.html');
												thumbnails[7451708] = new thumbnail(7451708,'47626','Caldey Island','E3040613_thumb.jpg',160, 108,18,'photo_7451708.html');
												thumbnails[7451758] = new thumbnail(7451758,'47627','St Illtyds Church, leaning tower and Old Priory, Caldey Island','E3040566_thumb.jpg',160, 120,18,'photo_7451758.html');
												thumbnails[7451759] = new thumbnail(7451759,'47627','Autumn colour, Romilly Park, Barry','E3127719_FL_copy_thumb.jpg',160, 96,18,'photo_7451759.html');
												thumbnails[7451761] = new thumbnail(7451761,'47627','Spring wood, Dinas Powis','E3271838_FL_copy_thumb.jpg',160, 160,18,'photo_7451761.html');
												thumbnails[7451762] = new thumbnail(7451762,'47627','Spring wood, Dinas Powis','E3271869_FL_copy_thumb.jpg',160, 96,18,'photo_7451762.html');
												thumbnails[7451765] = new thumbnail(7451765,'47627','River Cadoxton, Dinas Powis','E3272000_FL_copy_thumb.jpg',160, 160,18,'photo_7451765.html');
												thumbnails[7451767] = new thumbnail(7451767,'47627','Woodland Walk, Dinas Powis','E3085721_copy_copy_thumb.jpg',160, 240,18,'photo_7451767.html');
												thumbnails[7451770] = new thumbnail(7451770,'401197','Rhone Valley from top of Furka Pass, switzerland','E3282509_thumb.jpg',160, 90,18,'photo_7451770.html');
												thumbnails[7451772] = new thumbnail(7451772,'401197','Bernese Oberland from Furka Pass','E3282507_thumb.jpg',160, 90,18,'photo_7451772.html');
												thumbnails[7457787] = new thumbnail(7457787,'47627','Umbria, Italy','E3286225_FL_copy_thumb.jpg',160, 100,18,'photo_7457787.html');
												thumbnails[7457795] = new thumbnail(7457795,'47627','Umbria, Italy','E3286299_thumb.jpg',160, 100,18,'photo_7457795.html');
												thumbnails[7457796] = new thumbnail(7457796,'47627','Umbrian landscape, Italy','E3296445_FL_copy_thumb.jpg',160, 105,18,'photo_7457796.html');
												thumbnails[7457797] = new thumbnail(7457797,'47626','Catching the wind, Bigbury, Devon','E3309760_thumb.jpg',160, 106,18,'photo_7457797.html');
												thumbnails[7457811] = new thumbnail(7457811,'47626','Airborne - Bigbury, South Devon','E3309762_thumb.jpg',160, 107,18,'photo_7457811.html');
												thumbnails[7457815] = new thumbnail(7457815,'47626','Surfing, Bigbury, South Devon','E3309767_thumb.jpg',160, 213,18,'photo_7457815.html');
												thumbnails[7457819] = new thumbnail(7457819,'47626','Surfing, Bigbury, South Devon','E3309765_thumb.jpg',160, 213,18,'photo_7457819.html');
												thumbnails[7457821] = new thumbnail(7457821,'47626','Surfing, Bigbury, South Devon','E3309775_thumb.jpg',160, 213,18,'photo_7457821.html');
												thumbnails[7457824] = new thumbnail(7457824,'47626','Manorbier, Pembrokeshire','E3311000_FL_copy_thumb.jpg',160, 160,18,'photo_7457824.html');
												thumbnails[7457825] = new thumbnail(7457825,'47626','Manorbier, Pembrokeshire','E3311002_FL_copy_halo_thumb.jpg',160, 96,18,'photo_7457825.html');
												thumbnails[7457828] = new thumbnail(7457828,'47626','Manorbier, Pembrokeshire','E3311005_copy_copy_thumb.jpg',160, 160,18,'photo_7457828.html');
												thumbnails[7457829] = new thumbnail(7457829,'47626','Hope Cove, South Devon','E3319970_thumb.jpg',160, 114,18,'photo_7457829.html');
												thumbnails[7457830] = new thumbnail(7457830,'47626','Hope Cove, South Devon','E3319972_thumb.jpg',160, 94,18,'photo_7457830.html');
												thumbnails[7457831] = new thumbnail(7457831,'47626','Hope Cove, South Devon','E3319977_thumb.jpg',160, 121,18,'photo_7457831.html');
												thumbnails[7457832] = new thumbnail(7457832,'47626','Hope Cove, South Devon','E3319990_thumb.jpg',160, 121,18,'photo_7457832.html');
												thumbnails[7457837] = new thumbnail(7457837,'47627','Vineyard, Umbria, Italy','E3286302_copy_thumb.jpg',160, 100,18,'photo_7457837.html');
												thumbnails[7457838] = new thumbnail(7457838,'47627','Monte Cetona, Umbria, Italy','E3286308_fl_cpy_thumb.jpg',160, 90,18,'photo_7457838.html');
												thumbnails[7469906] = new thumbnail(7469906,'47626','Three Cliffs Bay, Gower','E3107434_copy_thumb.jpg',160, 100,18,'photo_7469906.html');
												thumbnails[7469908] = new thumbnail(7469908,'47626','Three Cliffs Bay, Gower','E3107441_thumb.jpg',160, 98,18,'photo_7469908.html');
												thumbnails[7469910] = new thumbnail(7469910,'47626','Heritage Coast, Nash Point, Glamorgan','E3117119_5_6_7_8_tonemapped_copy_thumb.jpg',160, 213,18,'photo_7469910.html');
												thumbnails[7469913] = new thumbnail(7469913,'47627','Ewenny Priory, Glamorgan','E3117015_1_2_3_4_tonemapped_QUICK_thumb.jpg',160, 121,18,'photo_7469913.html');
												thumbnails[7469915] = new thumbnail(7469915,'47627','Quiet Corner, St Donats Church, Glamorgan','E3117026_2_3_4_5_tonemapped_copy_thumb.jpg',160, 213,18,'photo_7469915.html');
												thumbnails[7483259] = new thumbnail(7483259,'47626','M.V. Balmoral, leaving Penarth Pier','E3030865_thumb.jpg',160, 111,18,'photo_7483259.html');
												thumbnails[7483261] = new thumbnail(7483261,'47626','Tenby Harbour','E3040511_thumb.jpg',160, 113,18,'photo_7483261.html');
												thumbnails[7483263] = new thumbnail(7483263,'47626','Tenby Harbour, high tide','E3040513_thumb.jpg',160, 103,18,'photo_7483263.html');
												thumbnails[7483264] = new thumbnail(7483264,'47626','M.V. Balmoral, arriving Penarth Pier','E3030856_thumb.jpg',160, 103,18,'photo_7483264.html');
												thumbnails[7483265] = new thumbnail(7483265,'47627','Porthkerry Viaduct','E3063078_thumb.jpg',160, 100,18,'photo_7483265.html');
												thumbnails[7483266] = new thumbnail(7483266,'47626','Tenby Harbour and St Mary\'s Church','E3040515_thumb.jpg',160, 104,18,'photo_7483266.html');
												thumbnails[7483268] = new thumbnail(7483268,'47627','Frosted leaves','E3063110_thumb.jpg',160, 100,18,'photo_7483268.html');
												thumbnails[7483269] = new thumbnail(7483269,'47627','Hoar frost on leaves','E3063113_thumb.jpg',160, 110,18,'photo_7483269.html');
												thumbnails[7483271] = new thumbnail(7483271,'47627','Winter leaf','E3063114_thumb.jpg',160, 160,18,'photo_7483271.html');
												thumbnails[7483272] = new thumbnail(7483272,'47626','Three Cliffs Bay, Gower','E3107436_thumb.jpg',160, 120,18,'photo_7483272.html');
												thumbnails[7483273] = new thumbnail(7483273,'47627','St Donats church, window detail','E3117032_27_28_29_30_31_tonemapped_thumb.jpg',160, 212,18,'photo_7483273.html');
												thumbnails[7483274] = new thumbnail(7483274,'47626','Heritage Coast, Nash Point, Glamorgan','E3117099_5_6_7_8_tonemapped-2_thumb.jpg',160, 83,18,'photo_7483274.html');
												thumbnails[7483275] = new thumbnail(7483275,'47626','Heritage Coast, Nash Point, Glamorgan','E3117135_1_2_3_4_tonemapped_LIGHT_blur_cpy_copy_thumb.jpg',160, 111,18,'photo_7483275.html');
												thumbnails[7483278] = new thumbnail(7483278,'47626','Llantwit Major beach and cliffs, Glamorgan heritage coast.','E3152663_dfx_cpy_thumb.jpg',160, 110,18,'photo_7483278.html');
												thumbnails[7483279] = new thumbnail(7483279,'47626','Llantwit Major beach and cliffs, Glamorgan heritage coast.','E3152687_2_4_-2_-4_tonemapped_thumb.jpg',160, 110,18,'photo_7483279.html');
												thumbnails[7483282] = new thumbnail(7483282,'47626','Evening sky, Bristol Channel','E3152747_thumb.jpg',160, 70,18,'photo_7483282.html');
												thumbnails[7483286] = new thumbnail(7483286,'47626','Sunset Sea, Southerndown','E3160616_thumb.jpg',160, 100,18,'photo_7483286.html');
												thumbnails[7483289] = new thumbnail(7483289,'47626','Twilight, Southerndown','E3160628_thumb.jpg',160, 100,18,'photo_7483289.html');
												thumbnails[7483292] = new thumbnail(7483292,'47627','Autumn, Porthkerry Park','E3162765_thumb.jpg',160, 110,18,'photo_7483292.html');
												thumbnails[7483295] = new thumbnail(7483295,'47627','Autumn, Porthkerry Park','E3162767_thumb.jpg',160, 213,18,'photo_7483295.html');
												thumbnails[7483297] = new thumbnail(7483297,'47627','Blot on the Landscape - wind farm above Ogmore Vale','E3172394_thumb.jpg',160, 90,18,'photo_7483297.html');
												thumbnails[7483299] = new thumbnail(7483299,'47627','St Donats Castle, Glamorgan - established 11th Century','E3181768_DFX_blur_copy_thumb.jpg',160, 106,18,'photo_7483299.html');
												thumbnails[7483300] = new thumbnail(7483300,'47626','Moonrise above Barry Island and Bristol Channel','E3212175_thumb.jpg',160, 102,18,'photo_7483300.html');
												thumbnails[7483301] = new thumbnail(7483301,'47626','Sunset storm clouds gathering over Bristol Channel','E3232182_thumb.jpg',160, 90,18,'photo_7483301.html');
												thumbnails[7483304] = new thumbnail(7483304,'47627','Schaffhausen, Switzerland - Rhine Falls','E3247767_thumb.jpg',160, 90,18,'photo_7483304.html');
												thumbnails[7483305] = new thumbnail(7483305,'47627','Schaffhausen, Switzerland - Rhine Falls','E3247769-2_thumb.jpg',160, 90,18,'photo_7483305.html');
												thumbnails[7483306] = new thumbnail(7483306,'47627','Schaffhausen, Switzerland - Rhine Falls','E3247769_thumb.jpg',160, 90,18,'photo_7483306.html');
												thumbnails[7483309] = new thumbnail(7483309,'47627','Autumn frost, Porthkerry Park','E3252853_4_5_6_7_tonemapped_thumb.jpg',160, 100,18,'photo_7483309.html');
												thumbnails[7483310] = new thumbnail(7483310,'401197','Bernese Oberland from Zurich, Switzerland','E3257913_thumb.jpg',160, 213,18,'photo_7483310.html');
												thumbnails[7483312] = new thumbnail(7483312,'47627','Weir, Michaelston-le-Pit, Glamorgan','E3260747_FL_copy_7E2FA54A-1E4F-37DC-71A45EB7B532B4CC_thumb.jpg',160, 96,18,'photo_7483312.html');
												thumbnails[7483313] = new thumbnail(7483313,'47627','Weir and wooden bridge, Thun, Switzerland','E3267939And3more_tonemapped_thumb.jpg',160, 100,18,'photo_7483313.html');
												thumbnails[7483315] = new thumbnail(7483315,'401197','Lake Brienz, Switzerland','E3282614_thumb.jpg',160, 110,18,'photo_7483315.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[47627] = new gallery(47627,'7483313,7483312,7483309,7483306,7483305,7483304,7483299,7483297,7483295,7483292','...TO THE LAND','gallery',[1878054,1274906,1274909,7396973,7396975,7396977,7396983,7400026,7400029,7400031,7400032,7400049,7400060,7400061,7400062,7400070,7405886,7405888,7406856,7451684,7451690,7451693,7451697,7451702,7451703,7451704,7451707,7451758,7451759,7451761,7451762,7451765,7451767,7457787,7457795,7457796,7457837,7457838,7469913,7469915,7483265,7483268,7483269,7483271,7483273,7483292,7483295,7483297,7483299,7483304,7483305,7483306,7483309,7483312,7483313],0, 0, '', 'gallery_47627.html',0,0);
				  					galleries[47626] = new gallery(47626,'7469910,7469908','...TO THE SEA','gallery',[1877839,629505,7396965,7396979,7396981,7400028,7400050,7400052,7400053,7400054,7400055,7400057,7400059,7400066,7400067,7400068,7405891,7406827,7406839,7406850,7406870,7451663,7451665,7451666,7451669,7451670,7451672,7451675,7451677,7451679,7451681,7451682,7451683,7451688,7451689,7451696,7451700,7451708,7457797,7457811,7457815,7457819,7457821,7457824,7457825,7457828,7457829,7457830,7457831,7457832,7469906,7469908,7469910,7483259,7483261,7483263,7483264,7483266,7483272,7483274,7483275,7483278,7483279,7483282,7483286,7483289,7483300,7483301],0, 0, '', 'gallery_47626.html',0,0);
				  					galleries[401197] = new gallery(401197,'7483315,7483310,7451772,7451770,7451686,7451685,7406990,7400051,799072,799063','...TO THE MOUNTAINS','gallery',[799063,799072,7400051,7406990,7451685,7451686,7451770,7451772,7483310,7483315],0, 0, '', 'gallery_401197.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7469910,7469908,799063';
imageSets[2] = '7469910,7469908';
imageSets[3] = '1878054,1877839,1274909,1274906,799072,799063';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/PhilDee/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/PhilDee/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 = 'FotoSensitive...: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {photoinfominwidth:200};	    		options.photoinfoadjacent = true;			      	      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 = 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> &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="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 + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="item_name" value="'+item_name+'">';
								ref = '';
				if(this.photo_ref != ''){
					ref = this.photo_ref+' - '+this.caption;
				}
				else{
					ref = this.id+' - '+this.caption;
				}
				price = amount;					temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="phildee@viennatec.com">';
	temp = temp + '<input type="hidden" name="currency_code" value="GBP">';
	temp = temp + '<input type="hidden" name="add" value="1">';
					temp = temp + '<input type="hidden" name="amount" value="'+amount+'">';
	temp = temp + '<input type="hidden" name="item_number" value="'+ref+'">';
					temp = temp + '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
									temp = temp + '</form>';
								temp = temp + '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="phildee@viennatec.com">';
	temp = temp + '<input type="hidden" name="display" value="1">';
	temp = temp + '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
	temp = temp + '</form>';
							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;
	}
}

			

