window.thumbnails = {};
															thumbnails[6272555] = clik.newPhoto({"id":6272555,"src":"Picture_019_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_6272555.html","width":130,"caption":"","height":87});
															thumbnails[6272557] = clik.newPhoto({"id":6272557,"src":"Picture_020_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_6272557.html","width":130,"caption":"","height":87});
															thumbnails[6272568] = clik.newPhoto({"id":6272568,"src":"Picture_041_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_6272568.html","width":130,"caption":"","height":195});
															thumbnails[6397301] = clik.newPhoto({"id":6397301,"src":"B0000017-copy_thumb.gif","galleries_id":170409,"server_id":1,"link":"photo_6397301.html","width":130,"caption":"","height":195});
															thumbnails[6397316] = clik.newPhoto({"id":6397316,"src":"B0000114_thumb.gif","galleries_id":66354,"server_id":1,"link":"photo_6397316.html","width":130,"caption":"","height":87});
															thumbnails[6397321] = clik.newPhoto({"id":6397321,"src":"B0000439_thumb.gif","galleries_id":161465,"server_id":1,"link":"photo_6397321.html","width":130,"caption":"","height":87});
															thumbnails[6397440] = clik.newPhoto({"id":6397440,"src":"B0000103_thumb.gif","galleries_id":66354,"server_id":1,"link":"photo_6397440.html","width":130,"caption":"","height":87});
															thumbnails[6397447] = clik.newPhoto({"id":6397447,"src":"B0000266_thumb.gif","galleries_id":66350,"server_id":1,"link":"photo_6397447.html","width":130,"caption":"","height":87});
															thumbnails[6397448] = clik.newPhoto({"id":6397448,"src":"B0000377_thumb.gif","galleries_id":161465,"server_id":1,"link":"photo_6397448.html","width":130,"caption":"","height":195});
															thumbnails[6397451] = clik.newPhoto({"id":6397451,"src":"B0000395_thumb.gif","galleries_id":161465,"server_id":1,"link":"photo_6397451.html","width":130,"caption":"","height":87});
															thumbnails[6397462] = clik.newPhoto({"id":6397462,"src":"B00001581_thumb.gif","galleries_id":170409,"server_id":1,"link":"photo_6397462.html","width":130,"caption":"","height":87});
															thumbnails[6503204] = clik.newPhoto({"id":6503204,"src":"IMG_1278_thumb.gif","galleries_id":66349,"server_id":1,"link":"photo_6503204.html","width":130,"caption":"","height":98});
															thumbnails[6503205] = clik.newPhoto({"id":6503205,"src":"IMG_1279_thumb.gif","galleries_id":66349,"server_id":1,"link":"photo_6503205.html","width":130,"caption":"","height":98});
															thumbnails[6503211] = clik.newPhoto({"id":6503211,"src":"IMG_1285_thumb.gif","galleries_id":66349,"server_id":1,"link":"photo_6503211.html","width":130,"caption":"","height":98});
															thumbnails[6503215] = clik.newPhoto({"id":6503215,"src":"IMG_1287_thumb.gif","galleries_id":66349,"server_id":1,"link":"photo_6503215.html","width":130,"caption":"","height":98});
															thumbnails[7831012] = clik.newPhoto({"id":7831012,"src":"Roads_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_7831012.html","width":130,"caption":"The road to?","height":92});
															thumbnails[7831018] = clik.newPhoto({"id":7831018,"src":"Steps_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_7831018.html","width":130,"caption":"Steps","height":98});
															thumbnails[7831022] = clik.newPhoto({"id":7831022,"src":"Steps2_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_7831022.html","width":130,"caption":"Steps 2","height":173});
															thumbnails[7833986] = clik.newPhoto({"id":7833986,"src":"Sun_thumb.jpg","galleries_id":422815,"server_id":1,"link":"photo_7833986.html","width":130,"caption":"Sun","height":98});
															thumbnails[7833992] = clik.newPhoto({"id":7833992,"src":"Lake_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7833992.html","width":130,"caption":"Lake","height":98});
															thumbnails[7834329] = clik.newPhoto({"id":7834329,"src":"Blooms_thumb.jpg","galleries_id":66349,"server_id":1,"link":"photo_7834329.html","width":130,"caption":"Blooms","height":98});
															thumbnails[7834332] = clik.newPhoto({"id":7834332,"src":"Brecon-Beacons_thumb.jpg","galleries_id":66351,"server_id":1,"link":"photo_7834332.html","width":130,"caption":"Brecon Beacons","height":98});
															thumbnails[7834334] = clik.newPhoto({"id":7834334,"src":"Bull-Rushes_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834334.html","width":130,"caption":"Bull Rushes","height":173});
															thumbnails[7834336] = clik.newPhoto({"id":7834336,"src":"Carving-at-Tredegar-House_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_7834336.html","width":130,"caption":"Carving at Tredegar House","height":173});
															thumbnails[7834339] = clik.newPhoto({"id":7834339,"src":"Cotswold-Blossom_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_7834339.html","width":130,"caption":"Cotswold Blossom","height":98});
															thumbnails[7834340] = clik.newPhoto({"id":7834340,"src":"Cotswold-View_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_7834340.html","width":130,"caption":"Cotswold View","height":98});
															thumbnails[7834344] = clik.newPhoto({"id":7834344,"src":"Duck-Family_thumb.jpg","galleries_id":161465,"server_id":1,"link":"photo_7834344.html","width":130,"caption":"Duck Family","height":98});
															thumbnails[7834346] = clik.newPhoto({"id":7834346,"src":"Footbridge_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_7834346.html","width":130,"caption":"Footbridge","height":98});
															thumbnails[7834348] = clik.newPhoto({"id":7834348,"src":"Footbridge-2_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834348.html","width":130,"caption":"Footbridge 2","height":173});
															thumbnails[7834349] = clik.newPhoto({"id":7834349,"src":"Heads-of-the-Valley-Road_thumb.jpg","galleries_id":66351,"server_id":1,"link":"photo_7834349.html","width":130,"caption":"Heads of the Valley Road","height":98});
															thumbnails[7834362] = clik.newPhoto({"id":7834362,"src":"Iris_thumb.jpg","galleries_id":66349,"server_id":1,"link":"photo_7834362.html","width":130,"caption":"Iris","height":173});
															thumbnails[7834372] = clik.newPhoto({"id":7834372,"src":"Lake1_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834372.html","width":130,"caption":"Lake","height":98});
															thumbnails[7834373] = clik.newPhoto({"id":7834373,"src":"Lake-entrance_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834373.html","width":130,"caption":"Lake Entrance","height":98});
															thumbnails[7834375] = clik.newPhoto({"id":7834375,"src":"Lake-View_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834375.html","width":130,"caption":"Lake View","height":98});
															thumbnails[7834377] = clik.newPhoto({"id":7834377,"src":"Parkland_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_7834377.html","width":130,"caption":"Parkland","height":98});
															thumbnails[7834380] = clik.newPhoto({"id":7834380,"src":"Pebbles_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834380.html","width":130,"caption":"Pebbles","height":98});
															thumbnails[7834381] = clik.newPhoto({"id":7834381,"src":"Reeds_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834381.html","width":130,"caption":"Reeds","height":98});
															thumbnails[7834383] = clik.newPhoto({"id":7834383,"src":"River-footbridge_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834383.html","width":130,"caption":"River Footbridge","height":98});
															thumbnails[7834387] = clik.newPhoto({"id":7834387,"src":"Roads_12781B32-24E8-5EC4-4FB332B172CAD66D_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_7834387.html","width":130,"caption":"Roads","height":92});
															thumbnails[7834388] = clik.newPhoto({"id":7834388,"src":"Round-the-Lake-at-Tredegar-Park_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_7834388.html","width":130,"caption":"Round the lake at Tredegar Park","height":98});
															thumbnails[7834389] = clik.newPhoto({"id":7834389,"src":"Seagull_thumb.jpg","galleries_id":161465,"server_id":1,"link":"photo_7834389.html","width":130,"caption":"Seagull","height":98});
															thumbnails[7834392] = clik.newPhoto({"id":7834392,"src":"Spring-in-Bloom_thumb.jpg","galleries_id":66349,"server_id":1,"link":"photo_7834392.html","width":130,"caption":"Spring in Bloom","height":98});
															thumbnails[7834393] = clik.newPhoto({"id":7834393,"src":"Spring-in-the-Cotswolds_thumb.jpg","galleries_id":161252,"server_id":1,"link":"photo_7834393.html","width":130,"caption":"Spring in the Cotswolds","height":98});
															thumbnails[7834394] = clik.newPhoto({"id":7834394,"src":"Swans-at-Tredegar-Park_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_7834394.html","width":130,"caption":"Swans at Tredegar Park","height":92});
															thumbnails[7834395] = clik.newPhoto({"id":7834395,"src":"The-Lake_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_7834395.html","width":130,"caption":"The Lake","height":98});
															thumbnails[7834402] = clik.newPhoto({"id":7834402,"src":"Time_thumb.jpg","galleries_id":66351,"server_id":1,"link":"photo_7834402.html","width":130,"caption":"Time","height":98});
															thumbnails[7834418] = clik.newPhoto({"id":7834418,"src":"Tredegar-House-Lake_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_7834418.html","width":130,"caption":"Tredegar House Lake","height":98});
															thumbnails[7834420] = clik.newPhoto({"id":7834420,"src":"Tredegar-Park_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_7834420.html","width":130,"caption":"Tredegar Park","height":173});
															thumbnails[7834421] = clik.newPhoto({"id":7834421,"src":"Valley-View_thumb.jpg","galleries_id":66351,"server_id":1,"link":"photo_7834421.html","width":130,"caption":"Valley View","height":98});
															thumbnails[7834423] = clik.newPhoto({"id":7834423,"src":"View-across-the-lake_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_7834423.html","width":130,"caption":"View across the Lake","height":98});
															thumbnails[7834424] = clik.newPhoto({"id":7834424,"src":"View-across-the-valley_thumb.jpg","galleries_id":66351,"server_id":1,"link":"photo_7834424.html","width":130,"caption":"View across the valley","height":98});
															thumbnails[7834425] = clik.newPhoto({"id":7834425,"src":"Waterfall_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834425.html","width":130,"caption":"Waterfall","height":98});
															thumbnails[7834426] = clik.newPhoto({"id":7834426,"src":"Watersplash_thumb.jpg","galleries_id":422814,"server_id":1,"link":"photo_7834426.html","width":130,"caption":"Watersplash","height":98});
															thumbnails[7834428] = clik.newPhoto({"id":7834428,"src":"Woodland-Walk-at-Tredegar-House_thumb.jpg","galleries_id":66354,"server_id":1,"link":"photo_7834428.html","width":130,"caption":"Woodland Walk","height":173});
															thumbnails[8239517] = clik.newPhoto({"id":8239517,"src":"A-Harris-Hawk-Meg_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239517.html","width":130,"caption":"","height":87});
															thumbnails[8239518] = clik.newPhoto({"id":8239518,"src":"At-Speed_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239518.html","width":130,"caption":"","height":195});
															thumbnails[8239519] = clik.newPhoto({"id":8239519,"src":"Bill-Molton-and-his-dogs_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239519.html","width":130,"caption":"","height":87});
															thumbnails[8239520] = clik.newPhoto({"id":8239520,"src":"Bringing-it_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239520.html","width":130,"caption":"","height":104});
															thumbnails[8239521] = clik.newPhoto({"id":8239521,"src":"Brittany-gathering_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239521.html","width":130,"caption":"","height":87});
															thumbnails[8239522] = clik.newPhoto({"id":8239522,"src":"Collected-2_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239522.html","width":130,"caption":"","height":104});
															thumbnails[8239523] = clik.newPhoto({"id":8239523,"src":"Collected-3_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239523.html","width":130,"caption":"","height":87});
															thumbnails[8239525] = clik.newPhoto({"id":8239525,"src":"Collected_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239525.html","width":130,"caption":"","height":87});
															thumbnails[8239527] = clik.newPhoto({"id":8239527,"src":"Discussing-the-breed_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239527.html","width":130,"caption":"","height":87});
															thumbnails[8239528] = clik.newPhoto({"id":8239528,"src":"Found_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239528.html","width":130,"caption":"","height":87});
															thumbnails[8239529] = clik.newPhoto({"id":8239529,"src":"Gallop_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239529.html","width":130,"caption":"","height":104});
															thumbnails[8239530] = clik.newPhoto({"id":8239530,"src":"Here-it-is_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239530.html","width":130,"caption":"","height":87});
															thumbnails[8239532] = clik.newPhoto({"id":8239532,"src":"I-can-see-it_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239532.html","width":130,"caption":"","height":87});
															thumbnails[8239534] = clik.newPhoto({"id":8239534,"src":"In-a-hurry_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239534.html","width":130,"caption":"","height":104});
															thumbnails[8239535] = clik.newPhoto({"id":8239535,"src":"Learning_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239535.html","width":130,"caption":"","height":87});
															thumbnails[8239536] = clik.newPhoto({"id":8239536,"src":"Pick-up_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239536.html","width":130,"caption":"","height":104});
															thumbnails[8239539] = clik.newPhoto({"id":8239539,"src":"Quick_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239539.html","width":130,"caption":"","height":87});
															thumbnails[8239542] = clik.newPhoto({"id":8239542,"src":"Retrieved_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239542.html","width":130,"caption":"","height":87});
															thumbnails[8239546] = clik.newPhoto({"id":8239546,"src":"Returning_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239546.html","width":130,"caption":"","height":87});
															thumbnails[8239549] = clik.newPhoto({"id":8239549,"src":"Spectating_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239549.html","width":130,"caption":"","height":195});
															thumbnails[8239554] = clik.newPhoto({"id":8239554,"src":"Steve-and-Meg_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239554.html","width":130,"caption":"","height":87});
															thumbnails[8239558] = clik.newPhoto({"id":8239558,"src":"Waiting_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239558.html","width":130,"caption":"","height":87});
															thumbnails[8239561] = clik.newPhoto({"id":8239561,"src":"Waiting-Patiently_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239561.html","width":130,"caption":"","height":87});
															thumbnails[8239564] = clik.newPhoto({"id":8239564,"src":"Working_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239564.html","width":130,"caption":"","height":104});
															thumbnails[8239568] = clik.newPhoto({"id":8239568,"src":"You-do-it-this-way_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239568.html","width":130,"caption":"","height":87});
															thumbnails[8239573] = clik.newPhoto({"id":8239573,"src":"Steve-Wright-giving-a-talk_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239573.html","width":130,"caption":"","height":195});
															thumbnails[8239577] = clik.newPhoto({"id":8239577,"src":"Steve-Wright-giving-a-talk-on-working_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239577.html","width":130,"caption":"","height":195});
															thumbnails[8239579] = clik.newPhoto({"id":8239579,"src":"Steve-Wright-giving-his-talk_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239579.html","width":130,"caption":"","height":195});
															thumbnails[8239582] = clik.newPhoto({"id":8239582,"src":"Striding-Out_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239582.html","width":130,"caption":"","height":87});
															thumbnails[8239584] = clik.newPhoto({"id":8239584,"src":"Thankyou_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239584.html","width":130,"caption":"","height":195});
															thumbnails[8239586] = clik.newPhoto({"id":8239586,"src":"The-Brittany-Day-Organisers_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239586.html","width":130,"caption":"","height":87});
															thumbnails[8239590] = clik.newPhoto({"id":8239590,"src":"Twigs-as-well_thumb.jpg","galleries_id":438978,"server_id":37,"link":"photo_8239590.html","width":130,"caption":"","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[161465] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Birds","link":"gallery_161465.html","maxRecords":0.0,"photoIDs":[6397321.0,6397448.0,6397451.0,7834344.0,7834389.0],"skipIndex":0,"section_code":"gallery","featured_images":"7834389,7834344,6397451,6397448,6397321","id":161465,"singleSection":false});				  						galleries[438978] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Brittany Awareness Day","link":"gallery_438978.html","maxRecords":0.0,"photoIDs":[8239517.0,8239518.0,8239519.0,8239520.0,8239521.0,8239522.0,8239523.0,8239525.0,8239527.0,8239528.0,8239529.0,8239530.0,8239532.0,8239534.0,8239535.0,8239536.0,8239539.0,8239542.0,8239546.0,8239549.0,8239554.0,8239558.0,8239561.0,8239564.0,8239568.0,8239573.0,8239577.0,8239579.0,8239582.0,8239584.0,8239586.0,8239590.0],"skipIndex":0,"section_code":"gallery","featured_images":"8239590,8239586,8239584,8239582,8239579,8239577,8239573,8239568,8239564,8239561","id":438978,"singleSection":false});				  						galleries[170409] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Butterflies and insects","link":"gallery_170409.html","maxRecords":0.0,"photoIDs":[6397301.0,6397462.0],"skipIndex":0,"section_code":"gallery","featured_images":"6397462,6397301","id":170409,"singleSection":false});				  						galleries[66354] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commissions (not for sale)","link":"gallery_66354.html","maxRecords":0.0,"photoIDs":[6272555.0,6272557.0,6397316.0,6397440.0,7834377.0,7834388.0,7834394.0,7834395.0,7834418.0,7834420.0,7834423.0,7834428.0],"skipIndex":0,"section_code":"gallery","featured_images":"7834428,7834423,7834420,7834418,7834395,7834394,7834388,7834377,6397440,6397316","id":66354,"singleSection":false});				  						galleries[66351] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Countryside views and villages","link":"gallery_66351.html","maxRecords":0.0,"photoIDs":[7834332.0,7834349.0,7834402.0,7834421.0,7834424.0],"skipIndex":0,"section_code":"gallery","featured_images":"7834424,7834421,7834402,7834349,7834332","id":66351,"singleSection":false});				  						galleries[66350] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dogs, Cats and Other Animals","link":"gallery_66350.html","maxRecords":0.0,"photoIDs":[6397447.0],"skipIndex":0,"section_code":"gallery","featured_images":6397447.0,"id":66350,"singleSection":false});				  						galleries[66349] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flowers and Gardens","link":"gallery_66349.html","maxRecords":0.0,"photoIDs":[6503204.0,6503205.0,6503211.0,6503215.0,7834329.0,7834362.0,7834392.0],"skipIndex":0,"section_code":"gallery","featured_images":"7834392,7834362,7834329,6503215,6503211,6503205,6503204","id":66349,"singleSection":false});				  						galleries[161466] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Horses and ponies","link":"gallery_161466.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":161466,"singleSection":false});				  						galleries[422815] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sun and Sky","link":"gallery_422815.html","maxRecords":0.0,"photoIDs":[7833986.0],"skipIndex":0,"section_code":"gallery","featured_images":7833986.0,"id":422815,"singleSection":false});				  						galleries[161455] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Towns and Buildings","link":"gallery_161455.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":161455,"singleSection":false});				  						galleries[161252] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Trees, woodland, roads and pathways","link":"gallery_161252.html","maxRecords":0.0,"photoIDs":[6272568.0,7831012.0,7831018.0,7831022.0,7834336.0,7834339.0,7834340.0,7834346.0,7834387.0,7834393.0],"skipIndex":0,"section_code":"gallery","featured_images":"7834393,7834387,7834346,7834340,7834339,7834336,7831022,7831018,7831012,6272568","id":161252,"singleSection":false});				  						galleries[422814] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Water","link":"gallery_422814.html","maxRecords":0.0,"photoIDs":[7833992.0,7834334.0,7834348.0,7834372.0,7834373.0,7834375.0,7834380.0,7834381.0,7834383.0,7834425.0,7834426.0],"skipIndex":0,"section_code":"gallery","featured_images":"7834426,7834425,7834383,7834381,7834380,7834375,7834373,7834372,7834348,7834334","id":422814,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8239590,8239586,8239584,8239582,8239579,8239577,8239573,8239568,8239564,8239561,8239558,8239554,8239549,8239546,8239542,8239539,8239536,8239535,8239534,8239532,8239530,8239529,8239528,8239527,8239525,8239523,8239522,8239521,8239520,8239519,8239518,8239517,7834428,7834426,7834425,7834424,7834423,7834421,7834420,7834418,7834402,7834395,7834394,7834393,7834392,7834389,7834388,7834387,7834383,7834381';
imageSets[3] = '8239590,8239586,8239584,8239582,8239579,8239577,8239573,8239568,8239564,8239561,8239558,8239554,8239549,8239546,8239542,8239539,8239536,8239535,8239534,8239532,8239530,8239529,8239528,8239527,8239525,8239523,8239522,8239521,8239520,8239519,8239518,8239517,7834428,7834426,7834425,7834424,7834423,7834421,7834420,7834418,7834402,7834395,7834394,7834393,7834392,7834389,7834388,7834387,7834383,7834381';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/smcphotographs/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/smcphotographs/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'SMC Photographs: ' + 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>Storm Grayson </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="SMCPHOTOGRAPHS">';
			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({					href: thumbnails[imageID].fnGalleryLink(gallery_id),					title: galleries[gallery_id].title				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

