window.thumbnails = {};
															thumbnails[7999097] = clik.newPhoto({"id":7999097,"src":"AythorpeStorm_thumb.jpg","galleries_id":480519,"server_id":1,"link":"photo_7999097.html","width":160,"caption":"WATCHING THE LIGHT","height":106});
															thumbnails[7718526] = clik.newPhoto({"id":7718526,"src":"South_Weald_Bluebells12_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_7718526.html","width":160,"caption":"BLUEBELLS SOUTH WEALD","height":108});
															thumbnails[8204174] = clik.newPhoto({"id":8204174,"src":"WillyLottsCottage_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_8204174.html","width":160,"caption":"WILLY LOTTS COTTAGE","height":109});
															thumbnails[6533339] = clik.newPhoto({"id":6533339,"src":"TheOldBoathouse_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_6533339.html","width":160,"caption":"THE OLD BOATHOUSE","height":107});
															thumbnails[7151970] = clik.newPhoto({"id":7151970,"src":"HoeMillBarge_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_7151970.html","width":160,"caption":"HOE MILL BARGE","height":105});
															thumbnails[7152089] = clik.newPhoto({"id":7152089,"src":"TheCrowstone_B1DC0C3E-1E4F-37DC-7163E60C668DCF67_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_7152089.html","width":160,"caption":"THE CROWSTONE","height":104});
															thumbnails[7855105] = clik.newPhoto({"id":7855105,"src":"ABreakInTheRain_thumb.jpg","galleries_id":480519,"server_id":1,"link":"photo_7855105.html","width":160,"caption":"A BREAK IN THE RAIN","height":111});
															thumbnails[7151988] = clik.newPhoto({"id":7151988,"src":"RocksAndSky_B1D2C0EE-1E4F-37DC-713BAC796578C89D_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_7151988.html","width":160,"caption":"ROCKS AND CLOUDS","height":102});
															thumbnails[5126652] = clik.newPhoto({"id":5126652,"src":"ThreeTrees_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_5126652.html","width":160,"caption":"FOREST TREES","height":107});
															thumbnails[7468178] = clik.newPhoto({"id":7468178,"src":"MaldonBench_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_7468178.html","width":160,"caption":"BENCHES","height":105});
															thumbnails[7520720] = clik.newPhoto({"id":7520720,"src":"IngatestoneHall_AFCB5A4D-1EC9-D45B-1C45FB72398CA491_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_7520720.html","width":160,"caption":"INGATESTONE HALL","height":106});
															thumbnails[7299838] = clik.newPhoto({"id":7299838,"src":"ShoeburySeascape_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_7299838.html","width":160,"caption":"DAYBREAK","height":106});
															thumbnails[1708305] = clik.newPhoto({"id":1708305,"src":"Southweald_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_1708305.html","width":160,"caption":"SOUTHWEALD","height":113});
															thumbnails[8282336] = clik.newPhoto({"id":8282336,"src":"Shoeburyness_Defence_thumb.jpg","galleries_id":480519,"server_id":1,"link":"photo_8282336.html","width":160,"caption":"SHOEBURYNESS DEFENCE","height":104});
															thumbnails[8845030] = clik.newPhoto({"id":8845030,"src":"AFoggyStart_thumb.jpg","galleries_id":480519,"server_id":1,"link":"photo_8845030.html","width":160,"caption":"A FOGGY START","height":107});
															thumbnails[6978887] = clik.newPhoto({"id":6978887,"src":"RhsGardenHydeHall_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_6978887.html","width":160,"caption":"RHS GARDEN HYDE HALL","height":105});
															thumbnails[7152119] = clik.newPhoto({"id":7152119,"src":"CloudsAndHayBales_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_7152119.html","width":160,"caption":"CLOUDS AND HAY BALES","height":107});
															thumbnails[8681395] = clik.newPhoto({"id":8681395,"src":"BigSky_thumb.jpg","galleries_id":480519,"server_id":1,"link":"photo_8681395.html","width":160,"caption":"BLUE SKY","height":108});
															thumbnails[7226867] = clik.newPhoto({"id":7226867,"src":"NorthFambridgeSunset_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_7226867.html","width":160,"caption":"SUN SETTING OVER NORTH FAMBRIDGE","height":101});
															thumbnails[3676371] = clik.newPhoto({"id":3676371,"src":"warmlightsplendour2_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_3676371.html","width":160,"caption":"WARM LIGHT SPLENDOUR","height":120});
															thumbnails[8431420] = clik.newPhoto({"id":8431420,"src":"WarliesParkBW_thumb.jpg","galleries_id":480519,"server_id":1,"link":"photo_8431420.html","width":160,"caption":"WARLIES PARK","height":104});
															thumbnails[1708291] = clik.newPhoto({"id":1708291,"src":"cloudyskies_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_1708291.html","width":160,"caption":"CLOUDY SKIES","height":120});
															thumbnails[3049772] = clik.newPhoto({"id":3049772,"src":"gatheringstormD_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_3049772.html","width":160,"caption":"GATHERING STORM","height":120});
															thumbnails[5548144] = clik.newPhoto({"id":5548144,"src":"GreensteadChurch_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_5548144.html","width":160,"caption":"THE CHURCH OF ST ANDREW","height":107});
															thumbnails[1694120] = clik.newPhoto({"id":1694120,"src":"SummerEveningAtAyphorpeRoding_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_1694120.html","width":160,"caption":"SUMMER EVENING AT AYTHORPE RODING","height":106});
															thumbnails[5034807] = clik.newPhoto({"id":5034807,"src":"HylandsHouse_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_5034807.html","width":160,"caption":"HYLANDS HOUSE","height":102});
															thumbnails[5999790] = clik.newPhoto({"id":5999790,"src":"HylandsPark_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_5999790.html","width":160,"caption":"HYLANDS PARK","height":107});
															thumbnails[1708322] = clik.newPhoto({"id":1708322,"src":"threeboatsD_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_1708322.html","width":160,"caption":"THREE BOATS","height":113});
															thumbnails[3636944] = clik.newPhoto({"id":3636944,"src":"PapermillLock_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_3636944.html","width":160,"caption":"PAPERMILL LOCK","height":107});
															thumbnails[1708334] = clik.newPhoto({"id":1708334,"src":"hadleighcastleD_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_1708334.html","width":160,"caption":"HADLEIGH CASTLE","height":104});
															thumbnails[3073817] = clik.newPhoto({"id":3073817,"src":"Rainbowoverhadleighcastle_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_3073817.html","width":160,"caption":"RAINBOW OVER HADLEIGH CASTLE","height":107});
															thumbnails[7352058] = clik.newPhoto({"id":7352058,"src":"RocksAndJetty_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_7352058.html","width":160,"caption":"MORNING TIDE","height":107});
															thumbnails[5275797] = clik.newPhoto({"id":5275797,"src":"WinterWindmill_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_5275797.html","width":160,"caption":"WINTER WINDMILL","height":107});
															thumbnails[7195871] = clik.newPhoto({"id":7195871,"src":"MorningBreeze_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_7195871.html","width":160,"caption":"MORNING BREEZE","height":101});
															thumbnails[5460580] = clik.newPhoto({"id":5460580,"src":"HighAndDry_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_5460580.html","width":160,"caption":"HIGH AND DRY","height":106});
															thumbnails[3090883] = clik.newPhoto({"id":3090883,"src":"EveningSkyandWoodenJetty_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_3090883.html","width":160,"caption":"EVENING SKY AND WOODEN JETTY","height":118});
															thumbnails[1708336] = clik.newPhoto({"id":1708336,"src":"thehornetD_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_1708336.html","width":160,"caption":"THE HORNET","height":100});
															thumbnails[5480507] = clik.newPhoto({"id":5480507,"src":"TideOut_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_5480507.html","width":160,"caption":"BLUE BOAT","height":107});
															thumbnails[3039381] = clik.newPhoto({"id":3039381,"src":"SunriseAtSteeple_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_3039381.html","width":160,"caption":"SUNRISE AT STEEPLE","height":107});
															thumbnails[7244886] = clik.newPhoto({"id":7244886,"src":"BlusteryDedham_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_7244886.html","width":160,"caption":"BLUSTERY DAY","height":102});
															thumbnails[5357834] = clik.newPhoto({"id":5357834,"src":"TheWateringHole_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_5357834.html","width":160,"caption":"THE WATERING HOLE","height":103});
															thumbnails[7081423] = clik.newPhoto({"id":7081423,"src":"ShoeburyStormyLight1_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_7081423.html","width":160,"caption":"STORM LIGHT SHOEBURYNESS","height":108});
															thumbnails[3073862] = clik.newPhoto({"id":3073862,"src":"darkeningskies_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_3073862.html","width":160,"caption":"DARKENING SKIES","height":120});
															thumbnails[3206953] = clik.newPhoto({"id":3206953,"src":"SteepleSunrise_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_3206953.html","width":160,"caption":"FIRST LIGHT AT STEEPLE","height":104});
															thumbnails[8754498] = clik.newPhoto({"id":8754498,"src":"LoughtonBrookAutumn_thumb.jpg","galleries_id":480519,"server_id":1,"link":"photo_8754498.html","width":160,"caption":"Autumn Brook","height":104});
															thumbnails[8591981] = clik.newPhoto({"id":8591981,"src":"LowTide_thumb.jpg","galleries_id":480519,"server_id":1,"link":"photo_8591981.html","width":160,"caption":"OLD SOLDIERS","height":102});
															thumbnails[3120995] = clik.newPhoto({"id":3120995,"src":"Gate_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_3120995.html","width":160,"caption":"TIMBER GATE","height":108});
															thumbnails[3656807] = clik.newPhoto({"id":3656807,"src":"ANewDay_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_3656807.html","width":160,"caption":"A NEW DAY","height":102});
															thumbnails[6543958] = clik.newPhoto({"id":6543958,"src":"Chalkwell_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_6543958.html","width":160,"caption":"CHALKWELL","height":103});
															thumbnails[1694088] = clik.newPhoto({"id":1694088,"src":"sunriseandpierD_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_1694088.html","width":160,"caption":"SUNRISE AND PIER","height":107});
															thumbnails[3352525] = clik.newPhoto({"id":3352525,"src":"TwoTreeBoat_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_3352525.html","width":160,"caption":"DAWN AT TWO TREE ISLAND","height":106});
															thumbnails[1694085] = clik.newPhoto({"id":1694085,"src":"restingboatsatleighD_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_1694085.html","width":160,"caption":"RESTING BOATS AT LEIGH","height":120});
															thumbnails[4329748] = clik.newPhoto({"id":4329748,"src":"MorningColour_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_4329748.html","width":160,"caption":"MORNING COLOUR","height":104});
															thumbnails[5548143] = clik.newPhoto({"id":5548143,"src":"RidersOnTheBeach_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_5548143.html","width":160,"caption":"RIDERS ON THE BEACH","height":100});
															thumbnails[3436143] = clik.newPhoto({"id":3436143,"src":"WreckTwoTreeIsland_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_3436143.html","width":160,"caption":"NEGLECTED","height":107});
															thumbnails[5480713] = clik.newPhoto({"id":5480713,"src":"Snowfall_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_5480713.html","width":160,"caption":"SNOWFALL","height":104});
															thumbnails[5034598] = clik.newPhoto({"id":5034598,"src":"ThePier_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_5034598.html","width":160,"caption":"THE PIER","height":107});
															thumbnails[4103747] = clik.newPhoto({"id":4103747,"src":"TollesburyMoorings_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_4103747.html","width":160,"caption":"TOLLESBURY MOORINGS","height":107});
															thumbnails[4184728] = clik.newPhoto({"id":4184728,"src":"TollesburyWaters_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_4184728.html","width":160,"caption":"TOLLESBURY WATERS","height":107});
															thumbnails[2859036] = clik.newPhoto({"id":2859036,"src":"TheBrook_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_2859036.html","width":160,"caption":"LOUGHTON BROOK","height":96});
															thumbnails[3508190] = clik.newPhoto({"id":3508190,"src":"Abridge_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_3508190.html","width":160,"caption":"THE BRIDGE","height":107});
															thumbnails[3663561] = clik.newPhoto({"id":3663561,"src":"StatueOfBrythnoth_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_3663561.html","width":160,"caption":"STATUE OF BRYTHNOTH","height":103});
															thumbnails[3829938] = clik.newPhoto({"id":3829938,"src":"ConnaghtWaterSunrise_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_3829938.html","width":160,"caption":"CONNAUGHT WATER","height":107});
															thumbnails[3877020] = clik.newPhoto({"id":3877020,"src":"AfterTheRain_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_3877020.html","width":160,"caption":"AFTER THE RAIN","height":106});
															thumbnails[6917495] = clik.newPhoto({"id":6917495,"src":"ChapelOfStPeterOnTheWall_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_6917495.html","width":160,"caption":"CHAPEL OF ST PETER ON-THE-WALL","height":107});
															thumbnails[8161893] = clik.newPhoto({"id":8161893,"src":"ShoeburyMorning_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_8161893.html","width":104,"caption":"SHOEBURY MORNING","height":160});
															thumbnails[6051559] = clik.newPhoto({"id":6051559,"src":"Canewdon2_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_6051559.html","width":107,"caption":"CANEWDON","height":160});
															thumbnails[1694139] = clik.newPhoto({"id":1694139,"src":"thejettyD_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_1694139.html","width":119,"caption":"THE JETTY","height":160});
															thumbnails[6415414] = clik.newPhoto({"id":6415414,"src":"MorningOutlook_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_6415414.html","width":106,"caption":"MORNING OUTLOOK","height":160});
															thumbnails[1694141] = clik.newPhoto({"id":1694141,"src":"whitesailsD_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_1694141.html","width":109,"caption":"WHITE SAILS","height":160});
															thumbnails[2025027] = clik.newPhoto({"id":2025027,"src":"TheOldMill_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_2025027.html","width":113,"caption":"THE OLD MILL","height":160});
															thumbnails[7056354] = clik.newPhoto({"id":7056354,"src":"AutumnTide_thumb.jpg","galleries_id":480513,"server_id":1,"link":"photo_7056354.html","width":110,"caption":"AUTUMN TIDE","height":160});
															thumbnails[3508207] = clik.newPhoto({"id":3508207,"src":"StAndrewsChurchGreensted_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_3508207.html","width":113,"caption":"GREENSTEAD CHURCH","height":160});
															thumbnails[4750553] = clik.newPhoto({"id":4750553,"src":"WildFlowers_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_4750553.html","width":111,"caption":"WILD FLOWERS AT HYDE HALL","height":160});
															thumbnails[7151982] = clik.newPhoto({"id":7151982,"src":"NorthFambridge_thumb.jpg","galleries_id":45586,"server_id":1,"link":"photo_7151982.html","width":160,"caption":"NORTH FAMBRIDGE","height":105});
															thumbnails[4865482] = clik.newPhoto({"id":4865482,"src":"ShoeburyShoreline_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_4865482.html","width":106,"caption":"SHOEBURY SHORELINE","height":160});
															thumbnails[8180462] = clik.newPhoto({"id":8180462,"src":"WheatFieldAndMill2_thumb.jpg","galleries_id":480512,"server_id":1,"link":"photo_8180462.html","width":106,"caption":"WHEAT FIELD AND MILL","height":160});
															thumbnails[3176592] = clik.newPhoto({"id":3176592,"src":"WheatfieldAlyphorpeRoding_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_3176592.html","width":107,"caption":"WHEATFIELD AT AYTHORPE RODING","height":160});
															thumbnails[5357910] = clik.newPhoto({"id":5357910,"src":"TreeFeet_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_5357910.html","width":111,"caption":"TREE FEET","height":160});
															thumbnails[2572397] = clik.newPhoto({"id":2572397,"src":"EarlyWaters_thumb.jpg","galleries_id":45266,"server_id":1,"link":"photo_2572397.html","width":117,"caption":"EARLY WATERS","height":160});
															thumbnails[1708366] = clik.newPhoto({"id":1708366,"src":"ultingchurch_thumb.jpg","galleries_id":480514,"server_id":1,"link":"photo_1708366.html","width":105,"caption":"ULTING CHURCH","height":160});
															thumbnails[7588819] = clik.newPhoto({"id":7588819,"src":"MrkrWeed1_thumb.jpg","galleries_id":480511,"server_id":1,"link":"photo_7588819.html","width":109,"caption":"MOTION","height":160});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[45266] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Gallery 1","link":"gallery_45266.html","maxRecords":0.0,"photoIDs":[3676371.0,5034807.0,1708322.0,1708334.0,3090883.0,3039381.0,1694088.0,3663561.0,3829938.0,3877020.0,6415414.0,2572397.0],"skipIndex":0,"section_code":"gallery","featured_images":"6415414,5034807,3877020,3829938,3676371,3663561,3090883,3039381,2572397,1708334","id":45266,"singleSection":false});				  						galleries[45586] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Gallery 2","link":"gallery_45586.html","maxRecords":0.0,"photoIDs":[7151988.0,5126652.0,7299838.0,1708305.0,6978887.0,7152119.0,7226867.0,1694120.0,3206953.0,5480713.0,4750553.0,7151982.0],"skipIndex":0,"section_code":"gallery","featured_images":"7299838,7226867,7152119,7151988,7151982,6978887,5480713,5126652,4750553,3206953","id":45586,"singleSection":false});				  						galleries[480511] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Gallery 3","link":"gallery_480511.html","maxRecords":0.0,"photoIDs":[7152089.0,1708291.0,5548144.0,5999790.0,3636944.0,3073817.0,7244886.0,3073862.0,1694085.0,8161893.0,3176592.0,5357910.0,7588819.0],"skipIndex":0,"section_code":"gallery","featured_images":"8161893,7588819,7244886,7152089,5999790,5548144,5357910,3636944,3176592,3073862","id":480511,"singleSection":false});				  						galleries[480512] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Gallery 4","link":"gallery_480512.html","maxRecords":0.0,"photoIDs":[6533339.0,7151970.0,5275797.0,7195871.0,1708336.0,5357834.0,3120995.0,3352525.0,4329748.0,2859036.0,1694141.0,4865482.0,8180462.0],"skipIndex":0,"section_code":"gallery","featured_images":"8180462,7195871,7151970,6533339,5357834,5275797,4865482,4329748,3352525,3120995","id":480512,"singleSection":false});				  						galleries[480513] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Gallery 5","link":"gallery_480513.html","maxRecords":0.0,"photoIDs":[8204174.0,7468178.0,3049772.0,7352058.0,5460580.0,3656807.0,3436143.0,4103747.0,4184728.0,3508190.0,2025027.0,7056354.0],"skipIndex":0,"section_code":"gallery","featured_images":"8204174,7468178,7352058,7056354,5460580,4184728,4103747,3656807,3508190,3436143","id":480513,"singleSection":false});				  						galleries[480514] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Gallery 6","link":"gallery_480514.html","maxRecords":0.0,"photoIDs":[7718526.0,7520720.0,5480507.0,7081423.0,6543958.0,5548143.0,5034598.0,6917495.0,6051559.0,1694139.0,3508207.0,1708366.0],"skipIndex":0,"section_code":"gallery","featured_images":"7718526,7520720,7081423,6917495,6543958,6051559,5548143,5480507,5034598,3508207","id":480514,"singleSection":false});				  						galleries[480519] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"View latest work","link":"gallery_480519.html","maxRecords":0.0,"photoIDs":[7999097.0,7855105.0,8282336.0,8845030.0,8681395.0,8431420.0,8754498.0,8591981.0],"skipIndex":0,"section_code":"gallery","featured_images":"8845030,8754498,8681395,8591981,8431420,8282336,7999097,7855105","id":480519,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8845030,8754498,8681395,8591981,8431420,8282336,8204174,8180462,8161893,7999097,7855105,7718526,7588819,7520720,7468178,7352058,7299838,7244886,7226867,7195871,7152119,7152089,7151988,7151982,7151970,7081423,7056354,6978887,6917495,6543958,6533339,6415414,6051559,5999790,5548144,5548143,5480713,5480507,5460580,5357910,5357834,5275797,5126652,5034807,5034598,4865482,4750553,4329748,4184728,4103747';
imageSets[3] = '8845030,8754498,8681395,8591981,8431420,8282336,8204174,8180462,8161893,7999097,7855105,7718526,7588819,7520720,7468178,7352058,7299838,7244886,7226867,7195871,7152119,7152089,7151988,7151982,7151970,7081423,7056354,6978887,6917495,6543958,6533339,6415414,6051559,5999790,5548144,5548143,5480713,5480507,5460580,5357910,5357834,5275797,5126652,5034807,5034598,4865482,4750553,4329748,4184728,4103747';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/ianlipscomb/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/ianlipscomb/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 = 'I A N L I P S C O M B P H O T O G R A P H Y: ' + 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="IANLIPSCOMB">';
			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;
	}
}

			

