window.thumbnails = {};
															thumbnails[8058580] = clik.newPhoto({"id":8058580,"src":"web-logo_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"logo","height":46});
															thumbnails[8679413] = clik.newPhoto({"id":8679413,"src":"Camera_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":100,"caption":"","height":100});
															thumbnails[8686731] = clik.newPhoto({"id":8686731,"src":"twitter_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":100,"caption":"","height":98});
															thumbnails[8686767] = clik.newPhoto({"id":8686767,"src":"facebook_logo_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":100,"caption":"","height":100});
															thumbnails[8707830] = clik.newPhoto({"id":8707830,"src":"Profile_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"New profile","height":160});
															thumbnails[9089970] = clik.newPhoto({"id":9089970,"src":"ifuud2f8jjazh3u_scalewithin_600x600noup1_1.jpg","galleries_id":"","server_id":15,"link":"#","width":150,"caption":"","height":100});
															thumbnails[9087814] = clik.newPhoto({"id":9087814,"src":"Dress_22.jpg","galleries_id":"","server_id":15,"link":"#","width":101,"caption":"","height":150});
															thumbnails[1819413] = clik.newPhoto({"id":1819413,"src":"Dune 2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Dune 1 - Beadnell Bay","height":130});
															thumbnails[8708172] = clik.newPhoto({"id":8708172,"src":"ear_ring_bw_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":107});
															thumbnails[1819404] = clik.newPhoto({"id":1819404,"src":"dune 1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Dune 2 - Beadnell Bay","height":130});
															thumbnails[8825850] = clik.newPhoto({"id":8825850,"src":"make_up_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":101,"caption":"","height":150});
															thumbnails[8764950] = clik.newPhoto({"id":8764950,"src":"Dresses_c_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":101,"caption":"","height":150});
															thumbnails[1819415] = clik.newPhoto({"id":1819415,"src":"embleton bay_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Embleton Bay - Northumberland","height":130});
															thumbnails[8064542] = clik.newPhoto({"id":8064542,"src":"Car_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":88,"caption":"","height":130});
															thumbnails[4732270] = clik.newPhoto({"id":4732270,"src":"Beach-Hut_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Beach Hut - Low Newton","height":129});
															thumbnails[8708169] = clik.newPhoto({"id":8708169,"src":"dress_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":113});
															thumbnails[8826053] = clik.newPhoto({"id":8826053,"src":"Bride_Groom_1_c_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":150,"caption":"","height":101});
															thumbnails[1801603] = clik.newPhoto({"id":1801603,"src":"water flash 2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Water flash 2","height":130});
															thumbnails[8826129] = clik.newPhoto({"id":8826129,"src":"trippet_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":105,"caption":"","height":150});
															thumbnails[8708166] = clik.newPhoto({"id":8708166,"src":"Annie_and_Mark_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"","height":160});
															thumbnails[9087785] = clik.newPhoto({"id":9087785,"src":"annie_mark1_2.jpg","galleries_id":"","server_id":15,"link":"#","width":150,"caption":"","height":150});
															thumbnails[5050228] = clik.newPhoto({"id":5050228,"src":"Sunrise-Embleton_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Sunrise - Embleton Bay (Digital Image)","height":98});
															thumbnails[5050196] = clik.newPhoto({"id":5050196,"src":"King-Edwards-Bay_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"King Edwards Bay - Tynemouth","height":130});
															thumbnails[8765330] = clik.newPhoto({"id":8765330,"src":"dance_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":150,"caption":"","height":150});
															thumbnails[8064437] = clik.newPhoto({"id":8064437,"src":"Molly-Web-2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":87,"caption":"","height":130});
															thumbnails[8688018] = clik.newPhoto({"id":8688018,"src":"Molly-Web-1_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8688018.html","width":100,"caption":"","height":67});
															thumbnails[6786098] = clik.newPhoto({"id":6786098,"src":"Abbey_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_6786098.html","width":130,"caption":"","height":87});
															thumbnails[8688019] = clik.newPhoto({"id":8688019,"src":"Henry_50E13C50-1E4F-37DC-7170C904493166A3_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8688019.html","width":67,"caption":"","height":100});
															thumbnails[8687790] = clik.newPhoto({"id":8687790,"src":"Maisy-Web-1_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8687790.html","width":67,"caption":"","height":100});
															thumbnails[8687787] = clik.newPhoto({"id":8687787,"src":"Laura-2_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8687787.html","width":67,"caption":"","height":100});
															thumbnails[8687652] = clik.newPhoto({"id":8687652,"src":"Laura_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8687652.html","width":67,"caption":"","height":100});
															thumbnails[8647006] = clik.newPhoto({"id":8647006,"src":"Daisy_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8647006.html","width":65,"caption":"","height":100});
															thumbnails[8647035] = clik.newPhoto({"id":8647035,"src":"Eve_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8647035.html","width":100,"caption":"","height":100});
															thumbnails[8104181] = clik.newPhoto({"id":8104181,"src":"21-Hannan_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8104181.html","width":100,"caption":"","height":100});
															thumbnails[6358777] = clik.newPhoto({"id":6358777,"src":"Maddy-and-ceshen_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_6358777.html","width":130,"caption":"","height":87});
															thumbnails[8100253] = clik.newPhoto({"id":8100253,"src":"85-BW-Greenshield_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8100253.html","width":130,"caption":"","height":130});
															thumbnails[6332126] = clik.newPhoto({"id":6332126,"src":"Lousie-Camper_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_6332126.html","width":130,"caption":"","height":87});
															thumbnails[8104079] = clik.newPhoto({"id":8104079,"src":"69-Greenshield_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8104079.html","width":100,"caption":"","height":100});
															thumbnails[5453588] = clik.newPhoto({"id":5453588,"src":"Thomas-1_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_5453588.html","width":130,"caption":"","height":81});
															thumbnails[8687794] = clik.newPhoto({"id":8687794,"src":"Maisy-Web-2_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8687794.html","width":100,"caption":"","height":67});
															thumbnails[8688039] = clik.newPhoto({"id":8688039,"src":"Maddy1_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8688039.html","width":67,"caption":"","height":100});
															thumbnails[8688020] = clik.newPhoto({"id":8688020,"src":"Maddy-2_50E1C492-1E4F-37DC-71E4AEEC7492E09D_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8688020.html","width":67,"caption":"","height":100});
															thumbnails[8064469] = clik.newPhoto({"id":8064469,"src":"Innogen-1_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8064469.html","width":130,"caption":"","height":130});
															thumbnails[8707923] = clik.newPhoto({"id":8707923,"src":"Eeve-2_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8707923.html","width":160,"caption":"","height":107});
															thumbnails[8064442] = clik.newPhoto({"id":8064442,"src":"Noah-Web-1_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8064442.html","width":130,"caption":"","height":130});
															thumbnails[8707962] = clik.newPhoto({"id":8707962,"src":"Dancing-girl_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8707962.html","width":106,"caption":"","height":160});
															thumbnails[8707968] = clik.newPhoto({"id":8707968,"src":"Reg_thumb.jpg","galleries_id":302736,"server_id":15,"link":"photo_8707968.html","width":160,"caption":"","height":160});
															thumbnails[6332213] = clik.newPhoto({"id":6332213,"src":"Sky-2---Tynemouth_thumb.jpg","galleries_id":451461,"server_id":15,"link":"photo_6332213.html","width":150,"caption":"Sky 2 - Tynemouth","height":150});
															thumbnails[8476942] = clik.newPhoto({"id":8476942,"src":"morning-low-newton_thumb.jpg","galleries_id":456083,"server_id":15,"link":"photo_8476942.html","width":150,"caption":"Morning 2 - Low Newton","height":150});
															thumbnails[8476948] = clik.newPhoto({"id":8476948,"src":"morning-low-newton-2_thumb.jpg","galleries_id":456083,"server_id":15,"link":"photo_8476948.html","width":150,"caption":"Morning 1 - Low Newton","height":150});
															thumbnails[8678994] = clik.newPhoto({"id":8678994,"src":"Tynemouth-waves_thumb.jpg","galleries_id":451459,"server_id":15,"link":"photo_8678994.html","width":150,"caption":"Moving Sea 1 - Tynemouth","height":150});
															thumbnails[8678996] = clik.newPhoto({"id":8678996,"src":"cullercoats-harbour-wall_thumb.jpg","galleries_id":451461,"server_id":15,"link":"photo_8678996.html","width":150,"caption":"Sky 3 - Cullercoats","height":150});
															thumbnails[8688478] = clik.newPhoto({"id":8688478,"src":"Sea-Fret_thumb.jpg","galleries_id":451459,"server_id":15,"link":"photo_8688478.html","width":150,"caption":"Sea Fret - Low Newton by the Sea","height":150});
															thumbnails[8688479] = clik.newPhoto({"id":8688479,"src":"Sea-Wall-1_thumb.jpg","galleries_id":451459,"server_id":15,"link":"photo_8688479.html","width":150,"caption":"Outdoor Pool 1 - Tynemouth","height":150});
															thumbnails[8688480] = clik.newPhoto({"id":8688480,"src":"Plessey_Woods_400_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_8688480.html","width":150,"caption":"Stream 1 - Plessey Woods","height":150});
															thumbnails[8693995] = clik.newPhoto({"id":8693995,"src":"Stream-1---Plessey-Woods_566C2BAF-1E4F-37DC-71766539E71FBBFD_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_8693995.html","width":150,"caption":"Stream 2 - Plessey Woods","height":151});
															thumbnails[8693999] = clik.newPhoto({"id":8693999,"src":"foam_web_thumb.jpg","galleries_id":451459,"server_id":15,"link":"photo_8693999.html","width":150,"caption":"Embleton Bay - Northumberland","height":150});
															thumbnails[8694036] = clik.newPhoto({"id":8694036,"src":"Sky_-_River_Derwent_thumb.jpg","galleries_id":451461,"server_id":15,"link":"photo_8694036.html","width":150,"caption":"Sky 1 - River Derwent","height":150});
															thumbnails[8694149] = clik.newPhoto({"id":8694149,"src":"wood_1001_thumb.jpg","galleries_id":451460,"server_id":15,"link":"photo_8694149.html","width":150,"caption":"Wood - Rising Sun Countryside Centre","height":150});
															thumbnails[8694152] = clik.newPhoto({"id":8694152,"src":"Bench_-_Jesmond_Dene_thumb.jpg","galleries_id":451460,"server_id":15,"link":"photo_8694152.html","width":150,"caption":"Bench - Jesmond Dene","height":150});
															thumbnails[8694157] = clik.newPhoto({"id":8694157,"src":"Dusk-1---Tynemouth_5678776A-1E4F-37DC-7124C1FC3A97F7AF_thumb.jpg","galleries_id":451459,"server_id":15,"link":"photo_8694157.html","width":160,"caption":"Dusk 1 - Tynemouth","height":160});
															thumbnails[8694178] = clik.newPhoto({"id":8694178,"src":"River-Bank-1_thumb.jpg","galleries_id":456082,"server_id":15,"link":"photo_8694178.html","width":150,"caption":"Wylam River Bank #1","height":150});
															thumbnails[8710389] = clik.newPhoto({"id":8710389,"src":"River_bank_3_thumb.jpg","galleries_id":456082,"server_id":15,"link":"photo_8710389.html","width":150,"caption":"Wylam River Bank #3","height":150});
															thumbnails[8710391] = clik.newPhoto({"id":8710391,"src":"river-bank-2_thumb.jpg","galleries_id":456082,"server_id":15,"link":"photo_8710391.html","width":150,"caption":"Wylam River Bank #2","height":150});
															thumbnails[8737188] = clik.newPhoto({"id":8737188,"src":"Dusk_4_-_Tynemouth_thumb.jpg","galleries_id":456083,"server_id":15,"link":"photo_8737188.html","width":150,"caption":"Dusk 4 - Tynemouth","height":150});
															thumbnails[8737253] = clik.newPhoto({"id":8737253,"src":"Dusk_5_thumb.jpg","galleries_id":456083,"server_id":15,"link":"photo_8737253.html","width":150,"caption":"Dusk 5 - Tynemouth","height":150});
															thumbnails[8767317] = clik.newPhoto({"id":8767317,"src":"The_Source_-_Jesmond_Dene_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_8767317.html","width":150,"caption":"The Source - Jesmond Dene","height":150});
															thumbnails[8767488] = clik.newPhoto({"id":8767488,"src":"Water_flash_2_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_8767488.html","width":150,"caption":"Water Flash 2 ","height":150});
															thumbnails[8768628] = clik.newPhoto({"id":8768628,"src":"river-bank-11_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_8768628.html","width":150,"caption":"Wylam River Bank #1 ","height":150});
															thumbnails[8777278] = clik.newPhoto({"id":8777278,"src":"Under_the_Bridge_2_-_Jesmond_Dene_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_8777278.html","width":150,"caption":"Under the Bridge #2 - Jesmond Dene","height":150});
															thumbnails[8969593] = clik.newPhoto({"id":8969593,"src":"Ivy_1_-_Jesmond_Dene_thumb.jpg","galleries_id":451460,"server_id":15,"link":"photo_8969593.html","width":150,"caption":"Ivy 1 - Jesmond Dene","height":150});
															thumbnails[8969633] = clik.newPhoto({"id":8969633,"src":"Leaves_2_-_Bolam_Lake_thumb.jpg","galleries_id":451460,"server_id":15,"link":"photo_8969633.html","width":150,"caption":"Leaves 2 - Bolam Lake","height":150});
															thumbnails[8969643] = clik.newPhoto({"id":8969643,"src":"Autumn_B_Lake_thumb.jpg","galleries_id":451460,"server_id":15,"link":"photo_8969643.html","width":149,"caption":"Autumn - Bolam Lake","height":150});
															thumbnails[8971391] = clik.newPhoto({"id":8971391,"src":"Ivy_2__-_Jesmond_Dene__thumb.jpg","galleries_id":451460,"server_id":15,"link":"photo_8971391.html","width":150,"caption":"Ivy 2 - Jesmond Dene","height":150});
															thumbnails[8971408] = clik.newPhoto({"id":8971408,"src":"Leaves_1_-_Bolam_Lake_thumb.jpg","galleries_id":451460,"server_id":15,"link":"photo_8971408.html","width":150,"caption":"Leaves 1 - Bolam Lake","height":150});
															thumbnails[8971433] = clik.newPhoto({"id":8971433,"src":"Woodland_edge_-_Bolam_Lake_thumb.jpg","galleries_id":451460,"server_id":15,"link":"photo_8971433.html","width":150,"caption":"Woodland Edge - Bolam Lake","height":150});
															thumbnails[1801601] = clik.newPhoto({"id":1801601,"src":"leaves_thumb.jpg","galleries_id":451460,"server_id":15,"link":"photo_1801601.html","width":150,"caption":"Leaves - Jesmond Dene","height":150});
															thumbnails[1801602] = clik.newPhoto({"id":1801602,"src":"water flash 1_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_1801602.html","width":150,"caption":"Water Flash 1","height":150});
															thumbnails[1928320] = clik.newPhoto({"id":1928320,"src":"blur_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_1928320.html","width":150,"caption":"Leaves on Stone - River Derwent","height":150});
															thumbnails[8764139] = clik.newPhoto({"id":8764139,"src":"Leaves_on_Bolam_lake_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_8764139.html","width":150,"caption":"","height":150});
															thumbnails[8764152] = clik.newPhoto({"id":8764152,"src":"Under_the_Bridge_-_Jesmond_Dene_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_8764152.html","width":150,"caption":"Under the Bridge - Jesmond Dene","height":150});
															thumbnails[1870725] = clik.newPhoto({"id":1870725,"src":"dappled right_thumb.jpg","galleries_id":451458,"server_id":15,"link":"photo_1870725.html","width":150,"caption":"River Derwent - Thornley Woods","height":150});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[456083] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New work","link":"gallery_456083.html","maxRecords":0.0,"photoIDs":[8476942.0,8476948.0,8737188.0,8737253.0],"skipIndex":0,"section_code":"gallery","featured_images":"8737253,8737188,8476948,8476942","id":456083,"singleSection":false});				  						galleries[302736] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"section335426.html","maxRecords":0.0,"photoIDs":[8688018.0,6786098.0,8688019.0,8687790.0,8687787.0,8687652.0,8647006.0,8647035.0,8104181.0,6358777.0,8100253.0,6332126.0,8104079.0,5453588.0,8687794.0,8688039.0,8688020.0,8064469.0,8707923.0,8064442.0,8707962.0,8707968.0],"skipIndex":0,"section_code":"section335426","featured_images":"8707968,8707962,8707923,8688039,8688020,8688019,8688018,8687794,8687790,8687787","id":302736,"singleSection":true});				  						galleries[451458] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"River\/Stream","link":"gallery_451458.html","maxRecords":0.0,"photoIDs":[8688480.0,8693995.0,8767317.0,8767488.0,8768628.0,8777278.0,1801602.0,1928320.0,8764139.0,8764152.0,1870725.0],"skipIndex":0,"section_code":"gallery","featured_images":"8777278,8768628,8767488,8767317,8764152,8764139,8693995,8688480,1928320,1870725","id":451458,"singleSection":false});				  						galleries[451459] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sea","link":"gallery_451459.html","maxRecords":0.0,"photoIDs":[8678994.0,8688478.0,8688479.0,8693999.0,8694157.0],"skipIndex":0,"section_code":"gallery","featured_images":"8694157,8693999,8688479,8688478,8678994","id":451459,"singleSection":false});				  						galleries[451461] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sky","link":"gallery_451461.html","maxRecords":0.0,"photoIDs":[6332213.0,8678996.0,8694036.0],"skipIndex":0,"section_code":"gallery","featured_images":"8694036,8678996,6332213","id":451461,"singleSection":false});				  						galleries[451460] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wood","link":"gallery_451460.html","maxRecords":0.0,"photoIDs":[8694149.0,8694152.0,8969593.0,8969633.0,8969643.0,8971391.0,8971408.0,8971433.0,1801601.0],"skipIndex":0,"section_code":"gallery","featured_images":"8971433,8971408,8971391,8969643,8969633,8969593,8694152,8694149,1801601","id":451460,"singleSection":false});				  						galleries[456082] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wylam calendar","link":"gallery_456082.html","maxRecords":0.0,"photoIDs":[8694178.0,8710389.0,8710391.0],"skipIndex":0,"section_code":"gallery","featured_images":"8710391,8710389,8694178","id":456082,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[247643] = '9089970';
imageSets[245664] = '8707830';
imageSets[246077] = '8686731';
imageSets[1] = '8694036,8693999,8688479,8678996,8678994,8476948,6332213,8064542,1928320,8647035,8104181,8100253,8707923';
imageSets[3] = '8688018,8688019,8687790,8687787,8687652,8647006,8647035,8104181,8100253,8064437,6332126,5453588';
imageSets[245956] = '9087814,8708172,8825850,8764950,8064542,8826053,8708169,8826129,8708166,9087785,8765330';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/JohnnyF/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/JohnnyF/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 += 'section335426.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 && 'section335426' != '') {
					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 = 'John Faulkner Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="JOHNNYF">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

