window.thumbnails = {};
thumbnails[8927021] = clik.newPhoto({"link":"#","caption":"","height":160,"id":8927021,"server_id":21,"src":"cherub_2_thumb.jpg","galleries_id":"","width":160});
thumbnails[8815771] = clik.newPhoto({"link":"photo_8815771.html","caption":"","height":121,"id":8815771,"server_id":21,"src":"logo_300ppi_elements_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8821076] = clik.newPhoto({"link":"photo_8821076.html","caption":"Velvet Lined","height":142,"id":8821076,"server_id":21,"src":"velvet_lined_thumb.jpg","galleries_id":463963,"width":160});
thumbnails[8821098] = clik.newPhoto({"link":"photo_8821098.html","caption":"Velvet Lined Inside","height":159,"id":8821098,"server_id":21,"src":"velvet_lined_inside_thumb.jpg","galleries_id":463963,"width":160});
thumbnails[8823129] = clik.newPhoto({"link":"photo_8823129.html","caption":"Box Inside","height":111,"id":8823129,"server_id":21,"src":"box_inside_thumb.jpg","galleries_id":463963,"width":160});
thumbnails[8825548] = clik.newPhoto({"link":"photo_8825548.html","caption":"Chastity Inside","height":113,"id":8825548,"server_id":21,"src":"chastity_inside_thumb.jpg","galleries_id":463963,"width":160});
thumbnails[8825556] = clik.newPhoto({"link":"photo_8825556.html","caption":"Chastity","height":147,"id":8825556,"server_id":21,"src":"chastity2_thumb.jpg","galleries_id":463963,"width":160});
thumbnails[8825563] = clik.newPhoto({"link":"photo_8825563.html","caption":"Neck Metal","height":148,"id":8825563,"server_id":21,"src":"neck_thumb.jpg","galleries_id":463963,"width":160});
thumbnails[8825566] = clik.newPhoto({"link":"photo_8825566.html","caption":"Perfume Inside","height":113,"id":8825566,"server_id":21,"src":"perfume_inside_thumb.jpg","galleries_id":463963,"width":160});
thumbnails[8825573] = clik.newPhoto({"link":"photo_8825573.html","caption":"Spring Loaded Inside","height":120,"id":8825573,"server_id":21,"src":"springloaded_inside_thumb.jpg","galleries_id":463963,"width":160});
thumbnails[8837856] = clik.newPhoto({"link":"photo_8837856.html","caption":"Presentation","height":143,"id":8837856,"server_id":21,"src":"rr_eden_presentation_A3DFA6BD-24E8-5EC4-4F679D72A7ACF416_thumb.jpg","galleries_id":464370,"width":160});
thumbnails[8841979] = clik.newPhoto({"link":"photo_8841979.html","caption":"North American Design & Make","height":160,"id":8841979,"server_id":21,"src":"north_american_design_make_D40110FB-1EC9-DFB6-0975B6B3362ED702_thumb.jpg","galleries_id":465046,"width":160});
thumbnails[8841984] = clik.newPhoto({"link":"photo_8841984.html","caption":"UK Community Project","height":160,"id":8841984,"server_id":21,"src":"uk_community_project_D4099916-1EC9-DFB6-092A8874C7F6ABFC_thumb.jpg","galleries_id":465046,"width":115});
thumbnails[8842092] = clik.newPhoto({"link":"photo_8842092.html","caption":"Box","height":160,"id":8842092,"server_id":21,"src":"box_D56D7288-1EC9-DFB6-097C3F998754D956_thumb.jpg","galleries_id":463963,"width":135});
thumbnails[8842094] = clik.newPhoto({"link":"photo_8842094.html","caption":"Perfume","height":160,"id":8842094,"server_id":21,"src":"perfume_D5728F76-1EC9-DFB6-099B5261D40BE0F9_thumb.jpg","galleries_id":463963,"width":134});
thumbnails[8842109] = clik.newPhoto({"link":"photo_8842109.html","caption":"Spring Loaded","height":160,"id":8842109,"server_id":21,"src":"springloaded_D5979760-1EC9-DFB6-09308A604629F36C_thumb.jpg","galleries_id":463963,"width":120});
thumbnails[8842120] = clik.newPhoto({"link":"photo_8842120.html","caption":"Tower","height":160,"id":8842120,"server_id":21,"src":"tower_D5BAC19E-1EC9-DFB6-099FE399F6D2D3C5_thumb.jpg","galleries_id":463963,"width":106});
thumbnails[8842156] = clik.newPhoto({"link":"photo_8842156.html","caption":"","height":160,"id":8842156,"server_id":21,"src":"eden_project_rolls_royce_D5E9C51A-1EC9-DFB6-09EB10E88D28A4B7_thumb.jpg","galleries_id":464370,"width":127});
thumbnails[8842160] = clik.newPhoto({"link":"photo_8842160.html","caption":"","height":160,"id":8842160,"server_id":21,"src":"eden_project_rolls_royce_2_D5F36DCB-1EC9-DFB6-09FA015D031FDA00_thumb.jpg","galleries_id":464370,"width":120});
thumbnails[8842161] = clik.newPhoto({"link":"photo_8842161.html","caption":"","height":160,"id":8842161,"server_id":21,"src":"eden_project_rolls_royce_3_D5F68459-1EC9-DFB6-098E2C61EE957E91_thumb.jpg","galleries_id":464370,"width":130});
thumbnails[8842215] = clik.newPhoto({"link":"photo_8842215.html","caption":"Learning & Development German Apprentice of the Year","height":160,"id":8842215,"server_id":21,"src":"german_apprentice_D6EE7CAF-1EC9-D45B-1C3A0F2DF0F150B4_thumb.jpg","galleries_id":465046,"width":120});
thumbnails[8842216] = clik.newPhoto({"link":"photo_8842216.html","caption":"Learning & Development German Design & Make Project of the Year","height":160,"id":8842216,"server_id":21,"src":"german_design_make_D6F2CA62-1EC9-D45B-1C0FFF85E939A797_thumb.jpg","galleries_id":465046,"width":122});
thumbnails[8842218] = clik.newPhoto({"link":"photo_8842218.html","caption":"Learning & Development German Community Project of the Year","height":160,"id":8842218,"server_id":21,"src":"german-community-project_D6F63544-1EC9-D45B-1C31B8FCA15D18F8_thumb.jpg","galleries_id":465046,"width":127});
thumbnails[8842222] = clik.newPhoto({"link":"photo_8842222.html","caption":"Learning & Development North American Graduate of the Year","height":160,"id":8842222,"server_id":21,"src":"north_america_graduate_D6FA07C9-1EC9-D45B-1C25FF9A9F4ED556_thumb.jpg","galleries_id":465046,"width":160});
thumbnails[8842224] = clik.newPhoto({"link":"photo_8842224.html","caption":"Learning & Development North American Community Project of the Year","height":160,"id":8842224,"server_id":21,"src":"north_american_community_pr_D6FD5474-1EC9-D45B-1C0FB4161305D0BA_thumb.jpg","galleries_id":465046,"width":160});
thumbnails[8842228] = clik.newPhoto({"link":"photo_8842228.html","caption":"Learning & Development Norwegian Graduate","height":160,"id":8842228,"server_id":21,"src":"norwegian_graduate_D701CCCE-1EC9-D45B-1C44A7DD7641A36C_thumb.jpg","galleries_id":465046,"width":120});
thumbnails[8846761] = clik.newPhoto({"link":"photo_8846761.html","caption":"Awards Presentation Display","height":114,"id":8846761,"server_id":21,"src":"awards_group_thumb.jpg","galleries_id":465046,"width":160});
thumbnails[8846763] = clik.newPhoto({"link":"photo_8846763.html","caption":"Learning & Development Asian Graduate of the Year","height":160,"id":8846763,"server_id":21,"src":"asian_graduate_of_year_thumb.jpg","galleries_id":465046,"width":115});
thumbnails[8846771] = clik.newPhoto({"link":"photo_8846771.html","caption":"Asian Award for Outstanding Application of Continuous Learning & Development","height":160,"id":8846771,"server_id":21,"src":"asian_oacld_thumb.jpg","galleries_id":465046,"width":160});
thumbnails[8846775] = clik.newPhoto({"link":"photo_8846775.html","caption":"North American Award for Outstanding Application of Continuous Learning & Development","height":160,"id":8846775,"server_id":21,"src":"n_american_oacld_thumb.jpg","galleries_id":465046,"width":160});
thumbnails[8846783] = clik.newPhoto({"link":"photo_8846783.html","caption":"Nordic Countries Award for Outstanding Application of Continuous Learning & Development","height":160,"id":8846783,"server_id":21,"src":"nordic_oacld_thumb.jpg","galleries_id":465046,"width":160});
thumbnails[8846808] = clik.newPhoto({"link":"photo_8846808.html","caption":"UK Award for Outstanding Application of Continuous Learning & Development","height":160,"id":8846808,"server_id":21,"src":"uk_oacld_thumb.jpg","galleries_id":465046,"width":160});
thumbnails[8846811] = clik.newPhoto({"link":"photo_8846811.html","caption":"North American Student of the Year","height":160,"id":8846811,"server_id":21,"src":"n_american_student_of_year_thumb.jpg","galleries_id":465046,"width":135});
thumbnails[8860518] = clik.newPhoto({"link":"photo_8860518.html","caption":"","height":160,"id":8860518,"server_id":21,"src":"storage_concepts_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8860522] = clik.newPhoto({"link":"photo_8860522.html","caption":"","height":120,"id":8860522,"server_id":21,"src":"glass_mosaic_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8860526] = clik.newPhoto({"link":"photo_8860526.html","caption":"","height":125,"id":8860526,"server_id":21,"src":"lansdowne_roundel_glass_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8860530] = clik.newPhoto({"link":"photo_8860530.html","caption":"","height":160,"id":8860530,"server_id":21,"src":"shuna_george_thumb.jpg","galleries_id":463962,"width":122});
thumbnails[8860537] = clik.newPhoto({"link":"photo_8860537.html","caption":"","height":160,"id":8860537,"server_id":21,"src":"st_lukes_primary_thumb.jpg","galleries_id":463962,"width":143});
thumbnails[8860542] = clik.newPhoto({"link":"photo_8860542.html","caption":"","height":160,"id":8860542,"server_id":21,"src":"osprey_thumb.jpg","galleries_id":463962,"width":106});
thumbnails[8860546] = clik.newPhoto({"link":"photo_8860546.html","caption":"","height":160,"id":8860546,"server_id":21,"src":"st_cuthberts_b_thumb.jpg","galleries_id":463962,"width":114});
thumbnails[8860555] = clik.newPhoto({"link":"photo_8860555.html","caption":"","height":160,"id":8860555,"server_id":21,"src":"dance_thumb.jpg","galleries_id":465925,"width":109});
thumbnails[8860559] = clik.newPhoto({"link":"photo_8860559.html","caption":"","height":115,"id":8860559,"server_id":21,"src":"hemisphere_light_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8860563] = clik.newPhoto({"link":"photo_8860563.html","caption":"","height":160,"id":8860563,"server_id":21,"src":"sphere_light_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8870640] = clik.newPhoto({"link":"photo_8870640.html","caption":"","height":160,"id":8870640,"server_id":21,"src":"boston_ferns_thumb.jpg","galleries_id":465925,"width":102});
thumbnails[8870641] = clik.newPhoto({"link":"photo_8870641.html","caption":"","height":160,"id":8870641,"server_id":21,"src":"ferns_fossils_thumb.jpg","galleries_id":465925,"width":133});
thumbnails[8870642] = clik.newPhoto({"link":"photo_8870642.html","caption":"","height":160,"id":8870642,"server_id":21,"src":"stacked_glass_light_thumb.jpg","galleries_id":465925,"width":104});
thumbnails[8870644] = clik.newPhoto({"link":"photo_8870644.html","caption":"","height":160,"id":8870644,"server_id":21,"src":"turtle_amonite_lights_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8870646] = clik.newPhoto({"link":"photo_8870646.html","caption":"Ferns on Glass - Scunthorpe Museum","height":137,"id":8870646,"server_id":21,"src":"scunthorpe_museum_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8870648] = clik.newPhoto({"link":"photo_8870648.html","caption":"","height":118,"id":8870648,"server_id":21,"src":"glass_page_2_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8870651] = clik.newPhoto({"link":"photo_8870651.html","caption":"","height":160,"id":8870651,"server_id":21,"src":"glass_page_1_thumb.jpg","galleries_id":465925,"width":108});
thumbnails[8870652] = clik.newPhoto({"link":"photo_8870652.html","caption":"","height":160,"id":8870652,"server_id":21,"src":"oval_mirror_thumb.jpg","galleries_id":465925,"width":101});
thumbnails[8870653] = clik.newPhoto({"link":"photo_8870653.html","caption":"","height":117,"id":8870653,"server_id":21,"src":"lansdowne_mirrors_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8875440] = clik.newPhoto({"link":"photo_8875440.html","caption":"Three Glass Lightbox","height":96,"id":8875440,"server_id":21,"src":"3_colour_lightbox_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8875460] = clik.newPhoto({"link":"photo_8875460.html","caption":"Fossil","height":160,"id":8875460,"server_id":21,"src":"fossil_thumb.jpg","galleries_id":465925,"width":94});
thumbnails[8875473] = clik.newPhoto({"link":"photo_8875473.html","caption":"Laurence Olivier","height":160,"id":8875473,"server_id":21,"src":"laurance_olivier_thumb.jpg","galleries_id":463962,"width":50});
thumbnails[8875501] = clik.newPhoto({"link":"photo_8875501.html","caption":"Islamic Mosaic","height":120,"id":8875501,"server_id":21,"src":"pallash_islamic_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8875506] = clik.newPhoto({"link":"photo_8875506.html","caption":"Turtle & Amonite Lights","height":160,"id":8875506,"server_id":21,"src":"turtle_amonite_lights1_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8895168] = clik.newPhoto({"link":"photo_8895168.html","caption":"Dissipator","height":160,"id":8895168,"server_id":21,"src":"dissipator_thumb.jpg","galleries_id":465925,"width":106});
thumbnails[8895171] = clik.newPhoto({"link":"photo_8895171.html","caption":"Sphere Light","height":113,"id":8895171,"server_id":21,"src":"sphere_light_21C89817-1EC9-D45B-1C5BBE9B32AB28FB_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8895172] = clik.newPhoto({"link":"photo_8895172.html","caption":"Stacked Glass Light","height":160,"id":8895172,"server_id":21,"src":"stacked_glass_light_21D0D563-1EC9-D45B-1C91AFB81AE8D7B1_thumb.jpg","galleries_id":465925,"width":115});
thumbnails[8898300] = clik.newPhoto({"link":"photo_8898300.html","caption":"Global Learning & Development Awards","height":142,"id":8898300,"server_id":21,"src":"global_learning_develop_awa_thumb.jpg","galleries_id":465046,"width":160});
thumbnails[8922369] = clik.newPhoto({"link":"photo_8922369.html","caption":"Fused Ferns","height":160,"id":8922369,"server_id":21,"src":"fused_ferns_thumb.jpg","galleries_id":463962,"width":120});
thumbnails[8922371] = clik.newPhoto({"link":"photo_8922371.html","caption":"Spiral Mosaic","height":160,"id":8922371,"server_id":21,"src":"spiral_mosaic_thumb.jpg","galleries_id":463962,"width":142});
thumbnails[8922460] = clik.newPhoto({"link":"photo_8922460.html","caption":"Highpoint Leicester","height":160,"id":8922460,"server_id":21,"src":"highpoint_leicester_thumb.jpg","galleries_id":463962,"width":57});
thumbnails[8927001] = clik.newPhoto({"link":"photo_8927001.html","caption":"Colours","height":120,"id":8927001,"server_id":21,"src":"colour_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8927009] = clik.newPhoto({"link":"photo_8927009.html","caption":"Acid Etched Flashed Glass Restoration","height":133,"id":8927009,"server_id":21,"src":"etched_flashed_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8927014] = clik.newPhoto({"link":"photo_8927014.html","caption":"Painted & Silver Stained Fired Glass","height":160,"id":8927014,"server_id":21,"src":"colin_parker_barsby_thumb.jpg","galleries_id":463962,"width":120});
thumbnails[8927018] = clik.newPhoto({"link":"photo_8927018.html","caption":"Restored & Adapted Leaded Light","height":122,"id":8927018,"server_id":21,"src":"bets_twyford_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8927020] = clik.newPhoto({"link":"photo_8927020.html","caption":"Sandblasted Cherub","height":160,"id":8927020,"server_id":21,"src":"cherub_1_thumb.jpg","galleries_id":463962,"width":144});
thumbnails[8927022] = clik.newPhoto({"link":"photo_8927022.html","caption":"","height":128,"id":8927022,"server_id":21,"src":"malcolm_bonser_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8927027] = clik.newPhoto({"link":"photo_8927027.html","caption":"","height":160,"id":8927027,"server_id":21,"src":"fish_light_thumb.jpg","galleries_id":465925,"width":114});
thumbnails[8927030] = clik.newPhoto({"link":"photo_8927030.html","caption":"","height":120,"id":8927030,"server_id":21,"src":"glass_curves_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8927035] = clik.newPhoto({"link":"photo_8927035.html","caption":"","height":114,"id":8927035,"server_id":21,"src":"glass_curves_2_thumb.jpg","galleries_id":465925,"width":160});
thumbnails[8927036] = clik.newPhoto({"link":"photo_8927036.html","caption":"Fountain","height":160,"id":8927036,"server_id":21,"src":"glass_fountain_thumb.jpg","galleries_id":465925,"width":114});
thumbnails[8927037] = clik.newPhoto({"link":"photo_8927037.html","caption":"","height":160,"id":8927037,"server_id":21,"src":"seahorse_light_thumb.jpg","galleries_id":465925,"width":114});
thumbnails[8927038] = clik.newPhoto({"link":"photo_8927038.html","caption":"","height":160,"id":8927038,"server_id":21,"src":"tower_thumb.jpg","galleries_id":465925,"width":114});
thumbnails[8927044] = clik.newPhoto({"link":"photo_8927044.html","caption":"","height":160,"id":8927044,"server_id":21,"src":"tree_light_1_thumb.jpg","galleries_id":465925,"width":114});
thumbnails[8927045] = clik.newPhoto({"link":"photo_8927045.html","caption":"","height":160,"id":8927045,"server_id":21,"src":"tree_light_2_thumb.jpg","galleries_id":465925,"width":114});
thumbnails[8927048] = clik.newPhoto({"link":"photo_8927048.html","caption":"Managing Director's Quality Award","height":160,"id":8927048,"server_id":21,"src":"managing_directors_quality__thumb.jpg","galleries_id":465046,"width":81});
thumbnails[8927050] = clik.newPhoto({"link":"photo_8927050.html","caption":"Process Excellence Award","height":160,"id":8927050,"server_id":21,"src":"process_excellence_award_thumb.jpg","galleries_id":465046,"width":126});
thumbnails[8931583] = clik.newPhoto({"link":"photo_8931583.html","caption":"","height":160,"id":8931583,"server_id":21,"src":"chelsea_first_panel_thumb.jpg","galleries_id":463962,"width":160});
thumbnails[8931587] = clik.newPhoto({"link":"photo_8931587.html","caption":"","height":160,"id":8931587,"server_id":21,"src":"jesus__child_thumb.jpg","galleries_id":463962,"width":124});
thumbnails[8931589] = clik.newPhoto({"link":"photo_8931589.html","caption":"Church Restoration - Before & After","height":160,"id":8931589,"server_id":21,"src":"stained_glass_restoration_1_thumb.jpg","galleries_id":463962,"width":111});
thumbnails[8931593] = clik.newPhoto({"link":"photo_8931593.html","caption":"Church Restoration - Before & After","height":160,"id":8931593,"server_id":21,"src":"stained_glass_restoration_2_thumb.jpg","galleries_id":463962,"width":110});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
galleries[465925] = clik.newGallery({"photoIDs":[8860555,8860559,8860563,8870640,8870641,8870642,8870644,8870646,8870648,8870651,8870652,8870653,8875440,8875460,8875506,8895168,8895171,8895172,8927027,8927030,8927035,8927036,8927037,8927038,8927044,8927045],"link":"gallery_465925.html","skipIndex":0,"section_code":"gallery","id":465925,"parentGallery":"","featured_images":"8927045,8927044,8927038,8927037,8927036,8927035,8927030,8927027,8895172,8895171","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Sculpture."});galleries[463962] = clik.newGallery({"photoIDs":[8815771,8860518,8860522,8860526,8860530,8860537,8860542,8860546,8875473,8875501,8922369,8922371,8922460,8927001,8927009,8927014,8927018,8927020,8927022,8931583,8931587,8931589,8931593],"link":"gallery_463962.html","skipIndex":0,"section_code":"gallery","id":463962,"parentGallery":"","featured_images":"8931593,8931589,8931587,8931583,8927022,8927020,8927018,8927014,8927009,8927001","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Stained Glass."});galleries[465046] = clik.newGallery({"photoIDs":[8841979,8841984,8842215,8842216,8842218,8842222,8842224,8842228,8846761,8846763,8846771,8846775,8846783,8846808,8846811,8898300,8927048,8927050],"link":"gallery_465046.html","skipIndex":0,"section_code":"gallery","id":465046,"parentGallery":"","featured_images":"8927050,8927048,8898300,8846811,8846808,8846783,8846775,8846771,8846763,8846761","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Rolls-Royce Presentation Awards."});galleries[464370] = clik.newGallery({"photoIDs":[8837856,8842156,8842160,8842161],"link":"gallery_464370.html","skipIndex":0,"section_code":"gallery","id":464370,"parentGallery":"","featured_images":"8842161,8842160,8842156,8837856","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Rolls-Royce & Eden Project Science Prize."});galleries[463963] = clik.newGallery({"photoIDs":[8821076,8821098,8823129,8825548,8825556,8825563,8825566,8825573,8842092,8842094,8842109,8842120],"link":"gallery_463963.html","skipIndex":0,"section_code":"gallery","id":463963,"parentGallery":"","featured_images":"8842120,8842109,8842094,8842092,8825573,8825566,8825563,8825556,8825548,8823129","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Small Sculptures \/ Objects."});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '8931593,8931589,8931587,8931583,8927050,8927048,8927045,8927044,8927038,8927037,8927036,8927035,8927030,8927027,8927022,8927021,8927020,8927018,8927014,8927009,8927001,8922460,8922371,8922369,8898300,8895172,8895171,8895168,8875506,8875501,8875473,8875460,8875440,8870653,8870652,8870651,8870648,8870646,8870644,8870642,8870641,8870640,8860563,8860559,8860555,8860546,8860542,8860537,8860530,8860526';
imageSets[1] = '8927001,8922369,8895168,8860559,8860526,8860522,8842222,8815771';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/timjcarter/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/timjcarter/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 = 'Timothy Carter  :  Glass - Sculpture: ' + 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.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;
	}
}

		

