window.thumbnails = new Object();
												thumbnails[3395296] = new thumbnail(3395296,'','Walking the Streets','George_thumb.jpg',130, 91,32,'															#');
												thumbnails[2726851] = new thumbnail(2726851,'171083','The Wedding Flowers','flowers_thumb.jpg',130, 87,32,'																			photo_2726851.html');
												thumbnails[2726866] = new thumbnail(2726866,'171083','Blackwater Barges','Barges 1_thumb.jpg',130, 62,32,'																			photo_2726866.html');
												thumbnails[2726901] = new thumbnail(2726901,'178883','Off Mersea Island','Pioneer dredging_thumb.jpg',130, 90,32,'																			photo_2726901.html');
												thumbnails[2726911] = new thumbnail(2726911,'302733','Just Married','Just Married_thumb.jpg',130, 87,32,'																			photo_2726911.html');
												thumbnails[2729417] = new thumbnail(2729417,'302733','The Bridesmaid','The Bridesmaid_thumb.jpg',130, 85,32,'																			photo_2729417.html');
												thumbnails[2729421] = new thumbnail(2729421,'302733','Victoria','Victoria_thumb.jpg',130, 80,32,'																			photo_2729421.html');
												thumbnails[2729429] = new thumbnail(2729429,'302733','Wedding Haze','Vicky\'s Wedding Day_thumb.jpg',130, 88,32,'																			photo_2729429.html');
												thumbnails[2729447] = new thumbnail(2729447,'171082','Whisky in the Jar','Dreamy 2_thumb.jpg',130, 85,32,'																			photo_2729447.html');
												thumbnails[2729452] = new thumbnail(2729452,'350891','Watching','watching_thumb.jpg',130, 87,32,'																			photo_2729452.html');
												thumbnails[2729467] = new thumbnail(2729467,'171082','Mick Murphy','Mick at Home_thumb.jpg',130, 87,32,'																			photo_2729467.html');
												thumbnails[2729550] = new thumbnail(2729550,'171082','The Presence of Beauty','M 4_ The Presence of Beauty_thumb.jpg',130, 87,32,'																			photo_2729550.html');
												thumbnails[2745109] = new thumbnail(2745109,'178883','Pinky','Pinky_thumb.jpg',130, 87,32,'																			photo_2745109.html');
												thumbnails[2745119] = new thumbnail(2745119,'178883','The Baker Brothers','The Baker Boys Eyes_thumb.jpg',130, 87,32,'																			photo_2745119.html');
												thumbnails[2745133] = new thumbnail(2745133,'171083','Rock Tree','tree in rock_thumb.jpg',130, 87,32,'																			photo_2745133.html');
												thumbnails[2745230] = new thumbnail(2745230,'171083','Oyster\'s on Chiffon','Two Oysters on Chiffon copy_thumb.jpg',130, 90,32,'																			photo_2745230.html');
												thumbnails[2745548] = new thumbnail(2745548,'171082','Ifor Williams','G4_Ifor_thumb.jpg',130, 84,32,'																			photo_2745548.html');
												thumbnails[2745619] = new thumbnail(2745619,'171082','Paul Davis','brighter_thumb.jpg',130, 95,32,'																			photo_2745619.html');
												thumbnails[2745634] = new thumbnail(2745634,'171083','Desperado','Hamish_thumb.jpg',130, 90,32,'																			photo_2745634.html');
												thumbnails[2750373] = new thumbnail(2750373,'178883','The Mermaid','The Mermaid_thumb.jpg',130, 87,32,'																			photo_2750373.html');
												thumbnails[2750374] = new thumbnail(2750374,'171083','Harbour Seals Iceland','Natural History - Harbour Seals, Iceland_thumb..jpg',130, 85,32,'																			photo_2750374.html');
												thumbnails[2750375] = new thumbnail(2750375,'171083','Mersea Morning','Mersea Morning2_thumb.jpg',130, 185,32,'																			photo_2750375.html');
												thumbnails[2750381] = new thumbnail(2750381,'171083','Coopers Cottage','Coopers Cottage - Mersea Island_thumb.jpg',130, 92,32,'																			photo_2750381.html');
												thumbnails[2750455] = new thumbnail(2750455,'171082','At Home Hoi-An','At Home - Hoi An_thumb.jpg',130, 86,32,'																			photo_2750455.html');
												thumbnails[2763295] = new thumbnail(2763295,'171083','Flowers of Silk','Angel edges_thumb. 2.jpg',130, 90,32,'																			photo_2763295.html');
												thumbnails[2882014] = new thumbnail(2882014,'178883','CK 21 Maria off West Mersea','Maria CK21_thumb.jpg',130, 88,32,'																			photo_2882014.html');
												thumbnails[2882038] = new thumbnail(2882038,'178883','Bodicea CK 213','Bodicea CK 213_thumb.jpg',130, 83,32,'																			photo_2882038.html');
												thumbnails[2882039] = new thumbnail(2882039,'178883','Richard Howard','Richard Howard - Oyster Man_thumb.jpg',130, 86,32,'																			photo_2882039.html');
												thumbnails[2882072] = new thumbnail(2882072,'178883','Bumble','Bumble_thumb.jpg',130, 80,32,'																			photo_2882072.html');
												thumbnails[2882874] = new thumbnail(2882874,'178883','Nicky on board Bodicea','On board Pioneer_thumb.jpg',130, 84,32,'																			photo_2882874.html');
												thumbnails[2882875] = new thumbnail(2882875,'178883','The Winner','Christian close_thumb.jpg',130, 87,32,'																			photo_2882875.html');
												thumbnails[2882877] = new thumbnail(2882877,'178883','Christian Woodley','Christian_thumb.jpg',130, 186,32,'																			photo_2882877.html');
												thumbnails[2882879] = new thumbnail(2882879,'178883','The Baker Brothers','Baker Brothers Mono_thumb.jpg',130, 86,32,'																			photo_2882879.html');
												thumbnails[2882888] = new thumbnail(2882888,'178883','Great Sight!','Four Ships_thumb.jpg',130, 44,32,'																			photo_2882888.html');
												thumbnails[2891281] = new thumbnail(2891281,'178883','CK 21','CK 21_thumb.jpg',130, 86,32,'																			photo_2891281.html');
												thumbnails[2891304] = new thumbnail(2891304,'178883','Three Ships','Three ships_thumb.jpg',130, 82,32,'																			photo_2891304.html');
												thumbnails[2891305] = new thumbnail(2891305,'178883','Three Ships!','Three ships1_thumb.jpg',130, 82,32,'																			photo_2891305.html');
												thumbnails[2893673] = new thumbnail(2893673,'171083','Yellow Rose on Chiffon','Yellow Rose_thumb.jpg',130, 86,32,'																			photo_2893673.html');
												thumbnails[2893689] = new thumbnail(2893689,'171083','Layer Woods','woods BORDER_thumb.jpg',130, 87,32,'																			photo_2893689.html');
												thumbnails[2893699] = new thumbnail(2893699,'171083','Tulips in Mono','tulips 1_thumb.jpg',130, 173,32,'																			photo_2893699.html');
												thumbnails[2893707] = new thumbnail(2893707,'171083','Sunflowers','Sunflowers_thumb.jpg',130, 86,32,'																			photo_2893707.html');
												thumbnails[2893711] = new thumbnail(2893711,'171083','Poppies','poppy_thumb.jpg',129, 194,32,'																			photo_2893711.html');
												thumbnails[2893732] = new thumbnail(2893732,'171083','Iris','Iris_thumb.jpg',130, 86,32,'																			photo_2893732.html');
												thumbnails[2893749] = new thumbnail(2893749,'171083','5 am in the morning - West Mersea','Five in the morning_thumb.jpg',130, 195,32,'																			photo_2893749.html');
												thumbnails[2893754] = new thumbnail(2893754,'171083','Faded rose','Faded mono_thumb.jpg',130, 87,32,'																			photo_2893754.html');
												thumbnails[2893762] = new thumbnail(2893762,'171083','Under the hedgerow','berries 2_thumb.jpg',130, 86,32,'																			photo_2893762.html');
												thumbnails[2893769] = new thumbnail(2893769,'171083','Oyster Shells','Oysters_thumb.jpg',129, 86,32,'																			photo_2893769.html');
												thumbnails[2904405] = new thumbnail(2904405,'178883','The committee boat ','The Committee Boat_thumb.jpg',130, 77,32,'																			photo_2904405.html');
												thumbnails[2904407] = new thumbnail(2904407,'178883','F 14','F14_thumb.jpg',130, 84,32,'																			photo_2904407.html');
												thumbnails[2904494] = new thumbnail(2904494,'171083','Sea Gull ','seagull blue 11_thumb.jpg',129, 48,32,'																			photo_2904494.html');
												thumbnails[2904497] = new thumbnail(2904497,'178883','CK 213 Bodicea','Bodicea_thumb.jpg',130, 195,32,'																			photo_2904497.html');
												thumbnails[2904500] = new thumbnail(2904500,'171083','Daisy on Chiffon','Copy of Daisy_thumb.jpg',130, 86,32,'																			photo_2904500.html');
												thumbnails[2904525] = new thumbnail(2904525,'171082','The Surfer','surfer_thumb.jpg',130, 87,32,'																			photo_2904525.html');
												thumbnails[2932912] = new thumbnail(2932912,'302733','Under the veil','Black_thumb.jpg',130, 107,32,'																			photo_2932912.html');
												thumbnails[2932919] = new thumbnail(2932919,'302733','Gillian and Richard','gillian richard cloud_thumb.jpg',130, 140,32,'																			photo_2932919.html');
												thumbnails[2932927] = new thumbnail(2932927,'302733','Mirror reflection','IMG_7368_thumb.jpg',130, 197,32,'																			photo_2932927.html');
												thumbnails[2945555] = new thumbnail(2945555,'171082','Appleby Horse Fair','tunnel_thumb.jpg',130, 86,32,'																			photo_2945555.html');
												thumbnails[3013029] = new thumbnail(3013029,'171083','Rainy Day at the Angel','angel1_thumb.jpg',130, 173,32,'																			photo_3013029.html');
												thumbnails[3390046] = new thumbnail(3390046,'207011','Le Chateau Fleuri','Au Chateau Fleuri_thumb.jpg',130, 192,32,'																			photo_3390046.html');
												thumbnails[3390053] = new thumbnail(3390053,'207011','At the Cafe Doorway','Bar Mono_thumb.jpg',130, 87,32,'																			photo_3390053.html');
												thumbnails[3390059] = new thumbnail(3390059,'207011','Cafe Doorway in colour','Bar_thumb.jpg',130, 87,32,'																			photo_3390059.html');
												thumbnails[3390183] = new thumbnail(3390183,'207011','White lamps - Blue Sky','blue lights copy_thumb.jpg',130, 90,32,'																			photo_3390183.html');
												thumbnails[3390187] = new thumbnail(3390187,'207011','CAFE DELAUZAN','Cafe_thumb.jpg',130, 86,32,'																			photo_3390187.html');
												thumbnails[3390192] = new thumbnail(3390192,'207011','Lovely Light in the Orchard','Church_thumb.jpg',130, 87,32,'																			photo_3390192.html');
												thumbnails[3390199] = new thumbnail(3390199,'207011','The Blue Door','doorway_thumb.jpg',130, 90,32,'																			photo_3390199.html');
												thumbnails[3390200] = new thumbnail(3390200,'207011','Not my dog!','lady dog_thumb.jpg',130, 89,32,'																			photo_3390200.html');
												thumbnails[3390213] = new thumbnail(3390213,'207011','Blue Shutters','Man _thumb.jpg',130, 189,32,'																			photo_3390213.html');
												thumbnails[3390216] = new thumbnail(3390216,'207011','Poplar Trees','Poplars_thumb.jpg',130, 195,32,'																			photo_3390216.html');
												thumbnails[3390239] = new thumbnail(3390239,'207011','Street Lighting','The Lamp_thumb.jpg',130, 196,32,'																			photo_3390239.html');
												thumbnails[3390242] = new thumbnail(3390242,'207011','The Planter','The plant Pot_thumb.jpg',130, 86,32,'																			photo_3390242.html');
												thumbnails[3390245] = new thumbnail(3390245,'207011','The Orchard','Trees_thumb.jpg',130, 79,32,'																			photo_3390245.html');
												thumbnails[3390247] = new thumbnail(3390247,'207011','I can\'t speak French!','which way_thumb.jpg',130, 87,32,'																			photo_3390247.html');
												thumbnails[3390252] = new thumbnail(3390252,'207011','Monsieur Aubrac','window_thumb.jpg',130, 87,32,'																			photo_3390252.html');
												thumbnails[3393476] = new thumbnail(3393476,'207011','Francoise & Franco','Francoise and Franco light_thumb.jpg',130, 178,32,'																			photo_3393476.html');
												thumbnails[3393910] = new thumbnail(3393910,'207011','Pairs','two pots_thumb.jpg',130, 91,32,'																			photo_3393910.html');
												thumbnails[3393920] = new thumbnail(3393920,'207011','The Bus Shelter','Bus Shelter_thumb.jpg',130, 81,32,'																			photo_3393920.html');
												thumbnails[3395299] = new thumbnail(3395299,'207011','Towards the Alps','Snow view_thumb.jpg',130, 49,32,'																			photo_3395299.html');
												thumbnails[3395303] = new thumbnail(3395303,'207011','Recessions','recessions_thumb.jpg',130, 77,32,'																			photo_3395303.html');
												thumbnails[3395481] = new thumbnail(3395481,'207011','George & Celia','George & Celia_thumb.jpg',130, 191,32,'																			photo_3395481.html');
												thumbnails[3398068] = new thumbnail(3398068,'207011','The Barn','v_thumb.jpg',130, 87,32,'																			photo_3398068.html');
												thumbnails[3398118] = new thumbnail(3398118,'207011','The Press','The Press_thumb.jpg',130, 195,32,'																			photo_3398118.html');
												thumbnails[5370001] = new thumbnail(5370001,'302733','','Arch_thumb.jpg',130, 196,32,'																			photo_5370001.html');
												thumbnails[5370002] = new thumbnail(5370002,'302733','','arrival_mono_thumb.jpg',130, 82,32,'																			photo_5370002.html');
												thumbnails[5370004] = new thumbnail(5370004,'302733','','back3_thumb.jpg',130, 189,32,'																			photo_5370004.html');
												thumbnails[5370016] = new thumbnail(5370016,'302733','','confetti_thumb.jpg',130, 74,32,'																			photo_5370016.html');
												thumbnails[5370018] = new thumbnail(5370018,'302733','','close_brighter_thumb.jpg',130, 87,32,'																			photo_5370018.html');
												thumbnails[5370019] = new thumbnail(5370019,'302733','','Charlotte_mono_thumb.jpg',130, 87,32,'																			photo_5370019.html');
												thumbnails[5370020] = new thumbnail(5370020,'302733','','charlotte_arms_mono_thumb.jpg',130, 87,32,'																			photo_5370020.html');
												thumbnails[5370024] = new thumbnail(5370024,'302733','','char_jo_vine_thumb.jpg',130, 95,32,'																			photo_5370024.html');
												thumbnails[5370030] = new thumbnail(5370030,'302733','','ceremony_thumb.jpg',130, 205,32,'																			photo_5370030.html');
												thumbnails[5370031] = new thumbnail(5370031,'302733','','c_bench_thumb.jpg',130, 87,32,'																			photo_5370031.html');
												thumbnails[5370033] = new thumbnail(5370033,'302733','','boys4_mono_thumb.jpg',130, 184,32,'																			photo_5370033.html');
												thumbnails[6326229] = new thumbnail(6326229,'350818','','Bottom_row_1_thumb.jpg',130, 87,32,'																			photo_6326229.html');
												thumbnails[6326252] = new thumbnail(6326252,'350818','Auntie Ivy','Auntie_Ivy_thumb.jpg',130, 87,32,'																			photo_6326252.html');
												thumbnails[6326268] = new thumbnail(6326268,'350818','','Bottom_row_2_thumb.jpg',130, 87,32,'																			photo_6326268.html');
												thumbnails[6326312] = new thumbnail(6326312,'350818','','Bottom_row_4_thumb.jpg',130, 95,32,'																			photo_6326312.html');
												thumbnails[6326316] = new thumbnail(6326316,'350818','','Bottom_row_5_thumb.jpg',130, 87,32,'																			photo_6326316.html');
												thumbnails[6326334] = new thumbnail(6326334,'350818','','Bottom_row_7_thumb.jpg',130, 87,32,'																			photo_6326334.html');
												thumbnails[6326647] = new thumbnail(6326647,'350818','','der_thumb.jpg',130, 87,32,'																			photo_6326647.html');
												thumbnails[6326769] = new thumbnail(6326769,'350818','','Middle_row_2_thumb.jpg',130, 87,32,'																			photo_6326769.html');
												thumbnails[6326772] = new thumbnail(6326772,'350818','','Middle_row_5_thumb.jpg',130, 87,32,'																			photo_6326772.html');
												thumbnails[6327042] = new thumbnail(6327042,'350818','','Middle_row_6_thumb.jpg',130, 88,32,'																			photo_6327042.html');
												thumbnails[6327197] = new thumbnail(6327197,'350818','','Middle_row_7_thumb.jpg',130, 87,32,'																			photo_6327197.html');
												thumbnails[6327199] = new thumbnail(6327199,'350818','','SAS_thumb.jpg',130, 87,32,'																			photo_6327199.html');
												thumbnails[6327202] = new thumbnail(6327202,'350818','','Top_row_1_thumb.jpg',130, 87,32,'																			photo_6327202.html');
												thumbnails[6327204] = new thumbnail(6327204,'350818','','Top_row_2_thumb.jpg',130, 87,32,'																			photo_6327204.html');
												thumbnails[6327207] = new thumbnail(6327207,'350818','','Top_row_3_thumb.jpg',130, 87,32,'																			photo_6327207.html');
												thumbnails[6327209] = new thumbnail(6327209,'350818','','Top_row_5_thumb.jpg',130, 87,32,'																			photo_6327209.html');
												thumbnails[6327212] = new thumbnail(6327212,'350818','','Top_row_4_thumb.jpg',130, 87,32,'																			photo_6327212.html');
												thumbnails[6327529] = new thumbnail(6327529,'350818','','1_thumb.jpg',130, 85,32,'																			photo_6327529.html');
												thumbnails[6327532] = new thumbnail(6327532,'350818','','5_thumb.jpg',130, 83,32,'																			photo_6327532.html');
												thumbnails[6327534] = new thumbnail(6327534,'350818','','6_thumb.jpg',130, 87,32,'																			photo_6327534.html');
												thumbnails[6327538] = new thumbnail(6327538,'350818','','7_thumb.jpg',130, 87,32,'																			photo_6327538.html');
												thumbnails[6327539] = new thumbnail(6327539,'350818','','14_thumb.jpg',130, 78,32,'																			photo_6327539.html');
												thumbnails[6327540] = new thumbnail(6327540,'350818','','29_thumb.jpg',130, 87,32,'																			photo_6327540.html');
												thumbnails[6327543] = new thumbnail(6327543,'350818','','36_thumb.jpg',130, 87,32,'																			photo_6327543.html');
												thumbnails[6327545] = new thumbnail(6327545,'350818','','38_thumb.jpg',130, 87,32,'																			photo_6327545.html');
												thumbnails[6327557] = new thumbnail(6327557,'350818','','431_thumb.jpg',130, 86,32,'																			photo_6327557.html');
												thumbnails[6327559] = new thumbnail(6327559,'350818','','55_thumb.jpg',130, 87,32,'																			photo_6327559.html');
												thumbnails[6327560] = new thumbnail(6327560,'350818','','59_thumb.jpg',130, 89,32,'																			photo_6327560.html');
												thumbnails[6327582] = new thumbnail(6327582,'350818','','65_thumb.jpg',130, 87,32,'																			photo_6327582.html');
												thumbnails[6327596] = new thumbnail(6327596,'350818','','71_thumb.jpg',130, 195,32,'																			photo_6327596.html');
												thumbnails[6327599] = new thumbnail(6327599,'350818','','74_thumb.jpg',130, 87,32,'																			photo_6327599.html');
												thumbnails[6327601] = new thumbnail(6327601,'350818','','82_thumb.jpg',130, 195,32,'																			photo_6327601.html');
												thumbnails[6328670] = new thumbnail(6328670,'350891','','IMG_2598_thumb.jpg',130, 87,32,'																			photo_6328670.html');
												thumbnails[6328674] = new thumbnail(6328674,'350891','','Sheka__Looby_thumb.jpg',130, 86,32,'																			photo_6328674.html');
												thumbnails[6328828] = new thumbnail(6328828,'350891','','t_thumb.jpg',130, 86,32,'																			photo_6328828.html');
												thumbnails[6328864] = new thumbnail(6328864,'350891','','Sheka_sepia_thumb.jpg',130, 87,32,'																			photo_6328864.html');
												thumbnails[6328894] = new thumbnail(6328894,'350891','','IMG_2606_thumb.jpg',130, 87,32,'																			photo_6328894.html');
												thumbnails[6328905] = new thumbnail(6328905,'350891','','IMG_6469_thumb.jpg',130, 195,32,'																			photo_6328905.html');
												thumbnails[6331513] = new thumbnail(6331513,'350891','','2_Kitchen_Hand_thumb.jpg',130, 85,32,'																			photo_6331513.html');
												thumbnails[6331517] = new thumbnail(6331517,'171082','','1_Free_Bed_Booking_thumb.jpg',130, 85,32,'																			photo_6331517.html');
												thumbnails[6331522] = new thumbnail(6331522,'171082','','4_Happy_Honda_thumb.jpg',130, 177,32,'																			photo_6331522.html');
												thumbnails[6332716] = new thumbnail(6332716,'350891','','2_Pink_Rose_-_Orange_Wall_thumb.jpg',130, 84,32,'																			photo_6332716.html');
												thumbnails[6332787] = new thumbnail(6332787,'171082','','1_Silas_The_Stockman_thumb.jpg',130, 87,32,'																			photo_6332787.html');
												thumbnails[6332862] = new thumbnail(6332862,'350891','','4_Running_Home_thumb.jpg',130, 85,32,'																			photo_6332862.html');
												thumbnails[6333164] = new thumbnail(6333164,'350891','','Gracie_thumb.jpg',130, 87,32,'																			photo_6333164.html');
												thumbnails[6333166] = new thumbnail(6333166,'350891','','Village_Children_Vietnam_thumb.jpg',130, 87,32,'																			photo_6333166.html');
												thumbnails[6333167] = new thumbnail(6333167,'350891','','IMG_2145_thumb.jpg',130, 83,32,'																			photo_6333167.html');
												thumbnails[6333174] = new thumbnail(6333174,'171083','','F_thumb.jpg',130, 108,32,'																			photo_6333174.html');
												thumbnails[6333179] = new thumbnail(6333179,'171082','','The_Turquoise_Hat_thumb.jpg',130, 87,32,'																			photo_6333179.html');
												thumbnails[6333195] = new thumbnail(6333195,'171082','','Jed_thumb.jpg',130, 87,32,'																			photo_6333195.html');
												thumbnails[6333200] = new thumbnail(6333200,'350891','','Street_Kids_-_Ireland_thumb.jpg',130, 98,32,'																			photo_6333200.html');
												thumbnails[6333202] = new thumbnail(6333202,'171083','','Human_Traces_thumb.jpg',130, 86,32,'																			photo_6333202.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[350818] = new gallery(350818,'6327601,6327599,6327596,6327582,6327560,6327559,6327557,6327545,6327543,6327540','Auntie Ivy','gallery',[6326229,6326252,6326268,6326312,6326316,6326334,6326647,6326769,6326772,6327042,6327197,6327199,6327202,6327204,6327207,6327209,6327212,6327529,6327532,6327534,6327538,6327539,6327540,6327543,6327545,6327557,6327559,6327560,6327582,6327596,6327599,6327601],0, 0, '', '																																																																																																							gallery_350818.html',0,0);
				  					galleries[350891] = new gallery(350891,'6333200,6333167,6333166,6333164,6332862,6332716,6331513,6328905,6328894,6328864','Children','gallery',[2729452,6328670,6328674,6328828,6328864,6328894,6328905,6331513,6332716,6332862,6333164,6333166,6333167,6333200],0, 0, '', '																																																																																																							gallery_350891.html',0,0);
				  					galleries[207011] = new gallery(207011,'3398118,3398068,3395481,3395303,3395299,3393920,3393910,3393476,3390252,3390247','Fleeting moments from France!','gallery',[3390046,3390053,3390059,3390183,3390187,3390192,3390199,3390200,3390213,3390216,3390239,3390242,3390245,3390247,3390252,3393476,3393910,3393920,3395299,3395303,3395481,3398068,3398118],0, 0, '', '																																																																																																							gallery_207011.html',0,0);
				  					galleries[302733] = new gallery(302733,'5370033,5370031,5370030,5370024,5370020,5370019,5370018,5370016,5370004,5370002','Weddings','gallery',[2726911,2729417,2729421,2729429,2932912,2932919,2932927,5370001,5370002,5370004,5370016,5370018,5370019,5370020,5370024,5370030,5370031,5370033],0, 0, '', '																																																																																																							gallery_302733.html',0,0);
				  					galleries[178883] = new gallery(178883,'2904497,2904407,2904405,2891305,2891304,2891281,2882888,2882879,2882877,2882875','West Mersea Oyster Dredging Match 2008','gallery',[2726901,2745109,2745119,2750373,2882014,2882038,2882039,2882072,2882874,2882875,2882877,2882879,2882888,2891281,2891304,2891305,2904405,2904407,2904497],0, 0, '', '																																																																																																							gallery_178883.html',0,0);
				  					galleries[171082] = new gallery(171082,'6333195,6333179,6332787,6331522,6331517,2945555,2904525,2750455,2745619,2745548','People','gallery',[2729447,2729467,2729550,2745548,2745619,2750455,2904525,2945555,6331517,6331522,6332787,6333179,6333195],0, 0, '', '																																																																																																							gallery_171082.html',0,0);
				  					galleries[171083] = new gallery(171083,'6333202,6333174,3013029,2904500,2904494,2893769,2893762,2893754,2893749,2893732','Places, Commercial and Fine Art','gallery',[2726851,2726866,2745133,2745230,2745634,2750374,2750375,2750381,2763295,2893673,2893689,2893699,2893707,2893711,2893732,2893749,2893754,2893762,2893769,2904494,2904500,3013029,6333174,6333202],0, 0, '', '																																																																																																							gallery_171083.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '5370019,5370018,5370016,5370004,5370002,5370001,3398118,3398068,3395481,3395303,3395299,3395296,3393920,3393910,3393476,3390252,3390247,3390245,3390242,3390239,3390216,3390213,3390200,3390199,3390192,3390187,3390183,3390059,3390053,3390046,3013029,2945555,2932927,2932919,2932912,2904525,2904500,2904497,2904494,2904407,2904405,2893769,2893762,2893754,2893749';
imageSets[3] = '5370019,5370018,5370016,5370004,5370002,5370001,3398118,3398068,3395481,3395303,3395299,3395296,3393920,3393910,3393476,3390252,3390247,3390245,3390242,3390239,3390216,3390213,3390200,3390199,3390192,3390187,3390183,3390059,3390053,3390046,3013029,2945555,2932927,2932919,2932912,2904525,2904500,2904497,2904494,2904407,2904405,2893769,2893762,2893754,2893749';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/chrissieg/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/chrissieg/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));		}, 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 = '\'Mersea Mermaid Images\': ' + 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));    }        
    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>';
	}
					
	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="CHRISSIEG">';
		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;
	}
}

		

