window.thumbnails = {};
															thumbnails[5515359] = clik.newPhoto({"id":5515359,"src":"BecclesFromTheRiverDJL_thumb.jpg","galleries_id":312323,"server_id":5,"link":"photo_5515359.html","width":130,"caption":"Beccles From the River","height":88});
															thumbnails[5515360] = clik.newPhoto({"id":5515360,"src":"BlyburgateBecclesDJL_thumb.jpg","galleries_id":312323,"server_id":5,"link":"photo_5515360.html","width":130,"caption":"Blyburgate Beccles","height":89});
															thumbnails[5515365] = clik.newPhoto({"id":5515365,"src":"TideMillWoodbridgeDJL_thumb.jpg","galleries_id":312334,"server_id":5,"link":"photo_5515365.html","width":100,"caption":"The Tide Mill, Woodbridge","height":130});
															thumbnails[5515399] = clik.newPhoto({"id":5515399,"src":"HousesAtStaithesDJL_thumb.jpg","galleries_id":312338,"server_id":5,"link":"photo_5515399.html","width":130,"caption":"Houses at Staithes","height":97});
															thumbnails[5515428] = clik.newPhoto({"id":5515428,"src":"AQuietBeachNorfolk_DJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5515428.html","width":130,"caption":"The Beach at Wells, Norfolk","height":89});
															thumbnails[5515433] = clik.newPhoto({"id":5515433,"src":"CromerDJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5515433.html","width":130,"caption":"Cromer","height":90});
															thumbnails[5515442] = clik.newPhoto({"id":5515442,"src":"SplashDJL_thumb.jpg","galleries_id":312336,"server_id":5,"link":"photo_5515442.html","width":130,"caption":"Splash","height":97});
															thumbnails[5515448] = clik.newPhoto({"id":5515448,"src":"WildLupinsBrnW_thumb.jpg","galleries_id":312336,"server_id":5,"link":"photo_5515448.html","width":130,"caption":"Wild Lupins  Pakefield Beach","height":87});
															thumbnails[5515490] = clik.newPhoto({"id":5515490,"src":"ChurchgateStDJL_thumb.jpg","galleries_id":312335,"server_id":5,"link":"photo_5515490.html","width":130,"caption":"Churchgate Street  The Queens Head","height":78});
															thumbnails[5515491] = clik.newPhoto({"id":5515491,"src":"AbbeygateStrret3DJL_thumb.jpg","galleries_id":312335,"server_id":5,"link":"photo_5515491.html","width":130,"caption":"Abbeygate Street 3","height":77});
															thumbnails[5516149] = clik.newPhoto({"id":5516149,"src":"AbbeygateStreet1DJL_thumb.jpg","galleries_id":312335,"server_id":5,"link":"photo_5516149.html","width":130,"caption":"Abbeygate Street from the Angel Hill","height":103});
															thumbnails[5516153] = clik.newPhoto({"id":5516153,"src":"AbbeygateStreetDJL_thumb.jpg","galleries_id":312335,"server_id":5,"link":"photo_5516153.html","width":130,"caption":"Abbeygate Street 2","height":106});
															thumbnails[5516160] = clik.newPhoto({"id":5516160,"src":"ChurchgateStreetDJL_thumb.jpg","galleries_id":312335,"server_id":5,"link":"photo_5516160.html","width":130,"caption":"Churchgate Street","height":88});
															thumbnails[5516177] = clik.newPhoto({"id":5516177,"src":"CrownStreetDJL_thumb.jpg","galleries_id":312335,"server_id":5,"link":"photo_5516177.html","width":130,"caption":"Crown Street and St Mary's","height":87});
															thumbnails[5516188] = clik.newPhoto({"id":5516188,"src":"CromerHutsDJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5516188.html","width":130,"caption":"Cromer Beach Huts","height":73});
															thumbnails[5516192] = clik.newPhoto({"id":5516192,"src":"CromerSnowsceneDJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5516192.html","width":130,"caption":"Cromer Snowscene","height":87});
															thumbnails[5516195] = clik.newPhoto({"id":5516195,"src":"FreshAirNorfolkDJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5516195.html","width":130,"caption":"Fresh Air, Norfolk","height":79});
															thumbnails[5516201] = clik.newPhoto({"id":5516201,"src":"HighDryDJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5516201.html","width":130,"caption":"High & Dry, Wells next the Sea","height":78});
															thumbnails[5516204] = clik.newPhoto({"id":5516204,"src":"PicnicOnCromerBeachDJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5516204.html","width":130,"caption":"The Picnic, Cromer Beach","height":82});
															thumbnails[5516206] = clik.newPhoto({"id":5516206,"src":"WellsQuayDJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5516206.html","width":130,"caption":"The Quay, Wells next the Sea","height":91});
															thumbnails[5516293] = clik.newPhoto({"id":5516293,"src":"PakefieldBeachDJL_thumb.jpg","galleries_id":312336,"server_id":5,"link":"photo_5516293.html","width":130,"caption":"Pakefield Beach","height":88});
															thumbnails[5516298] = clik.newPhoto({"id":5516298,"src":"PakefieldJuneDJL_thumb.jpg","galleries_id":312336,"server_id":5,"link":"photo_5516298.html","width":130,"caption":"Pakefield in June","height":88});
															thumbnails[5516308] = clik.newPhoto({"id":5516308,"src":"SummerSkiesPakefieldDJL_thumb.jpg","galleries_id":312336,"server_id":5,"link":"photo_5516308.html","width":128,"caption":"Summer Skies Pakefield","height":130});
															thumbnails[5516312] = clik.newPhoto({"id":5516312,"src":"JustLandedPakefieldDJL_thumb.jpg","galleries_id":312336,"server_id":5,"link":"photo_5516312.html","width":130,"caption":"Just Landed, Pakefield","height":43});
															thumbnails[5516352] = clik.newPhoto({"id":5516352,"src":"PlaytimeWellsNextTheSeaDJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5516352.html","width":130,"caption":"Playtime, Wells next the Sea","height":63});
															thumbnails[5516356] = clik.newPhoto({"id":5516356,"src":"ViewOfCromerDJL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5516356.html","width":130,"caption":"View of Cromer","height":70});
															thumbnails[5516360] = clik.newPhoto({"id":5516360,"src":"GirlWithKiteCromerDL_thumb.jpg","galleries_id":312340,"server_id":5,"link":"photo_5516360.html","width":130,"caption":"Girl with Kite, Cromer","height":90});
															thumbnails[5516721] = clik.newPhoto({"id":5516721,"src":"LowTideAtStaithesDJL1_thumb.jpg","galleries_id":312338,"server_id":5,"link":"photo_5516721.html","width":130,"caption":"Low Tide at Staithes","height":93});
															thumbnails[5516731] = clik.newPhoto({"id":5516731,"src":"JustLandedDetail_thumb.jpg","galleries_id":312336,"server_id":5,"link":"photo_5516731.html","width":130,"caption":"Just Landed Pakefield (detail)","height":81});
															thumbnails[5557441] = clik.newPhoto({"id":5557441,"src":"FeriniCalendarDL_thumb.jpg","galleries_id":312336,"server_id":5,"link":"photo_5557441.html","width":93,"caption":"Summer Skies","height":130});
															thumbnails[8849101] = clik.newPhoto({"id":8849101,"src":"FiveHutsSouthwoldDenesDLw_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_8849101.html","width":130,"caption":"Five Huts, Southwold Denes","height":94});
															thumbnails[8865428] = clik.newPhoto({"id":8865428,"src":"SouthwoldBoatyardDLw_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_8865428.html","width":130,"caption":"Southwold Boatyard","height":93});
															thumbnails[8182360] = clik.newPhoto({"id":8182360,"src":"SummertimeSWDLw_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_8182360.html","width":130,"caption":"Summertime, Southwold","height":90});
															thumbnails[8766903] = clik.newPhoto({"id":8766903,"src":"PlumsInACrystalBowlW_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_8766903.html","width":130,"caption":"Plums in a Crystal Bowl","height":89});
															thumbnails[5516545] = clik.newPhoto({"id":5516545,"src":"OnThePromenadeSouthwoldDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516545.html","width":130,"caption":"On the Promenade, Southwold","height":77});
															thumbnails[5524097] = clik.newPhoto({"id":5524097,"src":"TwoRipePearsDJL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5524097.html","width":130,"caption":"Two Ripe Pears","height":95});
															thumbnails[6901687] = clik.newPhoto({"id":6901687,"src":"CherriesInABlueBowlWa_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_6901687.html","width":130,"caption":"Cherries in a Blue Bowl","height":97});
															thumbnails[8259968] = clik.newPhoto({"id":8259968,"src":"ThreePlumsDLw_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_8259968.html","width":130,"caption":"Three Plums","height":95});
															thumbnails[9101884] = clik.newPhoto({"id":9101884,"src":"FourPearsAHoneyPotAGingerJarDLW_1_thumb.jpg","galleries_id":312322,"server_id":37,"link":"photo_9101884.html","width":130,"caption":"Four Pears, a Honey Pot and a Ginger Jar","height":87});
															thumbnails[8399082] = clik.newPhoto({"id":8399082,"src":"EggsInABlueBowlDL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_8399082.html","width":130,"caption":"Eggs and Shells","height":90});
															thumbnails[8889286] = clik.newPhoto({"id":8889286,"src":"ApplesInAWhiteBowl_DLw_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_8889286.html","width":130,"caption":"Apples in a White Bowl","height":95});
															thumbnails[8512243] = clik.newPhoto({"id":8512243,"src":"ChinaBowlWithCherriesDLw_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_8512243.html","width":130,"caption":"Cherries in a Little China Bowl","height":111});
															thumbnails[7892295] = clik.newPhoto({"id":7892295,"src":"BlackCherriesDLw_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_7892295.html","width":130,"caption":"Black Cherries in a Silver Dish","height":96});
															thumbnails[8134542] = clik.newPhoto({"id":8134542,"src":"GlasswithMarblesDJL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_8134542.html","width":130,"caption":"Glass with Marbles","height":96});
															thumbnails[7982590] = clik.newPhoto({"id":7982590,"src":"RedcurrantsLittleDLw_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_7982590.html","width":130,"caption":"Redcurrants in a Little Bowl","height":95});
															thumbnails[8122333] = clik.newPhoto({"id":8122333,"src":"CherriesInASilverDishDL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_8122333.html","width":130,"caption":"Cherries in a Silver Dish","height":102});
															thumbnails[5516328] = clik.newPhoto({"id":5516328,"src":"ThreepearsDJLa_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5516328.html","width":130,"caption":"Three Pears","height":85});
															thumbnails[5515368] = clik.newPhoto({"id":5515368,"src":"ClementinesDJL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5515368.html","width":130,"caption":"Clementines","height":89});
															thumbnails[7074802] = clik.newPhoto({"id":7074802,"src":"HighTideatBlackshoreDL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_7074802.html","width":130,"caption":"High Tide at Blackshore, Southwold","height":81});
															thumbnails[5515414] = clik.newPhoto({"id":5515414,"src":"RiverBlythSouthwoldDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5515414.html","width":120,"caption":"River Blyth, Southwold Harbour","height":130});
															thumbnails[6901681] = clik.newPhoto({"id":6901681,"src":"CherriesinaChineseBowlDL2_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_6901681.html","width":130,"caption":"Cherries in a Chinese Bowl","height":88});
															thumbnails[5515421] = clik.newPhoto({"id":5515421,"src":"StormLightSouthwoldDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5515421.html","width":130,"caption":"Storm Light  Southwold","height":98});
															thumbnails[5516215] = clik.newPhoto({"id":5516215,"src":"AldeburghBoatDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516215.html","width":130,"caption":"Aldeburgh Beach & Fishing Boat","height":57});
															thumbnails[5516220] = clik.newPhoto({"id":5516220,"src":"SummerCloudAldeburghDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516220.html","width":130,"caption":"Summer Cloud, Aldeburgh","height":73});
															thumbnails[5516207] = clik.newPhoto({"id":5516207,"src":"ThreeApplesDJL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5516207.html","width":130,"caption":"Three Apples and a Silver Mug","height":95});
															thumbnails[5516226] = clik.newPhoto({"id":5516226,"src":"BeachHutsAtSouthwoldDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516226.html","width":130,"caption":"Beach Huts at Souithwold","height":58});
															thumbnails[5516212] = clik.newPhoto({"id":5516212,"src":"EggshellsDJLa_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5516212.html","width":130,"caption":"Eggshells","height":86});
															thumbnails[5516237] = clik.newPhoto({"id":5516237,"src":"BoatsJettiesBlackshoreSouthwoldDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516237.html","width":130,"caption":"Boats and Jetties, Blackshore, Southwold","height":89});
															thumbnails[5516321] = clik.newPhoto({"id":5516321,"src":"ApricotsDJLa_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5516321.html","width":130,"caption":"Apricots","height":86});
															thumbnails[5516244] = clik.newPhoto({"id":5516244,"src":"GlimpseOfThePierDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516244.html","width":130,"caption":"A Glimpse of the Pier, Southwold","height":90});
															thumbnails[5516340] = clik.newPhoto({"id":5516340,"src":"ApricotsinaBlueBowlDJLa_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5516340.html","width":130,"caption":"Apricots in a Blue Bowl","height":96});
															thumbnails[5516253] = clik.newPhoto({"id":5516253,"src":"LowTideBlackshoreDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516253.html","width":130,"caption":"Low Tide at Blackshore, Southwold","height":89});
															thumbnails[5516336] = clik.newPhoto({"id":5516336,"src":"OrangeslemonsDJLa_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5516336.html","width":130,"caption":"Oranges & Lemons","height":89});
															thumbnails[5516273] = clik.newPhoto({"id":5516273,"src":"EveningShadowsSouthwoldDenesDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516273.html","width":130,"caption":"Evening Shadows, Southwold Denes","height":80});
															thumbnails[7324002] = clik.newPhoto({"id":7324002,"src":"BowlOfCherrieswDL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_7324002.html","width":130,"caption":"A Bowl of Cherries","height":130});
															thumbnails[5516609] = clik.newPhoto({"id":5516609,"src":"GoldenapplesDJLa_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5516609.html","width":130,"caption":"Two Golden Apples","height":86});
															thumbnails[5516362] = clik.newPhoto({"id":5516362,"src":"AldeburghCragPathDL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516362.html","width":130,"caption":"Aldeburgh  Crag Path","height":88});
															thumbnails[5516612] = clik.newPhoto({"id":5516612,"src":"PewterBrassDJLa_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5516612.html","width":130,"caption":"Pewter Brass & Three Oranges","height":89});
															thumbnails[5516466] = clik.newPhoto({"id":5516466,"src":"AutumnontheMarshesSouthwoldDjl_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516466.html","width":130,"caption":"Autumn on the Marshes, Southwold","height":84});
															thumbnails[5516541] = clik.newPhoto({"id":5516541,"src":"BeachHutsOnTheDenesDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516541.html","width":130,"caption":"Beach Huts on the Denes, Southwold","height":87});
															thumbnails[5516557] = clik.newPhoto({"id":5516557,"src":"TeaByTheBeachDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516557.html","width":130,"caption":"The Beach Cafe, Southwold","height":102});
															thumbnails[5516566] = clik.newPhoto({"id":5516566,"src":"TheBeachHutsSouthwoldDenesDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516566.html","width":130,"caption":"The Beach Huts, Southwold Denes","height":89});
															thumbnails[5669729] = clik.newPhoto({"id":5669729,"src":"BowlOfCherriesMugDL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5669729.html","width":130,"caption":"Bowl of Cherries and a Silver Mug","height":90});
															thumbnails[5516579] = clik.newPhoto({"id":5516579,"src":"TheBoatyardBlackshoreDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516579.html","width":130,"caption":"The Boatyard  Blackshore Southwold","height":83});
															thumbnails[5703929] = clik.newPhoto({"id":5703929,"src":"TwoGalaApplesDL1_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5703929.html","width":130,"caption":"Two Gala Apples","height":96});
															thumbnails[5516599] = clik.newPhoto({"id":5516599,"src":"TwelveHutsInARowDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5516599.html","width":130,"caption":"Twelve Huts in a Row, Southwold","height":57});
															thumbnails[5847597] = clik.newPhoto({"id":5847597,"src":"StrawberriesHoneypotDJL2_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5847597.html","width":130,"caption":"Strawberries and a Honeypot","height":59});
															thumbnails[5524100] = clik.newPhoto({"id":5524100,"src":"HarbourHutsDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5524100.html","width":130,"caption":"Harbour Huts and Boats Blackshore","height":84});
															thumbnails[5847606] = clik.newPhoto({"id":5847606,"src":"StrawberriesGlass24x24DJL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_5847606.html","width":130,"caption":"Strawberries in a Glass Dish","height":130});
															thumbnails[5524107] = clik.newPhoto({"id":5524107,"src":"AldeburghBeachDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5524107.html","width":130,"caption":"Aldeburgh Beach","height":95});
															thumbnails[6481619] = clik.newPhoto({"id":6481619,"src":"StrawberriesSugarShakerDL_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_6481619.html","width":130,"caption":"Strawberries and a Sugar Shaker","height":98});
															thumbnails[5756287] = clik.newPhoto({"id":5756287,"src":"SouthwoldSummerDJL_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5756287.html","width":130,"caption":"Southwold Summer","height":88});
															thumbnails[7324001] = clik.newPhoto({"id":7324001,"src":"SunlitBowlOfCherriesW_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_7324001.html","width":130,"caption":"Sunlit Bowl of Cherries","height":89});
															thumbnails[5756332] = clik.newPhoto({"id":5756332,"src":"Pier2Wdla_thumb.jpg","galleries_id":312339,"server_id":5,"link":"photo_5756332.html","width":130,"caption":"On the Pier, Southwold","height":102});
															thumbnails[7892360] = clik.newPhoto({"id":7892360,"src":"FiveApplesDLw1_thumb.jpg","galleries_id":312322,"server_id":5,"link":"photo_7892360.html","width":130,"caption":"Five Apples and a Pewter Mug","height":89});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[312322] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Still Life","link":"gallery_312322.html","maxRecords":0.0,"photoIDs":[8766903.0,5524097.0,6901687.0,8259968.0,9101884.0,8399082.0,8889286.0,8512243.0,7892295.0,8134542.0,7982590.0,8122333.0,5516328.0,5515368.0,6901681.0,5516207.0,5516212.0,5516321.0,5516340.0,5516336.0,7324002.0,5516609.0,5516612.0,5669729.0,5703929.0,5847597.0,5847606.0,6481619.0,7324001.0,7892360.0],"skipIndex":0,"section_code":"gallery","featured_images":"8766903,8134542,7892360,5847606,5669729","id":312322,"singleSection":false});				  						galleries[312339] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Southwold and Aldeburgh","link":"gallery_312339.html","maxRecords":0.0,"photoIDs":[8849101.0,8865428.0,8182360.0,5516545.0,7074802.0,5515414.0,5515421.0,5516215.0,5516220.0,5516226.0,5516237.0,5516244.0,5516253.0,5516273.0,5516362.0,5516466.0,5516541.0,5516557.0,5516566.0,5516579.0,5516599.0,5524100.0,5524107.0,5756287.0,5756332.0],"skipIndex":0,"section_code":"gallery","featured_images":"7074802,5516566,5516466,5516362","id":312339,"singleSection":false});				  						galleries[312336] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Lowestoft, Pakefield and Gorleston","link":"gallery_312336.html","maxRecords":0.0,"photoIDs":[5515442.0,5515448.0,5516293.0,5516298.0,5516308.0,5516312.0,5516731.0,5557441.0],"skipIndex":0,"section_code":"gallery","featured_images":"5516731,5515448,5515442","id":312336,"singleSection":false});				  						galleries[312335] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Bury St Edmunds","link":"gallery_312335.html","maxRecords":0.0,"photoIDs":[5515490.0,5515491.0,5516149.0,5516153.0,5516160.0,5516177.0],"skipIndex":0,"section_code":"gallery","featured_images":"5516153,5515490","id":312335,"singleSection":false});				  						galleries[312340] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cromer and Wells next the Sea","link":"gallery_312340.html","maxRecords":0.0,"photoIDs":[5515428.0,5515433.0,5516188.0,5516192.0,5516195.0,5516201.0,5516204.0,5516206.0,5516352.0,5516356.0,5516360.0],"skipIndex":0,"section_code":"gallery","featured_images":"5516204,5516192,5516188,5515433,5515428","id":312340,"singleSection":false});				  						galleries[312338] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Staithes","link":"gallery_312338.html","maxRecords":0.0,"photoIDs":[5515399.0,5516721.0],"skipIndex":0,"section_code":"gallery","featured_images":5515399.0,"id":312338,"singleSection":false});				  						galleries[312334] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Woodbridge","link":"gallery_312334.html","maxRecords":0.0,"photoIDs":[5515365.0],"skipIndex":0,"section_code":"gallery","featured_images":5515365.0,"id":312334,"singleSection":false});				  						galleries[312323] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Beccles","link":"gallery_312323.html","maxRecords":0.0,"photoIDs":[5515359.0,5515360.0],"skipIndex":0,"section_code":"gallery","featured_images":"5515360,5515359","id":312323,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5515442,8766903,8399082,7892295,8134542,5516328,5515368,7074802,5515421,5516362,5516466,5516566,5669729,5703929,5847606,7892360';
imageSets[2] = '5516731,5516204,5516192,5516188,5516153,5515490,5515448,5515442,5515433,5515428,5515399,5515365,5515360,5515359,8766903,8134542,7074802,5516362,5516466,5516566,5669729,5847606,7892360';
imageSets[3] = '9101884,8889286,8865428,8849101,8766903,8512243,8399082,8259968,8182360,8134542,8122333,7982590,7892360,7892295,7324002,7324001,7074802,6901687,6901681,6481619,5847606,5847597,5756332,5756287,5703929,5669729,5557441,5524107,5524100,5524097,5516731,5516721,5516612,5516609,5516599,5516579,5516566,5516557,5516545,5516541,5516466,5516362,5516360,5516356,5516352,5516340,5516336,5516328,5516321,5516312';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/djlart2010/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/djlart2010/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 = 'DAVID JOHN LEATHERS PAINTINGS: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

