window.thumbnails = {};
															thumbnails[8728182] = clik.newPhoto({"id":8728182,"src":"webwin_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Handmade Winchester Christmas Fair","height":184});
															thumbnails[3263405] = clik.newPhoto({"id":3263405,"src":"new-dog-024_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3263405.html","width":130,"caption":"","height":98});
															thumbnails[3263406] = clik.newPhoto({"id":3263406,"src":"Dogs-080_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3263406.html","width":130,"caption":"","height":98});
															thumbnails[3263407] = clik.newPhoto({"id":3263407,"src":"email-dogs-001_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3263407.html","width":130,"caption":"","height":98});
															thumbnails[3263408] = clik.newPhoto({"id":3263408,"src":"DSC01861_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3263408.html","width":130,"caption":"","height":98});
															thumbnails[3263430] = clik.newPhoto({"id":3263430,"src":"dogs-012_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3263430.html","width":130,"caption":"","height":98});
															thumbnails[3263431] = clik.newPhoto({"id":3263431,"src":"dogs-005_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3263431.html","width":130,"caption":"","height":98});
															thumbnails[3263433] = clik.newPhoto({"id":3263433,"src":"dogs-010_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3263433.html","width":130,"caption":"","height":98});
															thumbnails[3264674] = clik.newPhoto({"id":3264674,"src":"DSC01789_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_3264674.html","width":130,"caption":"","height":98});
															thumbnails[3264688] = clik.newPhoto({"id":3264688,"src":"DSC017871_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_3264688.html","width":130,"caption":"","height":98});
															thumbnails[3264699] = clik.newPhoto({"id":3264699,"src":"no_thumb.2.jpg","galleries_id":164175,"server_id":32,"link":"photo_3264699.html","width":130,"caption":"","height":98});
															thumbnails[3264704] = clik.newPhoto({"id":3264704,"src":"new-dog-012_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3264704.html","width":130,"caption":"","height":98});
															thumbnails[3264708] = clik.newPhoto({"id":3264708,"src":"new-dog-014_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3264708.html","width":130,"caption":"","height":98});
															thumbnails[3264714] = clik.newPhoto({"id":3264714,"src":"new-dog-017_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3264714.html","width":130,"caption":"","height":98});
															thumbnails[3264748] = clik.newPhoto({"id":3264748,"src":"new-dog-005_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_3264748.html","width":130,"caption":"My favourite place.......My workshop.","height":98});
															thumbnails[3267216] = clik.newPhoto({"id":3267216,"src":"other-web-pics-001_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3267216.html","width":130,"caption":"","height":98});
															thumbnails[3267224] = clik.newPhoto({"id":3267224,"src":"other-web-pics-003_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3267224.html","width":130,"caption":"","height":98});
															thumbnails[3267235] = clik.newPhoto({"id":3267235,"src":"other-web-pics-006_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3267235.html","width":130,"caption":"","height":98});
															thumbnails[3267249] = clik.newPhoto({"id":3267249,"src":"other-web-pics-007_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3267249.html","width":130,"caption":"","height":98});
															thumbnails[3267266] = clik.newPhoto({"id":3267266,"src":"other-web-pics-013_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3267266.html","width":130,"caption":"","height":98});
															thumbnails[3267267] = clik.newPhoto({"id":3267267,"src":"other-web-pics-015_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_3267267.html","width":130,"caption":"My chocolate labrador \"Thornton\"","height":98});
															thumbnails[3269724] = clik.newPhoto({"id":3269724,"src":"phone-pics-093_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_3269724.html","width":130,"caption":"\"Lottie\"","height":98});
															thumbnails[3269726] = clik.newPhoto({"id":3269726,"src":"phone-pics-095_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_3269726.html","width":130,"caption":"","height":98});
															thumbnails[3269727] = clik.newPhoto({"id":3269727,"src":"phone-pics-096_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_3269727.html","width":130,"caption":"\"Fubar\"","height":98});
															thumbnails[3269729] = clik.newPhoto({"id":3269729,"src":"phone-pics-097_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_3269729.html","width":130,"caption":"","height":98});
															thumbnails[4657890] = clik.newPhoto({"id":4657890,"src":"alfie-phone-001_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_4657890.html","width":130,"caption":"Alfie","height":98});
															thumbnails[4657900] = clik.newPhoto({"id":4657900,"src":"alfie-phone-002_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_4657900.html","width":130,"caption":"","height":98});
															thumbnails[4697528] = clik.newPhoto({"id":4697528,"src":"web-pic-5_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4697528.html","width":130,"caption":"","height":98});
															thumbnails[4697657] = clik.newPhoto({"id":4697657,"src":"growler-web_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4697657.html","width":130,"caption":"","height":98});
															thumbnails[4697659] = clik.newPhoto({"id":4697659,"src":"web2_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4697659.html","width":130,"caption":"","height":98});
															thumbnails[4697785] = clik.newPhoto({"id":4697785,"src":"web3_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4697785.html","width":130,"caption":"","height":98});
															thumbnails[4697789] = clik.newPhoto({"id":4697789,"src":"web4_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4697789.html","width":130,"caption":"","height":98});
															thumbnails[4697790] = clik.newPhoto({"id":4697790,"src":"web5_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4697790.html","width":130,"caption":"","height":98});
															thumbnails[4698281] = clik.newPhoto({"id":4698281,"src":"web6_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698281.html","width":130,"caption":"","height":98});
															thumbnails[4698295] = clik.newPhoto({"id":4698295,"src":"web7_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698295.html","width":130,"caption":"","height":98});
															thumbnails[4698303] = clik.newPhoto({"id":4698303,"src":"web8_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698303.html","width":130,"caption":"","height":98});
															thumbnails[4698348] = clik.newPhoto({"id":4698348,"src":"web9_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698348.html","width":130,"caption":"","height":98});
															thumbnails[4698353] = clik.newPhoto({"id":4698353,"src":"web11_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698353.html","width":130,"caption":"","height":98});
															thumbnails[4698357] = clik.newPhoto({"id":4698357,"src":"web12_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698357.html","width":130,"caption":"","height":98});
															thumbnails[4698362] = clik.newPhoto({"id":4698362,"src":"web13_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698362.html","width":130,"caption":"","height":98});
															thumbnails[4698368] = clik.newPhoto({"id":4698368,"src":"web14_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698368.html","width":130,"caption":"","height":98});
															thumbnails[4698371] = clik.newPhoto({"id":4698371,"src":"web15_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698371.html","width":130,"caption":"","height":98});
															thumbnails[4698376] = clik.newPhoto({"id":4698376,"src":"web17_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698376.html","width":130,"caption":"","height":98});
															thumbnails[4698383] = clik.newPhoto({"id":4698383,"src":"web18_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698383.html","width":130,"caption":"","height":98});
															thumbnails[4698821] = clik.newPhoto({"id":4698821,"src":"sleepin_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698821.html","width":130,"caption":"","height":98});
															thumbnails[4698825] = clik.newPhoto({"id":4698825,"src":"st--bernard_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4698825.html","width":130,"caption":"","height":98});
															thumbnails[4864436] = clik.newPhoto({"id":4864436,"src":"inspirational-027_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864436.html","width":130,"caption":"howler","height":98});
															thumbnails[4864578] = clik.newPhoto({"id":4864578,"src":"bullterrierweb_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864578.html","width":130,"caption":"bullterrier wall plaque","height":98});
															thumbnails[4864588] = clik.newPhoto({"id":4864588,"src":"bullterrierweb2_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864588.html","width":130,"caption":"","height":98});
															thumbnails[4864602] = clik.newPhoto({"id":4864602,"src":"Frodo1_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864602.html","width":130,"caption":"Frodo wall plaque","height":98});
															thumbnails[4864650] = clik.newPhoto({"id":4864650,"src":"boxer_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864650.html","width":130,"caption":"boxer","height":98});
															thumbnails[4864652] = clik.newPhoto({"id":4864652,"src":"boxer2_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864652.html","width":130,"caption":"","height":98});
															thumbnails[4864654] = clik.newPhoto({"id":4864654,"src":"scratcher_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864654.html","width":130,"caption":"scratcher","height":98});
															thumbnails[4864656] = clik.newPhoto({"id":4864656,"src":"scratcher2_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864656.html","width":130,"caption":"","height":98});
															thumbnails[4864661] = clik.newPhoto({"id":4864661,"src":"tilly_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864661.html","width":130,"caption":"tilly wall plaque","height":98});
															thumbnails[4864662] = clik.newPhoto({"id":4864662,"src":"tilly2_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_4864662.html","width":130,"caption":"","height":98});
															thumbnails[5742836] = clik.newPhoto({"id":5742836,"src":"scumpy1_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_5742836.html","width":130,"caption":"\"Scrumpy\"","height":98});
															thumbnails[5742855] = clik.newPhoto({"id":5742855,"src":"scrumpy_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_5742855.html","width":130,"caption":"","height":98});
															thumbnails[5742856] = clik.newPhoto({"id":5742856,"src":"monty1_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_5742856.html","width":130,"caption":"\"Monty\"","height":98});
															thumbnails[5742857] = clik.newPhoto({"id":5742857,"src":"commissions-004_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_5742857.html","width":130,"caption":"","height":98});
															thumbnails[5742871] = clik.newPhoto({"id":5742871,"src":"web-wurgo_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_5742871.html","width":130,"caption":"\"Wurgo\"","height":98});
															thumbnails[5742874] = clik.newPhoto({"id":5742874,"src":"web-wur_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_5742874.html","width":130,"caption":"","height":98});
															thumbnails[5742934] = clik.newPhoto({"id":5742934,"src":"reg-gallery-004_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_5742934.html","width":130,"caption":"","height":98});
															thumbnails[6478010] = clik.newPhoto({"id":6478010,"src":"troy-web_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_6478010.html","width":130,"caption":"Troy","height":98});
															thumbnails[6478020] = clik.newPhoto({"id":6478020,"src":"Troy-commission-002-web_thumb.jpg","galleries_id":199113,"server_id":32,"link":"photo_6478020.html","width":130,"caption":"","height":98});
															thumbnails[8728204] = clik.newPhoto({"id":8728204,"src":"webwin1_thumb.jpg","galleries_id":459991,"server_id":32,"link":"photo_8728204.html","width":130,"caption":"Winchester Handmade Christmas Fair","height":184});
															thumbnails[3263440] = clik.newPhoto({"id":3263440,"src":"dogs-103_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3263440.html","width":130,"caption":"","height":173});
															thumbnails[3263438] = clik.newPhoto({"id":3263438,"src":"dogs-055_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3263438.html","width":130,"caption":"","height":98});
															thumbnails[3267179] = clik.newPhoto({"id":3267179,"src":"janes-ceramic-pictures-062_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3267179.html","width":130,"caption":"","height":98});
															thumbnails[3267205] = clik.newPhoto({"id":3267205,"src":"janes-ceramic-pictures-063_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3267205.html","width":130,"caption":"","height":98});
															thumbnails[3263436] = clik.newPhoto({"id":3263436,"src":"dogs-046_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3263436.html","width":130,"caption":"","height":98});
															thumbnails[3267129] = clik.newPhoto({"id":3267129,"src":"janes-ceramic-pictures-020_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3267129.html","width":130,"caption":"Roy Ashmore my tutor who very kindly let me share his stand at Tredegar ceramics fair,what a wonderful experience.","height":98});
															thumbnails[3263432] = clik.newPhoto({"id":3263432,"src":"DSC01668_thumb.jpg","galleries_id":164175,"server_id":32,"link":"photo_3263432.html","width":130,"caption":"","height":173});
															thumbnails[3264807] = clik.newPhoto({"id":3264807,"src":"4_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3264807.html","width":130,"caption":"A picture of my work was printed in July\/August 2007 No.207 edition of \"CRAFTS\" magazine. Magazine for contemporary craft.","height":98});
															thumbnails[3264810] = clik.newPhoto({"id":3264810,"src":"5_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3264810.html","width":130,"caption":"","height":98});
															thumbnails[3264794] = clik.newPhoto({"id":3264794,"src":"1_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3264794.html","width":130,"caption":"A picture of my work was printed in the ninth edition 2008\/9 \"Craft Galleries Guide\" a must for anyone who is interested in contemporary arts and crafts.","height":98});
															thumbnails[3264799] = clik.newPhoto({"id":3264799,"src":"3_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3264799.html","width":130,"caption":"","height":98});
															thumbnails[3264802] = clik.newPhoto({"id":3264802,"src":"21_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3264802.html","width":130,"caption":"","height":98});
															thumbnails[3322746] = clik.newPhoto({"id":3322746,"src":"j-2_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3322746.html","width":130,"caption":"","height":98});
															thumbnails[3322749] = clik.newPhoto({"id":3322749,"src":"j-1_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3322749.html","width":130,"caption":"","height":98});
															thumbnails[3322753] = clik.newPhoto({"id":3322753,"src":"j-3_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3322753.html","width":130,"caption":"","height":104});
															thumbnails[3322755] = clik.newPhoto({"id":3322755,"src":"j-7_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3322755.html","width":130,"caption":"","height":98});
															thumbnails[3322751] = clik.newPhoto({"id":3322751,"src":"j-6_thumb.jpg","galleries_id":164176,"server_id":32,"link":"photo_3322751.html","width":130,"caption":"","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[199113] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"commissions","link":"gallery_199113.html","maxRecords":0.0,"photoIDs":[3264674.0,3264688.0,3264748.0,3267267.0,3269724.0,3269726.0,3269727.0,3269729.0,4657890.0,4657900.0,5742836.0,5742855.0,5742856.0,5742857.0,5742871.0,5742874.0,6478010.0,6478020.0],"skipIndex":0,"section_code":"gallery","featured_images":"6478020,6478010,5742874,5742871,5742857,5742856,5742855,5742836,4657900,4657890","id":199113,"singleSection":false});				  						galleries[164175] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery 1","link":"gallery_164175.html","maxRecords":0.0,"photoIDs":[3263405.0,3263406.0,3263407.0,3263408.0,3263430.0,3263431.0,3263433.0,3264699.0,3264704.0,3264708.0,3264714.0,3267216.0,3267224.0,3267235.0,3267249.0,3267266.0,4697528.0,4697657.0,4697659.0,4697785.0,4697789.0,4697790.0,4698281.0,4698295.0,4698303.0,4698348.0,4698353.0,4698357.0,4698362.0,4698368.0,4698371.0,4698376.0,4698383.0,4698821.0,4698825.0,4864436.0,4864578.0,4864588.0,4864602.0,4864650.0,4864652.0,4864654.0,4864656.0,4864661.0,4864662.0,5742934.0,3263432.0],"skipIndex":0,"section_code":"gallery","featured_images":"5742934,4864662,4864661,4864656,4864654,4864652,4864650,4864602,4864588,4864578","id":164175,"singleSection":false});				  						galleries[164176] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery 2","link":"gallery_164176.html","maxRecords":0.0,"photoIDs":[3263440.0,3263438.0,3267179.0,3267205.0,3263436.0,3267129.0,3264807.0,3264810.0,3264794.0,3264799.0,3264802.0,3322746.0,3322749.0,3322753.0,3322755.0,3322751.0],"skipIndex":0,"section_code":"gallery","featured_images":"3322755,3322753,3322751,3322749,3322746,3267205,3267179,3267129,3264810,3264807","id":164176,"singleSection":false});				  						galleries[459991] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Up and coming Fairs","link":"gallery_459991.html","maxRecords":0.0,"photoIDs":[8728204.0],"skipIndex":0,"section_code":"gallery","featured_images":8728204.0,"id":459991,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8728204';
imageSets[3] = '8728204,8728182,6478020,6478010,5742934,5742874,5742871,5742857,5742856,5742855,5742836,4864662,4864661,4864656,4864654,4864652,4864650,4864602,4864588,4864578,4864436,4698825,4698821,4698383,4698376,4698371,4698368,4698362,4698357,4698353,4698348,4698303,4698295,4698281,4697790,4697789,4697785,4697659,4697657,4697528,4657900,4657890,3322755,3322753,3322751,3322749,3322746,3269729,3269727,3269726';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/janeygirl/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/janeygirl/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 && backgrounds[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 = 'Jane Layton Ceramics: ' + 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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp += '<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;
	}
}

			

