window.thumbnails = {};
															thumbnails[1145434] = clik.newPhoto({"id":1145434,"src":"Gribdale-2_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_1145434.html","width":160,"caption":"Gribdale Winter","height":105});
															thumbnails[1145444] = clik.newPhoto({"id":1145444,"src":"Saltburn-Sunset_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_1145444.html","width":160,"caption":"Saltburn Sunset","height":107});
															thumbnails[1145454] = clik.newPhoto({"id":1145454,"src":"Evening-Roseberry_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_1145454.html","width":160,"caption":"Evening Light, Roseberry","height":106});
															thumbnails[1145456] = clik.newPhoto({"id":1145456,"src":"The-Buck_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_1145456.html","width":160,"caption":"Levenside, Great Ayton","height":95});
															thumbnails[1145459] = clik.newPhoto({"id":1145459,"src":"June-1_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_1145459.html","width":160,"caption":"Huntcliffe, Saltburn","height":107});
															thumbnails[1145463] = clik.newPhoto({"id":1145463,"src":"Paddys-Hole1_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_1145463.html","width":160,"caption":"Paddy's Hole, South Gare","height":107});
															thumbnails[1145556] = clik.newPhoto({"id":1145556,"src":"Estuary_wreck_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_1145556.html","width":160,"caption":"Tees Estuary","height":90});
															thumbnails[1145562] = clik.newPhoto({"id":1145562,"src":"Church-in-Snow_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_1145562.html","width":160,"caption":"Winter, Kirkby in Cleveland","height":105});
															thumbnails[1145567] = clik.newPhoto({"id":1145567,"src":"Bridge of Sighs 2_thumb.jpg","galleries_id":83102,"server_id":15,"link":"photo_1145567.html","width":130,"caption":"Queen of Sighs","height":88});
															thumbnails[1145568] = clik.newPhoto({"id":1145568,"src":"Gondalas Final_thumb.jpg","galleries_id":83102,"server_id":15,"link":"photo_1145568.html","width":130,"caption":"Venetian Dawn","height":83});
															thumbnails[1145569] = clik.newPhoto({"id":1145569,"src":"Venetian Mask  Cropped_thumb.jpg","galleries_id":83102,"server_id":15,"link":"photo_1145569.html","width":130,"caption":"Come Hither","height":88});
															thumbnails[1145571] = clik.newPhoto({"id":1145571,"src":"Web choice 2_thumb.jpg","galleries_id":83102,"server_id":15,"link":"photo_1145571.html","width":130,"caption":"Venetian Couple","height":83});
															thumbnails[1145575] = clik.newPhoto({"id":1145575,"src":"Lizard-in-tree-2_thumb.jpg","galleries_id":83103,"server_id":15,"link":"photo_1145575.html","width":160,"caption":"Forest Dragon","height":108});
															thumbnails[1145578] = clik.newPhoto({"id":1145578,"src":"Cayman-Final_thumb.jpg","galleries_id":83103,"server_id":15,"link":"photo_1145578.html","width":160,"caption":"Amazon Cayman","height":98});
															thumbnails[1145580] = clik.newPhoto({"id":1145580,"src":"Squirrell-Monkey_thumb.jpg","galleries_id":83103,"server_id":15,"link":"photo_1145580.html","width":160,"caption":"Squirrel Monkey","height":107});
															thumbnails[1145582] = clik.newPhoto({"id":1145582,"src":"Green-frog-10a_thumb.jpg","galleries_id":83103,"server_id":15,"link":"photo_1145582.html","width":160,"caption":"Tree Frog","height":110});
															thumbnails[1145586] = clik.newPhoto({"id":1145586,"src":"Sally-Lightfoot-Crab-1_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_1145586.html","width":160,"caption":"Sally Lightfoot Crab","height":101});
															thumbnails[1145589] = clik.newPhoto({"id":1145589,"src":"Albatross-with-egg-final_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_1145589.html","width":160,"caption":"Waved Albatross","height":102});
															thumbnails[1145591] = clik.newPhoto({"id":1145591,"src":"Great-Frigate-Bird-Displaying_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_1145591.html","width":160,"caption":"Great Frigate Bird","height":112});
															thumbnails[1145595] = clik.newPhoto({"id":1145595,"src":"Sealion-and-pup-5_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_1145595.html","width":160,"caption":"Sealion and Pup","height":107});
															thumbnails[1145603] = clik.newPhoto({"id":1145603,"src":"George-3_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_1145603.html","width":160,"caption":"Lonesome George","height":107});
															thumbnails[1145604] = clik.newPhoto({"id":1145604,"src":"BF-Boobies-displaying-blurred-backgorund_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_1145604.html","width":160,"caption":"Blue Footed Boobies","height":120});
															thumbnails[1145609] = clik.newPhoto({"id":1145609,"src":"Rabida-sealions-1_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_1145609.html","width":160,"caption":"Rabida Sealions","height":107});
															thumbnails[1145615] = clik.newPhoto({"id":1145615,"src":"Machu-Picchu-darkened_thumb.jpg","galleries_id":83105,"server_id":15,"link":"photo_1145615.html","width":160,"caption":"View over the ancient city","height":107});
															thumbnails[1145618] = clik.newPhoto({"id":1145618,"src":"MP-23_thumb.jpg","galleries_id":83105,"server_id":15,"link":"photo_1145618.html","width":160,"caption":"","height":107});
															thumbnails[1145619] = clik.newPhoto({"id":1145619,"src":"MP-78_thumb.jpg","galleries_id":83105,"server_id":15,"link":"photo_1145619.html","width":160,"caption":"Machu Picchu at dawn","height":107});
															thumbnails[1145621] = clik.newPhoto({"id":1145621,"src":"MP-6_thumb.jpg","galleries_id":83105,"server_id":15,"link":"photo_1145621.html","width":160,"caption":"","height":107});
															thumbnails[1149118] = clik.newPhoto({"id":1149118,"src":"Child-at-Awana-Kancha_thumb.jpg","galleries_id":83106,"server_id":15,"link":"photo_1149118.html","width":160,"caption":"Girl at Awana","height":110});
															thumbnails[1149122] = clik.newPhoto({"id":1149122,"src":"Inca-Walled-St-3_thumb.jpg","galleries_id":83106,"server_id":15,"link":"photo_1149122.html","width":160,"caption":"Girl at Cusco","height":107});
															thumbnails[1149124] = clik.newPhoto({"id":1149124,"src":"Children-at-Pisac-Market-new_thumb.jpg","galleries_id":83106,"server_id":15,"link":"photo_1149124.html","width":160,"caption":"Pisac Children","height":107});
															thumbnails[1149125] = clik.newPhoto({"id":1149125,"src":"Girl-with-Llama_thumb.jpg","galleries_id":83106,"server_id":15,"link":"photo_1149125.html","width":160,"caption":"Girl with Llama","height":107});
															thumbnails[1149126] = clik.newPhoto({"id":1149126,"src":"Woman-in-Pizac-Market_thumb.jpg","galleries_id":83106,"server_id":15,"link":"photo_1149126.html","width":160,"caption":"Woman at Pisac Market","height":110});
															thumbnails[1211330] = clik.newPhoto({"id":1211330,"src":"Beech-and-Bluebells---Blur-_thumb.jpg","galleries_id":86777,"server_id":15,"link":"photo_1211330.html","width":130,"caption":"Beeches and Bluebells","height":89});
															thumbnails[1211339] = clik.newPhoto({"id":1211339,"src":"Bridge-with-figure-final_thumb.jpg","galleries_id":86777,"server_id":15,"link":"photo_1211339.html","width":130,"caption":"You Never Walk Alone","height":92});
															thumbnails[1211341] = clik.newPhoto({"id":1211341,"src":"British-Steel_thumb.jpg","galleries_id":86777,"server_id":15,"link":"photo_1211341.html","width":130,"caption":"British Steel","height":85});
															thumbnails[1211343] = clik.newPhoto({"id":1211343,"src":"Come-in-Number-One_thumb.jpg","galleries_id":86777,"server_id":15,"link":"photo_1211343.html","width":160,"caption":"Come in Number One","height":98});
															thumbnails[1211347] = clik.newPhoto({"id":1211347,"src":"Into-the-mist_thumb..jpg","galleries_id":86777,"server_id":15,"link":"photo_1211347.html","width":130,"caption":"Into the Mist","height":87});
															thumbnails[1211349] = clik.newPhoto({"id":1211349,"src":"Thorpe Perrow Bluebells_thumb.jpg","galleries_id":86777,"server_id":15,"link":"photo_1211349.html","width":130,"caption":"Spring Impression","height":86});
															thumbnails[1211378] = clik.newPhoto({"id":1211378,"src":"Whitby-Street-border-plus-b_thumb.jpg","galleries_id":86777,"server_id":15,"link":"photo_1211378.html","width":130,"caption":"Street Painting","height":90});
															thumbnails[7388804] = clik.newPhoto({"id":7388804,"src":"laprimavera_thumb.jpg","galleries_id":399984,"server_id":15,"link":"photo_7388804.html","width":160,"caption":"La Primavera","height":160});
															thumbnails[7388813] = clik.newPhoto({"id":7388813,"src":"lestate_thumb.jpg","galleries_id":399984,"server_id":15,"link":"photo_7388813.html","width":160,"caption":"L'Estate","height":160});
															thumbnails[7388814] = clik.newPhoto({"id":7388814,"src":"lautonno_thumb.jpg","galleries_id":399984,"server_id":15,"link":"photo_7388814.html","width":160,"caption":"L'Autonno","height":160});
															thumbnails[7388820] = clik.newPhoto({"id":7388820,"src":"linverno_thumb.jpg","galleries_id":399984,"server_id":15,"link":"photo_7388820.html","width":160,"caption":"L'Inverno","height":160});
															thumbnails[7388843] = clik.newPhoto({"id":7388843,"src":"mycenagroup_thumb.jpg","galleries_id":399992,"server_id":15,"link":"photo_7388843.html","width":160,"caption":"Mycena Group","height":110});
															thumbnails[7388844] = clik.newPhoto({"id":7388844,"src":"mycenapattern_thumb.jpg","galleries_id":399992,"server_id":15,"link":"photo_7388844.html","width":160,"caption":"Mycena Pattern","height":105});
															thumbnails[7388926] = clik.newPhoto({"id":7388926,"src":"Battersby-Junction_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388926.html","width":160,"caption":"Battersby Junction ","height":110});
															thumbnails[7388932] = clik.newPhoto({"id":7388932,"src":"Broughton-Watersplash_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388932.html","width":160,"caption":"Watersplash, Great Broughton","height":107});
															thumbnails[7388934] = clik.newPhoto({"id":7388934,"src":"Cover-with-border_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388934.html","width":160,"caption":"Cleveland Way Above Scarth Nick","height":102});
															thumbnails[7388936] = clik.newPhoto({"id":7388936,"src":"Fishpond_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388936.html","width":160,"caption":"Fishpond, Dromonby","height":107});
															thumbnails[7388940] = clik.newPhoto({"id":7388940,"src":"January_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388940.html","width":160,"caption":"Hill Road, Kirkby in Cleveland","height":112});
															thumbnails[7388944] = clik.newPhoto({"id":7388944,"src":"November_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388944.html","width":160,"caption":"Levenside, Stokesley","height":105});
															thumbnails[7388946] = clik.newPhoto({"id":7388946,"src":"Lonsdale_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388946.html","width":160,"caption":"Lonsdale From Percy Rigg","height":112});
															thumbnails[7388950] = clik.newPhoto({"id":7388950,"src":"May_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388950.html","width":160,"caption":"The Cleveland Hills","height":105});
															thumbnails[7388952] = clik.newPhoto({"id":7388952,"src":"Snilesworth_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388952.html","width":160,"caption":"Ruins on Snilesworth Moor","height":107});
															thumbnails[7388954] = clik.newPhoto({"id":7388954,"src":"St-Andrews_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388954.html","width":160,"caption":"St Andrew's Church, Ingleby Greenhow","height":106});
															thumbnails[7388957] = clik.newPhoto({"id":7388957,"src":"Leven-Waterfall_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7388957.html","width":160,"caption":"Leven Waterfall, Kildale","height":107});
															thumbnails[7391218] = clik.newPhoto({"id":7391218,"src":"mycena2_thumb.jpg","galleries_id":399992,"server_id":15,"link":"photo_7391218.html","width":160,"caption":"Mycena 2","height":119});
															thumbnails[7391226] = clik.newPhoto({"id":7391226,"src":"mycena11_thumb.jpg","galleries_id":399992,"server_id":15,"link":"photo_7391226.html","width":117,"caption":"Mycena 1","height":160});
															thumbnails[7391233] = clik.newPhoto({"id":7391233,"src":"mycena4_thumb.jpg","galleries_id":399992,"server_id":15,"link":"photo_7391233.html","width":160,"caption":"Mycena 4","height":113});
															thumbnails[7421535] = clik.newPhoto({"id":7421535,"src":"Leven-Source_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7421535.html","width":160,"caption":"The Source of the River Leven","height":107});
															thumbnails[7421541] = clik.newPhoto({"id":7421541,"src":"Saltburn-Twilight_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7421541.html","width":160,"caption":"Saltburn Twilight","height":102});
															thumbnails[7421547] = clik.newPhoto({"id":7421547,"src":"Roseberry-R_thumb.jpg","galleries_id":83096,"server_id":15,"link":"photo_7421547.html","width":160,"caption":"Spring in Newton Woods","height":108});
															thumbnails[7425196] = clik.newPhoto({"id":7425196,"src":"Taca-06_thumb.jpg","galleries_id":83106,"server_id":15,"link":"photo_7425196.html","width":160,"caption":"Boatman on Lake Titicaca","height":107});
															thumbnails[7425204] = clik.newPhoto({"id":7425204,"src":"Pisac-Carpet-Seller_thumb.jpg","galleries_id":83106,"server_id":15,"link":"photo_7425204.html","width":160,"caption":"Pisac Market Trader","height":101});
															thumbnails[7425223] = clik.newPhoto({"id":7425223,"src":"Nightjar-Final_thumb.jpg","galleries_id":83103,"server_id":15,"link":"photo_7425223.html","width":160,"caption":"Nightjar","height":110});
															thumbnails[7425228] = clik.newPhoto({"id":7425228,"src":"Tent-Making-Bat-2_thumb.jpg","galleries_id":83103,"server_id":15,"link":"photo_7425228.html","width":160,"caption":"Tent Making Bat","height":113});
															thumbnails[7425237] = clik.newPhoto({"id":7425237,"src":"Toad-Camouflage_thumb.jpg","galleries_id":83103,"server_id":15,"link":"photo_7425237.html","width":160,"caption":"Leaf-Litter Toad","height":117});
															thumbnails[7425241] = clik.newPhoto({"id":7425241,"src":"Caterpillar-Final_thumb.jpg","galleries_id":83103,"server_id":15,"link":"photo_7425241.html","width":160,"caption":"Unidentified Caterpillar","height":117});
															thumbnails[7425293] = clik.newPhoto({"id":7425293,"src":"Lava-heron-stalking-crab-new_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_7425293.html","width":160,"caption":"Lava Heron","height":105});
															thumbnails[7425301] = clik.newPhoto({"id":7425301,"src":"Marine-Iguana-Final_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_7425301.html","width":160,"caption":"Marine Iguana","height":109});
															thumbnails[7425303] = clik.newPhoto({"id":7425303,"src":"Oystercatcher-Final_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_7425303.html","width":160,"caption":"Oystercatcher","height":103});
															thumbnails[7425308] = clik.newPhoto({"id":7425308,"src":"Marine-Iguana-5-final_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_7425308.html","width":160,"caption":"Marine Iguana Portrait","height":110});
															thumbnails[7425315] = clik.newPhoto({"id":7425315,"src":"Frigate-Display-_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_7425315.html","width":160,"caption":"Frigate Bird Displaying","height":107});
															thumbnails[7425317] = clik.newPhoto({"id":7425317,"src":"Machu-Picchu-Panorama-new_thumb.jpg","galleries_id":83105,"server_id":15,"link":"photo_7425317.html","width":160,"caption":"Machu Picchu Panorama","height":59});
															thumbnails[7425341] = clik.newPhoto({"id":7425341,"src":"Iguanas-in-Landscape-2-final_thumb.jpg","galleries_id":83104,"server_id":15,"link":"photo_7425341.html","width":160,"caption":"Basking Marine Iguanas","height":102});
															thumbnails[8328736] = clik.newPhoto({"id":8328736,"src":"beunique_thumb.jpg","galleries_id":442766,"server_id":19,"link":"photo_8328736.html","width":160,"caption":"Shanghai Street Scene","height":104});
															thumbnails[8328737] = clik.newPhoto({"id":8328737,"src":"guilinfisherman_thumb.jpg","galleries_id":442766,"server_id":19,"link":"photo_8328737.html","width":160,"caption":"Fisherman at Longsheng","height":149});
															thumbnails[8328740] = clik.newPhoto({"id":8328740,"src":"riceterraceworkers_thumb.jpg","galleries_id":442766,"server_id":19,"link":"photo_8328740.html","width":160,"caption":"Rice Terrace Workers","height":106});
															thumbnails[8328754] = clik.newPhoto({"id":8328754,"src":"warrior_thumb.jpg","galleries_id":442766,"server_id":19,"link":"photo_8328754.html","width":160,"caption":"Terracotta Warriors","height":120});
															thumbnails[8328772] = clik.newPhoto({"id":8328772,"src":"chinagirl_thumb.jpg","galleries_id":442766,"server_id":19,"link":"photo_8328772.html","width":160,"caption":"Girl from Guilin","height":160});
															thumbnails[8328810] = clik.newPhoto({"id":8328810,"src":"cormorantfisherman_thumb.jpg","galleries_id":442766,"server_id":19,"link":"photo_8328810.html","width":160,"caption":"Cormorant Fisherman","height":114});
															thumbnails[1211240] = clik.newPhoto({"id":1211240,"src":"Alstroemeria-1_thumb.jpg","galleries_id":86773,"server_id":15,"link":"photo_1211240.html","width":130,"caption":"Alstroemeria","height":146});
															thumbnails[1211248] = clik.newPhoto({"id":1211248,"src":"Cornflower-1_thumb.jpg","galleries_id":86773,"server_id":15,"link":"photo_1211248.html","width":130,"caption":"Cornflower","height":146});
															thumbnails[1211256] = clik.newPhoto({"id":1211256,"src":"Lily-4_thumb.jpg","galleries_id":86773,"server_id":15,"link":"photo_1211256.html","width":130,"caption":"Lily","height":136});
															thumbnails[1211261] = clik.newPhoto({"id":1211261,"src":"Turks-Head-Lily-2_thumb.jpg","galleries_id":86773,"server_id":15,"link":"photo_1211261.html","width":130,"caption":"Turks-Head Lily","height":130});
															thumbnails[1211241] = clik.newPhoto({"id":1211241,"src":"Aquilegia-5-new_thumb.jpg","galleries_id":86773,"server_id":15,"link":"photo_1211241.html","width":130,"caption":"Aquilegia","height":69});
															thumbnails[1211254] = clik.newPhoto({"id":1211254,"src":"Dicentra_thumb.jpg","galleries_id":86773,"server_id":15,"link":"photo_1211254.html","width":130,"caption":"Dicentra","height":88});
															thumbnails[1211259] = clik.newPhoto({"id":1211259,"src":"Orchid-1_thumb.jpg","galleries_id":86773,"server_id":15,"link":"photo_1211259.html","width":130,"caption":"Phalaenopsis","height":69});
															thumbnails[1211260] = clik.newPhoto({"id":1211260,"src":"Sweet-Pea-35-extended_thumb.jpg","galleries_id":86773,"server_id":15,"link":"photo_1211260.html","width":130,"caption":"Sweet Pea","height":69});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[442766] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"China","link":"gallery_442766.html","maxRecords":0.0,"photoIDs":[8328736.0,8328737.0,8328740.0,8328754.0,8328772.0,8328810.0],"skipIndex":0,"section_code":"gallery","featured_images":"8328810,8328772,8328754,8328740,8328737,8328736","id":442766,"singleSection":false});				  						galleries[399983] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Digital Fantasy","link":"gallery_399983.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"7388820,7388814,7388813,7388804,1211343","id":399983,"singleSection":false});				  						galleries[86777] = clik.newGallery({"parentGallery":399983,"usePopups":false,"title":"Digital Landscapes","link":"gallery_86777.html","maxRecords":0.0,"photoIDs":[1211330.0,1211339.0,1211341.0,1211343.0,1211347.0,1211349.0,1211378.0],"skipIndex":0,"section_code":"gallery","featured_images":1211343.0,"id":86777,"singleSection":false});				  						galleries[86773] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flower Portraits","link":"gallery_86773.html","maxRecords":0.0,"photoIDs":[1211240.0,1211248.0,1211256.0,1211261.0,1211241.0,1211254.0,1211259.0,1211260.0],"skipIndex":0,"section_code":"gallery","featured_images":"1211261,1211260,1211259,1211256,1211254,1211248,1211241,1211240","id":86773,"singleSection":false});				  						galleries[399992] = clik.newGallery({"parentGallery":399991,"usePopups":false,"title":"Fungi","link":"gallery_399992.html","maxRecords":0.0,"photoIDs":[7388843.0,7388844.0,7391218.0,7391226.0,7391233.0],"skipIndex":0,"section_code":"gallery","featured_images":"7391233,7391226,7388844","id":399992,"singleSection":false});				  						galleries[83096] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Local Landscapes","link":"gallery_83096.html","maxRecords":0.0,"photoIDs":[1145434.0,1145444.0,1145454.0,1145456.0,1145459.0,1145463.0,1145556.0,1145562.0,7388926.0,7388932.0,7388934.0,7388936.0,7388940.0,7388944.0,7388946.0,7388950.0,7388952.0,7388954.0,7388957.0,7421535.0,7421541.0,7421547.0],"skipIndex":0,"section_code":"gallery","featured_images":"7388954,7388952,7388950,7388946,7388944,7388936,7388934,7388926,1145463,1145456,1145454,1145444,1145434","id":83096,"singleSection":false});				  						galleries[83105] = clik.newGallery({"parentGallery":83258,"usePopups":false,"title":"Machu Picchu","link":"gallery_83105.html","maxRecords":0.0,"photoIDs":[1145615.0,1145618.0,1145619.0,1145621.0,7425317.0],"skipIndex":0,"section_code":"gallery","featured_images":"7425317,1145621,1145619,1145618,1145615","id":83105,"singleSection":false});				  						galleries[399991] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Natural History","link":"gallery_399991.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"7391233,7391226,7388844","id":399991,"singleSection":false});				  						galleries[83106] = clik.newGallery({"parentGallery":83258,"usePopups":false,"title":"People","link":"gallery_83106.html","maxRecords":0.0,"photoIDs":[1149118.0,1149122.0,1149124.0,1149125.0,1149126.0,7425196.0,7425204.0],"skipIndex":0,"section_code":"gallery","featured_images":"7425204,7425196,1149126,1149125,1149124,1149122,1149118","id":83106,"singleSection":false});				  						galleries[83258] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"South America","link":"gallery_83258.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"7425341,7425317,7425315,7425308,7425303,7425301,7425293,7425241,7425237,7425228","id":83258,"singleSection":false});				  						galleries[83103] = clik.newGallery({"parentGallery":83258,"usePopups":false,"title":"The Amazon Basin","link":"gallery_83103.html","maxRecords":0.0,"photoIDs":[1145575.0,1145578.0,1145580.0,1145582.0,7425223.0,7425228.0,7425237.0,7425241.0],"skipIndex":0,"section_code":"gallery","featured_images":"7425241,7425237,7425228,7425223,1145582,1145580,1145578,1145575","id":83103,"singleSection":false});				  						galleries[399984] = clik.newGallery({"parentGallery":399983,"usePopups":false,"title":"The Four Seasons","link":"gallery_399984.html","maxRecords":0.0,"photoIDs":[7388804.0,7388813.0,7388814.0,7388820.0],"skipIndex":0,"section_code":"gallery","featured_images":"7388820,7388814,7388813,7388804","id":399984,"singleSection":false});				  						galleries[83104] = clik.newGallery({"parentGallery":83258,"usePopups":false,"title":"The Galapagos Islands","link":"gallery_83104.html","maxRecords":0.0,"photoIDs":[1145586.0,1145589.0,1145591.0,1145595.0,1145603.0,1145604.0,1145609.0,7425293.0,7425301.0,7425303.0,7425308.0,7425315.0,7425341.0],"skipIndex":0,"section_code":"gallery","featured_images":"7425341,7425315,7425308,7425303,7425301,7425293,1145609,1145604,1145603,1145595","id":83104,"singleSection":false});				  						galleries[399993] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel","link":"gallery_399993.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"1145571,1145569,1145568,1145567","id":399993,"singleSection":false});				  						galleries[83102] = clik.newGallery({"parentGallery":399993,"usePopups":false,"title":"Venice","link":"gallery_83102.html","maxRecords":0.0,"photoIDs":[1145567.0,1145568.0,1145569.0,1145571.0],"skipIndex":0,"section_code":"gallery","featured_images":"1145571,1145569,1145568,1145567","id":83102,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7391233,7391226,7388954,7388952,7388950,7388946,7388944,7388936,7388934,7388926,7388844,7388820,7388814,7388813,7388804,1211343,1145463,1145456,1145454,1145444,1145434';
imageSets[2] = '7391233,7391226,7388954,7388952,7388950,7388946,7388944,7388936,7388934,7388926,7388844,7388820,7388814,7388813,7388804,1211343,1145463,1145456,1145454,1145444,1145434';
imageSets[3] = '7391233,7391226,7388954,7388952,7388950,7388946,7388944,7388936,7388934,7388926,7388844,7388820,7388814,7388813,7388804,1211343,1145463,1145456,1145454,1145444,1145434';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Brackenwaypics/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Brackenwaypics/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 = ': ' + 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;
	}
}

			

