window.thumbnails = {};
															thumbnails[1543689] = clik.newPhoto({"id":1543689,"src":"Blowing_in_the_wind_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"\"Blowing in The wind\"","height":188});
															thumbnails[1543700] = clik.newPhoto({"id":1543700,"src":"Girl_with_red_lips_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"\"Girl With Red Lips\"","height":142});
															thumbnails[1543703] = clik.newPhoto({"id":1543703,"src":"BigOneRollercoaste2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"\"The Big One\"","height":195});
															thumbnails[1862863] = clik.newPhoto({"id":1862863,"src":"sax_appeal_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"\"Audio Sex\"","height":98});
															thumbnails[7383659] = clik.newPhoto({"id":7383659,"src":"TAAGopening_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Terry Boulton and Mac Bouchere opening the exhibition","height":98});
															thumbnails[1541740] = clik.newPhoto({"id":1541740,"src":"115town_square_Portugal12_thumb.jpg","galleries_id":105624,"server_id":1,"link":"photo_1541740.html","width":130,"caption":"\"Town Square Portugal\"","height":247});
															thumbnails[1541741] = clik.newPhoto({"id":1541741,"src":"115TeignmouthLifeboat_thumb.jpg","galleries_id":105624,"server_id":1,"link":"photo_1541741.html","width":130,"caption":" \"Teignmouth Lifeboat\"","height":82});
															thumbnails[1541742] = clik.newPhoto({"id":1541742,"src":"115portugeseconvent_thumb.jpg","galleries_id":105624,"server_id":1,"link":"photo_1541742.html","width":130,"caption":"\"Portugese Convent\"","height":249});
															thumbnails[1541743] = clik.newPhoto({"id":1541743,"src":"115takingintheview_thumb.jpg","galleries_id":105624,"server_id":1,"link":"photo_1541743.html","width":130,"caption":"\"Taking in the View\"","height":273});
															thumbnails[1544608] = clik.newPhoto({"id":1544608,"src":"Waterwheel_2a_thumb.jpg","galleries_id":105840,"server_id":1,"link":"photo_1544608.html","width":130,"caption":"\"Waterwheel\"","height":179});
															thumbnails[1544614] = clik.newPhoto({"id":1544614,"src":"Pigs_thumb.jpg","galleries_id":105840,"server_id":1,"link":"photo_1544614.html","width":130,"caption":"\"Pig\"","height":94});
															thumbnails[1544619] = clik.newPhoto({"id":1544619,"src":"Water_fun_1_copy_thumb.jpg","galleries_id":105840,"server_id":1,"link":"photo_1544619.html","width":130,"caption":"\"Water Fun\"","height":54});
															thumbnails[1544623] = clik.newPhoto({"id":1544623,"src":"William_copy_thumb.jpg","galleries_id":105840,"server_id":1,"link":"photo_1544623.html","width":130,"caption":"\"William\"","height":65});
															thumbnails[1544699] = clik.newPhoto({"id":1544699,"src":"Autumn_leaves_63F56F32-24E8-5EC4-4F2958C93B401D22_thumb.jpg","galleries_id":310011,"server_id":1,"link":"photo_1544699.html","width":130,"caption":"\"Autumn Leaves\"","height":153});
															thumbnails[1556050] = clik.newPhoto({"id":1556050,"src":"Be-Calmed_75_thumb_DE8A5B56-1EC9-D45B-1C6D05C3B70426EC.jpg","galleries_id":106595,"server_id":1,"link":"photo_1556050.html","width":130,"caption":"\"Be-calmed\"","height":96});
															thumbnails[1556057] = clik.newPhoto({"id":1556057,"src":"Ceiling_Detail_-_Welsh_Assembly_75_thumb_DE9CCBD7-1EC9-D45B-1CE53EE5165533B1.jpg","galleries_id":106595,"server_id":1,"link":"photo_1556057.html","width":130,"caption":"\"Ceiling Detail - Welsh Assembly\"","height":97});
															thumbnails[1556064] = clik.newPhoto({"id":1556064,"src":"Pulpit_Wells_Cathedral_75_thumb_DEA67826-1EC9-D45B-1C3D5E0BAB8D79C2.jpg","galleries_id":106595,"server_id":1,"link":"photo_1556064.html","width":130,"caption":"\"Pulpit - Wells Cathedral\"","height":176});
															thumbnails[1556090] = clik.newPhoto({"id":1556090,"src":"Sunset_on_the_Teign_75_thumb_DEAF52C6-1EC9-D45B-1C81E72B2BA7FAFC.jpg","galleries_id":106595,"server_id":1,"link":"photo_1556090.html","width":130,"caption":"\"Sunset on the Teign\"","height":82});
															thumbnails[1556126] = clik.newPhoto({"id":1556126,"src":"Air_Intake_Ferrari_76_thumb_DED85E1B-1EC9-D45B-1CFB88D55751968A.jpg","galleries_id":106594,"server_id":1,"link":"photo_1556126.html","width":130,"caption":"\"Air Intake Ferrari\"","height":98});
															thumbnails[1688318] = clik.newPhoto({"id":1688318,"src":"Apples_thumb.jpg","galleries_id":113742,"server_id":1,"link":"photo_1688318.html","width":130,"caption":"\"Apples\"","height":102});
															thumbnails[1688349] = clik.newPhoto({"id":1688349,"src":"BusKers_thumb.jpg","galleries_id":113742,"server_id":1,"link":"photo_1688349.html","width":130,"caption":"\"Buskers\"","height":108});
															thumbnails[1688352] = clik.newPhoto({"id":1688352,"src":"Christmas_Table_thumb.jpg","galleries_id":113742,"server_id":1,"link":"photo_1688352.html","width":130,"caption":"\"Christmas Table\"","height":98});
															thumbnails[1691103] = clik.newPhoto({"id":1691103,"src":"red Cabbage_thumb.jpg","galleries_id":168071,"server_id":1,"link":"photo_1691103.html","width":130,"caption":"\"Red Cabbage\"","height":136});
															thumbnails[1691129] = clik.newPhoto({"id":1691129,"src":"Spokes and Circles_thumb.jpg","galleries_id":168071,"server_id":1,"link":"photo_1691129.html","width":130,"caption":"\"Steam Engine Wheel Close Up\"","height":83});
															thumbnails[1874977] = clik.newPhoto({"id":1874977,"src":"Two-Horse-Race_thumb.jpg","galleries_id":126049,"server_id":1,"link":"photo_1874977.html","width":130,"caption":"\"Two Horse Race\"","height":87});
															thumbnails[1874979] = clik.newPhoto({"id":1874979,"src":"Snow-Patrol_thumb.jpg","galleries_id":136602,"server_id":1,"link":"photo_1874979.html","width":130,"caption":"\"Snow Patrol\"","height":60});
															thumbnails[1874983] = clik.newPhoto({"id":1874983,"src":"Stage_Fright_thumb.jpg","galleries_id":126049,"server_id":1,"link":"photo_1874983.html","width":130,"caption":"\"Stage Fright\"","height":184});
															thumbnails[1874985] = clik.newPhoto({"id":1874985,"src":"Curved-Seat_thumb.jpg","galleries_id":126049,"server_id":1,"link":"photo_1874985.html","width":130,"caption":"\"Curved Seat\"","height":195});
															thumbnails[1957776] = clik.newPhoto({"id":1957776,"src":"Irish_Loch_76_thumb_DEEF9757-1EC9-D45B-1CE1700FECBBBF5A.jpg","galleries_id":106594,"server_id":1,"link":"photo_1957776.html","width":130,"caption":"\"Irish Loch\"","height":98});
															thumbnails[1957781] = clik.newPhoto({"id":1957781,"src":"Loch_Carrib_76_thumb_DEF82519-1EC9-D45B-1CECFC6DBED609FC.jpg","galleries_id":106594,"server_id":1,"link":"photo_1957781.html","width":130,"caption":"\"Loch Carrib\"","height":68});
															thumbnails[1957782] = clik.newPhoto({"id":1957782,"src":"Stair_Well_Cardiff_76_thumb_DF02AE53-1EC9-D45B-1C4BDDB245CB9023.jpg","galleries_id":106594,"server_id":1,"link":"photo_1957782.html","width":130,"caption":"\"Stair Well (Cardiff)\"","height":174});
															thumbnails[2024035] = clik.newPhoto({"id":2024035,"src":"Power_1comp_pic_Placed_third_Ad_Col_jpg_thumb.jpg","galleries_id":135666,"server_id":1,"link":"photo_2024035.html","width":130,"caption":"\"Steam Up\"","height":83});
															thumbnails[2025825] = clik.newPhoto({"id":2025825,"src":"Irises in the style of Van Gough_thumb.jpg","galleries_id":135666,"server_id":1,"link":"photo_2025825.html","width":130,"caption":"\"Irises on the style of Van Gough\"","height":96});
															thumbnails[2025827] = clik.newPhoto({"id":2025827,"src":"Umbrellas_thumb.jpg","galleries_id":135666,"server_id":1,"link":"photo_2025827.html","width":130,"caption":"\"Umbrellas\"","height":173});
															thumbnails[2025831] = clik.newPhoto({"id":2025831,"src":"Le Ballet_thumb.jpg","galleries_id":135666,"server_id":1,"link":"photo_2025831.html","width":130,"caption":"\"Le Ballet\"","height":98});
															thumbnails[2120485] = clik.newPhoto({"id":2120485,"src":"SUNBATHING_ON_ACLOUDY_DAY_1_thumb.jpg","galleries_id":141067,"server_id":1,"link":"photo_2120485.html","width":130,"caption":"\"Watching You\"","height":173});
															thumbnails[2121889] = clik.newPhoto({"id":2121889,"src":"Gaudi_Gates1_thumb.jpg","galleries_id":141067,"server_id":1,"link":"photo_2121889.html","width":130,"caption":"\"Gaudi Gates\"","height":195});
															thumbnails[2123054] = clik.newPhoto({"id":2123054,"src":"CHRISTIAN_DOVEHOUSE_thumb.jpg","galleries_id":141067,"server_id":1,"link":"photo_2123054.html","width":130,"caption":"\"Christian Dovehouse\"","height":87});
															thumbnails[3217993] = clik.newPhoto({"id":3217993,"src":"Sunset Peek Hill Dartmoor_thumb.jpg","galleries_id":168071,"server_id":1,"link":"photo_3217993.html","width":130,"caption":"\"sunset Peek Hill, Dartmoor\"","height":86});
															thumbnails[3314516] = clik.newPhoto({"id":3314516,"src":"Beach_run_64060A1D-24E8-5EC4-4F9838DF3B3AE8AC_thumb.jpg","galleries_id":310011,"server_id":1,"link":"photo_3314516.html","width":130,"caption":"\"Beach Run\"","height":220});
															thumbnails[3468933] = clik.newPhoto({"id":3468933,"src":"East Dart Dartmoor_thumb.jpg","galleries_id":168071,"server_id":1,"link":"photo_3468933.html","width":130,"caption":"\"East Dart, Dartmoor\"","height":86});
															thumbnails[3630169] = clik.newPhoto({"id":3630169,"src":"Beads_of_dew_on_a_web_thumb.jpg","galleries_id":221998,"server_id":1,"link":"photo_3630169.html","width":130,"caption":"\"Beads of dew on a web\"","height":101});
															thumbnails[3630215] = clik.newPhoto({"id":3630215,"src":"_7170015_-_Copy_thumb.jpg","galleries_id":221998,"server_id":1,"link":"photo_3630215.html","width":130,"caption":"  \"Upper Teign\"","height":180});
															thumbnails[3630222] = clik.newPhoto({"id":3630222,"src":"Candle_thumb.jpg","galleries_id":221998,"server_id":1,"link":"photo_3630222.html","width":130,"caption":"\"Candle\"","height":173});
															thumbnails[3776854] = clik.newPhoto({"id":3776854,"src":"Inside_the_Hermitage_Z_thumb.jpg","galleries_id":230359,"server_id":1,"link":"photo_3776854.html","width":130,"caption":"\"Inside the Hermitage\"","height":211});
															thumbnails[3776866] = clik.newPhoto({"id":3776866,"src":"Beach_hut._thumb.jpg","galleries_id":230359,"server_id":1,"link":"photo_3776866.html","width":130,"caption":"\"Beach Hut\"","height":98});
															thumbnails[3776871] = clik.newPhoto({"id":3776871,"src":"Dutch_formal_garden_x_thumb.jpg","galleries_id":230359,"server_id":1,"link":"photo_3776871.html","width":130,"caption":"Dutch Formal Garden","height":98});
															thumbnails[3781560] = clik.newPhoto({"id":3781560,"src":"Beachcomber_thumb.jpg","galleries_id":310011,"server_id":1,"link":"photo_3781560.html","width":130,"caption":"\"Beachcomber\"","height":204});
															thumbnails[3781574] = clik.newPhoto({"id":3781574,"src":"puffballs_642A4909-24E8-5EC4-4FCF6F3A3A786FD6_thumb.jpg","galleries_id":310011,"server_id":1,"link":"photo_3781574.html","width":130,"caption":"\"Puffballs\"","height":83});
															thumbnails[4435647] = clik.newPhoto({"id":4435647,"src":"Byron_field_thumb.jpg","galleries_id":283860,"server_id":1,"link":"photo_4435647.html","width":130,"caption":"\"Hay Field\"","height":90});
															thumbnails[4454214] = clik.newPhoto({"id":4454214,"src":"Meldon_Dam_thumb.jpg","galleries_id":221998,"server_id":1,"link":"photo_4454214.html","width":130,"caption":"\"Meldon Dam\"","height":93});
															thumbnails[4811288] = clik.newPhoto({"id":4811288,"src":"Maisie_bw4C_thumb.jpg","galleries_id":221998,"server_id":1,"link":"photo_4811288.html","width":130,"caption":"\"Maisie\"","height":154});
															thumbnails[5209756] = clik.newPhoto({"id":5209756,"src":"Ella_final_print_BW_831_thumb.jpg","galleries_id":294046,"server_id":1,"link":"photo_5209756.html","width":130,"caption":"\"Ella\"","height":187});
															thumbnails[5210378] = clik.newPhoto({"id":5210378,"src":"Combe_Cellars_Sunset_8212_thumb.jpg","galleries_id":294046,"server_id":1,"link":"photo_5210378.html","width":130,"caption":"","height":91});
															thumbnails[5210473] = clik.newPhoto({"id":5210473,"src":"2_Cathedral_copy_thumb.jpg","galleries_id":294046,"server_id":1,"link":"photo_5210473.html","width":130,"caption":"\"Notre Dame\"","height":195});
															thumbnails[5210764] = clik.newPhoto({"id":5210764,"src":"Vancouver_Vamp_891_thumb.jpg","galleries_id":294046,"server_id":1,"link":"photo_5210764.html","width":130,"caption":"\"Vancover Vamp\"","height":174});
															thumbnails[5210987] = clik.newPhoto({"id":5210987,"src":"Rolling_in_871_thumb.jpg","galleries_id":294046,"server_id":1,"link":"photo_5210987.html","width":130,"caption":"\"Rolling\"","height":192});
															thumbnails[5232481] = clik.newPhoto({"id":5232481,"src":"tree_on_the_Green_thumb.jpg","galleries_id":113742,"server_id":1,"link":"photo_5232481.html","width":130,"caption":"\"Tree on The Green\"","height":98});
															thumbnails[5264019] = clik.newPhoto({"id":5264019,"src":"I_love_Eaves_thumb.jpg","galleries_id":141067,"server_id":1,"link":"photo_5264019.html","width":130,"caption":"\"I Love Eavis\"","height":89});
															thumbnails[5337225] = clik.newPhoto({"id":5337225,"src":"Fritiliari_thumb.jpg","galleries_id":300523,"server_id":1,"link":"photo_5337225.html","width":130,"caption":"\"Fritillary\"","height":195});
															thumbnails[5337230] = clik.newPhoto({"id":5337230,"src":"bjddbdjd_thumb.jpg","galleries_id":300523,"server_id":1,"link":"photo_5337230.html","width":130,"caption":"\"Early Morning\"","height":98});
															thumbnails[5337243] = clik.newPhoto({"id":5337243,"src":"S148_Join_the_queue_thumb.jpg","galleries_id":300523,"server_id":1,"link":"photo_5337243.html","width":130,"caption":"Join the queue","height":98});
															thumbnails[5337267] = clik.newPhoto({"id":5337267,"src":"faaghhfi_thumb.jpg","galleries_id":300523,"server_id":1,"link":"photo_5337267.html","width":130,"caption":"\"No Time for Coffee\"","height":87});
															thumbnails[5700104] = clik.newPhoto({"id":5700104,"src":"BABTCHAGRADMOTHER_POLAND1_thumb.jpg","galleries_id":136602,"server_id":1,"link":"photo_5700104.html","width":130,"caption":"\"Babtcha\"","height":195});
															thumbnails[5906688] = clik.newPhoto({"id":5906688,"src":"05_Fjord__Rainbow_thumb.jpg","galleries_id":230359,"server_id":1,"link":"photo_5906688.html","width":130,"caption":"\"Fjord and Rainbow\"","height":69});
															thumbnails[6555487] = clik.newPhoto({"id":6555487,"src":"Silver-A-Wet-Day-in-Exeter-_thumb.jpg","galleries_id":136602,"server_id":1,"link":"photo_6555487.html","width":130,"caption":"\"Wet Day in Exeter\"","height":103});
															thumbnails[6567270] = clik.newPhoto({"id":6567270,"src":"Alone_thumb.jpg","galleries_id":136602,"server_id":1,"link":"photo_6567270.html","width":130,"caption":"\"Alone\"","height":173});
															thumbnails[6567271] = clik.newPhoto({"id":6567271,"src":"High_Tide_Venice_thumb.jpg","galleries_id":136602,"server_id":1,"link":"photo_6567271.html","width":130,"caption":"\"High Tide Venice\"","height":98});
															thumbnails[6567274] = clik.newPhoto({"id":6567274,"src":"Ruins_At_Foggintor_thumb.jpg","galleries_id":136602,"server_id":1,"link":"photo_6567274.html","width":130,"caption":"\"Ruins At Foggintor\"","height":98});
															thumbnails[6567275] = clik.newPhoto({"id":6567275,"src":"Three_Sheep_thumb.jpg","galleries_id":136602,"server_id":1,"link":"photo_6567275.html","width":130,"caption":"\"Three Sheep\"","height":173});
															thumbnails[6593370] = clik.newPhoto({"id":6593370,"src":"Notre_Dame_thumb.jpg","galleries_id":136602,"server_id":1,"link":"photo_6593370.html","width":130,"caption":"\"Notre Dame\"","height":195});
															thumbnails[6628460] = clik.newPhoto({"id":6628460,"src":"Man_and_child12345_thumb.jpg","galleries_id":136602,"server_id":1,"link":"photo_6628460.html","width":130,"caption":"\"Man & Child\"","height":195});
															thumbnails[6929743] = clik.newPhoto({"id":6929743,"src":"In_the_Shadows1_thumb.jpg","galleries_id":375774,"server_id":1,"link":"photo_6929743.html","width":130,"caption":"\"In The Shadows\" ","height":201});
															thumbnails[6929754] = clik.newPhoto({"id":6929754,"src":"Last_Men_Standing1_thumb.jpg","galleries_id":375774,"server_id":1,"link":"photo_6929754.html","width":130,"caption":"\"Last Men Standing\"","height":184});
															thumbnails[6929759] = clik.newPhoto({"id":6929759,"src":"Home_to_Breakfast_thumb.jpg","galleries_id":375774,"server_id":1,"link":"photo_6929759.html","width":130,"caption":"\"Home For Breakfast\"","height":87});
															thumbnails[6929763] = clik.newPhoto({"id":6929763,"src":"Young_Elk_thumb.jpg","galleries_id":375774,"server_id":1,"link":"photo_6929763.html","width":130,"caption":"\"Young Elk\"","height":98});
															thumbnails[6929790] = clik.newPhoto({"id":6929790,"src":"Evening_Tide_thumb.jpg","galleries_id":375774,"server_id":1,"link":"photo_6929790.html","width":130,"caption":"\"Evening Tide\"","height":88});
															thumbnails[6929791] = clik.newPhoto({"id":6929791,"src":"Peaceful_Mooring_thumb.jpg","galleries_id":375774,"server_id":1,"link":"photo_6929791.html","width":130,"caption":"\"Peaceful Mooring\"","height":91});
															thumbnails[7422373] = clik.newPhoto({"id":7422373,"src":"HighandDry_thumb.jpg","galleries_id":149087,"server_id":1,"link":"photo_7422373.html","width":130,"caption":"High & dry","height":196});
															thumbnails[8631456] = clik.newPhoto({"id":8631456,"src":"DSC_0614_thumb.jpg","galleries_id":455967,"server_id":1,"link":"photo_8631456.html","width":130,"caption":"\"Jacks in a Row\"","height":194});
															thumbnails[8771054] = clik.newPhoto({"id":8771054,"src":"Midnight_Blues1_thumb.jpg","galleries_id":106593,"server_id":1,"link":"photo_8771054.html","width":130,"caption":"\"Midnight Blues\"","height":163});
															thumbnails[8771059] = clik.newPhoto({"id":8771059,"src":"Against_The_Tide_thumb.jpg","galleries_id":106593,"server_id":1,"link":"photo_8771059.html","width":130,"caption":"\"Against the Tide\"","height":130});
															thumbnails[8771060] = clik.newPhoto({"id":8771060,"src":"One_Picture_Two_People_thumb.jpg","galleries_id":106593,"server_id":1,"link":"photo_8771060.html","width":130,"caption":"\"One Picture Two People\"","height":88});
															thumbnails[8771066] = clik.newPhoto({"id":8771066,"src":"Through_The_Black_Hole_thumb.jpg","galleries_id":106593,"server_id":1,"link":"photo_8771066.html","width":130,"caption":"\"Through the Black Hole\"","height":88});
															thumbnails[8867907] = clik.newPhoto({"id":8867907,"src":"Walking_in_the_Wet_thumb.jpg","galleries_id":149087,"server_id":1,"link":"photo_8867907.html","width":130,"caption":"\"Walking in the Wet\"","height":96});
															thumbnails[8954325] = clik.newPhoto({"id":8954325,"src":"Barcelona-6771_CA39FCCE-1EC9-DFB6-0970C989726A75A7_thumb.jpg","galleries_id":471256,"server_id":1,"link":"photo_8954325.html","width":130,"caption":"Barcelona 1","height":208});
															thumbnails[8954330] = clik.newPhoto({"id":8954330,"src":"Barcelona-6876_thumb.jpg","galleries_id":471256,"server_id":1,"link":"photo_8954330.html","width":130,"caption":"Barcelona 2","height":211});
															thumbnails[8954334] = clik.newPhoto({"id":8954334,"src":"IMG_4934_thumb.jpg","galleries_id":471256,"server_id":1,"link":"photo_8954334.html","width":130,"caption":"","height":87});
															thumbnails[8954335] = clik.newPhoto({"id":8954335,"src":"IMG_6174_thumb.jpg","galleries_id":471256,"server_id":1,"link":"photo_8954335.html","width":130,"caption":"","height":87});
															thumbnails[8954338] = clik.newPhoto({"id":8954338,"src":"IMG_6641_thumb.jpg","galleries_id":471256,"server_id":1,"link":"photo_8954338.html","width":130,"caption":"","height":87});
															thumbnails[8954339] = clik.newPhoto({"id":8954339,"src":"IMG_6649_thumb.jpg","galleries_id":471256,"server_id":1,"link":"photo_8954339.html","width":130,"caption":"","height":195});
															thumbnails[8954341] = clik.newPhoto({"id":8954341,"src":"IMG_6653_thumb.jpg","galleries_id":471256,"server_id":1,"link":"photo_8954341.html","width":130,"caption":"","height":195});
															thumbnails[8954344] = clik.newPhoto({"id":8954344,"src":"stourhead_6608_thumb.jpg","galleries_id":471256,"server_id":1,"link":"photo_8954344.html","width":130,"caption":"Stourhead","height":87});
															thumbnails[8954376] = clik.newPhoto({"id":8954376,"src":"Reed_grass_thumb.jpg","galleries_id":221998,"server_id":1,"link":"photo_8954376.html","width":130,"caption":"Reed Grass","height":98});
															thumbnails[8954380] = clik.newPhoto({"id":8954380,"src":"Sparklers_thumb.jpg","galleries_id":221998,"server_id":1,"link":"photo_8954380.html","width":130,"caption":"Sparklers","height":109});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[149087] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Competition Honours ","link":"gallery_149087.html","maxRecords":0.0,"photoIDs":[7422373.0,8867907.0],"skipIndex":0,"section_code":"gallery","featured_images":"8867907,7422373","id":149087,"singleSection":false});				  						galleries[136602] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"WCPF Members Exhibition 2010","link":"gallery_136602.html","maxRecords":0.0,"photoIDs":[1874979.0,5700104.0,6555487.0,6567270.0,6567271.0,6567274.0,6567275.0,6593370.0,6628460.0],"skipIndex":0,"section_code":"gallery","featured_images":"6628460,6593370,6567275,6567274,6567271,6567270,6555487,5700104,1874979","id":136602,"singleSection":false});				  						galleries[310011] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Ken Bradley","link":"gallery_310011.html","maxRecords":0.0,"photoIDs":[1544699.0,3314516.0,3781560.0,3781574.0],"skipIndex":0,"section_code":"gallery","featured_images":3781574.0,"id":310011,"singleSection":false});				  						galleries[105840] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Rosemary Bradley","link":"gallery_105840.html","maxRecords":0.0,"photoIDs":[1544608.0,1544614.0,1544619.0,1544623.0],"skipIndex":0,"section_code":"gallery","featured_images":1544619.0,"id":105840,"singleSection":false});				  						galleries[106593] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Ken Holland","link":"gallery_106593.html","maxRecords":0.0,"photoIDs":[8771054.0,8771059.0,8771060.0,8771066.0],"skipIndex":0,"section_code":"gallery","featured_images":"8771066,8771060,8771059,8771054","id":106593,"singleSection":false});				  						galleries[455967] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Jane Thomson","link":"gallery_455967.html","maxRecords":0.0,"photoIDs":[8631456.0],"skipIndex":0,"section_code":"gallery","featured_images":8631456.0,"id":455967,"singleSection":false});				  						galleries[168071] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"John Thompson","link":"gallery_168071.html","maxRecords":0.0,"photoIDs":[1691103.0,1691129.0,3217993.0,3468933.0],"skipIndex":0,"section_code":"gallery","featured_images":3468933.0,"id":168071,"singleSection":false});				  						galleries[126049] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Paul Lawson","link":"gallery_126049.html","maxRecords":0.0,"photoIDs":[1874977.0,1874983.0,1874985.0],"skipIndex":0,"section_code":"gallery","featured_images":1874977.0,"id":126049,"singleSection":false});				  						galleries[283860] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Byron Carnell","link":"gallery_283860.html","maxRecords":0.0,"photoIDs":[4435647.0],"skipIndex":0,"section_code":"gallery","featured_images":4435647.0,"id":283860,"singleSection":false});				  						galleries[141067] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Edward Crawford","link":"gallery_141067.html","maxRecords":0.0,"photoIDs":[2120485.0,2121889.0,2123054.0,5264019.0],"skipIndex":0,"section_code":"gallery","featured_images":5264019.0,"id":141067,"singleSection":false});				  						galleries[221998] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Roger Smart","link":"gallery_221998.html","maxRecords":0.0,"photoIDs":[3630169.0,3630215.0,3630222.0,4454214.0,4811288.0,8954376.0,8954380.0],"skipIndex":0,"section_code":"gallery","featured_images":4454214.0,"id":221998,"singleSection":false});				  						galleries[106595] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Shirley Boulton","link":"gallery_106595.html","maxRecords":0.0,"photoIDs":[1556050.0,1556057.0,1556064.0,1556090.0],"skipIndex":0,"section_code":"gallery","featured_images":1556064.0,"id":106595,"singleSection":false});				  						galleries[300523] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Jon Pitt","link":"gallery_300523.html","maxRecords":0.0,"photoIDs":[5337225.0,5337230.0,5337243.0,5337267.0],"skipIndex":0,"section_code":"gallery","featured_images":5337230.0,"id":300523,"singleSection":false});				  						galleries[106594] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Terry Boulton","link":"gallery_106594.html","maxRecords":0.0,"photoIDs":[1556126.0,1957776.0,1957781.0,1957782.0],"skipIndex":0,"section_code":"gallery","featured_images":1556126.0,"id":106594,"singleSection":false});				  						galleries[135666] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Tony Wilson","link":"gallery_135666.html","maxRecords":0.0,"photoIDs":[2024035.0,2025825.0,2025827.0,2025831.0],"skipIndex":0,"section_code":"gallery","featured_images":2025825.0,"id":135666,"singleSection":false});				  						galleries[113742] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Barbara Todd","link":"gallery_113742.html","maxRecords":0.0,"photoIDs":[1688318.0,1688349.0,1688352.0,5232481.0],"skipIndex":0,"section_code":"gallery","featured_images":1688352.0,"id":113742,"singleSection":false});				  						galleries[230359] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"David Renhard","link":"gallery_230359.html","maxRecords":0.0,"photoIDs":[3776854.0,3776866.0,3776871.0,5906688.0],"skipIndex":0,"section_code":"gallery","featured_images":3776866.0,"id":230359,"singleSection":false});				  						galleries[105624] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Peter Sillifant","link":"gallery_105624.html","maxRecords":0.0,"photoIDs":[1541740.0,1541741.0,1541742.0,1541743.0],"skipIndex":0,"section_code":"gallery","featured_images":1541742.0,"id":105624,"singleSection":false});				  						galleries[375774] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Colin Carter","link":"gallery_375774.html","maxRecords":0.0,"photoIDs":[6929743.0,6929754.0,6929759.0,6929763.0,6929790.0,6929791.0],"skipIndex":0,"section_code":"gallery","featured_images":6929754.0,"id":375774,"singleSection":false});				  						galleries[294046] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Bob Clowes","link":"gallery_294046.html","maxRecords":0.0,"photoIDs":[5209756.0,5210378.0,5210473.0,5210764.0,5210987.0],"skipIndex":0,"section_code":"gallery","featured_images":5210473.0,"id":294046,"singleSection":false});				  						galleries[471256] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dave Hutton","link":"gallery_471256.html","maxRecords":0.0,"photoIDs":[8954325.0,8954330.0,8954334.0,8954335.0,8954338.0,8954339.0,8954341.0,8954344.0],"skipIndex":0,"section_code":"gallery","featured_images":"8954344,8954341,8954339,8954338,8954335,8954334,8954330,8954325","id":471256,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6929791,6929790,6929763,6929759,6929754,6929743,6628460,6567275,6567274,6567271,6567270,6555487,5906688,5700104,5337267,5337243,5337230,5337225,5264019,5232481,5210987,5210764,5210473,5210378,5209756,4811288,4454214,4435647,3781574,3781560,3776871,3776866,3776854,3630222,3630215,3630169,3468933,3314516,3217993,2123054,2121889,2120485,2025831,2025827,2025825,2024035,1957782,1957781,1957776,1874985,1874983,1874979,1874977,1862863,1691129,1691103,1688352,1688349,1688318,1556126,1556090,1556064,1556057,1556050,1544699,1544623,1544619,1544614,1544608,1543703,1543700,1543689,1541743,1541742,1541741,1541740';
imageSets[2] = '6929754,5337230,5264019,5210473,4454214,3781574,3776866,3468933,2025825,1874977,1688352,1556126,1556064,1544619,1541742';
imageSets[3] = '6628460,6567275,6567274,6567271,6567270,6555487,5232481,4811288,4454214,4435647,3781574,3781560,3776871,3776866,3776854,3630222,3630215,3630169,3468933,3314516,3217993,2123054,2121889,2120485,2025831,2025827,2025825,2024035,1957782,1957781,1957776,1874985,1874983';
imageSets[239462] = '7383659';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Camera2007/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Camera2007/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 || photos || {})[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 = 'DAWLISH & TEIGNMOUTH CAMERA CLUB: ' + 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> ' + (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 !== '') {
			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;
	}
}

			

