window.thumbnails = {};
															thumbnails[546142] = clik.newPhoto({"id":546142,"src":"Poster-for-GN-website_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Exhibition poster - \"Black & Light\"","height":190});
															thumbnails[534715] = clik.newPhoto({"id":534715,"src":"AngleseaBeachweb_thumb.jpg","galleries_id":41496,"server_id":15,"link":"photo_534715.html","width":130,"caption":"Beach scene - Anglesey","height":198});
															thumbnails[534733] = clik.newPhoto({"id":534733,"src":"RoadtotheFerryweb_thumb.jpg","galleries_id":41496,"server_id":15,"link":"photo_534733.html","width":130,"caption":"The Road to the Ferry - Normandy","height":150});
															thumbnails[534784] = clik.newPhoto({"id":534784,"src":"ScotlandSeaCloudweb_thumb.jpg","galleries_id":41496,"server_id":15,"link":"photo_534784.html","width":130,"caption":"Sea scene - Ardnamurchan","height":131});
															thumbnails[534786] = clik.newPhoto({"id":534786,"src":"Scotlandweb_thumb.jpg","galleries_id":41496,"server_id":15,"link":"photo_534786.html","width":130,"caption":"Still waters - Ardnamurchan","height":129});
															thumbnails[534794] = clik.newPhoto({"id":534794,"src":"Borough-Market-cookbook-024_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_534794.html","width":130,"caption":"Shrimping, Les Salisbury, Furness Fish - Morecambe Bay, Cumbria","height":87});
															thumbnails[534797] = clik.newPhoto({"id":534797,"src":"Borough-Market-cookbook-036_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_534797.html","width":130,"caption":"The Dexter, Northfield Farm, Rutland","height":128});
															thumbnails[534800] = clik.newPhoto({"id":534800,"src":"Borough-Market-cookbook-061_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_534800.html","width":130,"caption":"Geese - The new brood, Seldom Seen Farm, Leicestershire","height":130});
															thumbnails[534801] = clik.newPhoto({"id":534801,"src":"Borough-Market-cookbook-095_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_534801.html","width":130,"caption":"Dorothy - prototype Cumberland Pig, Sillfield farm, Cumbria","height":199});
															thumbnails[534802] = clik.newPhoto({"id":534802,"src":"Borough-Market-cookbook-106_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_534802.html","width":130,"caption":"Lizzie Vines & The Matriarch, Wild Beef, Dartmoor, Devon","height":130});
															thumbnails[534809] = clik.newPhoto({"id":534809,"src":"ViewtowardsSkyeweb2_thumb.jpg","galleries_id":41496,"server_id":15,"link":"photo_534809.html","width":130,"caption":"Evening towards Skye","height":129});
															thumbnails[534812] = clik.newPhoto({"id":534812,"src":"hands_thumb.jpg","galleries_id":41521,"server_id":15,"link":"photo_534812.html","width":130,"caption":"Tabard Works - Down's medical instruments","height":108});
															thumbnails[534816] = clik.newPhoto({"id":534816,"src":"lutes_thumb.jpg","galleries_id":41521,"server_id":15,"link":"photo_534816.html","width":130,"caption":"Pullen's Yards, Stephen Barber,<br>\r\nLutemaker","height":130});
															thumbnails[534828] = clik.newPhoto({"id":534828,"src":"MrHorn1980_thumb.jpg","galleries_id":41521,"server_id":15,"link":"photo_534828.html","width":130,"caption":"Pullen's Yards,<br>\r\nMr Horn - fan maker","height":129});
															thumbnails[534830] = clik.newPhoto({"id":534830,"src":"MrHorn1980outsideshop_thumb.jpg","galleries_id":41521,"server_id":15,"link":"photo_534830.html","width":130,"caption":"Pullen's Yards, Mr Horn - fan maker","height":131});
															thumbnails[534834] = clik.newPhoto({"id":534834,"src":"MrRutterbrushmaker_thumb.jpg","galleries_id":41521,"server_id":15,"link":"photo_534834.html","width":130,"caption":"Pullen's Yards,<br>\r\nMr Rutter - brush maker","height":130});
															thumbnails[534837] = clik.newPhoto({"id":534837,"src":"TheWoodsFamily_thumb.jpg","galleries_id":41521,"server_id":15,"link":"photo_534837.html","width":130,"caption":"Union Street,<br>\r\nThe Woods Family - hat makers","height":154});
															thumbnails[534848] = clik.newPhoto({"id":534848,"src":"Pariscafewithsunsmoke_thumb.jpg","galleries_id":39182,"server_id":15,"link":"photo_534848.html","width":130,"caption":"Marais cafe","height":86});
															thumbnails[534851] = clik.newPhoto({"id":534851,"src":"InsideOutsideviewsParis-_thumb.jpg","galleries_id":39182,"server_id":15,"link":"photo_534851.html","width":130,"caption":"Inside Out","height":198});
															thumbnails[534912] = clik.newPhoto({"id":534912,"src":"CrepeStallParis_thumb.jpg","galleries_id":39182,"server_id":15,"link":"photo_534912.html","width":130,"caption":"Crepe stall","height":152});
															thumbnails[534925] = clik.newPhoto({"id":534925,"src":"APintandasmoke_thumb.jpg","galleries_id":41536,"server_id":15,"link":"photo_534925.html","width":130,"caption":"A pint and a smoke, Golden Eagle, Peckham","height":146});
															thumbnails[534929] = clik.newPhoto({"id":534929,"src":"BoroughMarket_thumb.jpg","galleries_id":41536,"server_id":15,"link":"photo_534929.html","width":130,"caption":"Market Barrows, Green Dragon Court, Borough Market","height":148});
															thumbnails[534934] = clik.newPhoto({"id":534934,"src":"NightLights_thumb.jpg","galleries_id":41536,"server_id":15,"link":"photo_534934.html","width":130,"caption":"Night Light - Canary Wharf","height":163});
															thumbnails[534943] = clik.newPhoto({"id":534943,"src":"Powergloryweb_thumb.jpg","galleries_id":41537,"server_id":15,"link":"photo_534943.html","width":130,"caption":"The power & the glory","height":194});
															thumbnails[534952] = clik.newPhoto({"id":534952,"src":"Immersionweb1_thumb.jpg","galleries_id":41537,"server_id":15,"link":"photo_534952.html","width":130,"caption":"The Immersion in the Ganges","height":129});
															thumbnails[534955] = clik.newPhoto({"id":534955,"src":"Kolkatafishmarkettrader_thumb.jpg","galleries_id":41541,"server_id":15,"link":"photo_534955.html","width":130,"caption":"Fish market trader","height":129});
															thumbnails[534961] = clik.newPhoto({"id":534961,"src":"LoveTunnel_thumb.jpg","galleries_id":39182,"server_id":15,"link":"photo_534961.html","width":130,"caption":"Love Tunnel","height":159});
															thumbnails[534967] = clik.newPhoto({"id":534967,"src":"BlackLight_thumb.jpg","galleries_id":41542,"server_id":15,"link":"photo_534967.html","width":130,"caption":"Black Light - after Matisse","height":131});
															thumbnails[546073] = clik.newPhoto({"id":546073,"src":"MarieLouiseDonkey_thumb.jpg","galleries_id":42307,"server_id":15,"link":"photo_546073.html","width":130,"caption":"Pyrenees - Marie Louise","height":108});
															thumbnails[546074] = clik.newPhoto({"id":546074,"src":"TheBoulesPlayers_thumb.jpg","galleries_id":42307,"server_id":15,"link":"photo_546074.html","width":130,"caption":"Pyrenees - The Boules Players","height":124});
															thumbnails[546077] = clik.newPhoto({"id":546077,"src":"WaitingforTourdeFrance_thumb.jpg","galleries_id":42307,"server_id":15,"link":"photo_546077.html","width":130,"caption":"Pyrenees - Waiting for the Tour de France","height":130});
															thumbnails[546079] = clik.newPhoto({"id":546079,"src":"Dreamland_thumb.jpg","galleries_id":39182,"server_id":15,"link":"photo_546079.html","width":130,"caption":"Dreamland - Euro Disney","height":170});
															thumbnails[546081] = clik.newPhoto({"id":546081,"src":"Flo_thumb.jpg","galleries_id":41521,"server_id":15,"link":"photo_546081.html","width":130,"caption":"Flo","height":152});
															thumbnails[546084] = clik.newPhoto({"id":546084,"src":"TheMeadow_thumb.jpg","galleries_id":42671,"server_id":15,"link":"photo_546084.html","width":130,"caption":"The Pyrenees Meadow","height":91});
															thumbnails[546085] = clik.newPhoto({"id":546085,"src":"CornLight_thumb.jpg","galleries_id":42671,"server_id":15,"link":"photo_546085.html","width":130,"caption":"Corn Light, Pyrenees","height":186});
															thumbnails[546094] = clik.newPhoto({"id":546094,"src":"TheThinker_thumb.jpg","galleries_id":41536,"server_id":15,"link":"photo_546094.html","width":130,"caption":"The Thinker, Bridge House Tavern, Canning Town.","height":154});
															thumbnails[546095] = clik.newPhoto({"id":546095,"src":"ChelseaFlowerShow_thumb.jpg","galleries_id":41536,"server_id":15,"link":"photo_546095.html","width":130,"caption":"A quiet corner, Chelsea Flower Show","height":108});
															thumbnails[546105] = clik.newPhoto({"id":546105,"src":"HeatandLight_thumb.jpg","galleries_id":41542,"server_id":15,"link":"photo_546105.html","width":130,"caption":"Heat and Light","height":189});
															thumbnails[546115] = clik.newPhoto({"id":546115,"src":"LightMomentNo1_thumb.jpg","galleries_id":42670,"server_id":15,"link":"photo_546115.html","width":130,"caption":"Light Moment No.1, A580, East Lancs Road, Liverpool","height":92});
															thumbnails[578143] = clik.newPhoto({"id":578143,"src":"image151_thumb.jpg","galleries_id":41541,"server_id":15,"link":"photo_578143.html","width":130,"caption":"Fish market trader","height":113});
															thumbnails[578144] = clik.newPhoto({"id":578144,"src":"image152_thumb.jpg","galleries_id":41542,"server_id":15,"link":"photo_578144.html","width":130,"caption":"Tulips - after Kertesz","height":200});
															thumbnails[578145] = clik.newPhoto({"id":578145,"src":"image153_thumb.jpg","galleries_id":41542,"server_id":15,"link":"photo_578145.html","width":130,"caption":"The back garden","height":129});
															thumbnails[578157] = clik.newPhoto({"id":578157,"src":"image154_thumb.jpg","galleries_id":41537,"server_id":15,"link":"photo_578157.html","width":130,"caption":"Ganesha & Laxmi","height":88});
															thumbnails[578158] = clik.newPhoto({"id":578158,"src":"image155_thumb.jpg","galleries_id":41537,"server_id":15,"link":"photo_578158.html","width":130,"caption":"Ganesha & Laxmi","height":87});
															thumbnails[578160] = clik.newPhoto({"id":578160,"src":"image157_thumb.jpg","galleries_id":42670,"server_id":15,"link":"photo_578160.html","width":130,"caption":"towards perception - river calling","height":85});
															thumbnails[578161] = clik.newPhoto({"id":578161,"src":"image159_thumb.jpg","galleries_id":42670,"server_id":15,"link":"photo_578161.html","width":130,"caption":"towards perception - river calling","height":86});
															thumbnails[578183] = clik.newPhoto({"id":578183,"src":"image160_thumb.jpg","galleries_id":42671,"server_id":15,"link":"photo_578183.html","width":130,"caption":"The Pyrenees meadow","height":103});
															thumbnails[578186] = clik.newPhoto({"id":578186,"src":"image163_thumb.jpg","galleries_id":42671,"server_id":15,"link":"photo_578186.html","width":130,"caption":"The Pyrenees meadow","height":101});
															thumbnails[578187] = clik.newPhoto({"id":578187,"src":"image165_thumb.jpg","galleries_id":42671,"server_id":15,"link":"photo_578187.html","width":130,"caption":"The Pyrenees meadow","height":103});
															thumbnails[578188] = clik.newPhoto({"id":578188,"src":"image166_thumb.jpg","galleries_id":42670,"server_id":15,"link":"photo_578188.html","width":130,"caption":"Kolkata Carnival, Millennium Park","height":97});
															thumbnails[578191] = clik.newPhoto({"id":578191,"src":"image169_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_578191.html","width":130,"caption":"Farmer Sharp, Master Butcher, Borough Market","height":130});
															thumbnails[578192] = clik.newPhoto({"id":578192,"src":"image170_thumb.jpg","galleries_id":41541,"server_id":15,"link":"photo_578192.html","width":130,"caption":"Fish market trader","height":128});
															thumbnails[578193] = clik.newPhoto({"id":578193,"src":"image171_thumb.jpg","galleries_id":45658,"server_id":15,"link":"photo_578193.html","width":130,"caption":"Evening breeze, Ganges riverside - Kolkata","height":99});
															thumbnails[578197] = clik.newPhoto({"id":578197,"src":"image156_thumb.jpg","galleries_id":39182,"server_id":15,"link":"photo_578197.html","width":130,"caption":"Leg-up ","height":155});
															thumbnails[578610] = clik.newPhoto({"id":578610,"src":"image172_thumb.jpg","galleries_id":41542,"server_id":15,"link":"photo_578610.html","width":130,"caption":"The tug ","height":188});
															thumbnails[578616] = clik.newPhoto({"id":578616,"src":"001_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_578616.html","width":130,"caption":"Smoked eels with Michael Brown, Brown & Forest, Somerset","height":193});
															thumbnails[578617] = clik.newPhoto({"id":578617,"src":"BO9012~1_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_578617.html","width":130,"caption":"Ostriches - Gamston Wood Farm, Nottingham","height":128});
															thumbnails[578638] = clik.newPhoto({"id":578638,"src":"BOA01A~1_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_578638.html","width":130,"caption":"The Tamworth - Ginger Pig (& piglet), Grange farm, Levisham","height":130});
															thumbnails[578662] = clik.newPhoto({"id":578662,"src":"BOA81E~1_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_578662.html","width":130,"caption":"Grange Farm, Levisham","height":102});
															thumbnails[578666] = clik.newPhoto({"id":578666,"src":"BOB01A~1_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_578666.html","width":130,"caption":"Grange Farm, Levisham","height":140});
															thumbnails[578668] = clik.newPhoto({"id":578668,"src":"Borough-Market-cookbook-009_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_578668.html","width":130,"caption":"Smoked Duck - Brown & Forest, Somerset","height":93});
															thumbnails[777191] = clik.newPhoto({"id":777191,"src":"Black and light1_thumb.jpg","galleries_id":41542,"server_id":15,"link":"photo_777191.html","width":130,"caption":"Catalan Curve - Barcelona","height":165});
															thumbnails[777193] = clik.newPhoto({"id":777193,"src":"durga puga 1_thumb.jpg","galleries_id":41537,"server_id":15,"link":"photo_777193.html","width":130,"caption":"The Immersion - Judges Ghat","height":98});
															thumbnails[777194] = clik.newPhoto({"id":777194,"src":"durga puga 2_thumb.jpg","galleries_id":41537,"server_id":15,"link":"photo_777194.html","width":130,"caption":"The Immersion - Judges Ghat","height":197});
															thumbnails[777195] = clik.newPhoto({"id":777195,"src":"durga puga 3_thumb.jpg","galleries_id":41537,"server_id":15,"link":"photo_777195.html","width":130,"caption":"The Immersion - Judges Ghat","height":194});
															thumbnails[777196] = clik.newPhoto({"id":777196,"src":"durga puga 4_thumb.jpg","galleries_id":41537,"server_id":15,"link":"photo_777196.html","width":130,"caption":"The Para and the Glory","height":197});
															thumbnails[777197] = clik.newPhoto({"id":777197,"src":"kolkata fish market1_thumb.jpg","galleries_id":41541,"server_id":15,"link":"photo_777197.html","width":130,"caption":"Fish Market Trader ","height":171});
															thumbnails[777198] = clik.newPhoto({"id":777198,"src":"kolkata fish market2_thumb.jpg","galleries_id":41541,"server_id":15,"link":"photo_777198.html","width":130,"caption":"Fish Market Trader","height":128});
															thumbnails[777200] = clik.newPhoto({"id":777200,"src":"made in southwark 1_thumb.jpg","galleries_id":41521,"server_id":15,"link":"photo_777200.html","width":130,"caption":"Made in Southwark - The printer","height":130});
															thumbnails[777201] = clik.newPhoto({"id":777201,"src":"made in southwark 2_thumb.jpg","galleries_id":41521,"server_id":15,"link":"photo_777201.html","width":130,"caption":"Made in Southwark - The Book","height":173});
															thumbnails[777204] = clik.newPhoto({"id":777204,"src":"meadow_thumb.jpg","galleries_id":42671,"server_id":15,"link":"photo_777204.html","width":130,"caption":"The Pyrenees Meadow","height":86});
															thumbnails[806484] = clik.newPhoto({"id":806484,"src":"Borough Market cookbook_thumb.jpg","galleries_id":62515,"server_id":15,"link":"photo_806484.html","width":130,"caption":"Borough Market Cookbook: Meat & Fish","height":185});
															thumbnails[806485] = clik.newPhoto({"id":806485,"src":"river calling_thumb.jpg","galleries_id":62515,"server_id":15,"link":"photo_806485.html","width":130,"caption":"River Calling","height":92});
															thumbnails[806488] = clik.newPhoto({"id":806488,"src":"rivers of meaning_thumb.jpg","galleries_id":62515,"server_id":15,"link":"photo_806488.html","width":130,"caption":"Rivers of Meaning","height":93});
															thumbnails[806512] = clik.newPhoto({"id":806512,"src":"made in southwark 21_thumb.jpg","galleries_id":62515,"server_id":15,"link":"photo_806512.html","width":130,"caption":"Made in Southwark: a photographic celebration of the hand","height":173});
															thumbnails[806569] = clik.newPhoto({"id":806569,"src":"Poster-for-GN-website1_thumb.jpg","galleries_id":62519,"server_id":15,"link":"photo_806569.html","width":130,"caption":"Black & Light exhibition - Oct-Nov 2006","height":190});
															thumbnails[1705854] = clik.newPhoto({"id":1705854,"src":"bmcover_thumb.jpg","galleries_id":41519,"server_id":15,"link":"photo_1705854.html","width":130,"caption":"The Borough Market Cookbook cover","height":178});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[42307] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"France","link":"gallery_42307.html","maxRecords":0.0,"photoIDs":[546073.0,546074.0,546077.0],"skipIndex":0,"section_code":"gallery","featured_images":"546077,546074,546073","id":42307,"singleSection":false});				  						galleries[45658] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Kolkata","link":"gallery_45658.html","maxRecords":0.0,"photoIDs":[578193.0],"skipIndex":0,"section_code":"gallery","featured_images":578193.0,"id":45658,"singleSection":false});				  						galleries[41536] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"London","link":"gallery_41536.html","maxRecords":0.0,"photoIDs":[534925.0,534929.0,534934.0,546094.0,546095.0],"skipIndex":0,"section_code":"gallery","featured_images":"546095,546094,534934,534929,534925","id":41536,"singleSection":false});				  						galleries[42670] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Painting with Light","link":"gallery_42670.html","maxRecords":0.0,"photoIDs":[546115.0,578160.0,578161.0,578188.0],"skipIndex":0,"section_code":"gallery","featured_images":"578188,578161,578160,546115","id":42670,"singleSection":false});				  						galleries[42671] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The Meadow","link":"gallery_42671.html","maxRecords":0.0,"photoIDs":[546084.0,546085.0,578183.0,578186.0,578187.0,777204.0],"skipIndex":0,"section_code":"gallery","featured_images":"777204,578187,578186,578183,546085,546084","id":42671,"singleSection":false});				  						galleries[41496] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes \/ seascapes","link":"gallery_41496.html","maxRecords":0.0,"photoIDs":[534715.0,534733.0,534784.0,534786.0,534809.0],"skipIndex":0,"section_code":"gallery","featured_images":"534809,534786,534784,534733,534715","id":41496,"singleSection":false});				  						galleries[41521] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Made in Southwark","link":"gallery_41521.html","maxRecords":0.0,"photoIDs":[534812.0,534816.0,534828.0,534830.0,534834.0,534837.0,546081.0,777200.0,777201.0],"skipIndex":0,"section_code":"gallery","featured_images":"777201,777200,546081,534837,534834,534830,534828,534816,534812","id":41521,"singleSection":false});				  						galleries[41519] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The Borough Market Cookbook","link":"gallery_41519.html","maxRecords":0.0,"photoIDs":[534794.0,534797.0,534800.0,534801.0,534802.0,578191.0,578616.0,578617.0,578638.0,578662.0,578666.0,578668.0,1705854.0],"skipIndex":0,"section_code":"gallery","featured_images":"1705854,578668,578666,578662,578638,578617,578616,578191,534802,534801","id":41519,"singleSection":false});				  						galleries[39182] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Paris","link":"gallery_39182.html","maxRecords":0.0,"photoIDs":[534848.0,534851.0,534912.0,534961.0,546079.0,578197.0],"skipIndex":0,"section_code":"gallery","featured_images":"578197,546079,534961,534912,534851,534848","id":39182,"singleSection":false});				  						galleries[41541] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Kolkata Markets","link":"gallery_41541.html","maxRecords":0.0,"photoIDs":[534955.0,578143.0,578192.0,777197.0,777198.0],"skipIndex":0,"section_code":"gallery","featured_images":"777198,777197,578192,578143,534955","id":41541,"singleSection":false});				  						galleries[41537] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Durga Puja","link":"gallery_41537.html","maxRecords":0.0,"photoIDs":[534943.0,534952.0,578157.0,578158.0,777193.0,777194.0,777195.0,777196.0],"skipIndex":0,"section_code":"gallery","featured_images":"777196,777195,777194,777193,578158,578157,534952,534943","id":41537,"singleSection":false});				  						galleries[41542] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Black Light","link":"gallery_41542.html","maxRecords":0.0,"photoIDs":[534967.0,546105.0,578144.0,578145.0,578610.0,777191.0],"skipIndex":0,"section_code":"gallery","featured_images":"777191,578610,578145,578144,546105,534967","id":41542,"singleSection":false});				  						galleries[62515] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Publications","link":"gallery_62515.html","maxRecords":0.0,"photoIDs":[806484.0,806485.0,806488.0,806512.0],"skipIndex":0,"section_code":"gallery","featured_images":"806512,806488,806485,806484","id":62515,"singleSection":false});				  						galleries[62519] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Previous exhibitions posters","link":"gallery_62519.html","maxRecords":0.0,"photoIDs":[806569.0],"skipIndex":0,"section_code":"gallery","featured_images":806569.0,"id":62519,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '534952,534809,534802,534733';
imageSets[3] = '1705854,806569,806512,806488,806485,806484,777204,777201,777200,777198,777197,777196,777195,777194,777193,777191,578668,578666,578662,578638,578617,578616,578610,578197,578193,578192,578191,578188,578187,578186,578183,578161,578160,578158,578157,578145,578144,578143,546142,546115,546105,546095,546094,546085,546084,546081,546079,546077,546074,546073';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/georgen/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/georgen/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/georgen/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/georgen/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/georgen/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/georgen/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/georgen/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/georgen/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 = 'George Nicholson photographer: ' + 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;
	}
}

			

