window.thumbnails = {};
															thumbnails[932774] = clik.newPhoto({"id":932774,"src":"JCbio2-web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":96,"caption":"","height":130});
															thumbnails[945301] = clik.newPhoto({"id":945301,"src":"MAP_web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":129});
															thumbnails[987795] = clik.newPhoto({"id":987795,"src":"OC-HEADER_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":9});
															thumbnails[1072152] = clik.newPhoto({"id":1072152,"src":"gales1.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":85});
															thumbnails[1073028] = clik.newPhoto({"id":1073028,"src":"gify_voucher1.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[1164630] = clik.newPhoto({"id":1164630,"src":"about_the_area_strip3_1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":23});
															thumbnails[1222091] = clik.newPhoto({"id":1222091,"src":"Mentoring_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1245576] = clik.newPhoto({"id":1245576,"src":"_DSC8929-Edit-web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":68});
															thumbnails[1301625] = clik.newPhoto({"id":1301625,"src":"about_the_area_strip2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":23});
															thumbnails[1306006] = clik.newPhoto({"id":1306006,"src":"about_the_area_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":23});
															thumbnails[1745056] = clik.newPhoto({"id":1745056,"src":"about_the_area_strip-bw_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":23});
															thumbnails[2212827] = clik.newPhoto({"id":2212827,"src":"venice_strip_copy_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[2213417] = clik.newPhoto({"id":2213417,"src":"languedoc_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[2743938] = clik.newPhoto({"id":2743938,"src":"china_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[3143534] = clik.newPhoto({"id":3143534,"src":"_JMC6273-web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[3153918] = clik.newPhoto({"id":3153918,"src":"Iceland_Strip_copy_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[3333288] = clik.newPhoto({"id":3333288,"src":"PAYPAL_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":42});
															thumbnails[3851226] = clik.newPhoto({"id":3851226,"src":"_JMC9932-news_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[4311633] = clik.newPhoto({"id":4311633,"src":"snowdonia_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[4397882] = clik.newPhoto({"id":4397882,"src":"untitled_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[4609686] = clik.newPhoto({"id":4609686,"src":"_JMC2982-web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":57});
															thumbnails[4745230] = clik.newPhoto({"id":4745230,"src":"gironde-strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[5130342] = clik.newPhoto({"id":5130342,"src":"CAMARGUE_CUBE_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[5130345] = clik.newPhoto({"id":5130345,"src":"camargue_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[5388292] = clik.newPhoto({"id":5388292,"src":"white_banner_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":51});
															thumbnails[5461436] = clik.newPhoto({"id":5461436,"src":"CLIKPIC_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":22});
															thumbnails[5462617] = clik.newPhoto({"id":5462617,"src":"JMC2570-web_thumb_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[6347372] = clik.newPhoto({"id":6347372,"src":"zansibar_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[6564820] = clik.newPhoto({"id":6564820,"src":"Jurassic_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":22});
															thumbnails[7097698] = clik.newPhoto({"id":7097698,"src":"DATES__PRICES_WEB1_1.png","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":126});
															thumbnails[7313771] = clik.newPhoto({"id":7313771,"src":"sunflowers-strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[7628380] = clik.newPhoto({"id":7628380,"src":"KathyWhite_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":96,"caption":"","height":130});
															thumbnails[7628381] = clik.newPhoto({"id":7628381,"src":"_KJW6547_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":104});
															thumbnails[7631536] = clik.newPhoto({"id":7631536,"src":"Zeiss-Logo_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":70,"caption":"","height":70});
															thumbnails[7631728] = clik.newPhoto({"id":7631728,"src":"white_banner_plain_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":118});
															thumbnails[8289370] = clik.newPhoto({"id":8289370,"src":"Greenland_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":13});
															thumbnails[8375722] = clik.newPhoto({"id":8375722,"src":"briancooneyfilm428-Edit_thumb.jpeg","galleries_id":"","server_id":1,"link":"#","width":96,"caption":"","height":130});
															thumbnails[8376381] = clik.newPhoto({"id":8376381,"src":"Solent_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":22});
															thumbnails[8494461] = clik.newPhoto({"id":8494461,"src":"WestIreland_strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":22});
															thumbnails[8571768] = clik.newPhoto({"id":8571768,"src":"DATES__PRICES_WEB1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":128});
															thumbnails[9034229] = clik.newPhoto({"id":9034229,"src":"North-Ireland-strip_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":22});
															thumbnails[1845226] = clik.newPhoto({"id":1845226,"src":"WEB_HOME_GRID_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":120});
															thumbnails[6283364] = clik.newPhoto({"id":6283364,"src":"5_day_BW_BTZ_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"JANUARY 24th-28th<br>B&W 5 day workshop<br>BIARRITZ","height":130});
															thumbnails[6283370] = clik.newPhoto({"id":6283370,"src":"3_day_BW_BTZ_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"FEBRUARY 1st-3rd<br>3 DAY B&W WORKSHOP<BR>BIARRITZ","height":130});
															thumbnails[6283381] = clik.newPhoto({"id":6283381,"src":"5_day_BTZ_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"FEBRUARY 14th-18th<br>5 DAY COURSE<br>BIARRITZ ","height":130});
															thumbnails[6285360] = clik.newPhoto({"id":6285360,"src":"3_day_BW_BTZ1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"FEBRUARY 22nd-24th<br>3 DAY B&W WORKSHOP<BR>BIARRITZ","height":130});
															thumbnails[6285456] = clik.newPhoto({"id":6285456,"src":"stilt_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"FEBRUARY 25th-28th<br>STILT FISHING HUTS of the GIRONDE","height":130});
															thumbnails[6285471] = clik.newPhoto({"id":6285471,"src":"3_day_BW_BTZ12_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"MARCH 1st-3rd<BR>3 DAY B&W WORKSHOP<br>BIARRITZ ","height":130});
															thumbnails[6285551] = clik.newPhoto({"id":6285551,"src":"venice_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"MARCH 17th-21st<br>VENICE PHOTO TOUR","height":130});
															thumbnails[6286044] = clik.newPhoto({"id":6286044,"src":"clikpic_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"APRIL 4th-7th<br><br>\r\nBUILD YOUR OWN WEBSITE, BIARRITZ","height":130});
															thumbnails[6286723] = clik.newPhoto({"id":6286723,"src":"3_Day_BTZ_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"APRIL 18th-21st<br>3 DAY COURSE<br>BIARRITZ","height":130});
															thumbnails[6286728] = clik.newPhoto({"id":6286728,"src":"5_day_BTZ1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"MAY 2nd-6th<br>5 DAY COURSE<BR>BIARRITZ","height":130});
															thumbnails[6286993] = clik.newPhoto({"id":6286993,"src":"5_day_BTZ_thumb3_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"MAY 9th-13TH<BR>5 DAY COURSE<BR>BIARRITZ","height":130});
															thumbnails[6287142] = clik.newPhoto({"id":6287142,"src":"3_Day_BTZ1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"MAY 17th-19th<BR>3 DAY COURSE<BR>BIARRITZ","height":130});
															thumbnails[1922762] = clik.newPhoto({"id":1922762,"src":"_DSC5820-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1922762.html","width":130,"caption":"","height":130});
															thumbnails[928121] = clik.newPhoto({"id":928121,"src":"_DSC5182-thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_928121.html","width":130,"caption":"","height":130});
															thumbnails[1118010] = clik.newPhoto({"id":1118010,"src":"_JMC5546-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1118010.html","width":130,"caption":"","height":130});
															thumbnails[993088] = clik.newPhoto({"id":993088,"src":"_DSC4537-thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_993088.html","width":130,"caption":"","height":130});
															thumbnails[1530196] = clik.newPhoto({"id":1530196,"src":"_JC17933-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1530196.html","width":130,"caption":"","height":130});
															thumbnails[928073] = clik.newPhoto({"id":928073,"src":"JC_fisherman _in_boat_vieux_boucau_lake_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_928073.html","width":130,"caption":"","height":130});
															thumbnails[928094] = clik.newPhoto({"id":928094,"src":"_DSC6641-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_928094.html","width":130,"caption":"","height":130});
															thumbnails[1705761] = clik.newPhoto({"id":1705761,"src":"_JMC4873-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1705761.html","width":130,"caption":"","height":130});
															thumbnails[928084] = clik.newPhoto({"id":928084,"src":"DSC_5663-web_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_928084.html","width":130,"caption":"","height":130});
															thumbnails[1705768] = clik.newPhoto({"id":1705768,"src":"_JMC5625-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1705768.html","width":130,"caption":"","height":130});
															thumbnails[928090] = clik.newPhoto({"id":928090,"src":"_JMC9077-web_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_928090.html","width":130,"caption":"","height":130});
															thumbnails[993083] = clik.newPhoto({"id":993083,"src":"_DSC6860-web_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_993083.html","width":130,"caption":"","height":130});
															thumbnails[1144879] = clik.newPhoto({"id":1144879,"src":"_JMC6645-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1144879.html","width":130,"caption":"","height":130});
															thumbnails[1922768] = clik.newPhoto({"id":1922768,"src":"_JC17062-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1922768.html","width":130,"caption":"","height":130});
															thumbnails[928067] = clik.newPhoto({"id":928067,"src":"_DSC9440-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_928067.html","width":130,"caption":"","height":130});
															thumbnails[950054] = clik.newPhoto({"id":950054,"src":"_DSC3262-thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_950054.html","width":130,"caption":"","height":130});
															thumbnails[1144869] = clik.newPhoto({"id":1144869,"src":"DSC_0054-thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1144869.html","width":130,"caption":"","height":130});
															thumbnails[950052] = clik.newPhoto({"id":950052,"src":"_DSC3317-thumb.gif","galleries_id":30044,"server_id":1,"link":"photo_950052.html","width":130,"caption":"","height":130});
															thumbnails[1530202] = clik.newPhoto({"id":1530202,"src":"_DSC9375-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1530202.html","width":130,"caption":"","height":130});
															thumbnails[1922765] = clik.newPhoto({"id":1922765,"src":"_JMC5550-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1922765.html","width":130,"caption":"","height":130});
															thumbnails[1052259] = clik.newPhoto({"id":1052259,"src":"DCS_5633-web copy.jpg","galleries_id":104913,"server_id":1,"link":"photo_1052259.html","width":130,"caption":"","height":130});
															thumbnails[1070271] = clik.newPhoto({"id":1070271,"src":"_DSC5658-web_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_1070271.html","width":130,"caption":"","height":130});
															thumbnails[928118] = clik.newPhoto({"id":928118,"src":"_DSC6656-col-web_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_928118.html","width":130,"caption":"","height":130});
															thumbnails[1052237] = clik.newPhoto({"id":1052237,"src":"_JMC5216-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1052237.html","width":130,"caption":"","height":130});
															thumbnails[1052251] = clik.newPhoto({"id":1052251,"src":"_DSC4874-web_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_1052251.html","width":130,"caption":"","height":130});
															thumbnails[1070243] = clik.newPhoto({"id":1070243,"src":"_DSC0011-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1070243.html","width":130,"caption":"","height":130});
															thumbnails[928115] = clik.newPhoto({"id":928115,"src":"wave_4003_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_928115.html","width":130,"caption":"","height":130});
															thumbnails[1070210] = clik.newPhoto({"id":1070210,"src":"_JMC5449-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1070210.html","width":130,"caption":"","height":130});
															thumbnails[928119] = clik.newPhoto({"id":928119,"src":"_DSC3275-thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_928119.html","width":130,"caption":"","height":130});
															thumbnails[1118007] = clik.newPhoto({"id":1118007,"src":"_JC12405-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1118007.html","width":130,"caption":"","height":130});
															thumbnails[928113] = clik.newPhoto({"id":928113,"src":"JMC2570-web_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_928113.html","width":130,"caption":"","height":130});
															thumbnails[1530212] = clik.newPhoto({"id":1530212,"src":"_JMC5776-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1530212.html","width":130,"caption":"","height":130});
															thumbnails[928114] = clik.newPhoto({"id":928114,"src":"chritchley_sand_dune_and_dunegrass_web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_928114.html","width":130,"caption":"","height":130});
															thumbnails[928116] = clik.newPhoto({"id":928116,"src":"chritch_lake_vieux_boucau_pan_t.jpg","galleries_id":30044,"server_id":1,"link":"photo_928116.html","width":130,"caption":"","height":130});
															thumbnails[950063] = clik.newPhoto({"id":950063,"src":"_DSC3242-thumb.gif","galleries_id":30044,"server_id":1,"link":"photo_950063.html","width":130,"caption":"","height":130});
															thumbnails[993085] = clik.newPhoto({"id":993085,"src":"_DSC1436-thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_993085.html","width":130,"caption":"","height":130});
															thumbnails[1052254] = clik.newPhoto({"id":1052254,"src":"Forest_mist_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_1052254.html","width":130,"caption":"","height":130});
															thumbnails[1070237] = clik.newPhoto({"id":1070237,"src":"_DSC1457-thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_1070237.html","width":130,"caption":"","height":130});
															thumbnails[993044] = clik.newPhoto({"id":993044,"src":"_DSC0339-thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_993044.html","width":130,"caption":"","height":130});
															thumbnails[1709840] = clik.newPhoto({"id":1709840,"src":"_DSC5191-web_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_1709840.html","width":130,"caption":"","height":130});
															thumbnails[1144882] = clik.newPhoto({"id":1144882,"src":"_DSC2862-Edit-web_thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_1144882.html","width":130,"caption":"","height":130});
															thumbnails[1118008] = clik.newPhoto({"id":1118008,"src":"_DSC3106-thumb.gif","galleries_id":30044,"server_id":1,"link":"photo_1118008.html","width":130,"caption":"","height":130});
															thumbnails[993081] = clik.newPhoto({"id":993081,"src":"_DSC3519-thumb.jpg","galleries_id":30044,"server_id":1,"link":"photo_993081.html","width":130,"caption":"","height":130});
															thumbnails[1144871] = clik.newPhoto({"id":1144871,"src":"_JMC8766-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1144871.html","width":130,"caption":"","height":130});
															thumbnails[1705762] = clik.newPhoto({"id":1705762,"src":"DSC9922-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1705762.html","width":130,"caption":"","height":130});
															thumbnails[1705765] = clik.newPhoto({"id":1705765,"src":"_DSC9619-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1705765.html","width":130,"caption":"","height":130});
															thumbnails[1922764] = clik.newPhoto({"id":1922764,"src":"_DSC6838-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1922764.html","width":130,"caption":"","height":130});
															thumbnails[1922767] = clik.newPhoto({"id":1922767,"src":"_DSC0022-web_thumb.jpg","galleries_id":104913,"server_id":1,"link":"photo_1922767.html","width":130,"caption":"","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[30044] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"COLOUR","link":"section100940_30044.html","maxRecords":0.0,"photoIDs":[928121.0,993088.0,928073.0,928084.0,928090.0,993083.0,950054.0,950052.0,1070271.0,928118.0,1052251.0,928115.0,928119.0,928113.0,928116.0,950063.0,993085.0,1052254.0,1070237.0,993044.0,1709840.0,1144882.0,1118008.0,993081.0],"skipIndex":0,"section_code":"section100940","featured_images":928113.0,"id":30044,"singleSection":false});				  						galleries[104913] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"BLACK & WHITE","link":"section100940_104913.html","maxRecords":0.0,"photoIDs":[1922762.0,1118010.0,1530196.0,928094.0,1705761.0,1705768.0,1144879.0,1922768.0,928067.0,1144869.0,1530202.0,1922765.0,1052259.0,1052237.0,1070243.0,1070210.0,1118007.0,1530212.0,928114.0,1144871.0,1705762.0,1705765.0,1922764.0,1922767.0],"skipIndex":0,"section_code":"section100940","featured_images":1922762.0,"id":104913,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '1845226';
imageSets[2] = '1922762,928113';
imageSets[3] = '9034229,8571768,8494461,8376381,8375722,8289370,7631728,7631536,7628381,7628380,7313771,7097698,6564820,6347372,6287142,6286993,6286728,6286723,6286044,6285551,6285471,6285456,6285360,6283381,6283370,6283364,5462617,5461436,5388292,5130345,5130342,4745230,4609686,4397882,4311633,3851226,3333288,3153918,3143534,2743938,2213417,2212827,1922768,1922767,1922765,1922764,1922762,1845226,1745056,1709840';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/surface/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/surface/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/surface/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/surface/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/surface/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/surface/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/surface/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/surface/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 += 'section416456.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 && 'section416456' != '') {
					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 = 'PHOTOGRAPHY HOLIDAYS tours & courses in France    : ' + 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> &euro;' + (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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="jonchritchley@wanadoo.fr">';
					temp += '<input type="hidden" name="currency_code" value="EUR">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="jonchritchley@wanadoo.fr">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

