window.thumbnails = {};
															thumbnails[1312476] = clik.newPhoto({"id":1312476,"src":"under construction_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Watch This Space","height":138});
															thumbnails[8033619] = clik.newPhoto({"id":8033619,"src":"bipp_CDA163B9-1EC9-D45B-1CCD1DB42E96A137_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"bipp","height":120});
															thumbnails[8712180] = clik.newPhoto({"id":8712180,"src":"IMG_5091_a_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_8712180.html","width":130,"caption":"Reflection","height":141});
															thumbnails[7602094] = clik.newPhoto({"id":7602094,"src":"HARRYS_BACK_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_7602094.html","width":130,"caption":"Harrys back","height":135});
															thumbnails[2843084] = clik.newPhoto({"id":2843084,"src":"CP_DSCF0538_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_2843084.html","width":124,"caption":"Freddie","height":150});
															thumbnails[1164415] = clik.newPhoto({"id":1164415,"src":"CP_Final Sprint_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_1164415.html","width":130,"caption":"Final Sprint","height":93});
															thumbnails[1164418] = clik.newPhoto({"id":1164418,"src":"CP_The leader_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_1164418.html","width":130,"caption":"The Leader","height":93});
															thumbnails[1164423] = clik.newPhoto({"id":1164423,"src":"CP_No_thumb. 70.jpg","galleries_id":24410,"server_id":18,"link":"photo_1164423.html","width":130,"caption":"No. 70","height":87});
															thumbnails[1164425] = clik.newPhoto({"id":1164425,"src":"CP_No_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_1164425.html","width":130,"caption":"No. 12","height":93});
															thumbnails[222229] = clik.newPhoto({"id":222229,"src":"Twisted Tree_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_222229.html","width":111,"caption":"Twisted Tree","height":150});
															thumbnails[222243] = clik.newPhoto({"id":222243,"src":"Playtime_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_222243.html","width":130,"caption":"Play Time","height":98});
															thumbnails[222262] = clik.newPhoto({"id":222262,"src":"hide and seek1_thumb.jpg","galleries_id":19696,"server_id":18,"link":"photo_222262.html","width":130,"caption":"Hidden","height":157});
															thumbnails[222264] = clik.newPhoto({"id":222264,"src":"Watching_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_222264.html","width":108,"caption":"Watching","height":150});
															thumbnails[222269] = clik.newPhoto({"id":222269,"src":"Profile_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_222269.html","width":130,"caption":"Profile","height":93});
															thumbnails[222273] = clik.newPhoto({"id":222273,"src":"Starling_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_222273.html","width":130,"caption":"Starling","height":132});
															thumbnails[222275] = clik.newPhoto({"id":222275,"src":"Dragonfly_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_222275.html","width":116,"caption":"Dragonfly","height":150});
															thumbnails[222277] = clik.newPhoto({"id":222277,"src":"Robin_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_222277.html","width":112,"caption":"Redbreast","height":150});
															thumbnails[222285] = clik.newPhoto({"id":222285,"src":"The Brock_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_222285.html","width":130,"caption":"The Brock","height":93});
															thumbnails[222287] = clik.newPhoto({"id":222287,"src":"Love_thumb.jpg","galleries_id":19696,"server_id":18,"link":"photo_222287.html","width":130,"caption":" Love","height":97});
															thumbnails[222302] = clik.newPhoto({"id":222302,"src":"The Gathering_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_222302.html","width":130,"caption":" The Gathering","height":93});
															thumbnails[241180] = clik.newPhoto({"id":241180,"src":"Busker_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_241180.html","width":130,"caption":"Busker","height":95});
															thumbnails[241192] = clik.newPhoto({"id":241192,"src":"Stairway To_thumb......jpg","galleries_id":19696,"server_id":18,"link":"photo_241192.html","width":130,"caption":"Stairway to....","height":98});
															thumbnails[241229] = clik.newPhoto({"id":241229,"src":"Kestrel_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_241229.html","width":108,"caption":"Kestrel","height":150});
															thumbnails[241232] = clik.newPhoto({"id":241232,"src":"No Evil_thumb.jpg","galleries_id":19696,"server_id":18,"link":"photo_241232.html","width":130,"caption":"No Evil","height":84});
															thumbnails[260863] = clik.newPhoto({"id":260863,"src":"Fly past_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_260863.html","width":130,"caption":"Fly Past","height":96});
															thumbnails[282211] = clik.newPhoto({"id":282211,"src":"Defeat_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_282211.html","width":130,"caption":"Defeat","height":93});
															thumbnails[389176] = clik.newPhoto({"id":389176,"src":"The Drummer_thumb.jpg","galleries_id":19696,"server_id":18,"link":"photo_389176.html","width":108,"caption":"The Drummer","height":150});
															thumbnails[391671] = clik.newPhoto({"id":391671,"src":"Red Arrows_thumb.jpg","galleries_id":19696,"server_id":18,"link":"photo_391671.html","width":130,"caption":"Red Arrows","height":93});
															thumbnails[391804] = clik.newPhoto({"id":391804,"src":"The Loop_thumb.jpg","galleries_id":19696,"server_id":18,"link":"photo_391804.html","width":130,"caption":"The Loop","height":99});
															thumbnails[494142] = clik.newPhoto({"id":494142,"src":"Spitfire_thumb.jpg","galleries_id":19696,"server_id":18,"link":"photo_494142.html","width":130,"caption":"Spitfire","height":93});
															thumbnails[554245] = clik.newPhoto({"id":554245,"src":"Friends_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_554245.html","width":130,"caption":"Friends","height":96});
															thumbnails[615004] = clik.newPhoto({"id":615004,"src":"Peaceful Child_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_615004.html","width":112,"caption":"Peaceful child","height":150});
															thumbnails[1406857] = clik.newPhoto({"id":1406857,"src":"CP_IMG_1581 copyII_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_1406857.html","width":130,"caption":"Lilac","height":130});
															thumbnails[1406895] = clik.newPhoto({"id":1406895,"src":"CP_Colour_thumb.jpg","galleries_id":19696,"server_id":18,"link":"photo_1406895.html","width":130,"caption":"Colour","height":93});
															thumbnails[1406897] = clik.newPhoto({"id":1406897,"src":"CP_Drew_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_1406897.html","width":130,"caption":"Drew","height":104});
															thumbnails[1406910] = clik.newPhoto({"id":1406910,"src":"CP_GC_May_21_013_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_1406910.html","width":130,"caption":"The Kids","height":107});
															thumbnails[1406944] = clik.newPhoto({"id":1406944,"src":"CP_Parrot_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_1406944.html","width":130,"caption":"Ring necked Parakeet","height":87});
															thumbnails[1406965] = clik.newPhoto({"id":1406965,"src":"CP_DSC_1114_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_1406965.html","width":130,"caption":"Stanley","height":95});
															thumbnails[1406971] = clik.newPhoto({"id":1406971,"src":"CP_DSC_1178 copy copy_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_1406971.html","width":120,"caption":"Willow","height":150});
															thumbnails[1406976] = clik.newPhoto({"id":1406976,"src":"CP_DSC_1160_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_1406976.html","width":125,"caption":"Henry","height":150});
															thumbnails[1712018] = clik.newPhoto({"id":1712018,"src":"CP_Pete_Becky_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_1712018.html","width":130,"caption":"Pete & Becky","height":109});
															thumbnails[1712032] = clik.newPhoto({"id":1712032,"src":"CP_Drew_1_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_1712032.html","width":106,"caption":"Drew","height":150});
															thumbnails[1836752] = clik.newPhoto({"id":1836752,"src":"CP_Taste For Adventure 1_thumb.jpg","galleries_id":19698,"server_id":18,"link":"photo_1836752.html","width":100,"caption":"Taste for Adventure","height":150});
															thumbnails[1955345] = clik.newPhoto({"id":1955345,"src":"CP_IMG_2899_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_1955345.html","width":130,"caption":"Colour","height":94});
															thumbnails[1955348] = clik.newPhoto({"id":1955348,"src":"CP_IMG_3054_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_1955348.html","width":130,"caption":"Lycoperdon Perlatum","height":93});
															thumbnails[3121184] = clik.newPhoto({"id":3121184,"src":"CP_DSC_1647_3_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_3121184.html","width":130,"caption":"Cracked Earth","height":87});
															thumbnails[3147160] = clik.newPhoto({"id":3147160,"src":"CP_041008_Portrait_Jon&Lisa_052_B&W_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_3147160.html","width":120,"caption":"Jon & Lisa","height":150});
															thumbnails[3147164] = clik.newPhoto({"id":3147164,"src":"CP_041008_Portrait_Joe&Helen_052_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_3147164.html","width":118,"caption":"Helen & Joe","height":150});
															thumbnails[3147170] = clik.newPhoto({"id":3147170,"src":"CP_IMG_2708 copy_thumb.jpg","galleries_id":92719,"server_id":18,"link":"photo_3147170.html","width":125,"caption":"Siblings","height":150});
															thumbnails[6506088] = clik.newPhoto({"id":6506088,"src":"005_copy_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_6506088.html","width":130,"caption":"Small Tortoiseshell (Aglais Urticae)","height":91});
															thumbnails[6506129] = clik.newPhoto({"id":6506129,"src":"006_copy_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_6506129.html","width":130,"caption":"Hoverfly (syrphidae)","height":99});
															thumbnails[6506175] = clik.newPhoto({"id":6506175,"src":"IMG_4417_Border_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_6506175.html","width":127,"caption":"The Humble Spuggie","height":150});
															thumbnails[7961587] = clik.newPhoto({"id":7961587,"src":"tulips_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_7961587.html","width":130,"caption":"Tulips","height":102});
															thumbnails[7961673] = clik.newPhoto({"id":7961673,"src":"coles_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_7961673.html","width":113,"caption":"Polka Dot Lady","height":150});
															thumbnails[7961780] = clik.newPhoto({"id":7961780,"src":"P1010425_copy_thumb.jpg","galleries_id":19688,"server_id":18,"link":"photo_7961780.html","width":130,"caption":"Bizzy Days","height":104});
															thumbnails[8030025] = clik.newPhoto({"id":8030025,"src":"IMG_4207_A_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_8030025.html","width":130,"caption":"Spiral","height":87});
															thumbnails[8030039] = clik.newPhoto({"id":8030039,"src":"IMG_4209_A_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_8030039.html","width":112,"caption":"Corridor","height":150});
															thumbnails[8030042] = clik.newPhoto({"id":8030042,"src":"IMG_4221_A_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_8030042.html","width":100,"caption":"Door","height":150});
															thumbnails[8033512] = clik.newPhoto({"id":8033512,"src":"waterlily_pink_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_8033512.html","width":130,"caption":"Water Lily","height":86});
															thumbnails[8446961] = clik.newPhoto({"id":8446961,"src":"001_053_IMG_4749_copy_thumb.jpg","galleries_id":451829,"server_id":18,"link":"photo_8446961.html","width":129,"caption":"The Nervous Bride","height":150});
															thumbnails[6181484] = clik.newPhoto({"id":6181484,"src":"IMG_4443_Border_thumb.jpg","galleries_id":345281,"server_id":18,"link":"photo_6181484.html","width":130,"caption":"Wildflower","height":91});
															thumbnails[222257] = clik.newPhoto({"id":222257,"src":"Big Ben_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_222257.html","width":109,"caption":"Big Ben","height":150});
															thumbnails[222279] = clik.newPhoto({"id":222279,"src":"Impact_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_222279.html","width":130,"caption":"Impact","height":89});
															thumbnails[222289] = clik.newPhoto({"id":222289,"src":"Raptor Foundation_thumb.jpg","galleries_id":19698,"server_id":18,"link":"photo_222289.html","width":103,"caption":"Raptor Foundation","height":150});
															thumbnails[222297] = clik.newPhoto({"id":222297,"src":"Electric Earth copy1_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_222297.html","width":130,"caption":" Electric Earth","height":99});
															thumbnails[735103] = clik.newPhoto({"id":735103,"src":"Aspect_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_735103.html","width":130,"caption":"Aspect","height":93});
															thumbnails[1226837] = clik.newPhoto({"id":1226837,"src":"CP_The Groom1_thumb.jpg","galleries_id":87673,"server_id":18,"link":"photo_1226837.html","width":130,"caption":"The Groom","height":93});
															thumbnails[1226897] = clik.newPhoto({"id":1226897,"src":"CP_Waiting_thumb.jpg","galleries_id":87674,"server_id":18,"link":"photo_1226897.html","width":130,"caption":"Waiting","height":93});
															thumbnails[1711994] = clik.newPhoto({"id":1711994,"src":"CP_Bella_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_1711994.html","width":128,"caption":"Bella","height":150});
															thumbnails[7989345] = clik.newPhoto({"id":7989345,"src":"Afghanistan_2008_001_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_7989345.html","width":130,"caption":"Afghan_2008_001","height":77});
															thumbnails[8447034] = clik.newPhoto({"id":8447034,"src":"002_072_IMG_4773_copy_thumb.jpg","galleries_id":451829,"server_id":18,"link":"photo_8447034.html","width":130,"caption":"The Vows","height":86});
															thumbnails[6183865] = clik.newPhoto({"id":6183865,"src":"IMG_4608_copy_thumb.jpg","galleries_id":345281,"server_id":18,"link":"photo_6183865.html","width":121,"caption":"Araniella cucurbitina (Cucumber Spider)","height":150});
															thumbnails[222240] = clik.newPhoto({"id":222240,"src":"Lilys_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_222240.html","width":130,"caption":"Lily's","height":98});
															thumbnails[222280] = clik.newPhoto({"id":222280,"src":"Finish line_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_222280.html","width":130,"caption":"Finish Line","height":93});
															thumbnails[241196] = clik.newPhoto({"id":241196,"src":"Rail Travel_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_241196.html","width":130,"caption":"Rail Travel","height":93});
															thumbnails[260857] = clik.newPhoto({"id":260857,"src":"Rush Hour_thumb.jpg","galleries_id":19698,"server_id":18,"link":"photo_260857.html","width":130,"caption":"Rush Hour","height":96});
															thumbnails[494132] = clik.newPhoto({"id":494132,"src":"Weston Park_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_494132.html","width":120,"caption":"Weston Park","height":150});
															thumbnails[615008] = clik.newPhoto({"id":615008,"src":"wired_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_615008.html","width":130,"caption":"Wired","height":94});
															thumbnails[1226832] = clik.newPhoto({"id":1226832,"src":"CP_Decoration_thumb.jpg","galleries_id":87673,"server_id":18,"link":"photo_1226832.html","width":108,"caption":"Decoration","height":150});
															thumbnails[1226907] = clik.newPhoto({"id":1226907,"src":"CP_The Bride_thumb.jpg","galleries_id":87674,"server_id":18,"link":"photo_1226907.html","width":108,"caption":"The Bride","height":150});
															thumbnails[1955336] = clik.newPhoto({"id":1955336,"src":"CP_DSC_1802_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_1955336.html","width":130,"caption":"Blaen - Y - Glyn","height":87});
															thumbnails[7989371] = clik.newPhoto({"id":7989371,"src":"Afghanistan_2008_002_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_7989371.html","width":130,"caption":"Afghan_2008_002","height":79});
															thumbnails[8447135] = clik.newPhoto({"id":8447135,"src":"003_056_IMG_4753_copy1_thumb.jpg","galleries_id":451829,"server_id":18,"link":"photo_8447135.html","width":123,"caption":"The Brides Maid","height":150});
															thumbnails[6181494] = clik.newPhoto({"id":6181494,"src":"IMG_4447_border_thumb.jpg","galleries_id":345281,"server_id":18,"link":"photo_6181494.html","width":130,"caption":"Wild Rose","height":88});
															thumbnails[222247] = clik.newPhoto({"id":222247,"src":"Costa_Coffee_thumb.jpg","galleries_id":19698,"server_id":18,"link":"photo_222247.html","width":130,"caption":"Coffee House","height":93});
															thumbnails[222263] = clik.newPhoto({"id":222263,"src":"Contrast_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_222263.html","width":130,"caption":"Contrast","height":93});
															thumbnails[494136] = clik.newPhoto({"id":494136,"src":"Entrance Hall_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_494136.html","width":120,"caption":"Weston Park Entrance Hall","height":150});
															thumbnails[494141] = clik.newPhoto({"id":494141,"src":"Stoned_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_494141.html","width":130,"caption":"Stoned","height":97});
															thumbnails[1226840] = clik.newPhoto({"id":1226840,"src":"The_Signing1_thumb.jpg","galleries_id":87673,"server_id":18,"link":"photo_1226840.html","width":118,"caption":"The Signing","height":150});
															thumbnails[1226910] = clik.newPhoto({"id":1226910,"src":"CP_Hurried_thumb.jpg","galleries_id":87674,"server_id":18,"link":"photo_1226910.html","width":108,"caption":"Hurried","height":150});
															thumbnails[7989703] = clik.newPhoto({"id":7989703,"src":"Afghanistan_2008_003_thumb.JPG","galleries_id":270062,"server_id":18,"link":"photo_7989703.html","width":97,"caption":"Afghan_2008_003","height":150});
															thumbnails[8447138] = clik.newPhoto({"id":8447138,"src":"004_119_IMG_4825_thumb.jpg","galleries_id":451829,"server_id":18,"link":"photo_8447138.html","width":130,"caption":"Crongratulations","height":98});
															thumbnails[222232] = clik.newPhoto({"id":222232,"src":"Glasshouse_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_222232.html","width":114,"caption":"Glasshouse","height":150});
															thumbnails[240905] = clik.newPhoto({"id":240905,"src":"CP_Cosford_Air_Museum1_thumb.jpg","galleries_id":19698,"server_id":18,"link":"photo_240905.html","width":113,"caption":"Cosford Air Museum","height":150});
															thumbnails[241200] = clik.newPhoto({"id":241200,"src":"thistle_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_241200.html","width":130,"caption":"Thistle","height":93});
															thumbnails[554243] = clik.newPhoto({"id":554243,"src":"Forgotten_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_554243.html","width":130,"caption":"Forgotten","height":90});
															thumbnails[1226847] = clik.newPhoto({"id":1226847,"src":"CP_Joined_thumb.jpg","galleries_id":87673,"server_id":18,"link":"photo_1226847.html","width":127,"caption":"Joined","height":150});
															thumbnails[1226913] = clik.newPhoto({"id":1226913,"src":"CP_Mrs Parton_thumb.jpg","galleries_id":87674,"server_id":18,"link":"photo_1226913.html","width":130,"caption":"Mrs Parton","height":93});
															thumbnails[1406926] = clik.newPhoto({"id":1406926,"src":"CP_IMG_1974_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_1406926.html","width":130,"caption":"Blaen-Y-Glyn","height":93});
															thumbnails[7989757] = clik.newPhoto({"id":7989757,"src":"Afghanistan_2008_004_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_7989757.html","width":130,"caption":"Afghan_2008_004","height":65});
															thumbnails[8447140] = clik.newPhoto({"id":8447140,"src":"005_092_IMG_4788_copy_thumb.jpg","galleries_id":451829,"server_id":18,"link":"photo_8447140.html","width":124,"caption":"Exchanging Rings","height":150});
															thumbnails[260856] = clik.newPhoto({"id":260856,"src":"View Point_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_260856.html","width":130,"caption":"View Point","height":95});
															thumbnails[272534] = clik.newPhoto({"id":272534,"src":"CP_Rugby Poster_thumb.jpg","galleries_id":19698,"server_id":18,"link":"photo_272534.html","width":119,"caption":"Rugby Poster","height":180});
															thumbnails[494116] = clik.newPhoto({"id":494116,"src":"Airborn_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_494116.html","width":130,"caption":"Airborn","height":173});
															thumbnails[1226861] = clik.newPhoto({"id":1226861,"src":"Happy_Couple1_thumb.jpg","galleries_id":87673,"server_id":18,"link":"photo_1226861.html","width":118,"caption":"Happy Couple","height":150});
															thumbnails[1226917] = clik.newPhoto({"id":1226917,"src":"CP_Best Friends_thumb.jpg","galleries_id":87674,"server_id":18,"link":"photo_1226917.html","width":108,"caption":"Best Friends","height":150});
															thumbnails[7989832] = clik.newPhoto({"id":7989832,"src":"Afghanistan_2008_005_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_7989832.html","width":130,"caption":"Afghan_2008_005","height":79});
															thumbnails[8447146] = clik.newPhoto({"id":8447146,"src":"006_038_IMG_4737_copy_thumb.jpg","galleries_id":451829,"server_id":18,"link":"photo_8447146.html","width":116,"caption":"Waiting","height":150});
															thumbnails[222256] = clik.newPhoto({"id":222256,"src":"London eye_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_222256.html","width":130,"caption":"London Eye ","height":93});
															thumbnails[222274] = clik.newPhoto({"id":222274,"src":"Rose_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_222274.html","width":111,"caption":"Rose","height":150});
															thumbnails[222286] = clik.newPhoto({"id":222286,"src":"Lakeside_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_222286.html","width":130,"caption":"Lakeside","height":87});
															thumbnails[222299] = clik.newPhoto({"id":222299,"src":"Storm_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_222299.html","width":100,"caption":" Storm","height":129});
															thumbnails[282208] = clik.newPhoto({"id":282208,"src":"Weed_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_282208.html","width":130,"caption":"Weed","height":96});
															thumbnails[390870] = clik.newPhoto({"id":390870,"src":"Fire_thumb.jpg","galleries_id":19698,"server_id":18,"link":"photo_390870.html","width":130,"caption":"Fire & Rescue","height":86});
															thumbnails[391681] = clik.newPhoto({"id":391681,"src":"Leap_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_391681.html","width":130,"caption":"Leap","height":86});
															thumbnails[1226860] = clik.newPhoto({"id":1226860,"src":"The_Grandchildren1_thumb.jpg","galleries_id":87673,"server_id":18,"link":"photo_1226860.html","width":130,"caption":"The Grand Children","height":93});
															thumbnails[1226920] = clik.newPhoto({"id":1226920,"src":"CP_The Bridesmaids_thumb.jpg","galleries_id":87674,"server_id":18,"link":"photo_1226920.html","width":130,"caption":"The bridesmaids ","height":93});
															thumbnails[1712012] = clik.newPhoto({"id":1712012,"src":"CP_Henry_thumb.jpg","galleries_id":92718,"server_id":18,"link":"photo_1712012.html","width":128,"caption":"Henry","height":150});
															thumbnails[7994336] = clik.newPhoto({"id":7994336,"src":"Afghanistan_2008_006_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_7994336.html","width":130,"caption":"Afghan_2008_006","height":100});
															thumbnails[8447150] = clik.newPhoto({"id":8447150,"src":"007_078_IMG_4779_copy_thumb.jpg","galleries_id":451829,"server_id":18,"link":"photo_8447150.html","width":130,"caption":"I now pronounce you . . . ","height":84});
															thumbnails[222291] = clik.newPhoto({"id":222291,"src":"CP_Lowepro_thumb.jpg","galleries_id":19698,"server_id":18,"link":"photo_222291.html","width":130,"caption":" Lowepro","height":100});
															thumbnails[282214] = clik.newPhoto({"id":282214,"src":"The moment_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_282214.html","width":130,"caption":"The Moment","height":93});
															thumbnails[950863] = clik.newPhoto({"id":950863,"src":"Duo_thumb.jpg","galleries_id":19692,"server_id":18,"link":"photo_950863.html","width":130,"caption":"Duo","height":93});
															thumbnails[1226857] = clik.newPhoto({"id":1226857,"src":"CP_Together_thumb.jpg","galleries_id":87673,"server_id":18,"link":"photo_1226857.html","width":130,"caption":"Together","height":93});
															thumbnails[1226923] = clik.newPhoto({"id":1226923,"src":"CP_Mr&Mrs_thumb.jpg","galleries_id":87674,"server_id":18,"link":"photo_1226923.html","width":108,"caption":"Mr & Mrs","height":150});
															thumbnails[1955341] = clik.newPhoto({"id":1955341,"src":"CP_DSC_1791_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_1955341.html","width":130,"caption":"Falls","height":88});
															thumbnails[7994367] = clik.newPhoto({"id":7994367,"src":"Afghanistan_2008_007_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_7994367.html","width":130,"caption":"Afghan_2008_007","height":96});
															thumbnails[8447154] = clik.newPhoto({"id":8447154,"src":"008_156_IMG_4870_thumb.jpg","galleries_id":451829,"server_id":18,"link":"photo_8447154.html","width":102,"caption":"Cheers","height":150});
															thumbnails[222251] = clik.newPhoto({"id":222251,"src":"Westminster_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_222251.html","width":130,"caption":"Westminster","height":84});
															thumbnails[241205] = clik.newPhoto({"id":241205,"src":"Power_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_241205.html","width":123,"caption":"Power","height":150});
															thumbnails[282213] = clik.newPhoto({"id":282213,"src":"line up_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_282213.html","width":111,"caption":"Line Up","height":150});
															thumbnails[1226858] = clik.newPhoto({"id":1226858,"src":"The_Bond1_thumb.jpg","galleries_id":87673,"server_id":18,"link":"photo_1226858.html","width":130,"caption":"The Bond","height":102});
															thumbnails[1226927] = clik.newPhoto({"id":1226927,"src":"CP_Reception_thumb.jpg","galleries_id":87674,"server_id":18,"link":"photo_1226927.html","width":108,"caption":"Reception","height":150});
															thumbnails[7994418] = clik.newPhoto({"id":7994418,"src":"Afghanistan_2008_008_thumb.JPG","galleries_id":270062,"server_id":18,"link":"photo_7994418.html","width":102,"caption":"Afghan_2008_008","height":150});
															thumbnails[221806] = clik.newPhoto({"id":221806,"src":"Window_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_221806.html","width":100,"caption":"Window","height":137});
															thumbnails[241263] = clik.newPhoto({"id":241263,"src":"Wrecked_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_241263.html","width":130,"caption":"Wrecked","height":112});
															thumbnails[260853] = clik.newPhoto({"id":260853,"src":"The Office_thumb.jpg","galleries_id":19699,"server_id":18,"link":"photo_260853.html","width":111,"caption":"The Office","height":150});
															thumbnails[391700] = clik.newPhoto({"id":391700,"src":"Rapid_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_391700.html","width":107,"caption":"Rapid","height":150});
															thumbnails[7994448] = clik.newPhoto({"id":7994448,"src":"Afghanistan_2008_009_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_7994448.html","width":130,"caption":"Afghan_2008_009","height":91});
															thumbnails[241202] = clik.newPhoto({"id":241202,"src":"Millennium_thumb.jpg","galleries_id":19691,"server_id":18,"link":"photo_241202.html","width":130,"caption":"Millennium","height":107});
															thumbnails[282210] = clik.newPhoto({"id":282210,"src":"Brought Down_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_282210.html","width":130,"caption":"Brought Down","height":93});
															thumbnails[7994477] = clik.newPhoto({"id":7994477,"src":"Afghanistan_2008_010_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_7994477.html","width":130,"caption":"Afghan_2008_010","height":71});
															thumbnails[282209] = clik.newPhoto({"id":282209,"src":"tackle_thumb.jpg","galleries_id":24410,"server_id":18,"link":"photo_282209.html","width":130,"caption":"Tackle","height":94});
															thumbnails[8029017] = clik.newPhoto({"id":8029017,"src":"Afghanistan_2008_0111_thumb.JPG","galleries_id":270062,"server_id":18,"link":"photo_8029017.html","width":130,"caption":"Afghanistan_2008_011","height":87});
															thumbnails[8029064] = clik.newPhoto({"id":8029064,"src":"Afghanistan_2008_012_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_8029064.html","width":130,"caption":"Afghanistan_2008_012","height":94});
															thumbnails[8029073] = clik.newPhoto({"id":8029073,"src":"Afghanistan_2008_013_thumb.JPG","galleries_id":270062,"server_id":18,"link":"photo_8029073.html","width":130,"caption":"Afghanistan_2008_013","height":65});
															thumbnails[8029092] = clik.newPhoto({"id":8029092,"src":"Afghanistan_2008_014_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_8029092.html","width":130,"caption":"Afghanistan_2008_014","height":44});
															thumbnails[8029096] = clik.newPhoto({"id":8029096,"src":"Afghanistan_2008_015_thumb.jpg","galleries_id":270062,"server_id":18,"link":"photo_8029096.html","width":130,"caption":"Afghanistan_2008_015","height":65});
															thumbnails[8029112] = clik.newPhoto({"id":8029112,"src":"Afghanistan_2008_016_thumb.JPG","galleries_id":270062,"server_id":18,"link":"photo_8029112.html","width":126,"caption":"Afghanistan_2008_016","height":150});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[92719] = clik.newGallery({"parentGallery":92717,"usePopups":false,"title":"People","link":"gallery_92719.html","maxRecords":0.0,"photoIDs":[8712180.0,241180.0,282211.0,615004.0,1406897.0,1406910.0,1712018.0,1712032.0,3147160.0,3147164.0,3147170.0],"skipIndex":0,"section_code":"gallery","featured_images":"3147170,3147164,3147160,1712032,1712018,1406910,1406897,615004,282211,241180","id":92719,"singleSection":false});				  						galleries[92718] = clik.newGallery({"parentGallery":92717,"usePopups":false,"title":"Pets (Captive animals)","link":"gallery_92718.html","maxRecords":0.0,"photoIDs":[2843084.0,222243.0,222264.0,222269.0,241229.0,260863.0,554245.0,1406965.0,1406971.0,1406976.0,1711994.0,1712012.0],"skipIndex":0,"section_code":"gallery","featured_images":"2843084,1712012,1711994,1406976,1406971,1406965,554245,260863,241229,222269,222264,222243","id":92718,"singleSection":false});				  						galleries[451829] = clik.newGallery({"parentGallery":19693,"usePopups":false,"title":"The Wedding of Mr & Mrs Deacon","link":"gallery_451829.html","maxRecords":0.0,"photoIDs":[8446961.0,8447034.0,8447135.0,8447138.0,8447140.0,8447146.0,8447150.0,8447154.0],"skipIndex":0,"section_code":"gallery","featured_images":"8447154,8447150,8447146,8447140,8447138,8447135,8447034,8446961","id":451829,"singleSection":false});				  						galleries[87674] = clik.newGallery({"parentGallery":19693,"usePopups":false,"title":"The Wedding of Mr & Mrs Parton","link":"gallery_87674.html","maxRecords":0.0,"photoIDs":[1226897.0,1226907.0,1226910.0,1226913.0,1226917.0,1226920.0,1226923.0,1226927.0],"skipIndex":0,"section_code":"gallery","featured_images":"1226927,1226923,1226920,1226917,1226910,1226907,1226897","id":87674,"singleSection":false});				  						galleries[87673] = clik.newGallery({"parentGallery":19693,"usePopups":false,"title":"The Wedding of Mr & Mrs Stacy","link":"gallery_87673.html","maxRecords":0.0,"photoIDs":[1226837.0,1226832.0,1226840.0,1226847.0,1226861.0,1226860.0,1226857.0,1226858.0],"skipIndex":0,"section_code":"gallery","featured_images":"1226861,1226860,1226858,1226857,1226840,1226837,1226832","id":87673,"singleSection":false});				  						galleries[19693] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_19693.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"1226927,1226923,1226920,1226917,1226910,1226907,1226897,1226861,1226860,1226858,1226857,1226840,1226837,1226832","id":19693,"singleSection":false});				  						galleries[92717] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits ","link":"gallery_92717.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"3147170,3147164,3147160,2843084,1712032,1712018,1712012,1711994,1406976,1406971,1406965,1406910,1406897,615004,554245,282211,260863,241229,241180,222269,222264,222243","id":92717,"singleSection":false});				  						galleries[19691] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscape","link":"gallery_19691.html","maxRecords":0.0,"photoIDs":[222229.0,3121184.0,222297.0,241196.0,615008.0,1955336.0,494141.0,554243.0,1406926.0,222286.0,222299.0,282208.0,1955341.0,241205.0,241263.0,241202.0],"skipIndex":0,"section_code":"gallery","featured_images":"3121184,1955341,1955336,1406926,615008,554243,494141,282208,241263,241205,241202,241196,222299,222297,222286,222229","id":19691,"singleSection":false});				  						galleries[19699] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Architecture","link":"gallery_19699.html","maxRecords":0.0,"photoIDs":[8030025.0,8030039.0,8030042.0,222257.0,494132.0,494136.0,222232.0,260856.0,222256.0,222251.0,221806.0,260853.0],"skipIndex":0,"section_code":"gallery","featured_images":"8030042,8030039,8030025,494136,494132,260856,260853,222257,222256,222251,222232,221806","id":19699,"singleSection":false});				  						galleries[19692] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flora","link":"gallery_19692.html","maxRecords":0.0,"photoIDs":[1406857.0,1955345.0,1955348.0,7961587.0,8033512.0,735103.0,222240.0,222263.0,241200.0,222274.0,950863.0],"skipIndex":0,"section_code":"gallery","featured_images":"1955348,1955345,1406857,950863,735103,241200,222274,222263,222240","id":19692,"singleSection":false});				  						galleries[19698] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commercial ","link":"gallery_19698.html","maxRecords":0.0,"photoIDs":[1836752.0,222289.0,260857.0,222247.0,240905.0,272534.0,390870.0,222291.0],"skipIndex":0,"section_code":"gallery","featured_images":"390870,272534,260857,240905,222291,222289,222247","id":19698,"singleSection":false});				  						galleries[19688] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wildlife","link":"gallery_19688.html","maxRecords":0.0,"photoIDs":[7602094.0,222273.0,222275.0,222277.0,222285.0,222302.0,1406944.0,6506088.0,6506129.0,6506175.0,7961673.0,7961780.0],"skipIndex":0,"section_code":"gallery","featured_images":"1406944,222302,222285,222277,222275,222273","id":19688,"singleSection":false});				  						galleries[24410] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sport","link":"gallery_24410.html","maxRecords":0.0,"photoIDs":[1164415.0,1164418.0,1164423.0,1164425.0,222279.0,222280.0,494116.0,391681.0,282214.0,282213.0,391700.0,282210.0,282209.0],"skipIndex":0,"section_code":"gallery","featured_images":"1164425,1164423,1164418,1164415,494116,391681,282214,282213,282210,282209,222280,222279","id":24410,"singleSection":false});				  						galleries[270062] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Afghanistan","link":"gallery_270062.html","maxRecords":0.0,"photoIDs":[7989345.0,7989371.0,7989703.0,7989757.0,7989832.0,7994336.0,7994367.0,7994418.0,7994448.0,7994477.0,8029017.0,8029064.0,8029073.0,8029092.0,8029096.0,8029112.0],"skipIndex":0,"section_code":"gallery","featured_images":"8029112,8029092,8029073,8029017,7994477,7994448,7994418,7994367,7994336,7989832,7989757,7989703,7989371,7989345","id":270062,"singleSection":false});				  						galleries[19696] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Other ","link":"gallery_19696.html","maxRecords":0.0,"photoIDs":[222262.0,222287.0,241192.0,241232.0,389176.0,391671.0,391804.0,494142.0,1406895.0],"skipIndex":0,"section_code":"gallery","featured_images":"1406895,494142,391804,391671,389176,241232,241192,222287,222262","id":19696,"singleSection":false});				  						galleries[345281] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Drew Cole","link":"gallery_345281.html","maxRecords":0.0,"photoIDs":[6181484.0,6183865.0,6181494.0],"skipIndex":0,"section_code":"gallery","featured_images":"6183865,6181494,6181484","id":345281,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8033512,8030042,8030039,8030025,3147170,3147164,3147160,3121184,2843084,1955348,1955345,1836752,1712032,1712018,1406976,1406971,1406965,1406944,1406910,1406897,1406895,1406857,1164425,1164423,1164418,1164415,615004,554245,494142,391804,391671,389176,282211,260863,241229,241180,222302,222287,222285,222277,222275,222273,222269,222264,222243,7989345,1711994,1226897,1226837,735103,222297,222279,222257,7989371,1955336,1226907,1226832,615008,494132,260857,241196,222280,222240,7989703,1226910,1226840,494141,494136,222263,222247,7989757,1406926,554243,241200,7989832,1226917,1226861,494116,272534,260856,7994336,1712012,1226920,1226860,222299,222286,222274,222256,7994367,1226923,1226857,950863,282214,222291,7994418,1226927,1226858,241205,222251,7994448,391700,241263,221806,7994477,282210,241202,8029017,282209,8029073,8029092,8029112';
imageSets[2] = '8030042,8030039,8030025,3147170,3147164,3147160,3121184,2843084,1955348,1955345,1712032,1712018,1406976,1406971,1406965,1406944,1406910,1406897,1406895,1406857,1312476,1164425,1164423,1164418,1164415,615004,554245,494142,391804,391671,389176,282211,260863,241232,241229,241192,241180,222302,222287,222285,222277,222275,222273,222269,222264,222262,222243,222229,7989345,1711994,1226897,1226837,735103,222297,222289,222279,222257,7989371,1955336,1226907,1226832,615008,494132,260857,241196,222280,222240,7989703,1226910,1226840,494141,494136,222263,222247,7989757,1406926,554243,241200,240905,222232,7989832,1226917,1226861,494116,272534,260856,7994336,1712012,1226920,1226860,391681,390870,282208,222299,222286,222274,222256,7994367,1955341,1226923,1226857,950863,282214,222291,7994418,1226927,1226858,282213,241205,222251,7994448,260853,241263,221806,7994477,282210,241202,8029017,282209,8029073,8029092,8029112';
imageSets[3] = '7989345,7989371,7989703,7989757,7989832,7994336,7994367,7994418,7994448,7994477';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Blaze/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Blaze/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Blaze/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Blaze/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Blaze/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/Blaze/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Blaze/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Blaze/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 = 'Cole Photographic: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			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;
	}
}

			

