window.thumbnails = {};
															thumbnails[3492940] = clik.newPhoto({"id":3492940,"src":"ChrisPictureBWweb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":203});
															thumbnails[3474866] = clik.newPhoto({"id":3474866,"src":"Defender_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3474866.html","width":130,"caption":"Business activities","height":195});
															thumbnails[3474888] = clik.newPhoto({"id":3474888,"src":"Anchorman_thumb.jpg","galleries_id":211067,"server_id":15,"link":"photo_3474888.html","width":130,"caption":"Albanian shipwreck","height":92});
															thumbnails[3474896] = clik.newPhoto({"id":3474896,"src":"Fishmonger's-Shop_thumb.jpg","galleries_id":211067,"server_id":15,"link":"photo_3474896.html","width":130,"caption":"Fishmonger's Wares","height":178});
															thumbnails[3474897] = clik.newPhoto({"id":3474897,"src":"Junk-Shop_thumb.jpg","galleries_id":211067,"server_id":15,"link":"photo_3474897.html","width":130,"caption":"Junk Shop","height":184});
															thumbnails[3474899] = clik.newPhoto({"id":3474899,"src":"Yatton_thumb.jpg","galleries_id":211067,"server_id":15,"link":"photo_3474899.html","width":130,"caption":"Yatton","height":69});
															thumbnails[3474900] = clik.newPhoto({"id":3474900,"src":"Towards May Hill_thumb.jpg","galleries_id":211067,"server_id":15,"link":"photo_3474900.html","width":130,"caption":"Towards May Hill","height":44});
															thumbnails[3474904] = clik.newPhoto({"id":3474904,"src":"Palmyra-tombs-1_thumb.jpg","galleries_id":211067,"server_id":15,"link":"photo_3474904.html","width":130,"caption":"Palmyra Tombs","height":92});
															thumbnails[3474905] = clik.newPhoto({"id":3474905,"src":"Doctor's-balcony,-Beirut_thumb.jpg","galleries_id":211067,"server_id":15,"link":"photo_3474905.html","width":130,"caption":"Doctor's Balcony","height":92});
															thumbnails[3474908] = clik.newPhoto({"id":3474908,"src":"B8-01-4_thumb.jpg","galleries_id":211067,"server_id":15,"link":"photo_3474908.html","width":130,"caption":"Dalmatian Ropes","height":199});
															thumbnails[3474929] = clik.newPhoto({"id":3474929,"src":"Bedouin family_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3474929.html","width":130,"caption":"Bedouin family in the Lebanese mountains","height":86});
															thumbnails[3474933] = clik.newPhoto({"id":3474933,"src":"BeiCo020_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3474933.html","width":130,"caption":"Vending on Beirut's Corniche","height":86});
															thumbnails[3474937] = clik.newPhoto({"id":3474937,"src":"BeiMi033_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3474937.html","width":130,"caption":"Rainbow over Beirut","height":86});
															thumbnails[3479871] = clik.newPhoto({"id":3479871,"src":"Post Office Staff_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3479871.html","width":130,"caption":"Staff events","height":87});
															thumbnails[3479872] = clik.newPhoto({"id":3479872,"src":"Crowns of Cradley_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3479872.html","width":130,"caption":"Theatrical photography","height":195});
															thumbnails[3479895] = clik.newPhoto({"id":3479895,"src":"Bird of Paradise flower_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479895.html","width":130,"caption":"Bird of Paradise flower in a Lebanese garden","height":86});
															thumbnails[3479897] = clik.newPhoto({"id":3479897,"src":"Fishing boats at Byblos_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479897.html","width":130,"caption":"Fishing boats at Byblos","height":86});
															thumbnails[3479899] = clik.newPhoto({"id":3479899,"src":"Fishing port near Beirut_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479899.html","width":130,"caption":"Fishing port near Beirut","height":86});
															thumbnails[3479900] = clik.newPhoto({"id":3479900,"src":"Independence demonstrations_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479900.html","width":130,"caption":"Street vendors during public demonstrations in Beirut","height":86});
															thumbnails[3479901] = clik.newPhoto({"id":3479901,"src":"Sarcophagi in Tyre_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479901.html","width":130,"caption":"Sarcophagi in Tyre","height":86});
															thumbnails[3479903] = clik.newPhoto({"id":3479903,"src":"Railway ruins_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479903.html","width":130,"caption":"Ruined railway in the Beka'a Valley","height":86});
															thumbnails[3479904] = clik.newPhoto({"id":3479904,"src":"Al Amine mosque in Beirut_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479904.html","width":130,"caption":"The Al Amine mosque in Beirut","height":196});
															thumbnails[3479905] = clik.newPhoto({"id":3479905,"src":"Reconstruction work in Downtown Beirut_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479905.html","width":130,"caption":"Construction work in Beirut","height":196});
															thumbnails[3479906] = clik.newPhoto({"id":3479906,"src":"Bedouin children in northern Lebanon_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479906.html","width":130,"caption":"Bedouin children in the Lebanese mountains","height":196});
															thumbnails[3479907] = clik.newPhoto({"id":3479907,"src":"Black Iris in the Lebanese mountains_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479907.html","width":130,"caption":"Fields of Black Iris in the Lebanese mountains","height":196});
															thumbnails[3479908] = clik.newPhoto({"id":3479908,"src":"Lebanese coast from Harissa_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479908.html","width":130,"caption":"Jounieh Bay from Harissa","height":196});
															thumbnails[3479911] = clik.newPhoto({"id":3479911,"src":"War memorial near Beirut_thumb.jpg","galleries_id":212540,"server_id":15,"link":"photo_3479911.html","width":130,"caption":"War memorial near Beirut","height":196});
															thumbnails[3479914] = clik.newPhoto({"id":3479914,"src":"Aleppo panoramic_thumb.jpg","galleries_id":212826,"server_id":15,"link":"photo_3479914.html","width":130,"caption":"Panoramic view of Aleppo from the Citadel","height":86});
															thumbnails[3479915] = clik.newPhoto({"id":3479915,"src":"Aleppo souq_thumb.jpg","galleries_id":212826,"server_id":15,"link":"photo_3479915.html","width":130,"caption":"Hardware in a souq in Aleppo","height":86});
															thumbnails[3479916] = clik.newPhoto({"id":3479916,"src":"Dead cities_thumb.jpg","galleries_id":212826,"server_id":15,"link":"photo_3479916.html","width":130,"caption":"Herding sheep through one of Syria's \"Dead Cities\"","height":86});
															thumbnails[3479917] = clik.newPhoto({"id":3479917,"src":"St Simeon's column_thumb.jpg","galleries_id":212826,"server_id":15,"link":"photo_3479917.html","width":130,"caption":"St Simeon's column in northern Syria","height":86});
															thumbnails[3479918] = clik.newPhoto({"id":3479918,"src":"Crac des Chevaliers_thumb.jpg","galleries_id":212826,"server_id":15,"link":"photo_3479918.html","width":130,"caption":"The fortress at Crac des Chevaliers","height":196});
															thumbnails[3479919] = clik.newPhoto({"id":3479919,"src":"Hama waterwheel_thumb.jpg","galleries_id":212826,"server_id":15,"link":"photo_3479919.html","width":130,"caption":"One of the ancient waterwheels at Hama","height":196});
															thumbnails[3479920] = clik.newPhoto({"id":3479920,"src":"Lanterns in Aleppo_thumb.jpg","galleries_id":212826,"server_id":15,"link":"photo_3479920.html","width":130,"caption":"Lanterns in a souq in Aleppo","height":196});
															thumbnails[3491108] = clik.newPhoto({"id":3491108,"src":"Croquet_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3491108.html","width":130,"caption":"Product photography","height":87});
															thumbnails[3491109] = clik.newPhoto({"id":3491109,"src":"Hat Shop_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3491109.html","width":130,"caption":"Photography for promotional material","height":195});
															thumbnails[3491130] = clik.newPhoto({"id":3491130,"src":"Air Ambulance_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3491130.html","width":130,"caption":"Editorial","height":87});
															thumbnails[3491131] = clik.newPhoto({"id":3491131,"src":"HMS Ledbury_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3491131.html","width":130,"caption":"Civic events","height":87});
															thumbnails[3491132] = clik.newPhoto({"id":3491132,"src":"Eve28-93_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3491132.html","width":130,"caption":"Public events and shows","height":196});
															thumbnails[3493012] = clik.newPhoto({"id":3493012,"src":"EgCai022_thumb.jpg","galleries_id":213587,"server_id":15,"link":"photo_3493012.html","width":130,"caption":"Street kids in a Cairo suburb","height":86});
															thumbnails[3493049] = clik.newPhoto({"id":3493049,"src":"EgCai045_thumb.jpg","galleries_id":213587,"server_id":15,"link":"photo_3493049.html","width":130,"caption":"Diners on a Nile cruise","height":86});
															thumbnails[3493054] = clik.newPhoto({"id":3493054,"src":"EgCai082_thumb.jpg","galleries_id":213587,"server_id":15,"link":"photo_3493054.html","width":130,"caption":"A Cairo traffic jam and feluccas on the Nile","height":86});
															thumbnails[3493058] = clik.newPhoto({"id":3493058,"src":"EgNil019_thumb.jpg","galleries_id":213587,"server_id":15,"link":"photo_3493058.html","width":130,"caption":"Feluccas moored on the Nile next to The Four Seasons hotel","height":196});
															thumbnails[3493062] = clik.newPhoto({"id":3493062,"src":"EgNil032_thumb.jpg","galleries_id":213587,"server_id":15,"link":"photo_3493062.html","width":130,"caption":"Bows of a Nile felucca","height":86});
															thumbnails[3493065] = clik.newPhoto({"id":3493065,"src":"EgRai016_thumb.jpg","galleries_id":213587,"server_id":15,"link":"photo_3493065.html","width":130,"caption":"Locomotive in the Cairo Railway museum","height":86});
															thumbnails[3990201] = clik.newPhoto({"id":3990201,"src":"One_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3990201.html","width":130,"caption":"Formal Portraits","height":200});
															thumbnails[3990204] = clik.newPhoto({"id":3990204,"src":"Two_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3990204.html","width":130,"caption":"Publicity Portraits","height":95});
															thumbnails[3990205] = clik.newPhoto({"id":3990205,"src":"Three_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_3990205.html","width":130,"caption":"Informal Portraits","height":192});
															thumbnails[5340326] = clik.newPhoto({"id":5340326,"src":"Corporate_Events_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_5340326.html","width":130,"caption":"Corporate Events","height":196});
															thumbnails[5340335] = clik.newPhoto({"id":5340335,"src":"Ledbury_snow_in_January_2010_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5340335.html","width":130,"caption":"Snow in Ledbury January 2010","height":196});
															thumbnails[5521521] = clik.newPhoto({"id":5521521,"src":"Blue_Mountains_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521521.html","width":130,"caption":"Blue Mountains","height":197});
															thumbnails[5521522] = clik.newPhoto({"id":5521522,"src":"Darling_Harbour_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521522.html","width":130,"caption":"Darling Harbour","height":193});
															thumbnails[5521523] = clik.newPhoto({"id":5521523,"src":"DidgereeDoos_in_Cairns_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521523.html","width":130,"caption":"DidgereeDoos in Cairns","height":186});
															thumbnails[5521524] = clik.newPhoto({"id":5521524,"src":"Giraffe_and_Opera_House_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521524.html","width":130,"caption":"Giraffe and Opera House","height":196});
															thumbnails[5521525] = clik.newPhoto({"id":5521525,"src":"Harbour_Bridge_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521525.html","width":130,"caption":"Harbour Bridge","height":91});
															thumbnails[5521526] = clik.newPhoto({"id":5521526,"src":"Kings_Cross_in_Sydney_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521526.html","width":130,"caption":"Kings Cross in Sydney","height":89});
															thumbnails[5521527] = clik.newPhoto({"id":5521527,"src":"Port_Douglas_in_Queensland_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521527.html","width":130,"caption":"Port Douglas in Queensland","height":196});
															thumbnails[5521528] = clik.newPhoto({"id":5521528,"src":"Sydney_Harbour_musician_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521528.html","width":130,"caption":"Sydney Harbour musician","height":86});
															thumbnails[5521529] = clik.newPhoto({"id":5521529,"src":"Taronga_Zoo_and_Harbour_Bridge_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521529.html","width":130,"caption":"Taronga Zoo and Harbour Bridge","height":86});
															thumbnails[5521530] = clik.newPhoto({"id":5521530,"src":"Taronga_Zoo_and_Opera_House_thumb.jpg","galleries_id":312772,"server_id":15,"link":"photo_5521530.html","width":130,"caption":"Zoo and Opera House","height":100});
															thumbnails[5521533] = clik.newPhoto({"id":5521533,"src":"Chobe_National_Park_thumb.jpg","galleries_id":312773,"server_id":15,"link":"photo_5521533.html","width":130,"caption":"Chobe National Park","height":86});
															thumbnails[5521534] = clik.newPhoto({"id":5521534,"src":"Kasane_Tourist_Office_thumb.jpg","galleries_id":312773,"server_id":15,"link":"photo_5521534.html","width":130,"caption":"Kasane Tourist Office","height":98});
															thumbnails[5521535] = clik.newPhoto({"id":5521535,"src":"Okavango_Delta_serpentine_thumb.jpg","galleries_id":312773,"server_id":15,"link":"photo_5521535.html","width":130,"caption":"Okavango Delta serpentine","height":192});
															thumbnails[5521536] = clik.newPhoto({"id":5521536,"src":"Okavango_Delta_thumb.jpg","galleries_id":312773,"server_id":15,"link":"photo_5521536.html","width":130,"caption":"Okavango Delta","height":86});
															thumbnails[5521537] = clik.newPhoto({"id":5521537,"src":"On_safari_thumb.jpg","galleries_id":312773,"server_id":15,"link":"photo_5521537.html","width":130,"caption":"On safari","height":86});
															thumbnails[5521538] = clik.newPhoto({"id":5521538,"src":"Suburb_of_Maun_thumb.jpg","galleries_id":312773,"server_id":15,"link":"photo_5521538.html","width":130,"caption":"Suburban dwelling in Maun","height":86});
															thumbnails[5190755] = clik.newPhoto({"id":5190755,"src":"Alms_houses_and_clock_tower_in_Ledbury_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190755.html","width":130,"caption":"Alms houses and clock tower in Ledbury","height":86});
															thumbnails[5340324] = clik.newPhoto({"id":5340324,"src":"Business_Presentations_thumb.jpg","galleries_id":211066,"server_id":15,"link":"photo_5340324.html","width":130,"caption":"Business Presentations","height":62});
															thumbnails[7371011] = clik.newPhoto({"id":7371011,"src":"UHRos339_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371011.html","width":130,"caption":"","height":195});
															thumbnails[5190756] = clik.newPhoto({"id":5190756,"src":"Castle_Green_Hereford_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190756.html","width":130,"caption":"Castle Green in Hereford","height":65});
															thumbnails[7371012] = clik.newPhoto({"id":7371012,"src":"UHRos363_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371012.html","width":130,"caption":"","height":180});
															thumbnails[5190757] = clik.newPhoto({"id":5190757,"src":"Hereford_Cathedral_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190757.html","width":130,"caption":"Hereford Cathedral","height":86});
															thumbnails[7371013] = clik.newPhoto({"id":7371013,"src":"UHRos368_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371013.html","width":130,"caption":"","height":86});
															thumbnails[5190758] = clik.newPhoto({"id":5190758,"src":"Strawberries_at_Ross-on-Wye_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190758.html","width":130,"caption":"Strawberries at Ross-on-wye","height":86});
															thumbnails[7371014] = clik.newPhoto({"id":7371014,"src":"UHRos392_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371014.html","width":130,"caption":"","height":195});
															thumbnails[5190759] = clik.newPhoto({"id":5190759,"src":"The_Pavilion_cafe_in_Leominster_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190759.html","width":130,"caption":"The Pavilion cafe in Leominster","height":86});
															thumbnails[7371015] = clik.newPhoto({"id":7371015,"src":"UHRos375_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371015.html","width":130,"caption":"","height":86});
															thumbnails[5190761] = clik.newPhoto({"id":5190761,"src":"Victoria_Bridge_in_Hereford_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190761.html","width":130,"caption":"Detail from Hereford's Victoria Bridge","height":86});
															thumbnails[7371016] = clik.newPhoto({"id":7371016,"src":"UHRos402_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371016.html","width":130,"caption":"","height":202});
															thumbnails[5190762] = clik.newPhoto({"id":5190762,"src":"Autumn_at_How_Caple_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190762.html","width":130,"caption":"Autumn at How Caple","height":196});
															thumbnails[7371017] = clik.newPhoto({"id":7371017,"src":"UHRos428_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371017.html","width":130,"caption":"","height":189});
															thumbnails[5190763] = clik.newPhoto({"id":5190763,"src":"Bicycles_in_Hereford_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190763.html","width":130,"caption":"Bicycles in Hereford","height":196});
															thumbnails[7371018] = clik.newPhoto({"id":7371018,"src":"UHRos436_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371018.html","width":130,"caption":"","height":195});
															thumbnails[5190764] = clik.newPhoto({"id":5190764,"src":"Fishing_lodge_on_the_River_Wye_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190764.html","width":130,"caption":"Fishing lodge on the River Wye","height":196});
															thumbnails[7371019] = clik.newPhoto({"id":7371019,"src":"UHRos458_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371019.html","width":130,"caption":"","height":169});
															thumbnails[5190765] = clik.newPhoto({"id":5190765,"src":"Pembridge_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190765.html","width":130,"caption":"Pub at Pembridge","height":196});
															thumbnails[7371020] = clik.newPhoto({"id":7371020,"src":"UHRos485_thumb.jpg","galleries_id":398994,"server_id":15,"link":"photo_7371020.html","width":130,"caption":"","height":195});
															thumbnails[5190766] = clik.newPhoto({"id":5190766,"src":"Summer_refreshments_in_Eardisland_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190766.html","width":130,"caption":"Summer refreshments in Eardisland","height":196});
															thumbnails[5190767] = clik.newPhoto({"id":5190767,"src":"Welcome_to_Ledbury_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190767.html","width":130,"caption":"Welcome to Ledbury","height":196});
															thumbnails[5190768] = clik.newPhoto({"id":5190768,"src":"Wood_carving_in_Hereford_thumb.jpg","galleries_id":293094,"server_id":15,"link":"photo_5190768.html","width":130,"caption":"Wood carving in Hereford","height":196});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[312772] = clik.newGallery({"parentGallery":212825,"usePopups":false,"title":"Australia","link":"gallery_312772.html","maxRecords":0.0,"photoIDs":[5521521.0,5521522.0,5521523.0,5521524.0,5521525.0,5521526.0,5521527.0,5521528.0,5521529.0,5521530.0],"skipIndex":0,"section_code":"gallery","featured_images":"5521530,5521529,5521528,5521527,5521526,5521525,5521524,5521523,5521522,5521521","id":312772,"singleSection":false});				  						galleries[312773] = clik.newGallery({"parentGallery":212825,"usePopups":false,"title":"Botswana","link":"gallery_312773.html","maxRecords":0.0,"photoIDs":[5521533.0,5521534.0,5521535.0,5521536.0,5521537.0,5521538.0],"skipIndex":0,"section_code":"gallery","featured_images":"5521538,5521537,5521536,5521535,5521534,5521533","id":312773,"singleSection":false});				  						galleries[213587] = clik.newGallery({"parentGallery":212825,"usePopups":false,"title":"Egypt","link":"gallery_213587.html","maxRecords":0.0,"photoIDs":[3493012.0,3493049.0,3493054.0,3493058.0,3493062.0,3493065.0],"skipIndex":0,"section_code":"gallery","featured_images":"3493065,3493062,3493058,3493054,3493049,3493012","id":213587,"singleSection":false});				  						galleries[212540] = clik.newGallery({"parentGallery":212825,"usePopups":false,"title":"Lebanon","link":"gallery_212540.html","maxRecords":0.0,"photoIDs":[3474929.0,3474933.0,3474937.0,3479895.0,3479897.0,3479899.0,3479900.0,3479901.0,3479903.0,3479904.0,3479905.0,3479906.0,3479907.0,3479908.0,3479911.0],"skipIndex":0,"section_code":"gallery","featured_images":"3479911,3479908,3479907,3479906,3479905,3479904,3479903,3479901,3479900,3479899","id":212540,"singleSection":false});				  						galleries[212826] = clik.newGallery({"parentGallery":212825,"usePopups":false,"title":"Syria","link":"gallery_212826.html","maxRecords":0.0,"photoIDs":[3479914.0,3479915.0,3479916.0,3479917.0,3479918.0,3479919.0,3479920.0],"skipIndex":0,"section_code":"gallery","featured_images":"3479920,3479919,3479918,3479917,3479916,3479915,3479914","id":212826,"singleSection":false});				  						galleries[293094] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Editorial photography","link":"gallery_293094.html","maxRecords":0.0,"photoIDs":[5340335.0,5190755.0,5190756.0,5190757.0,5190758.0,5190759.0,5190761.0,5190762.0,5190763.0,5190764.0,5190765.0,5190766.0,5190767.0,5190768.0],"skipIndex":0,"section_code":"gallery","featured_images":"5340335,5190768,5190767,5190766,5190765,5190764,5190763,5190762,5190761,5190759","id":293094,"singleSection":false});				  						galleries[212825] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel","link":"gallery_212825.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"5521538,5521537,5521536,5521535,5521534,5521533,5521530,5521529,5521528,5521527","id":212825,"singleSection":false});				  						galleries[211066] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commercial photography","link":"gallery_211066.html","maxRecords":0.0,"photoIDs":[3474866.0,3479871.0,3479872.0,3491108.0,3491109.0,3491130.0,3491131.0,3491132.0,3990201.0,3990204.0,3990205.0,5340326.0,5340324.0],"skipIndex":0,"section_code":"gallery","featured_images":"5340326,5340324,3990205,3990204,3990201,3491132,3491131,3491130,3491109,3491108","id":211066,"singleSection":false});				  						galleries[211067] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Limited edition prints","link":"gallery_211067.html","maxRecords":0.0,"photoIDs":[3474888.0,3474896.0,3474897.0,3474899.0,3474900.0,3474904.0,3474905.0,3474908.0],"skipIndex":0,"section_code":"gallery","featured_images":"3474908,3474905,3474904,3474900,3474899,3474897,3474896,3474888","id":211067,"singleSection":false});				  						galleries[398994] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Winter in Ross-on-Wye","link":"gallery_398994.html","maxRecords":0.0,"photoIDs":[7371011.0,7371012.0,7371013.0,7371014.0,7371015.0,7371016.0,7371017.0,7371018.0,7371019.0,7371020.0],"skipIndex":0,"section_code":"gallery","featured_images":"7371020,7371019,7371018,7371017,7371016,7371015,7371014,7371013,7371012,7371011","id":398994,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3492940';
imageSets[3] = '7371020,7371019,7371018,7371017,7371016,7371015,7371014,7371013,7371012,7371011,5521538,5521537,5521536,5521535,5521534,5521533,5521530,5521529,5521528,5521527,5521526,5521525,5521524,5521523,5521522,5521521,5340335,5340326,5340324,5190768,5190767,5190766,5190765,5190764,5190763,5190762,5190761,5190759,5190758,5190757,5190756,5190755,3990205,3990204,3990201,3493065,3493062,3493058,3493054,3493049';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/chrispoole/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/chrispoole/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 = 'Chris Poole Images: ' + 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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		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 += '<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 += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

