window.thumbnails = {};
															thumbnails[5535577] = clik.newPhoto({"id":5535577,"src":"NZGlasses_2_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"Wedding Glasses","height":157});
															thumbnails[5516787] = clik.newPhoto({"id":5516787,"src":"_38E1404_Photo_by_Simon_Bruntnell_12_thumb.jpg","galleries_id":310690,"server_id":5,"link":"photo_5516787.html","width":130,"caption":"Girls & Boys come out to play. ","height":132});
															thumbnails[5535553] = clik.newPhoto({"id":5535553,"src":"BFL_To_a_Wild_Rose_72dpi_thumb.jpg","galleries_id":310692,"server_id":5,"link":"photo_5535553.html","width":130,"caption":"To a Wild Rose","height":242});
															thumbnails[5540522] = clik.newPhoto({"id":5540522,"src":"Patricia_Hilton-Robinson_Lulworth_Benefice_300dpi_thumb.jpg","galleries_id":310050,"server_id":5,"link":"photo_5540522.html","width":130,"caption":"'The Lulworth Benefice Plate","height":128});
															thumbnails[5535564] = clik.newPhoto({"id":5535564,"src":"BFL_13geranium_jug_thumb.JPG","galleries_id":310692,"server_id":5,"link":"photo_5535564.html","width":130,"caption":"Geranium","height":201});
															thumbnails[5517072] = clik.newPhoto({"id":5517072,"src":"NightFilght_2_thumb.jpg","galleries_id":310690,"server_id":5,"link":"photo_5517072.html","width":130,"caption":"Nightflight","height":128});
															thumbnails[5540476] = clik.newPhoto({"id":5540476,"src":"cell300dpi_thumb.jpg","galleries_id":310050,"server_id":5,"link":"photo_5540476.html","width":130,"caption":"'Cello'","height":168});
															thumbnails[5540464] = clik.newPhoto({"id":5540464,"src":"CanterburyTales_thumb.jpg","galleries_id":310690,"server_id":5,"link":"photo_5540464.html","width":130,"caption":"Canterbury Tales","height":129});
															thumbnails[5517084] = clik.newPhoto({"id":5517084,"src":"Blessings_thumb.jpg","galleries_id":310050,"server_id":5,"link":"photo_5517084.html","width":130,"caption":"Blessings","height":163});
															thumbnails[5540204] = clik.newPhoto({"id":5540204,"src":"Call_of_the_Compline_Bell_thumb.JPG","galleries_id":310050,"server_id":5,"link":"photo_5540204.html","width":130,"caption":"Call of the Compline Bell","height":163});
															thumbnails[5540508] = clik.newPhoto({"id":5540508,"src":"Surfing_the_Tube_thumb.jpg","galleries_id":310690,"server_id":5,"link":"photo_5540508.html","width":130,"caption":"Surfing the Tube","height":101});
															thumbnails[5556015] = clik.newPhoto({"id":5556015,"src":"Jenningshouse4_bw_thumb.jpg","galleries_id":310696,"server_id":5,"link":"photo_5556015.html","width":130,"caption":"Black and White House ","height":129});
															thumbnails[5556784] = clik.newPhoto({"id":5556784,"src":"Periwinkles_thumb.JPG","galleries_id":310692,"server_id":5,"link":"photo_5556784.html","width":130,"caption":"Periwinkles","height":131});
															thumbnails[5556793] = clik.newPhoto({"id":5556793,"src":"Fressias1_thumb.jpg","galleries_id":310692,"server_id":5,"link":"photo_5556793.html","width":130,"caption":"Freesias","height":130});
															thumbnails[5556815] = clik.newPhoto({"id":5556815,"src":"Jug1Gray_thumb.jpg","galleries_id":310692,"server_id":5,"link":"photo_5556815.html","width":130,"caption":"\"If you would be happy all your life....","height":173});
															thumbnails[5556826] = clik.newPhoto({"id":5556826,"src":"Shepherd_Boy_thumb.jpg","galleries_id":310690,"server_id":5,"link":"photo_5556826.html","width":130,"caption":"Shepherd Boy","height":129});
															thumbnails[8853703] = clik.newPhoto({"id":8853703,"src":"DSCF0697_thumb.JPG","galleries_id":310050,"server_id":5,"link":"photo_8853703.html","width":130,"caption":"Poole RNLI Engraved Plate","height":133});
															thumbnails[8312749] = clik.newPhoto({"id":8312749,"src":"Faith_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_8312749.html","width":130,"caption":"","height":248});
															thumbnails[8853789] = clik.newPhoto({"id":8853789,"src":"DSCF0694_thumb.JPG","galleries_id":310050,"server_id":5,"link":"photo_8853789.html","width":130,"caption":"Poole Lifeboat Engraved Plate","height":89});
															thumbnails[6807997] = clik.newPhoto({"id":6807997,"src":"RandJ_thumb.jpg","galleries_id":352953,"server_id":5,"link":"photo_6807997.html","width":130,"caption":"A Derbyshire Wedding","height":203});
															thumbnails[5516964] = clik.newPhoto({"id":5516964,"src":"6M6_Patricia_Hilton-RobinsonOne_Ring_to_find_them_all_1_300dpi_thumb.jpg","galleries_id":310688,"server_id":5,"link":"photo_5516964.html","width":130,"caption":"One Ring to Bind Them","height":190});
															thumbnails[5535661] = clik.newPhoto({"id":5535661,"src":"RomseyAbbey2_thumb.JPG","galleries_id":310696,"server_id":5,"link":"photo_5535661.html","width":130,"caption":"Romsey Abbey","height":106});
															thumbnails[5540495] = clik.newPhoto({"id":5540495,"src":"VA1_thumb.jpg","galleries_id":310049,"server_id":5,"link":"photo_5540495.html","width":130,"caption":"Inspired by the V&A","height":130});
															thumbnails[5556020] = clik.newPhoto({"id":5556020,"src":"NightFilght_21_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5556020.html","width":130,"caption":"NightFlight","height":128});
															thumbnails[5556779] = clik.newPhoto({"id":5556779,"src":"Germany_thumb.JPG","galleries_id":310691,"server_id":5,"link":"photo_5556779.html","width":130,"caption":"Steyerberg Platter","height":134});
															thumbnails[5592503] = clik.newPhoto({"id":5592503,"src":"Teaching_Patricia_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592503.html","width":130,"caption":"Patricia Hilton-Robinson A.F.G.E","height":134});
															thumbnails[5517020] = clik.newPhoto({"id":5517020,"src":"_38E1508_Photo_by_Simon_Bruntnell__thumb.jpg","galleries_id":310049,"server_id":5,"link":"photo_5517020.html","width":130,"caption":"A Whiteness of Swans","height":251});
															thumbnails[6808085] = clik.newPhoto({"id":6808085,"src":"RandJCloseup_thumb.jpg","galleries_id":352953,"server_id":5,"link":"photo_6808085.html","width":130,"caption":"A Derbyshire Wedding - Closeup","height":126});
															thumbnails[5540260] = clik.newPhoto({"id":5540260,"src":"HarvestMice3_thumb.jpg","galleries_id":310049,"server_id":5,"link":"photo_5540260.html","width":130,"caption":"The Harvest now is over - view 1","height":191});
															thumbnails[5540487] = clik.newPhoto({"id":5540487,"src":"Christanika_thumb.JPG","galleries_id":310691,"server_id":5,"link":"photo_5540487.html","width":130,"caption":"'Christanika'","height":167});
															thumbnails[5535719] = clik.newPhoto({"id":5535719,"src":"14Sevenoaks_full_thumb.JPG","galleries_id":310696,"server_id":5,"link":"photo_5535719.html","width":130,"caption":"Sevenoaks School","height":218});
															thumbnails[5516957] = clik.newPhoto({"id":5516957,"src":"6M7_Patricia_Hilton-Robinson_One_Ring_to_find_them_all_2_TIFF_thumb.jpg","galleries_id":310688,"server_id":5,"link":"photo_5516957.html","width":130,"caption":"One Ring to Bind Them","height":200});
															thumbnails[5556818] = clik.newPhoto({"id":5556818,"src":"Madeleine3_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5556818.html","width":130,"caption":"Madeleine","height":121});
															thumbnails[5592505] = clik.newPhoto({"id":5592505,"src":"Teaching_North_Hampshire1_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592505.html","width":130,"caption":"Student from one of Patricia's classes in North Hampshire","height":173});
															thumbnails[5738108] = clik.newPhoto({"id":5738108,"src":"The_Harvest_Now_is_Over4_thumb.JPG","galleries_id":310049,"server_id":5,"link":"photo_5738108.html","width":130,"caption":"The Harvest Now is Over - view 2","height":202});
															thumbnails[5738047] = clik.newPhoto({"id":5738047,"src":"HarvestMice2_thumb.jpg","galleries_id":310049,"server_id":5,"link":"photo_5738047.html","width":130,"caption":"The Harvest Now is Over - view 3","height":200});
															thumbnails[6808089] = clik.newPhoto({"id":6808089,"src":"PandS_thumb.jpg","galleries_id":352953,"server_id":5,"link":"photo_6808089.html","width":130,"caption":"A Dorset Reception","height":211});
															thumbnails[5535520] = clik.newPhoto({"id":5535520,"src":"FireFighters4BW_thumb.jpg","galleries_id":310691,"server_id":5,"link":"photo_5535520.html","width":130,"caption":"Firefighters Memorial, St Pauls Cathedral, London","height":124});
															thumbnails[5540598] = clik.newPhoto({"id":5540598,"src":"31_Graal_Bilbo_thumb.JPG","galleries_id":310688,"server_id":5,"link":"photo_5540598.html","width":130,"caption":"Bilbo Baggins","height":126});
															thumbnails[5540209] = clik.newPhoto({"id":5540209,"src":"14Sevenoaks_school_thumb.JPG","galleries_id":310696,"server_id":5,"link":"photo_5540209.html","width":130,"caption":"Sevenoaks School","height":163});
															thumbnails[5556002] = clik.newPhoto({"id":5556002,"src":"Lab1_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5556002.html","width":130,"caption":"Labrador","height":143});
															thumbnails[5556644] = clik.newPhoto({"id":5556644,"src":"Here_Today_but_Gone_Tomorrow_thumb.jpg","galleries_id":310049,"server_id":5,"link":"photo_5556644.html","width":130,"caption":"Here Today But Gone Tomorrow? - view 1","height":161});
															thumbnails[5592509] = clik.newPhoto({"id":5592509,"src":"Teaching_North_Hampshire2_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592509.html","width":130,"caption":"Young student ","height":173});
															thumbnails[5517054] = clik.newPhoto({"id":5517054,"src":"_38E1497_Photo_by_Simon_Bruntnell_1_thumb.jpg","galleries_id":310049,"server_id":5,"link":"photo_5517054.html","width":130,"caption":"Here Today but Gone Tomorrow? - view 2","height":157});
															thumbnails[6808095] = clik.newPhoto({"id":6808095,"src":"PandSCloseup_thumb.jpg","galleries_id":352953,"server_id":5,"link":"photo_6808095.html","width":130,"caption":"A Dorset Reception Close up","height":192});
															thumbnails[5535524] = clik.newPhoto({"id":5535524,"src":"Worshipful_Company6_Bw_thumb.jpg","galleries_id":310691,"server_id":5,"link":"photo_5535524.html","width":130,"caption":"Worshipful Company of Firefighters","height":123});
															thumbnails[5540533] = clik.newPhoto({"id":5540533,"src":"Smaug2_thumb.JPG","galleries_id":310688,"server_id":5,"link":"photo_5540533.html","width":130,"caption":"Smaug the Dragon","height":132});
															thumbnails[5556003] = clik.newPhoto({"id":5556003,"src":"Lab2_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5556003.html","width":130,"caption":"Labrador 2","height":136});
															thumbnails[5592512] = clik.newPhoto({"id":5592512,"src":"Teaching_Earnley_Concourse1_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592512.html","width":130,"caption":"Student at Earnley Concourse","height":98});
															thumbnails[5535517] = clik.newPhoto({"id":5535517,"src":"algrey_1_corrected_thumb.jpg","galleries_id":310691,"server_id":5,"link":"photo_5535517.html","width":130,"caption":"Presentation from an officer leaving Middle Wallop Army Air Base","height":174});
															thumbnails[5540592] = clik.newPhoto({"id":5540592,"src":"30_Graal_Bilbo_embryo_thumb.jpg","galleries_id":310688,"server_id":5,"link":"photo_5540592.html","width":130,"caption":"Bilbo Graal Embryo","height":211});
															thumbnails[5556004] = clik.newPhoto({"id":5556004,"src":"Lab3_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5556004.html","width":130,"caption":"Labrador 3","height":135});
															thumbnails[5556012] = clik.newPhoto({"id":5556012,"src":"grevy2_thumb.jpg","galleries_id":310049,"server_id":5,"link":"photo_5556012.html","width":130,"caption":"Who's for dinner tonight? - view 1","height":133});
															thumbnails[5592551] = clik.newPhoto({"id":5592551,"src":"Teaching_Earnley_Concourse2_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592551.html","width":130,"caption":"Patricia with a student at Earnley Concourse","height":98});
															thumbnails[5738131] = clik.newPhoto({"id":5738131,"src":"Whos_for_Dinner_tonight3_thumb.JPG","galleries_id":310049,"server_id":5,"link":"photo_5738131.html","width":130,"caption":"Who's for dinner tonight?","height":127});
															thumbnails[5555944] = clik.newPhoto({"id":5555944,"src":"swan300dpi_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5555944.html","width":130,"caption":"The Swan","height":262});
															thumbnails[5556009] = clik.newPhoto({"id":5556009,"src":"ERIC_Orton_Trophy_4_thumb.JPG","galleries_id":310691,"server_id":5,"link":"photo_5556009.html","width":130,"caption":"Eric Orton Trophy","height":173});
															thumbnails[5556013] = clik.newPhoto({"id":5556013,"src":"Whos_for_Dinner_tonight4_thumb.JPG","galleries_id":310049,"server_id":5,"link":"photo_5556013.html","width":130,"caption":"Who's for dinner tonight? - view 3","height":129});
															thumbnails[5556010] = clik.newPhoto({"id":5556010,"src":"ERIC_Orton_Trophy_Awards_thumb.JPG","galleries_id":310691,"server_id":5,"link":"photo_5556010.html","width":130,"caption":"Eric Orton trophy plus the 10 years of prizes","height":73});
															thumbnails[5556014] = clik.newPhoto({"id":5556014,"src":"Harvest_Mice_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5556014.html","width":130,"caption":"Harvest Mice","height":187});
															thumbnails[5592559] = clik.newPhoto({"id":5592559,"src":"Teaching_Earnley_Concourse3_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592559.html","width":130,"caption":"Student at Earnley Concourse","height":98});
															thumbnails[5516929] = clik.newPhoto({"id":5516929,"src":"_38E1475_Photo_by_Simon_Bruntnell__thumb.jpg","galleries_id":310049,"server_id":5,"link":"photo_5516929.html","width":130,"caption":"Night Fishing","height":134});
															thumbnails[5535538] = clik.newPhoto({"id":5535538,"src":"Duffys_Nightwatch__thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5535538.html","width":130,"caption":"Duffy's Nightwatch","height":168});
															thumbnails[5556759] = clik.newPhoto({"id":5556759,"src":"P1000600_thumb.JPG","galleries_id":310691,"server_id":5,"link":"photo_5556759.html","width":130,"caption":"Penton Tankard","height":154});
															thumbnails[5592579] = clik.newPhoto({"id":5592579,"src":"Teaching_Earnley_Concourse4_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592579.html","width":130,"caption":"Student at Earnley Concourse","height":98});
															thumbnails[8312765] = clik.newPhoto({"id":8312765,"src":"Horse_of_the_Year_Show_GS_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_8312765.html","width":130,"caption":"Horse of the Year Show","height":229});
															thumbnails[5556011] = clik.newPhoto({"id":5556011,"src":"Donkey1_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5556011.html","width":130,"caption":"Donkeys","height":84});
															thumbnails[8608368] = clik.newPhoto({"id":8608368,"src":"PICT0125_thumb.JPG","galleries_id":310693,"server_id":5,"link":"photo_8608368.html","width":130,"caption":"Faith","height":196});
															thumbnails[8608347] = clik.newPhoto({"id":8608347,"src":"Andrew1_thumb.jpg","galleries_id":310691,"server_id":5,"link":"photo_8608347.html","width":130,"caption":"Paperweight Showing Crest","height":127});
															thumbnails[6808081] = clik.newPhoto({"id":6808081,"src":"CandN2_thumb.jpg","galleries_id":352953,"server_id":5,"link":"photo_6808081.html","width":130,"caption":"Queens House, Greenwich Maritime Museum","height":136});
															thumbnails[5540451] = clik.newPhoto({"id":5540451,"src":"Night_Flight_thumb.jpg","galleries_id":310693,"server_id":5,"link":"photo_5540451.html","width":130,"caption":"Night Patrol","height":86});
															thumbnails[5592651] = clik.newPhoto({"id":5592651,"src":"Teaching_Earnley_Concourse_Demonstration_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592651.html","width":130,"caption":"Demonstrating at Earnley Concourse","height":86});
															thumbnails[8608352] = clik.newPhoto({"id":8608352,"src":"Foxkins_Tankard_thumb.jpg","galleries_id":310691,"server_id":5,"link":"photo_8608352.html","width":130,"caption":"A Passion for Tea","height":138});
															thumbnails[5592863] = clik.newPhoto({"id":5592863,"src":"Teaching_Hawk_Conservancy1_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592863.html","width":130,"caption":"Student ","height":98});
															thumbnails[8608360] = clik.newPhoto({"id":8608360,"src":"GayAndrew3_thumb.jpg","galleries_id":310691,"server_id":5,"link":"photo_8608360.html","width":130,"caption":"Coast & Country Music Festival plate","height":127});
															thumbnails[5592865] = clik.newPhoto({"id":5592865,"src":"Teaching_Hawk_Conservancy2_thumb.jpg","galleries_id":317132,"server_id":5,"link":"photo_5592865.html","width":130,"caption":"Student","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[310696] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Architecture","link":"gallery_310696.html","maxRecords":0.0,"photoIDs":[5556015.0,5535661.0,5535719.0,5540209.0],"skipIndex":0,"section_code":"gallery","featured_images":5535661.0,"id":310696,"singleSection":false});				  						galleries[310049] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Cameo","link":"gallery_310049.html","maxRecords":0.0,"photoIDs":[5540495.0,5517020.0,5540260.0,5738108.0,5738047.0,5556644.0,5517054.0,5556012.0,5738131.0,5556013.0,5516929.0],"skipIndex":0,"section_code":"gallery","featured_images":5540495.0,"id":310049,"singleSection":false});				  						galleries[310050] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Clear","link":"gallery_310050.html","maxRecords":0.0,"photoIDs":[5540522.0,5540476.0,5517084.0,5540204.0,8853703.0,8853789.0],"skipIndex":0,"section_code":"gallery","featured_images":5517084.0,"id":310050,"singleSection":false});				  						galleries[310690] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Colour","link":"gallery_310690.html","maxRecords":0.0,"photoIDs":[5516787.0,5517072.0,5540464.0,5540508.0,5556826.0],"skipIndex":0,"section_code":"gallery","featured_images":"5517072,5516787","id":310690,"singleSection":false});				  						galleries[310691] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Commissions","link":"gallery_310691.html","maxRecords":0.0,"photoIDs":[5556779.0,5540487.0,5535520.0,5535524.0,5535517.0,5556009.0,5556010.0,5556759.0,8608347.0,8608352.0,8608360.0],"skipIndex":0,"section_code":"gallery","featured_images":"8608360,5535520","id":310691,"singleSection":false});				  						galleries[310692] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Flora","link":"gallery_310692.html","maxRecords":0.0,"photoIDs":[5535553.0,5535564.0,5556784.0,5556793.0,5556815.0],"skipIndex":0,"section_code":"gallery","featured_images":5535564.0,"id":310692,"singleSection":false});				  						galleries[310693] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Fauna","link":"gallery_310693.html","maxRecords":0.0,"photoIDs":[8312749.0,5556020.0,5556818.0,5556002.0,5556003.0,5556004.0,5555944.0,5556014.0,5535538.0,8312765.0,5556011.0,8608368.0,5540451.0],"skipIndex":0,"section_code":"gallery","featured_images":"8608368,5535538","id":310693,"singleSection":false});				  						galleries[310688] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Graal","link":"gallery_310688.html","maxRecords":0.0,"photoIDs":[5516964.0,5516957.0,5540598.0,5540533.0,5540592.0],"skipIndex":0,"section_code":"gallery","featured_images":5516964.0,"id":310688,"singleSection":false});				  						galleries[317132] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Teaching","link":"gallery_317132.html","maxRecords":0.0,"photoIDs":[5592503.0,5592505.0,5592509.0,5592512.0,5592551.0,5592559.0,5592579.0,5592651.0,5592863.0,5592865.0],"skipIndex":0,"section_code":"gallery","featured_images":5592651.0,"id":317132,"singleSection":false});				  						galleries[352953] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Wedding Glasses","link":"gallery_352953.html","maxRecords":0.0,"photoIDs":[6807997.0,6808085.0,6808089.0,6808095.0,6808081.0],"skipIndex":0,"section_code":"gallery","featured_images":6807997.0,"id":352953,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5517072,8853703,8312749,8853789,5556644,5516929,5535538,8312765,8608360';
imageSets[2] = '5535564,5517084,5517072,5516787,6807997,5540495,5535661,5516964,5535520,5535538,8608368,5592651,8608360';
imageSets[3] = '8853789,8853703,8608368,8608360,8608352,8608347,8312765,8312749,6808095,6808089,6808085,6808081,6807997,5738131,5738108,5738047,5592865,5592863,5592651,5592579,5592559,5592551,5592512,5592509,5592505,5592503,5556826,5556818,5556815,5556793,5556784,5556779,5556759,5556644,5556020,5556015,5556014,5556013,5556012,5556011,5556010,5556009,5556004,5556003,5556002,5555944,5540598,5540592,5540533,5540522';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/patriciahr/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/patriciahr/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 = 'Patricia Hilton-Robinson - Hand Engraved Glass: ' + 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;
	}
}

			

