window.thumbnails = {};
															thumbnails[9076894] = clik.newPhoto({"id":9076894,"src":"IMG_6245_thumb.jpg","galleries_id":471684,"server_id":1,"link":"photo_9076894.html","width":130,"caption":"Brooklands, VSCC Driving Tests","height":87});
															thumbnails[9049837] = clik.newPhoto({"id":9049837,"src":"IMG_9165_7F3EC5CB-24E8-5EC4-4F85B61093DE792E_thumb.jpg","galleries_id":471684,"server_id":1,"link":"photo_9049837.html","width":130,"caption":"Brands Hatch Stages","height":87});
															thumbnails[9007873] = clik.newPhoto({"id":9007873,"src":"IMG_7237_thumb.jpg","galleries_id":471684,"server_id":1,"link":"photo_9007873.html","width":130,"caption":"Autosport International, NEC Birmingham","height":87});
															thumbnails[8961704] = clik.newPhoto({"id":8961704,"src":"IMG_0438_thumb_3B0755FC-1EC9-D45B-1C762E1412A00F53.jpg","galleries_id":471684,"server_id":1,"link":"photo_8961704.html","width":130,"caption":"London to Cape Town World Cup Rally","height":87});
															thumbnails[8248554] = clik.newPhoto({"id":8248554,"src":"20110114-IMG_6684_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248554.html","width":130,"caption":"NEC Birmingham Autosport Show","height":87});
															thumbnails[8248560] = clik.newPhoto({"id":8248560,"src":"20110130-IMG_8640_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248560.html","width":130,"caption":"Brands Hatch Stages","height":87});
															thumbnails[8248563] = clik.newPhoto({"id":8248563,"src":"20110212-IMG_0497_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248563.html","width":130,"caption":"Towncross Stages Goodwood","height":87});
															thumbnails[8248566] = clik.newPhoto({"id":8248566,"src":"20110218-IMG_3385_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248566.html","width":130,"caption":"Top Hat \/ Masters Friday Test Day","height":87});
															thumbnails[8248568] = clik.newPhoto({"id":8248568,"src":"20110219-IMG_3727_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248568.html","width":130,"caption":"Top Hat \/ Masters Saturday Test  Day","height":87});
															thumbnails[8248573] = clik.newPhoto({"id":8248573,"src":"20110225-IMG_7015_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248573.html","width":130,"caption":"Race Retro - Stoneleigh","height":87});
															thumbnails[8248574] = clik.newPhoto({"id":8248574,"src":"20110310-IMG_6189_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248574.html","width":130,"caption":"Pre 66 Test Day - Goodwood","height":87});
															thumbnails[8248576] = clik.newPhoto({"id":8248576,"src":"20110314-IMG_6853_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248576.html","width":130,"caption":"Fordwater Test Day - Goodwood","height":87});
															thumbnails[8248578] = clik.newPhoto({"id":8248578,"src":"20110327-IMG_7385_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248578.html","width":130,"caption":"Brooklands Mini Day","height":87});
															thumbnails[8248585] = clik.newPhoto({"id":8248585,"src":"20110402-IMG_9355_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248585.html","width":130,"caption":"Track Day - Castle Combe","height":87});
															thumbnails[8248590] = clik.newPhoto({"id":8248590,"src":"20110402-IMG_9812_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248590.html","width":130,"caption":"Saywell Track Day - Goodwood","height":87});
															thumbnails[8248593] = clik.newPhoto({"id":8248593,"src":"20110425-IMG_0481_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248593.html","width":130,"caption":"GRRC Sprint - Goodwood","height":87});
															thumbnails[8248595] = clik.newPhoto({"id":8248595,"src":"20110430-IMG_3102_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248595.html","width":130,"caption":"BRMC Sprint Goodwood","height":87});
															thumbnails[8248599] = clik.newPhoto({"id":8248599,"src":"20110502-IMG_4104_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248599.html","width":130,"caption":"JDC Track Day - Goodwood","height":87});
															thumbnails[8248607] = clik.newPhoto({"id":8248607,"src":"20110521-IMG_7851_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248607.html","width":130,"caption":"Lancia Track Day - Goodwood","height":87});
															thumbnails[8248608] = clik.newPhoto({"id":8248608,"src":"20110605-IMG_8002_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248608.html","width":130,"caption":"Farnham Festival of Transport","height":87});
															thumbnails[8248610] = clik.newPhoto({"id":8248610,"src":"20110612-IMG_7763_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248610.html","width":130,"caption":"National Mini Cooper Day - Beaulieu","height":87});
															thumbnails[8248618] = clik.newPhoto({"id":8248618,"src":"20110625-IMG_8970_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248618.html","width":130,"caption":"TWMC Sprint - Goodwood","height":87});
															thumbnails[8248619] = clik.newPhoto({"id":8248619,"src":"20110701-IMG_9901_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248619.html","width":130,"caption":"Festival of Speed Goodwood - Friday","height":87});
															thumbnails[8248625] = clik.newPhoto({"id":8248625,"src":"20110702-IMG_2578_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248625.html","width":130,"caption":"Festival of Speed Goodwood - Saturday","height":87});
															thumbnails[8248629] = clik.newPhoto({"id":8248629,"src":"20110708-IMG_3291_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248629.html","width":130,"caption":"AMOC Track Day - Goodwood","height":87});
															thumbnails[8248636] = clik.newPhoto({"id":8248636,"src":"20110722-IMG_5731_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248636.html","width":130,"caption":"Silverstone Classic - Friday","height":87});
															thumbnails[8248639] = clik.newPhoto({"id":8248639,"src":"20110723-IMG_7729_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248639.html","width":130,"caption":"Silverstone Classic - Saturday","height":87});
															thumbnails[8248649] = clik.newPhoto({"id":8248649,"src":"20110730-IMG_8786_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8248649.html","width":130,"caption":"MGCC Raceday - Thruxton","height":87});
															thumbnails[8264565] = clik.newPhoto({"id":8264565,"src":"20110806-IMG_3105_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8264565.html","width":130,"caption":"B&HMC Sprint Goodwood","height":87});
															thumbnails[8274047] = clik.newPhoto({"id":8274047,"src":"20110808-P1030056_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8274047.html","width":130,"caption":"ProDrive Factory Visit","height":98});
															thumbnails[8418137] = clik.newPhoto({"id":8418137,"src":"20110904-P1030213_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8418137.html","width":130,"caption":"Chelsea Auto Legends","height":98});
															thumbnails[8437873] = clik.newPhoto({"id":8437873,"src":"20110907-IMG_5819_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8437873.html","width":130,"caption":"Goodwood Revival Test Day","height":87});
															thumbnails[7867279] = clik.newPhoto({"id":7867279,"src":"20030222-IMG_0733_379053E9-1EC9-D45B-1C6CFB5C0213A55E_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867279.html","width":130,"caption":"Sunseeker Rally, Bournemouth 2003","height":86});
															thumbnails[8962101] = clik.newPhoto({"id":8962101,"src":"IMG_9396_3D99B8E6-1EC9-D45B-1C2A811ED7299A04_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962101.html","width":130,"caption":"Goodwood Revival Friday","height":87});
															thumbnails[8962102] = clik.newPhoto({"id":8962102,"src":"IMG_0199_3D99E75F-1EC9-D45B-1CEA3F7181C89770_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962102.html","width":130,"caption":"IMG 0199","height":87});
															thumbnails[8962103] = clik.newPhoto({"id":8962103,"src":"IMG_2055_3D9A189D-1EC9-D45B-1CF5FEF552F0D416_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962103.html","width":130,"caption":"IMG 2055","height":87});
															thumbnails[7867282] = clik.newPhoto({"id":7867282,"src":"20041106-IMG_7834_37905B2C-1EC9-D45B-1C905BE3BFA90929_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867282.html","width":130,"caption":"Tempest Stages, Yateley 2004","height":86});
															thumbnails[8962104] = clik.newPhoto({"id":8962104,"src":"IMG_3276_3D9A4823-1EC9-D45B-1C65A8BA9D83BB5C_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962104.html","width":130,"caption":"IMG 3276","height":87});
															thumbnails[7867284] = clik.newPhoto({"id":7867284,"src":"20050916-IMG_3975_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867284.html","width":130,"caption":"Revival Meeting, Goodwood 2005","height":87});
															thumbnails[8962105] = clik.newPhoto({"id":8962105,"src":"IMG_4832_3D9A77B4-1EC9-D45B-1C2DFF7E2334699A_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962105.html","width":130,"caption":"IMG 4832","height":87});
															thumbnails[8962106] = clik.newPhoto({"id":8962106,"src":"IMG_6716_3D9AA783-1EC9-D45B-1C078BE761451E2E_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962106.html","width":130,"caption":"IMG 6716","height":87});
															thumbnails[7867286] = clik.newPhoto({"id":7867286,"src":"20050917-IMG_5113_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867286.html","width":130,"caption":"Revival Meeting, Goodwood 2005","height":87});
															thumbnails[8962107] = clik.newPhoto({"id":8962107,"src":"IMG_9396_3D9AD40A-1EC9-D45B-1CB046E878BCA8C1_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962107.html","width":130,"caption":"IMG 9396","height":87});
															thumbnails[7867288] = clik.newPhoto({"id":7867288,"src":"20060225-IMG_6442_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867288.html","width":130,"caption":"Race Retro, Stoneleigh 2006","height":87});
															thumbnails[8962108] = clik.newPhoto({"id":8962108,"src":"IMG_9961_3D9B040A-1EC9-D45B-1C75078E4FE5586A_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962108.html","width":130,"caption":"IMG 9961","height":195});
															thumbnails[8962109] = clik.newPhoto({"id":8962109,"src":"P1030776_3D9B3914-1EC9-D45B-1C4E385F1CA3ECDB_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962109.html","width":130,"caption":"P1030776","height":98});
															thumbnails[7867290] = clik.newPhoto({"id":7867290,"src":"20060630-IMG_9668_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867290.html","width":130,"caption":"DTM, German Touring Cars, Brands Hatch 2006","height":87});
															thumbnails[8962110] = clik.newPhoto({"id":8962110,"src":"P1030808_3D9B69C1-1EC9-D45B-1C1FE5B44878D7A3_thumb.jpg","galleries_id":439273,"server_id":1,"link":"photo_8962110.html","width":130,"caption":"P1030808","height":173});
															thumbnails[7867291] = clik.newPhoto({"id":7867291,"src":"20060708-IMG_0225_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867291.html","width":130,"caption":"Goodwood Festival of Speed, Rally Stage 2006","height":87});
															thumbnails[7867309] = clik.newPhoto({"id":7867309,"src":"20060929-IMG_5376_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867309.html","width":130,"caption":"Minis to Monte 2006","height":87});
															thumbnails[7867317] = clik.newPhoto({"id":7867317,"src":"20080711-IMG_5992_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867317.html","width":130,"caption":"Goodwood Festival of Speed, Rally Stage 2008","height":87});
															thumbnails[7867318] = clik.newPhoto({"id":7867318,"src":"20081108-IMG_6921_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867318.html","width":130,"caption":"Tempest Stages, Yateley 2008","height":87});
															thumbnails[7867328] = clik.newPhoto({"id":7867328,"src":"20081108-IMG_6998_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867328.html","width":130,"caption":"Tempest Stages, Yateley 2008","height":87});
															thumbnails[7867332] = clik.newPhoto({"id":7867332,"src":"20090109-IMG_7665_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867332.html","width":130,"caption":"Autosport Show, NEC Birmingham 2009","height":87});
															thumbnails[7867340] = clik.newPhoto({"id":7867340,"src":"20090125-IMG_9044_379C2E41-1EC9-D45B-1C4227A0FC8ECA49_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867340.html","width":130,"caption":"Mike Hawthorn 50th Anniversary Tribute 2009","height":87});
															thumbnails[7867341] = clik.newPhoto({"id":7867341,"src":"20090215-IMG_9180_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867341.html","width":130,"caption":"Retromobile, Paris 2009","height":87});
															thumbnails[7867342] = clik.newPhoto({"id":7867342,"src":"20090227-IMG_8091_379C3323-1EC9-D45B-1CC02E02A70DE909_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867342.html","width":130,"caption":"Top Hat Masters Series Test Day, Goodwood 2009","height":87});
															thumbnails[7867369] = clik.newPhoto({"id":7867369,"src":"20090503-IMG_7360_379EB47D-1EC9-D45B-1C53579B0F3DC367_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867369.html","width":130,"caption":"FIA GT Championship, Silverstone 2009","height":87});
															thumbnails[7867728] = clik.newPhoto({"id":7867728,"src":"20090704-IMG_8837_381ACE03-1E4F-37DC-71D25495B6E35764_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867728.html","width":130,"caption":"Goodwood Festival of Speed, Rally Stage 2009","height":87});
															thumbnails[7867372] = clik.newPhoto({"id":7867372,"src":"20090704-IMG_8989_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867372.html","width":130,"caption":"Goodwood Festival of Speed, Rally Stage 2009","height":87});
															thumbnails[7867823] = clik.newPhoto({"id":7867823,"src":"20090704-IMG_9021_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867823.html","width":130,"caption":"Goodwood Festival of Speed, Rally Stage 2009","height":87});
															thumbnails[7867731] = clik.newPhoto({"id":7867731,"src":"20090725-IMG_4701_381AD756-1E4F-37DC-710868E2B6D17D33_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867731.html","width":130,"caption":"Silverstone Classic, Silverstone 2009","height":87});
															thumbnails[7867413] = clik.newPhoto({"id":7867413,"src":"20090811-IMG_8742_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867413.html","width":130,"caption":"Mercedes Benz Museum, Stuttgart 2009","height":87});
															thumbnails[7867415] = clik.newPhoto({"id":7867415,"src":"20090812-IMG_8890_37A449DD-1EC9-D45B-1CE0BDDEFA5E2828_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867415.html","width":130,"caption":"BMW Museum, Munich 2009","height":87});
															thumbnails[7867783] = clik.newPhoto({"id":7867783,"src":"20090812-IMG_8891_382C94EA-1E4F-37DC-71805FADA87C390E_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867783.html","width":130,"caption":"BMW Museum, Munich 2009","height":87});
															thumbnails[7867827] = clik.newPhoto({"id":7867827,"src":"20090920-IMG_7363_383A29A5-1E4F-37DC-71362B5F59356321_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867827.html","width":130,"caption":"Revival Meeting, Goodwood 2009","height":87});
															thumbnails[7867796] = clik.newPhoto({"id":7867796,"src":"20091107-IMG_1936_382EBF5B-1E4F-37DC-710DACEE4A68B39F_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867796.html","width":130,"caption":"Tempest Stages, Yateley 2009","height":87});
															thumbnails[7899624] = clik.newPhoto({"id":7899624,"src":"20091101-IMG_1391_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7899624.html","width":130,"caption":"London to Brighton Veteran Car Run 2009","height":87});
															thumbnails[7867831] = clik.newPhoto({"id":7867831,"src":"20100227-IMG_9525_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867831.html","width":130,"caption":"Top Hat Master Series Test Day, Goodwood 2010","height":87});
															thumbnails[7867833] = clik.newPhoto({"id":7867833,"src":"20100508-IMG_35351_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867833.html","width":130,"caption":"MSVR GT Round, Thruxton 2010","height":87});
															thumbnails[7868274] = clik.newPhoto({"id":7868274,"src":"20100531-IMG_7367_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7868274.html","width":130,"caption":" Masters Series Festival, Brands Hatch 2010","height":87});
															thumbnails[7867834] = clik.newPhoto({"id":7867834,"src":"20100531-IMG_7410_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867834.html","width":130,"caption":"Masters Series Festival, Brands Hatch 2010","height":87});
															thumbnails[7867835] = clik.newPhoto({"id":7867835,"src":"20100531-IMG_9066_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867835.html","width":130,"caption":"Masters Series Festival, Brands Hatch 2010","height":87});
															thumbnails[7868277] = clik.newPhoto({"id":7868277,"src":"20100531-IMG_9146_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7868277.html","width":130,"caption":"Masters Series Festival, Brands Hatch 2010","height":87});
															thumbnails[7868278] = clik.newPhoto({"id":7868278,"src":"20100531-IMG_9392_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7868278.html","width":130,"caption":"Masters Series Festival, Brands Hatch 2010","height":87});
															thumbnails[7868289] = clik.newPhoto({"id":7868289,"src":"20100613-IMG_3504_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7868289.html","width":130,"caption":"National Mini Cooper Day, Beaulieu 2010","height":87});
															thumbnails[7867836] = clik.newPhoto({"id":7867836,"src":"20100702-IMG_0229_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867836.html","width":130,"caption":"Goodwood Festival of Speed, Rally Stage 2010","height":87});
															thumbnails[7868297] = clik.newPhoto({"id":7868297,"src":"20100702-IMG_0513_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7868297.html","width":130,"caption":"Goodwood Festival of Speed, Rally Stage 2010","height":87});
															thumbnails[7868298] = clik.newPhoto({"id":7868298,"src":"20100718-IMG_5245_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7868298.html","width":130,"caption":"World Touring Cars, Brands Hatch 2010","height":87});
															thumbnails[7867837] = clik.newPhoto({"id":7867837,"src":"20100821-IMG_5019_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867837.html","width":130,"caption":"Pistonheads Studio Photo Shoot 2010","height":87});
															thumbnails[7867838] = clik.newPhoto({"id":7867838,"src":"20100821-IMG_9010_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867838.html","width":130,"caption":"Pistonheads Studio Photo Shoot 2010","height":87});
															thumbnails[7899649] = clik.newPhoto({"id":7899649,"src":"20100830-IMG_9743_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7899649.html","width":130,"caption":"Wings and Wheels, Dunsfold 2010","height":87});
															thumbnails[7867842] = clik.newPhoto({"id":7867842,"src":"20100917-IMG_6666_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867842.html","width":130,"caption":"Revival Meeting, Goodwood 2010","height":87});
															thumbnails[7867843] = clik.newPhoto({"id":7867843,"src":"20100917-IMG_7023_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867843.html","width":130,"caption":"Revival Meeting – Goodwood 2010","height":87});
															thumbnails[7867844] = clik.newPhoto({"id":7867844,"src":"20100918-IMG_8063_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867844.html","width":130,"caption":"Revival Meeting, Goodwood 2010","height":87});
															thumbnails[7867845] = clik.newPhoto({"id":7867845,"src":"20101001-IMG_1434_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867845.html","width":130,"caption":"Minis to Monte 2010","height":87});
															thumbnails[7867846] = clik.newPhoto({"id":7867846,"src":"20101023-IMG_2016_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867846.html","width":130,"caption":"VSCC Sprint, Goodwood 2010","height":87});
															thumbnails[7867847] = clik.newPhoto({"id":7867847,"src":"20101106-IMG_3581_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867847.html","width":130,"caption":"Tempest Stages, Yateley 2010","height":87});
															thumbnails[7867854] = clik.newPhoto({"id":7867854,"src":"20110219-IMG_4081_thumb.jpg","galleries_id":425104,"server_id":1,"link":"photo_7867854.html","width":130,"caption":"Top Hat Masters Series Test Day, Goodwood 2011","height":87});
															thumbnails[7867292] = clik.newPhoto({"id":7867292,"src":"20060928-IMG_4888_thumb.jpg","galleries_id":425105,"server_id":1,"link":"photo_7867292.html","width":130,"caption":"Minis to Monte 2006","height":195});
															thumbnails[7867314] = clik.newPhoto({"id":7867314,"src":"20080111-IMG_3295_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867314.html","width":130,"caption":"Autosport Show, NEC Birmingham 2008","height":195});
															thumbnails[7867785] = clik.newPhoto({"id":7867785,"src":"20090920-IMG_9959_382C99DA-1E4F-37DC-719BFCCF0597F09C_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867785.html","width":130,"caption":"Revival Meeting, Goodwood 2009","height":195});
															thumbnails[7867839] = clik.newPhoto({"id":7867839,"src":"20100830-IMG_0412_thumb.jpg","galleries_id":425106,"server_id":1,"link":"photo_7867839.html","width":130,"caption":"Wings and Wheels, Dunsfold 2010","height":195});
															thumbnails[3241998] = clik.newPhoto({"id":3241998,"src":"2008-1002_thumb.jpg","galleries_id":157371,"server_id":1,"link":"photo_3241998.html","width":130,"caption":"Autosport Show NEC 2008","height":195});
															thumbnails[2417625] = clik.newPhoto({"id":2417625,"src":"IMG_0390_thumb.jpg","galleries_id":157361,"server_id":1,"link":"photo_2417625.html","width":130,"caption":"River Ouse, York.","height":98});
															thumbnails[2417626] = clik.newPhoto({"id":2417626,"src":"IMG_0394_thumb.jpg","galleries_id":157361,"server_id":1,"link":"photo_2417626.html","width":130,"caption":"River Ouse, York","height":98});
															thumbnails[2417572] = clik.newPhoto({"id":2417572,"src":"IMG_00282_thumb.jpg","galleries_id":157359,"server_id":1,"link":"photo_2417572.html","width":130,"caption":"Lighting Shop, Farnham","height":88});
															thumbnails[2417574] = clik.newPhoto({"id":2417574,"src":"IMG_2236_thumb.jpg","galleries_id":157359,"server_id":1,"link":"photo_2417574.html","width":130,"caption":"London Eye, from Hungerford Bridge","height":87});
															thumbnails[2417575] = clik.newPhoto({"id":2417575,"src":"IMG_2954_thumb.jpg","galleries_id":157359,"server_id":1,"link":"photo_2417575.html","width":130,"caption":"Salamanca, Spain","height":87});
															thumbnails[2417687] = clik.newPhoto({"id":2417687,"src":"IMG_4359_thumb.jpg","galleries_id":157364,"server_id":1,"link":"photo_2417687.html","width":130,"caption":"Seals at Blakeney, Norfolk","height":87});
															thumbnails[2417691] = clik.newPhoto({"id":2417691,"src":"IMG_4686_thumb.jpg","galleries_id":157364,"server_id":1,"link":"photo_2417691.html","width":130,"caption":"Avocet, Norfolk","height":87});
															thumbnails[2427394] = clik.newPhoto({"id":2427394,"src":"IMG_9860_thumb.jpg","galleries_id":157371,"server_id":1,"link":"photo_2427394.html","width":130,"caption":"Sight in Amsterdam","height":87});
															thumbnails[2427396] = clik.newPhoto({"id":2427396,"src":"IMG_9870_thumb.jpg","galleries_id":157361,"server_id":1,"link":"photo_2427396.html","width":130,"caption":"The Blues Brothers, Amsterdam","height":87});
															thumbnails[2417577] = clik.newPhoto({"id":2417577,"src":"IMG_9216_thumb.jpg","galleries_id":157359,"server_id":1,"link":"photo_2417577.html","width":130,"caption":"Spinaker Tower, Portsmouth","height":195});
															thumbnails[2417675] = clik.newPhoto({"id":2417675,"src":"IMG_0990_thumb.jpg","galleries_id":157371,"server_id":1,"link":"photo_2417675.html","width":130,"caption":"Covent Garden, London","height":173});
															thumbnails[2417677] = clik.newPhoto({"id":2417677,"src":"IMG_30391_thumb.jpg","galleries_id":157359,"server_id":1,"link":"photo_2417677.html","width":130,"caption":"Hire Boats on the River Lot, FrancePenne-d'Agenais","height":195});
															thumbnails[2417678] = clik.newPhoto({"id":2417678,"src":"IMG_31071_thumb.jpg","galleries_id":157361,"server_id":1,"link":"photo_2417678.html","width":130,"caption":"Seen in Pujols, near Villeneuve-sur-Lot, France","height":195});
															thumbnails[2417688] = clik.newPhoto({"id":2417688,"src":"IMG_4484_thumb.jpg","galleries_id":157361,"server_id":1,"link":"photo_2417688.html","width":130,"caption":"Arcade in Norwich","height":195});
															thumbnails[2417690] = clik.newPhoto({"id":2417690,"src":"IMG_4477_thumb.jpg","galleries_id":157361,"server_id":1,"link":"photo_2417690.html","width":130,"caption":"To Norwich Cathedral","height":195});
															thumbnails[2427392] = clik.newPhoto({"id":2427392,"src":"IMG_9879_thumb.jpg","galleries_id":157371,"server_id":1,"link":"photo_2427392.html","width":130,"caption":"Girl caught in the street, Amsterdam","height":195});
															thumbnails[2427399] = clik.newPhoto({"id":2427399,"src":"IMG_0352_thumb.jpg","galleries_id":157361,"server_id":1,"link":"photo_2427399.html","width":130,"caption":"Gold Hill, Shaftesbury","height":195});
															thumbnails[3242393] = clik.newPhoto({"id":3242393,"src":"2008-1057_thumb.jpg","galleries_id":157371,"server_id":1,"link":"photo_3242393.html","width":130,"caption":"Goodwood Revival Meeting","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[471684] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"So far from this year 2012","link":"section509405_471684.html","maxRecords":0.0,"photoIDs":[9076894.0,9049837.0,9007873.0,8961704.0],"skipIndex":0,"section_code":"section509405","featured_images":"9076894,9049837,9007873,8961704","id":471684,"singleSection":false});				  						galleries[439273] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Images 2011","link":"section509405_439273.html","maxRecords":0.0,"photoIDs":[8248554.0,8248560.0,8248563.0,8248566.0,8248568.0,8248573.0,8248574.0,8248576.0,8248578.0,8248585.0,8248590.0,8248593.0,8248595.0,8248599.0,8248607.0,8248608.0,8248610.0,8248618.0,8248619.0,8248625.0,8248629.0,8248636.0,8248639.0,8248649.0,8264565.0,8274047.0,8418137.0,8437873.0,8962101.0,8962102.0,8962103.0,8962104.0,8962105.0,8962106.0,8962107.0,8962108.0,8962109.0,8962110.0],"skipIndex":0,"section_code":"section509405","featured_images":"8962101,8437873,8418137,8274047,8264565,8248649,8248639,8248636,8248629,8248625,8248619,8248618,8248610,8248607,8248599,8248595,8248593,8248590,8248585,8248574,8248573,8248568,8248566,8248563,8248560,8248554","id":439273,"singleSection":false});				  						galleries[425104] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"On the black stuff, most of the time","link":"section509405_425104.html","maxRecords":0.0,"photoIDs":[7867284.0,7867286.0,7867290.0,7867342.0,7867369.0,7867731.0,7867827.0,7867831.0,7867833.0,7868274.0,7867834.0,7867835.0,7868277.0,7868278.0,7868298.0,7867842.0,7867843.0,7867844.0,7867846.0,7867854.0],"skipIndex":0,"section_code":"section509405","featured_images":"7868298,7868278,7868277,7868274,7867854,7867846,7867844,7867843,7867842,7867835,7867834,7867833,7867831,7867827,7867731,7867369,7867342,7867290,7867286,7867284","id":425104,"singleSection":false});				  						galleries[157359] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Low Light","link":"section309482_157359.html","maxRecords":0.0,"photoIDs":[2417572.0,2417574.0,2417575.0,2417577.0,2417677.0],"skipIndex":0,"section_code":"section309482","featured_images":"2417677,2417577,2417575,2417574,2417572","id":157359,"singleSection":false});				  						galleries[157361] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Buildings \/ Landscapes","link":"section309482_157361.html","maxRecords":0.0,"photoIDs":[2417625.0,2417626.0,2427396.0,2417678.0,2417688.0,2417690.0,2427399.0],"skipIndex":0,"section_code":"section309482","featured_images":"2427399,2427396,2417690,2417688,2417678,2417626,2417625","id":157361,"singleSection":false});				  						galleries[425105] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dusty, Dirty and Damp","link":"section509405_425105.html","maxRecords":0.0,"photoIDs":[7867279.0,7867282.0,7867288.0,7867291.0,7867309.0,7867317.0,7867318.0,7867328.0,7867728.0,7867372.0,7867823.0,7867796.0,7899624.0,7868289.0,7867836.0,7868297.0,7867845.0,7867847.0,7867292.0],"skipIndex":0,"section_code":"section509405","featured_images":"7899624,7868297,7868289,7867847,7867845,7867836,7867823,7867796,7867728,7867372,7867328,7867318,7867317,7867309,7867291,7867288,7867282,7867279","id":425105,"singleSection":false});				  						galleries[157364] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Wildlife","link":"section309482_157364.html","maxRecords":0.0,"photoIDs":[2417687.0,2417691.0],"skipIndex":0,"section_code":"section309482","featured_images":"2417691,2417687","id":157364,"singleSection":false});				  						galleries[425106] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Distractions","link":"section509405_425106.html","maxRecords":0.0,"photoIDs":[7867332.0,7867340.0,7867341.0,7867413.0,7867415.0,7867783.0,7867837.0,7867838.0,7899649.0,7867314.0,7867785.0,7867839.0],"skipIndex":0,"section_code":"section509405","featured_images":"7899649,7867838,7867837,7867783,7867415,7867413,7867341,7867340,7867332","id":425106,"singleSection":false});				  						galleries[157371] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"People","link":"section309482_157371.html","maxRecords":0.0,"photoIDs":[3241998.0,2427394.0,2417675.0,2427392.0,3242393.0],"skipIndex":0,"section_code":"section309482","featured_images":"3242393,3241998,2427394,2427392,2417675","id":157371,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9076894,9049837,9007873,8961704,8437873,8418137,8274047,8264565,8248649,8248639,8248636,8248629,8248625,8248619,8248618,8248610,8248607,8248599,8248595,8248593,8248590,8248585,8248574,8248573,8248568,8248566,8248563,8248560,8248554,8962101,7867279,7867282,7867284,7867286,7867288,7867290,7867291,7867309,7867317,7867318,7867328,7867332,7867340,7867341,7867342,7867369,7867728,7867372,7867823,7867731,7867413,7867415,7867783,7867827,7867796,7899624,7867831,7867833,7868274,7867834,7867835,7868277,7868278,7868289,7867836,7868297,7868298,7867837,7867838,7899649,7867842,7867843,7867844,7867845,7867846,7867847,7867854';
imageSets[2] = '9076894,9049837,9007873,8961704,8437873,8418137,8274047,8264565,8248649,8248639,8248636,8248629,8248625,8248619,8248618,8248610,8248607,8248599,8248595,8248593,8248590,8248585,8248574,8248573,8248568,8248566,8248563,8248560,8248554,3241998,8962101,7867279,2417626,2417625,2427396,2427394,2417691,2417687,2417575,2417574,2417572,2427399,2427392,2417690,2417688,2417678,2417677,2417675,2417577,7867282,7867284,3242393,7867286,7867288,7867290,7867291,7867309,7867317,7867318,7867328,7867332,7867340,7867341,7867342,7867369,7867728,7867372,7867823,7867731,7867413,7867415,7867783,7867827,7867796,7899624,7867831,7867833,7868274,7867834,7867835,7868277,7868278,7868289,7867836,7868297,7868298,7867837,7867838,7899649,7867842,7867843,7867844,7867845,7867846,7867847,7867854';
imageSets[3] = '9076894,9049837,9007873,8962110,8962109,8962108,8962107,8962106,8962105,8962104,8962103,8962102,8962101,8961704,8437873,8418137,8274047,8264565,8248649,8248639,8248636,8248629,8248625,8248619,8248618,8248610,8248608,8248607,8248599,8248595,8248593,8248590,8248585,8248578,8248576,8248574,8248573,8248568,8248566,8248563,8248560,8248554,7899649,7899624,7868298,7868297,7868289,7868278,7868277,7868274';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Robertc/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Robertc/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Robertc/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Robertc/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Robertc/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/Robertc/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Robertc/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Robertc/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 += 'section509405.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 && 'section509405' != '') {
					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 = 'Robert Clayson 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>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="ROBERTC">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

