window.thumbnails = {};
															thumbnails[5327745] = clik.newPhoto({"id":5327745,"src":"Arthur_Pendragon_I_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327745.html","width":130,"caption":"Arthur Pendragon I","height":122});
															thumbnails[5327752] = clik.newPhoto({"id":5327752,"src":"Arthur_Pendragon_II_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327752.html","width":130,"caption":"Arthur Pendragon II","height":150});
															thumbnails[5327755] = clik.newPhoto({"id":5327755,"src":"Baby_Arthur_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327755.html","width":130,"caption":"Baby Arthur","height":111});
															thumbnails[5327758] = clik.newPhoto({"id":5327758,"src":"Chinese_Dragon_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327758.html","width":130,"caption":"Chinese Dragon","height":183});
															thumbnails[5327760] = clik.newPhoto({"id":5327760,"src":"Cycling_School_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327760.html","width":130,"caption":"Cycling Schools","height":70});
															thumbnails[5327761] = clik.newPhoto({"id":5327761,"src":"Fish_on_Bike_1_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327761.html","width":130,"caption":"Fish on a Bicycle 1","height":147});
															thumbnails[5327767] = clik.newPhoto({"id":5327767,"src":"Fish_on_Mountain_Bike_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327767.html","width":130,"caption":"Fish on a Mountain Bike","height":107});
															thumbnails[5327770] = clik.newPhoto({"id":5327770,"src":"Fish_on_Racing_Bike_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327770.html","width":130,"caption":"Fish on a Racing Bicycle","height":153});
															thumbnails[5327772] = clik.newPhoto({"id":5327772,"src":"Pike_on_Trike_2_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327772.html","width":130,"caption":"Pike on a Trike","height":124});
															thumbnails[5327780] = clik.newPhoto({"id":5327780,"src":"Scooter_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327780.html","width":130,"caption":"Fish on a Scooter","height":158});
															thumbnails[5327784] = clik.newPhoto({"id":5327784,"src":"Pike_on_Trike_11_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_5327784.html","width":130,"caption":"Pike on a Trike","height":139});
															thumbnails[5327930] = clik.newPhoto({"id":5327930,"src":"Velo-ciraptor_1_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327930.html","width":130,"caption":"Veló-ciraptor","height":95});
															thumbnails[5327942] = clik.newPhoto({"id":5327942,"src":"velo-ciraptor_3_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327942.html","width":130,"caption":"Veló-ciraptor 2","height":100});
															thumbnails[5327952] = clik.newPhoto({"id":5327952,"src":"Velo-ciraptor_4_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327952.html","width":130,"caption":"Velociraptor 3","height":160});
															thumbnails[5327955] = clik.newPhoto({"id":5327955,"src":"Giant_Lizard_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327955.html","width":130,"caption":"Giant Bicycle Chain Lizard","height":180});
															thumbnails[5327963] = clik.newPhoto({"id":5327963,"src":"Large_Lizard_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327963.html","width":130,"caption":"Bicycle Chain Lizard","height":201});
															thumbnails[5327968] = clik.newPhoto({"id":5327968,"src":"Large_Lizard_2_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327968.html","width":130,"caption":"Bicycle Chain Lizard 2","height":120});
															thumbnails[5327972] = clik.newPhoto({"id":5327972,"src":"pig_1_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327972.html","width":130,"caption":"Pig","height":88});
															thumbnails[5327975] = clik.newPhoto({"id":5327975,"src":"pig_2_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327975.html","width":130,"caption":"Pig 2","height":99});
															thumbnails[5327978] = clik.newPhoto({"id":5327978,"src":"Seated_Frog_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327978.html","width":130,"caption":"Seated Frog","height":134});
															thumbnails[5327979] = clik.newPhoto({"id":5327979,"src":"Wall_Frog_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327979.html","width":130,"caption":"Wall Frog","height":137});
															thumbnails[5327980] = clik.newPhoto({"id":5327980,"src":"Small_Wall_Lizard_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327980.html","width":130,"caption":"Small Wall Lizard","height":247});
															thumbnails[5327991] = clik.newPhoto({"id":5327991,"src":"Tortoise_1_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327991.html","width":130,"caption":"Tortoise","height":95});
															thumbnails[5327993] = clik.newPhoto({"id":5327993,"src":"Tortoise_2_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327993.html","width":130,"caption":"Tortoise 2","height":97});
															thumbnails[5327994] = clik.newPhoto({"id":5327994,"src":"Tortoise_3_thumb.JPG","galleries_id":299870,"server_id":5,"link":"photo_5327994.html","width":130,"caption":"Tortoise 3","height":88});
															thumbnails[5327999] = clik.newPhoto({"id":5327999,"src":"Brown_Trout_thumb.JPG","galleries_id":299871,"server_id":5,"link":"photo_5327999.html","width":130,"caption":"Trout","height":86});
															thumbnails[5328014] = clik.newPhoto({"id":5328014,"src":"Crab_1_thumb.JPG","galleries_id":299871,"server_id":5,"link":"photo_5328014.html","width":130,"caption":"Crab 1","height":85});
															thumbnails[5328023] = clik.newPhoto({"id":5328023,"src":"Crab_2_thumb.JPG","galleries_id":299871,"server_id":5,"link":"photo_5328023.html","width":130,"caption":"Cranford crab","height":141});
															thumbnails[5328034] = clik.newPhoto({"id":5328034,"src":"Cranford_Trout_thumb.JPG","galleries_id":299871,"server_id":5,"link":"photo_5328034.html","width":130,"caption":"Cranford trout","height":98});
															thumbnails[5328036] = clik.newPhoto({"id":5328036,"src":"Octopus_thumb.JPG","galleries_id":299871,"server_id":5,"link":"photo_5328036.html","width":130,"caption":"Octopus","height":106});
															thumbnails[5328043] = clik.newPhoto({"id":5328043,"src":"Sea_Horse_thumb.JPG","galleries_id":299871,"server_id":5,"link":"photo_5328043.html","width":130,"caption":"Sea Horse","height":209});
															thumbnails[5328048] = clik.newPhoto({"id":5328048,"src":"barbel_thumb.JPG","galleries_id":299871,"server_id":5,"link":"photo_5328048.html","width":130,"caption":"Barbel","height":92});
															thumbnails[5328080] = clik.newPhoto({"id":5328080,"src":"stainless_sphere_thumb.JPG","galleries_id":299911,"server_id":5,"link":"photo_5328080.html","width":130,"caption":"Sprocket Spheres","height":144});
															thumbnails[5328097] = clik.newPhoto({"id":5328097,"src":"White_Stork_thumb.JPG","galleries_id":299911,"server_id":5,"link":"photo_5328097.html","width":130,"caption":"White Stork","height":225});
															thumbnails[5328099] = clik.newPhoto({"id":5328099,"src":"Taking_Flight_1_thumb.JPG","galleries_id":299911,"server_id":5,"link":"photo_5328099.html","width":130,"caption":"Taking Flight","height":92});
															thumbnails[5328120] = clik.newPhoto({"id":5328120,"src":"Taking_Flight_3_thumb.JPG","galleries_id":299911,"server_id":5,"link":"photo_5328120.html","width":130,"caption":"Taking flight 2","height":92});
															thumbnails[5328136] = clik.newPhoto({"id":5328136,"src":"Primary_thumb.JPG","galleries_id":299911,"server_id":5,"link":"photo_5328136.html","width":130,"caption":"Primary Commission","height":233});
															thumbnails[5328144] = clik.newPhoto({"id":5328144,"src":"Cranford_College_thumb.JPG","galleries_id":299911,"server_id":5,"link":"photo_5328144.html","width":130,"caption":"Cranford College Fountain","height":176});
															thumbnails[5328148] = clik.newPhoto({"id":5328148,"src":"Grey_Heron_thumb.JPG","galleries_id":299911,"server_id":5,"link":"photo_5328148.html","width":130,"caption":"Grey Heron","height":411});
															thumbnails[5328154] = clik.newPhoto({"id":5328154,"src":"Winged_Crane_1_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328154.html","width":130,"caption":"Winged Crane","height":315});
															thumbnails[5328162] = clik.newPhoto({"id":5328162,"src":"Winged_Crane_3_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328162.html","width":130,"caption":"Winged Crane 2","height":303});
															thumbnails[5328164] = clik.newPhoto({"id":5328164,"src":"Winged_Duck_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328164.html","width":130,"caption":"Winged Duck","height":121});
															thumbnails[5328167] = clik.newPhoto({"id":5328167,"src":"Winged_Duck_2_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328167.html","width":130,"caption":"Winged Duck 2","height":107});
															thumbnails[5328188] = clik.newPhoto({"id":5328188,"src":"Brown_Owls_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328188.html","width":130,"caption":"Brown owls","height":92});
															thumbnails[5328191] = clik.newPhoto({"id":5328191,"src":"Cockerel_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328191.html","width":130,"caption":"Cockerel","height":180});
															thumbnails[5328193] = clik.newPhoto({"id":5328193,"src":"fishing_heron_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328193.html","width":130,"caption":"Fishing Heron","height":224});
															thumbnails[5328199] = clik.newPhoto({"id":5328199,"src":"Fluffy_Flamingo_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328199.html","width":130,"caption":"Fluffy Flamingo","height":199});
															thumbnails[5328203] = clik.newPhoto({"id":5328203,"src":"Funky_flamingo_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328203.html","width":130,"caption":"Funky Flamingo","height":233});
															thumbnails[5328227] = clik.newPhoto({"id":5328227,"src":"Painted_Owls_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328227.html","width":130,"caption":"Painted Owl Pair","height":102});
															thumbnails[5328239] = clik.newPhoto({"id":5328239,"src":"owl_pair_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328239.html","width":130,"caption":"Owl Pair","height":163});
															thumbnails[5328244] = clik.newPhoto({"id":5328244,"src":"peacock_2_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328244.html","width":130,"caption":"Peacock","height":146});
															thumbnails[5328250] = clik.newPhoto({"id":5328250,"src":"standing_crane_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_5328250.html","width":130,"caption":"Standing Crane","height":263});
															thumbnails[5328269] = clik.newPhoto({"id":5328269,"src":"Batman_thumb.JPG","galleries_id":299932,"server_id":5,"link":"photo_5328269.html","width":130,"caption":"Batman","height":173});
															thumbnails[5328279] = clik.newPhoto({"id":5328279,"src":"Female_Wall_Form_thumb.JPG","galleries_id":299932,"server_id":5,"link":"photo_5328279.html","width":130,"caption":"Female Form","height":223});
															thumbnails[5328297] = clik.newPhoto({"id":5328297,"src":"Full_Female_1_thumb.JPG","galleries_id":299932,"server_id":5,"link":"photo_5328297.html","width":130,"caption":"Female Body","height":207});
															thumbnails[5328303] = clik.newPhoto({"id":5328303,"src":"Iron_Man_thumb.JPG","galleries_id":299932,"server_id":5,"link":"photo_5328303.html","width":130,"caption":"Iron Man","height":206});
															thumbnails[5328314] = clik.newPhoto({"id":5328314,"src":"Scarecrow_thumb.JPG","galleries_id":299932,"server_id":5,"link":"photo_5328314.html","width":130,"caption":"Scarecrow","height":172});
															thumbnails[5328343] = clik.newPhoto({"id":5328343,"src":"Time_Trial_thumb.JPG","galleries_id":299932,"server_id":5,"link":"photo_5328343.html","width":130,"caption":"Time Trial","height":146});
															thumbnails[5328394] = clik.newPhoto({"id":5328394,"src":"Bumble_Bee_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5328394.html","width":130,"caption":"Bumble Bee","height":96});
															thumbnails[5328403] = clik.newPhoto({"id":5328403,"src":"Butterfly_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5328403.html","width":130,"caption":"Butterfly","height":104});
															thumbnails[5328415] = clik.newPhoto({"id":5328415,"src":"Honeybee_Large_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5328415.html","width":130,"caption":"Large Honey Bee","height":118});
															thumbnails[5328416] = clik.newPhoto({"id":5328416,"src":"London_Wasp_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5328416.html","width":130,"caption":"London Wasp","height":144});
															thumbnails[5328419] = clik.newPhoto({"id":5328419,"src":"Painted_Dragonflies_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5328419.html","width":130,"caption":"Painted Dragonflies","height":86});
															thumbnails[5328423] = clik.newPhoto({"id":5328423,"src":"scorpion_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5328423.html","width":130,"caption":"Scorpion","height":104});
															thumbnails[5328425] = clik.newPhoto({"id":5328425,"src":"Small_Wasp_2_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5328425.html","width":130,"caption":"Small Wasp","height":108});
															thumbnails[5328443] = clik.newPhoto({"id":5328443,"src":"Sprocket_Spider_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5328443.html","width":130,"caption":"Sprocket Spider","height":87});
															thumbnails[5328477] = clik.newPhoto({"id":5328477,"src":"big_flamingo_thumb.JPG","galleries_id":299942,"server_id":5,"link":"photo_5328477.html","width":130,"caption":"big flamingo","height":170});
															thumbnails[5328492] = clik.newPhoto({"id":5328492,"src":"Goliath_Heron_2_thumb.JPG","galleries_id":299942,"server_id":5,"link":"photo_5328492.html","width":130,"caption":"Goliath Heron","height":259});
															thumbnails[5328504] = clik.newPhoto({"id":5328504,"src":"Marle_Place_Sphere_thumb.JPG","galleries_id":299942,"server_id":5,"link":"photo_5328504.html","width":130,"caption":"Marle Place Sphere","height":179});
															thumbnails[5328507] = clik.newPhoto({"id":5328507,"src":"Winged_Goliath_Heron_thumb.JPG","galleries_id":299942,"server_id":5,"link":"photo_5328507.html","width":130,"caption":"Winged Goliath Heron","height":205});
															thumbnails[5328538] = clik.newPhoto({"id":5328538,"src":"Geodesic_Tree_thumb.JPG","galleries_id":299956,"server_id":5,"link":"photo_5328538.html","width":130,"caption":"Geodesic Tree","height":229});
															thumbnails[5328594] = clik.newPhoto({"id":5328594,"src":"Aircraft_thumb.JPG","galleries_id":299963,"server_id":5,"link":"photo_5328594.html","width":130,"caption":"Airplane","height":173});
															thumbnails[5328597] = clik.newPhoto({"id":5328597,"src":"Geodesic_Table_thumb.JPG","galleries_id":299963,"server_id":5,"link":"photo_5328597.html","width":130,"caption":"Geodesic Table","height":98});
															thumbnails[5328600] = clik.newPhoto({"id":5328600,"src":"Jack_Table_thumb.JPG","galleries_id":299963,"server_id":5,"link":"photo_5328600.html","width":130,"caption":"Jack Table","height":98});
															thumbnails[5328611] = clik.newPhoto({"id":5328611,"src":"Triquetra_thumb.JPG","galleries_id":299963,"server_id":5,"link":"photo_5328611.html","width":130,"caption":"Triquetra","height":132});
															thumbnails[5328613] = clik.newPhoto({"id":5328613,"src":"Train_1_thumb.JPG","galleries_id":299963,"server_id":5,"link":"photo_5328613.html","width":130,"caption":"Train","height":108});
															thumbnails[5363174] = clik.newPhoto({"id":5363174,"src":"dragonfly_on_rock_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5363174.html","width":130,"caption":"Dragonfly on a Rock","height":99});
															thumbnails[5363193] = clik.newPhoto({"id":5363193,"src":"wall_dragonfly_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_5363193.html","width":130,"caption":"Wall Dragonfly","height":87});
															thumbnails[5446061] = clik.newPhoto({"id":5446061,"src":"Hole_in_Time_thumb.JPG","galleries_id":299911,"server_id":5,"link":"photo_5446061.html","width":130,"caption":"Hole in Time","height":136});
															thumbnails[6535094] = clik.newPhoto({"id":6535094,"src":"bullrush_dragonfly_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_6535094.html","width":130,"caption":"Dragonfly on Bulrush","height":261});
															thumbnails[6535141] = clik.newPhoto({"id":6535141,"src":"stainless_bullrush_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_6535141.html","width":130,"caption":"dragonfly on Stainless Steel Bulrush","height":297});
															thumbnails[6535148] = clik.newPhoto({"id":6535148,"src":"eagle_front_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_6535148.html","width":130,"caption":"Eagle","height":98});
															thumbnails[6535153] = clik.newPhoto({"id":6535153,"src":"eagle_side_thumb.JPG","galleries_id":299917,"server_id":5,"link":"photo_6535153.html","width":130,"caption":"Eagle II","height":143});
															thumbnails[6535159] = clik.newPhoto({"id":6535159,"src":"stainless_dragon_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_6535159.html","width":130,"caption":"Chinese Dragon 2","height":217});
															thumbnails[7382460] = clik.newPhoto({"id":7382460,"src":"fish_on_a_unicycle_web_thumb.JPG","galleries_id":299880,"server_id":5,"link":"photo_7382460.html","width":130,"caption":"\"Life\"","height":261});
															thumbnails[7382534] = clik.newPhoto({"id":7382534,"src":"aphidius_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_7382534.html","width":130,"caption":"Aphidius","height":84});
															thumbnails[8492897] = clik.newPhoto({"id":8492897,"src":"clansman_right_thumb.JPG","galleries_id":299932,"server_id":5,"link":"photo_8492897.html","width":130,"caption":"Clansman","height":256});
															thumbnails[8492911] = clik.newPhoto({"id":8492911,"src":"clansman_left_thumb.JPG","galleries_id":299932,"server_id":5,"link":"photo_8492911.html","width":130,"caption":"Clansman 2","height":218});
															thumbnails[8492922] = clik.newPhoto({"id":8492922,"src":"golden_eagle_thumb.JPG","galleries_id":299942,"server_id":5,"link":"photo_8492922.html","width":130,"caption":"Golden Eagle","height":167});
															thumbnails[8493067] = clik.newPhoto({"id":8493067,"src":"geodesic_tree_stainless12_thumb.JPG","galleries_id":299956,"server_id":5,"link":"photo_8493067.html","width":130,"caption":"Geodesic Tree Stainless Steel","height":194});
															thumbnails[8493239] = clik.newPhoto({"id":8493239,"src":"dragonfly_on_a_leaf_thumb.jpg","galleries_id":299937,"server_id":5,"link":"photo_8493239.html","width":130,"caption":"","height":195});
															thumbnails[8493291] = clik.newPhoto({"id":8493291,"src":"mantis_thumb.jpeg","galleries_id":299937,"server_id":5,"link":"photo_8493291.html","width":130,"caption":"Praying Mantis","height":87});
															thumbnails[8493306] = clik.newPhoto({"id":8493306,"src":"meredith_ants_3_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_8493306.html","width":130,"caption":"Ant","height":84});
															thumbnails[8493369] = clik.newPhoto({"id":8493369,"src":"stick_insect_thumb.jpg","galleries_id":299937,"server_id":5,"link":"photo_8493369.html","width":130,"caption":"Stick Insect","height":87});
															thumbnails[8493510] = clik.newPhoto({"id":8493510,"src":"mosquito_thumb.JPG","galleries_id":299937,"server_id":5,"link":"photo_8493510.html","width":130,"caption":"","height":98});
															thumbnails[8493582] = clik.newPhoto({"id":8493582,"src":"Stainless_steel_eagle_thumb.jpg","galleries_id":299917,"server_id":5,"link":"photo_8493582.html","width":130,"caption":"Stainless Steel Eagle","height":97});
															thumbnails[8885228] = clik.newPhoto({"id":8885228,"src":"syngenta_tree_thumb.JPG","galleries_id":299956,"server_id":5,"link":"photo_8885228.html","width":130,"caption":"Stainless Steel Tree","height":189});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[299880] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mythical and Humour","link":"gallery_299880.html","maxRecords":0.0,"photoIDs":[5327745.0,5327752.0,5327755.0,5327758.0,5327760.0,5327761.0,5327767.0,5327770.0,5327772.0,5327780.0,5327784.0,6535159.0,7382460.0],"skipIndex":0,"section_code":"gallery","featured_images":5327767.0,"id":299880,"singleSection":false});				  						galleries[299870] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Animals","link":"gallery_299870.html","maxRecords":0.0,"photoIDs":[5327930.0,5327942.0,5327952.0,5327955.0,5327963.0,5327968.0,5327972.0,5327975.0,5327978.0,5327979.0,5327980.0,5327991.0,5327993.0,5327994.0],"skipIndex":0,"section_code":"gallery","featured_images":5327930.0,"id":299870,"singleSection":false});				  						galleries[299871] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Aquatic","link":"gallery_299871.html","maxRecords":0.0,"photoIDs":[5327999.0,5328014.0,5328023.0,5328034.0,5328036.0,5328043.0,5328048.0],"skipIndex":0,"section_code":"gallery","featured_images":5327999.0,"id":299871,"singleSection":false});				  						galleries[299911] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Abstract","link":"gallery_299911.html","maxRecords":0.0,"photoIDs":[5328080.0,5328097.0,5328099.0,5328120.0,5328136.0,5328144.0,5328148.0,5446061.0],"skipIndex":0,"section_code":"gallery","featured_images":5328080.0,"id":299911,"singleSection":false});				  						galleries[299917] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Birds","link":"gallery_299917.html","maxRecords":0.0,"photoIDs":[5328154.0,5328162.0,5328164.0,5328167.0,5328188.0,5328191.0,5328193.0,5328199.0,5328203.0,5328227.0,5328239.0,5328244.0,5328250.0,6535148.0,6535153.0,8493582.0],"skipIndex":0,"section_code":"gallery","featured_images":6535153.0,"id":299917,"singleSection":false});				  						galleries[299932] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Human","link":"gallery_299932.html","maxRecords":0.0,"photoIDs":[5328269.0,5328279.0,5328297.0,5328303.0,5328314.0,5328343.0,8492897.0,8492911.0],"skipIndex":0,"section_code":"gallery","featured_images":8492897.0,"id":299932,"singleSection":false});				  						galleries[299937] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Insects","link":"gallery_299937.html","maxRecords":0.0,"photoIDs":[5328394.0,5328403.0,5328415.0,5328416.0,5328419.0,5328423.0,5328425.0,5328443.0,5363174.0,5363193.0,6535094.0,6535141.0,7382534.0,8493239.0,8493291.0,8493306.0,8493369.0,8493510.0],"skipIndex":0,"section_code":"gallery","featured_images":8493239.0,"id":299937,"singleSection":false});				  						galleries[299942] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Large Sculpture","link":"gallery_299942.html","maxRecords":0.0,"photoIDs":[5328477.0,5328492.0,5328504.0,5328507.0,8492922.0],"skipIndex":0,"section_code":"gallery","featured_images":8492922.0,"id":299942,"singleSection":false});				  						galleries[299956] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Plants","link":"gallery_299956.html","maxRecords":0.0,"photoIDs":[5328538.0,8493067.0,8885228.0],"skipIndex":0,"section_code":"gallery","featured_images":8885228.0,"id":299956,"singleSection":false});				  						galleries[299963] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Miscellaneous","link":"gallery_299963.html","maxRecords":0.0,"photoIDs":[5328594.0,5328597.0,5328600.0,5328611.0,5328613.0],"skipIndex":0,"section_code":"gallery","featured_images":5328594.0,"id":299963,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8885228,8492922,8492897,7382460,5328415,5328403,5328120,5328080,5328036,5327930,5327767,5327758';
imageSets[2] = '8885228,8493239,8492922,8492897,6535153,5328594,5328080,5327999,5327930,5327767';
imageSets[3] = '8885228,8493582,8493510,8493369,8493306,8493291,8493239,8493067,8492922,8492911,8492897,7382534,7382460,6535159,6535153,6535148,6535141,6535094,5446061,5363193,5363174,5328613,5328611,5328600,5328597,5328594,5328538,5328507,5328504,5328492,5328477,5328443,5328425,5328423,5328419,5328416,5328415,5328403,5328394,5328343,5328314,5328303,5328297,5328279,5328269,5328250,5328244,5328239,5328227,5328203';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/dazwebnew/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/dazwebnew/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 = 'Daren Greenhow Metal Sculpture: ' + 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;
	}
}

			

