window.thumbnails = {};
															thumbnails[5309522] = clik.newPhoto({"id":5309522,"src":"Old_image_before_restoring250pix_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"Original image before restoration","height":114});
															thumbnails[5309524] = clik.newPhoto({"id":5309524,"src":"Old_image_restored_250pix_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"Image after restoration ","height":92});
															thumbnails[5307582] = clik.newPhoto({"id":5307582,"src":"08_FrigilianaTwighlight_22_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"Twighlight over Frigiliana","height":85});
															thumbnails[5782117] = clik.newPhoto({"id":5782117,"src":"100410_grass_snake_single_tongue1234_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_5782117.html","width":130,"caption":"Grass snake crossing water 2","height":67});
															thumbnails[6106685] = clik.newPhoto({"id":6106685,"src":"20100602_heron_landing_7111123_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_6106685.html","width":130,"caption":"Heron landing","height":102});
															thumbnails[6661176] = clik.newPhoto({"id":6661176,"src":"IMG_0489_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_6661176.html","width":130,"caption":"","height":97});
															thumbnails[8572216] = clik.newPhoto({"id":8572216,"src":"100726_08_Lackford_butterfly_crop_9210_1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572216.html","width":130,"caption":"","height":104});
															thumbnails[8572640] = clik.newPhoto({"id":8572640,"src":"110417_Grebe_anf_creyfish3958_1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572640.html","width":130,"caption":"Gt Crested Grebe with creyfish","height":75});
															thumbnails[8572642] = clik.newPhoto({"id":8572642,"src":"110611_kingfisher_with_stickleback8643_1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572642.html","width":130,"caption":"kingfisher with stickleback","height":90});
															thumbnails[8572650] = clik.newPhoto({"id":8572650,"src":"110806_cricket_glems07_1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572650.html","width":130,"caption":"Grasshopper","height":67});
															thumbnails[8572661] = clik.newPhoto({"id":8572661,"src":"110806_lizard_on_log_glems127_11_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572661.html","width":130,"caption":"Lizard","height":91});
															thumbnails[8572664] = clik.newPhoto({"id":8572664,"src":"110807_bee_wings__fopen_0092__1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572664.html","width":130,"caption":"","height":90});
															thumbnails[8572667] = clik.newPhoto({"id":8572667,"src":"110831_Green_vained_butterfly_pair1356_1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572667.html","width":130,"caption":"Green vained Butterfly paired","height":73});
															thumbnails[8572671] = clik.newPhoto({"id":8572671,"src":"grebes_build_nest7601_1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572671.html","width":130,"caption":"Gt Crested Grebe building nest","height":65});
															thumbnails[8572677] = clik.newPhoto({"id":8572677,"src":"hobby7301_1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572677.html","width":130,"caption":"Hobby","height":108});
															thumbnails[8572683] = clik.newPhoto({"id":8572683,"src":"IMG_2458_1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572683.html","width":130,"caption":"Migrant Hawker in flight","height":81});
															thumbnails[8572688] = clik.newPhoto({"id":8572688,"src":"roberfly_prey0313_1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8572688.html","width":130,"caption":"Robberfly and prey","height":90});
															thumbnails[8590932] = clik.newPhoto({"id":8590932,"src":"IMG_2459_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8590932.html","width":130,"caption":"Migrant hawker in flight","height":89});
															thumbnails[8753026] = clik.newPhoto({"id":8753026,"src":"111029_kfisher_3fish_lose4470_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_8753026.html","width":130,"caption":"Kingfisher tossing stickleback","height":84});
															thumbnails[5311824] = clik.newPhoto({"id":5311824,"src":"76-0722a__Wmkt_opening_by_pass__thumb.jpg","galleries_id":298902,"server_id":5,"link":"photo_5311824.html","width":130,"caption":"First Traffic on Wickham Market By pass ©22nd July 1976","height":78});
															thumbnails[5311829] = clik.newPhoto({"id":5311829,"src":"790215_wm_square_in_snow_thumb.jpg","galleries_id":298902,"server_id":5,"link":"photo_5311829.html","width":130,"caption":"Wickham Market Square ©15th Feb 1979","height":83});
															thumbnails[5285787] = clik.newPhoto({"id":5285787,"src":"Common_blue_damselfly_paired1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_5285787.html","width":130,"caption":"Common blue damselfly paired","height":124});
															thumbnails[5285840] = clik.newPhoto({"id":5285840,"src":"2009_07_28_silver_studded_pair2_srgb1_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_5285840.html","width":130,"caption":"Common blue butterfly paired","height":88});
															thumbnails[5308982] = clik.newPhoto({"id":5308982,"src":"03_lightning_150609_thumb.jpg","galleries_id":297190,"server_id":5,"link":"photo_5308982.html","width":130,"caption":"Lightning over Ipswich","height":132});
															thumbnails[5311258] = clik.newPhoto({"id":5311258,"src":"FlatfordWillielots_cottage_1_thumb.jpg","galleries_id":298887,"server_id":5,"link":"photo_5311258.html","width":130,"caption":"Flatford  Willielots cottage","height":86});
															thumbnails[5311835] = clik.newPhoto({"id":5311835,"src":"790215_wmkt_snow_filed_road_into_wm_thumb.jpg","galleries_id":298902,"server_id":5,"link":"photo_5311835.html","width":104,"caption":"Chapel Lane , Wickham Mkt ©15th Feb 1979","height":150});
															thumbnails[5311844] = clik.newPhoto({"id":5311844,"src":"790217_ashe_snow_on_road_and_car_on_road_thumb.jpg","galleries_id":298902,"server_id":5,"link":"photo_5311844.html","width":130,"caption":"Between Campsea Ashe Wickham Mkt ©17th Feb 1979","height":81});
															thumbnails[5311296] = clik.newPhoto({"id":5311296,"src":"Glevering_mill__1_thumb.jpg","galleries_id":298887,"server_id":5,"link":"photo_5311296.html","width":130,"caption":"Glevering mill","height":84});
															thumbnails[5311916] = clik.newPhoto({"id":5311916,"src":"810124_Orwell_Bridge_first_span_from_manningtree_rd_thumb.jpg","galleries_id":298902,"server_id":5,"link":"photo_5311916.html","width":130,"caption":"First span built Orwell Bridge © 24th Jan 1981","height":61});
															thumbnails[6776978] = clik.newPhoto({"id":6776978,"src":"IMG_1703_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6776978.html","width":130,"caption":"The Balmoral at Bornholm","height":105});
															thumbnails[8577515] = clik.newPhoto({"id":8577515,"src":"IMG_2552_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577515.html","width":130,"caption":"Heathrow","height":87});
															thumbnails[5311918] = clik.newPhoto({"id":5311918,"src":"821212_Orwell_bridgepeople_walking_from_wherstead_to_nacton_side_thumb.jpg","galleries_id":298902,"server_id":5,"link":"photo_5311918.html","width":130,"caption":"Pedestrian access wknd prior to opening of Orwell Bridge to traffic ©12th Dec 1982","height":62});
															thumbnails[5311303] = clik.newPhoto({"id":5311303,"src":"Ipswich_Airport_from_air_1_thumb.jpg","galleries_id":298887,"server_id":5,"link":"photo_5311303.html","width":130,"caption":"Ipswich Airport (open day 1990)","height":87});
															thumbnails[5311343] = clik.newPhoto({"id":5311343,"src":"Ipswich_Custom_house_1_thumb.jpg","galleries_id":298887,"server_id":5,"link":"photo_5311343.html","width":130,"caption":"Ipswich Custom house","height":84});
															thumbnails[5311347] = clik.newPhoto({"id":5311347,"src":"Ipswich_Orwell_Bridge__East_Ipswich_thumb.jpg","galleries_id":298887,"server_id":5,"link":"photo_5311347.html","width":130,"caption":"Ipswich Orwell bridge looking east","height":83});
															thumbnails[8577516] = clik.newPhoto({"id":8577516,"src":"IMG_2578_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577516.html","width":130,"caption":"Hong Kong Airport","height":87});
															thumbnails[5311370] = clik.newPhoto({"id":5311370,"src":"Lethringham_Water_mill_1_thumb.jpg","galleries_id":298887,"server_id":5,"link":"photo_5311370.html","width":130,"caption":"Letheringham water mill ","height":84});
															thumbnails[8577519] = clik.newPhoto({"id":8577519,"src":"IMG_2623_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577519.html","width":130,"caption":"Hong Kong ","height":87});
															thumbnails[5309020] = clik.newPhoto({"id":5309020,"src":"16_wan_thrasher_thumb.jpg","galleries_id":297190,"server_id":5,"link":"photo_5309020.html","width":130,"caption":"Wantisden WW2 wknd,","height":87});
															thumbnails[5309021] = clik.newPhoto({"id":5309021,"src":"17_wan_traction_engine_driver_270909_thumb.jpg","galleries_id":297190,"server_id":5,"link":"photo_5309021.html","width":130,"caption":"Wantisden WW2 wknd,","height":87});
															thumbnails[5309148] = clik.newPhoto({"id":5309148,"src":"090925_dragon_in_flight_112_thumb.jpg","galleries_id":297189,"server_id":5,"link":"photo_5309148.html","width":130,"caption":"Southern Hawker in flight","height":91});
															thumbnails[5311862] = clik.newPhoto({"id":5311862,"src":"871018_Sproughton_road_sign_down_on_green_thumb.jpg","galleries_id":298902,"server_id":5,"link":"photo_5311862.html","width":130,"caption":"Storm damage Sproughton ©18th Oct 1987","height":83});
															thumbnails[6777565] = clik.newPhoto({"id":6777565,"src":"IMG_0707_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6777565.html","width":130,"caption":"KIEL CANAL","height":87});
															thumbnails[8577521] = clik.newPhoto({"id":8577521,"src":"IMG_2697_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577521.html","width":130,"caption":"Nanjing ( river lights)","height":87});
															thumbnails[8577525] = clik.newPhoto({"id":8577525,"src":"IMG_27051_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577525.html","width":130,"caption":"Nanjing , taxi service","height":87});
															thumbnails[8577526] = clik.newPhoto({"id":8577526,"src":"IMG_2715_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577526.html","width":130,"caption":"Nanjing by the river","height":87});
															thumbnails[8577527] = clik.newPhoto({"id":8577527,"src":"IMG_2761_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577527.html","width":130,"caption":"Xuzhou","height":87});
															thumbnails[8577524] = clik.newPhoto({"id":8577524,"src":"IMG_2784_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577524.html","width":130,"caption":"Xuzhou","height":87});
															thumbnails[8577541] = clik.newPhoto({"id":8577541,"src":"IMG_2822_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577541.html","width":130,"caption":"Laoyancun ,","height":87});
															thumbnails[8577542] = clik.newPhoto({"id":8577542,"src":"IMG_2828_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577542.html","width":130,"caption":"Laoyancun","height":100});
															thumbnails[8577548] = clik.newPhoto({"id":8577548,"src":"IMG_2832_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577548.html","width":130,"caption":"Laoyancun","height":80});
															thumbnails[8631639] = clik.newPhoto({"id":8631639,"src":"110920_chinaman_and_trike_28311_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8631639.html","width":130,"caption":"Laoyancun","height":81});
															thumbnails[6778108] = clik.newPhoto({"id":6778108,"src":"IMG_0837_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6778108.html","width":130,"caption":"BERLIN","height":109});
															thumbnails[8577555] = clik.newPhoto({"id":8577555,"src":"IMG_28511_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577555.html","width":110,"caption":"Laoyancun","height":150});
															thumbnails[8577535] = clik.newPhoto({"id":8577535,"src":"IMG_28151_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577535.html","width":100,"caption":"The old man from Laoyancun","height":150});
															thumbnails[6778211] = clik.newPhoto({"id":6778211,"src":"IMG_0880_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6778211.html","width":130,"caption":"BERLIN","height":87});
															thumbnails[8577560] = clik.newPhoto({"id":8577560,"src":"IMG_2881_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577560.html","width":130,"caption":"Laoyancun","height":141});
															thumbnails[6778212] = clik.newPhoto({"id":6778212,"src":"IMG_0896_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6778212.html","width":130,"caption":"BERLIN","height":87});
															thumbnails[6778213] = clik.newPhoto({"id":6778213,"src":"IMG_0955_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6778213.html","width":130,"caption":"BERLIN","height":87});
															thumbnails[8577563] = clik.newPhoto({"id":8577563,"src":"IMG_2898_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577563.html","width":130,"caption":"Xuzhou Station","height":87});
															thumbnails[8577575] = clik.newPhoto({"id":8577575,"src":"IMG_2903_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577575.html","width":130,"caption":"Nanjing, ","height":87});
															thumbnails[8577585] = clik.newPhoto({"id":8577585,"src":"IMG_2911_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577585.html","width":130,"caption":"nanjing, street sellers","height":87});
															thumbnails[8577618] = clik.newPhoto({"id":8577618,"src":"IMG_2916_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577618.html","width":130,"caption":"Nanjing, street sellers   ","height":87});
															thumbnails[8577602] = clik.newPhoto({"id":8577602,"src":"IMG_2925_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577602.html","width":130,"caption":"Sun yat-sen mausoleum","height":87});
															thumbnails[8577605] = clik.newPhoto({"id":8577605,"src":"IMG_2945_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577605.html","width":130,"caption":"Sun yat-sen mausoleum","height":87});
															thumbnails[8577607] = clik.newPhoto({"id":8577607,"src":"IMG_2947_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577607.html","width":130,"caption":"Sun yat-sen mausoleum","height":72});
															thumbnails[8577613] = clik.newPhoto({"id":8577613,"src":"IMG_2992_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577613.html","width":130,"caption":"Between Nanjing & Shanghai ","height":87});
															thumbnails[6784565] = clik.newPhoto({"id":6784565,"src":"IMG_1232_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6784565.html","width":101,"caption":"RUSSIA, St PETERSBERG.","height":150});
															thumbnails[8577616] = clik.newPhoto({"id":8577616,"src":"IMG_29981_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577616.html","width":130,"caption":"Between Nanjing Shanghai","height":87});
															thumbnails[6784598] = clik.newPhoto({"id":6784598,"src":"IMG_1233_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6784598.html","width":130,"caption":"RUSSIA, St PETERSBERG.","height":87});
															thumbnails[8577617] = clik.newPhoto({"id":8577617,"src":"IMG_3004_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8577617.html","width":130,"caption":"Aproaching Shanghai","height":87});
															thumbnails[8580276] = clik.newPhoto({"id":8580276,"src":"IMG_3025_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580276.html","width":130,"caption":"From Lijiang airport ","height":87});
															thumbnails[8580280] = clik.newPhoto({"id":8580280,"src":"IMG_3028_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580280.html","width":130,"caption":"From Lijiang airport ,","height":87});
															thumbnails[8580300] = clik.newPhoto({"id":8580300,"src":"IMG_3067_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580300.html","width":130,"caption":"Lijiang, ","height":141});
															thumbnails[8580304] = clik.newPhoto({"id":8580304,"src":"110923_keeping_an_eye_open3069_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580304.html","width":130,"caption":"Lijiang","height":80});
															thumbnails[6784890] = clik.newPhoto({"id":6784890,"src":"IMG_1495_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6784890.html","width":130,"caption":"RUSSIA, St PETERSBERG.","height":148});
															thumbnails[8580307] = clik.newPhoto({"id":8580307,"src":"IMG_3081_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580307.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[6789976] = clik.newPhoto({"id":6789976,"src":"IMG_1507_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6789976.html","width":130,"caption":"RUSSIA, St Petersberg","height":100});
															thumbnails[8580310] = clik.newPhoto({"id":8580310,"src":"IMG_3116_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580310.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580316] = clik.newPhoto({"id":8580316,"src":"IMG_3123_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580316.html","width":130,"caption":"Lijiang","height":92});
															thumbnails[6784895] = clik.newPhoto({"id":6784895,"src":"IMG_1564_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6784895.html","width":130,"caption":"RUSSIA, St PETERSBERG.","height":108});
															thumbnails[8580322] = clik.newPhoto({"id":8580322,"src":"IMG_3127_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580322.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[6784897] = clik.newPhoto({"id":6784897,"src":"IMG_1583_thumb.jpg","galleries_id":368846,"server_id":5,"link":"photo_6784897.html","width":103,"caption":"RUSSIA, St PETERSBERG.","height":150});
															thumbnails[8580395] = clik.newPhoto({"id":8580395,"src":"IMG_3159_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580395.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580295] = clik.newPhoto({"id":8580295,"src":"IMG_3064_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580295.html","width":130,"caption":"Lijiang, ","height":87});
															thumbnails[8658595] = clik.newPhoto({"id":8658595,"src":"110922_weaver_latest_3057_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8658595.html","width":130,"caption":"Lijiang ","height":87});
															thumbnails[8580402] = clik.newPhoto({"id":8580402,"src":"IMG_3228_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580402.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580405] = clik.newPhoto({"id":8580405,"src":"IMG_3238_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580405.html","width":130,"caption":"","height":87});
															thumbnails[8580408] = clik.newPhoto({"id":8580408,"src":"IMG_3269_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580408.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580409] = clik.newPhoto({"id":8580409,"src":"IMG_3302_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580409.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580410] = clik.newPhoto({"id":8580410,"src":"IMG_3316_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580410.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580413] = clik.newPhoto({"id":8580413,"src":"IMG_3347_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580413.html","width":100,"caption":"Lijiang","height":150});
															thumbnails[8580419] = clik.newPhoto({"id":8580419,"src":"IMG_3384_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580419.html","width":130,"caption":"Lijiang, ","height":87});
															thumbnails[8580423] = clik.newPhoto({"id":8580423,"src":"IMG_3403_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580423.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580425] = clik.newPhoto({"id":8580425,"src":"IMG_3411_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580425.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580428] = clik.newPhoto({"id":8580428,"src":"IMG_3423_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580428.html","width":100,"caption":"Lijiang","height":150});
															thumbnails[8580435] = clik.newPhoto({"id":8580435,"src":"IMG_3434_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580435.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580438] = clik.newPhoto({"id":8580438,"src":"IMG_3440_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580438.html","width":130,"caption":"Lijiang","height":87});
															thumbnails[8580441] = clik.newPhoto({"id":8580441,"src":"IMG_3460_thumb.jpg","galleries_id":452841,"server_id":5,"link":"photo_8580441.html","width":130,"caption":"Hong Kong","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[452841] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"China 2011","link":"gallery_452841.html","maxRecords":0.0,"photoIDs":[8577515.0,8577516.0,8577519.0,8577521.0,8577525.0,8577526.0,8577527.0,8577524.0,8577541.0,8577542.0,8577548.0,8631639.0,8577555.0,8577535.0,8577560.0,8577563.0,8577575.0,8577585.0,8577618.0,8577602.0,8577605.0,8577607.0,8577613.0,8577616.0,8577617.0,8580276.0,8580280.0,8580300.0,8580304.0,8580307.0,8580310.0,8580316.0,8580322.0,8580395.0,8580295.0,8658595.0,8580402.0,8580405.0,8580408.0,8580409.0,8580410.0,8580413.0,8580419.0,8580423.0,8580425.0,8580428.0,8580435.0,8580438.0,8580441.0],"skipIndex":0,"section_code":"gallery","featured_images":8580435.0,"id":452841,"singleSection":false});				  						galleries[368846] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Baltic cruise 9th - 21st Sep 2010","link":"gallery_368846.html","maxRecords":0.0,"photoIDs":[6776978.0,6777565.0,6778108.0,6778211.0,6778212.0,6778213.0,6784565.0,6784598.0,6784890.0,6789976.0,6784895.0,6784897.0],"skipIndex":0,"section_code":"gallery","featured_images":6776978.0,"id":368846,"singleSection":false});				  						galleries[297189] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wildlife","link":"gallery_297189.html","maxRecords":0.0,"photoIDs":[5782117.0,6106685.0,6661176.0,8572216.0,8572640.0,8572642.0,8572650.0,8572661.0,8572664.0,8572667.0,8572671.0,8572677.0,8572683.0,8572688.0,8590932.0,8753026.0,5285787.0,5285840.0,5309148.0],"skipIndex":0,"section_code":"gallery","featured_images":"8753026,8590932,8572688,8572683,8572677,8572671,8572667,8572664,8572661,8572650","id":297189,"singleSection":false});				  						galleries[297190] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"General & Topical","link":"gallery_297190.html","maxRecords":0.0,"photoIDs":[5308982.0,5309020.0,5309021.0],"skipIndex":0,"section_code":"gallery","featured_images":"5309021,5309020,5308982","id":297190,"singleSection":false});				  						galleries[298887] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Suffolk scenes","link":"gallery_298887.html","maxRecords":0.0,"photoIDs":[5311258.0,5311296.0,5311303.0,5311343.0,5311347.0,5311370.0],"skipIndex":0,"section_code":"gallery","featured_images":"5311347,5311296","id":298887,"singleSection":false});				  						galleries[298902] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Old Suffolk Images","link":"gallery_298902.html","maxRecords":0.0,"photoIDs":[5311824.0,5311829.0,5311835.0,5311844.0,5311916.0,5311918.0,5311862.0],"skipIndex":0,"section_code":"gallery","featured_images":5311829.0,"id":298902,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8753026,8590932,8572688,8572683,8572677,8572671,8572667,8572664,8572661,8572650,8572642,8572640,6661176,6106685,5782117,5308982,5285840,5285787,5311296,5311343,5307582,5311347,5311370,5309021,5309148,8577521,8577524,8577542,8631639,8580280,8580304,8580316,8580295,8658595,8580405,8580409,8580410,8580423,8580435,8580438';
imageSets[2] = '5311829,6776978,5311296,5307582,5311347,8580435';
imageSets[3] = '8753026,8658595,8631639,8590932,8580441,8580438,8580435,8580428,8580425,8580423,8580419,8580413,8580410,8580409,8580408,8580405,8580402,8580395,8580322,8580316,8580310,8580307,8580304,8580300,8580295,8580280,8580276,8577618,8577617,8577616,8577613,8577607,8577605,8577602,8577585,8577575,8577563,8577560,8577555,8577548,8577542,8577541,8577535,8577527,8577526,8577525,8577524,8577521,8577519,8577516';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/cwking/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/cwking/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/cwking/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/cwking/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/cwking/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/cwking/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/cwking/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:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Images by ... Charles Whitfield-King  DPAGB BPE3 : ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			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 += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="cwking@btinternet.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="cwking@btinternet.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

