window.thumbnails = {};
															thumbnails[4351347] = clik.newPhoto({"id":4351347,"src":"IMG_3244web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":76});
															thumbnails[4395133] = clik.newPhoto({"id":4395133,"src":"P10801541web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":121});
															thumbnails[4395134] = clik.newPhoto({"id":4395134,"src":"P10801551web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":78});
															thumbnails[7285024] = clik.newPhoto({"id":7285024,"src":"2011-Beautiful-Calendar1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":162});
															thumbnails[7965393] = clik.newPhoto({"id":7965393,"src":"testhomepage_thumb.gif","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":184});
															thumbnails[8446358] = clik.newPhoto({"id":8446358,"src":"harlow_ad_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":188});
															thumbnails[4398345] = clik.newPhoto({"id":4398345,"src":"1_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_4398345.html","width":130,"caption":"","height":98});
															thumbnails[4398348] = clik.newPhoto({"id":4398348,"src":"26_06_2004_09_58_0001_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_4398348.html","width":130,"caption":"","height":98});
															thumbnails[4398351] = clik.newPhoto({"id":4398351,"src":"303640_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_4398351.html","width":130,"caption":"","height":98});
															thumbnails[4398358] = clik.newPhoto({"id":4398358,"src":"DSCN1892_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_4398358.html","width":130,"caption":"","height":98});
															thumbnails[4416045] = clik.newPhoto({"id":4416045,"src":"mickweb2_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_4416045.html","width":130,"caption":"","height":98});
															thumbnails[4596877] = clik.newPhoto({"id":4596877,"src":"DSC00413web_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_4596877.html","width":130,"caption":"","height":98});
															thumbnails[4596930] = clik.newPhoto({"id":4596930,"src":"Dsc01224web_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_4596930.html","width":130,"caption":"","height":98});
															thumbnails[4596932] = clik.newPhoto({"id":4596932,"src":"P1070425web_thumb.jpg","galleries_id":270064,"server_id":15,"link":"photo_4596932.html","width":130,"caption":"","height":98});
															thumbnails[4596940] = clik.newPhoto({"id":4596940,"src":"DSC01323web_thumb.jpg","galleries_id":270064,"server_id":15,"link":"photo_4596940.html","width":130,"caption":"","height":98});
															thumbnails[4597847] = clik.newPhoto({"id":4597847,"src":"DSC01386web_thumb.jpg","galleries_id":270064,"server_id":15,"link":"photo_4597847.html","width":130,"caption":"","height":98});
															thumbnails[4597856] = clik.newPhoto({"id":4597856,"src":"web_thumb.jpg","galleries_id":270064,"server_id":15,"link":"photo_4597856.html","width":130,"caption":"","height":98});
															thumbnails[4597857] = clik.newPhoto({"id":4597857,"src":"DSC00986web_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_4597857.html","width":130,"caption":"","height":98});
															thumbnails[4597870] = clik.newPhoto({"id":4597870,"src":"Picture_055web_thumb.jpg","galleries_id":270064,"server_id":15,"link":"photo_4597870.html","width":130,"caption":"","height":98});
															thumbnails[4597905] = clik.newPhoto({"id":4597905,"src":"DSC01381web_thumb.jpg","galleries_id":270064,"server_id":15,"link":"photo_4597905.html","width":130,"caption":"","height":98});
															thumbnails[4597906] = clik.newPhoto({"id":4597906,"src":"Picture_051web_thumb.jpg","galleries_id":270064,"server_id":15,"link":"photo_4597906.html","width":130,"caption":"","height":98});
															thumbnails[4597910] = clik.newPhoto({"id":4597910,"src":"web2_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_4597910.html","width":130,"caption":"","height":98});
															thumbnails[6727200] = clik.newPhoto({"id":6727200,"src":"P1080612web_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_6727200.html","width":130,"caption":"","height":173});
															thumbnails[6990240] = clik.newPhoto({"id":6990240,"src":"P1080901web_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_6990240.html","width":130,"caption":"","height":145});
															thumbnails[7328383] = clik.newPhoto({"id":7328383,"src":"P1090130web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328383.html","width":130,"caption":"","height":98});
															thumbnails[7328393] = clik.newPhoto({"id":7328393,"src":"P1090132web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328393.html","width":130,"caption":"","height":98});
															thumbnails[7328397] = clik.newPhoto({"id":7328397,"src":"P1090135web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328397.html","width":130,"caption":"","height":98});
															thumbnails[7328398] = clik.newPhoto({"id":7328398,"src":"P1090136web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328398.html","width":130,"caption":"","height":98});
															thumbnails[7328400] = clik.newPhoto({"id":7328400,"src":"P1090140web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328400.html","width":130,"caption":"","height":117});
															thumbnails[7328401] = clik.newPhoto({"id":7328401,"src":"P1090141web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328401.html","width":130,"caption":"","height":98});
															thumbnails[7328403] = clik.newPhoto({"id":7328403,"src":"P1090142web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328403.html","width":130,"caption":"","height":98});
															thumbnails[7328405] = clik.newPhoto({"id":7328405,"src":"P1090143web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328405.html","width":130,"caption":"","height":98});
															thumbnails[7328407] = clik.newPhoto({"id":7328407,"src":"P1090144web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328407.html","width":130,"caption":"","height":98});
															thumbnails[7328408] = clik.newPhoto({"id":7328408,"src":"P1090164web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328408.html","width":130,"caption":"","height":98});
															thumbnails[7328409] = clik.newPhoto({"id":7328409,"src":"P1090165web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328409.html","width":130,"caption":"","height":98});
															thumbnails[7328410] = clik.newPhoto({"id":7328410,"src":"P1090168web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328410.html","width":130,"caption":"","height":98});
															thumbnails[7328411] = clik.newPhoto({"id":7328411,"src":"P1090174web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328411.html","width":130,"caption":"","height":98});
															thumbnails[7328412] = clik.newPhoto({"id":7328412,"src":"P1090189web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328412.html","width":130,"caption":"","height":98});
															thumbnails[7328415] = clik.newPhoto({"id":7328415,"src":"P1090191web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328415.html","width":130,"caption":"","height":98});
															thumbnails[7328416] = clik.newPhoto({"id":7328416,"src":"P1090193web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328416.html","width":130,"caption":"","height":98});
															thumbnails[7328419] = clik.newPhoto({"id":7328419,"src":"P1090194web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328419.html","width":130,"caption":"","height":98});
															thumbnails[7328421] = clik.newPhoto({"id":7328421,"src":"P1090196web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328421.html","width":130,"caption":"","height":98});
															thumbnails[7328425] = clik.newPhoto({"id":7328425,"src":"P1090199web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328425.html","width":130,"caption":"","height":98});
															thumbnails[7328428] = clik.newPhoto({"id":7328428,"src":"P1090200web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328428.html","width":130,"caption":"","height":98});
															thumbnails[7328442] = clik.newPhoto({"id":7328442,"src":"P1090201web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328442.html","width":130,"caption":"","height":98});
															thumbnails[7328471] = clik.newPhoto({"id":7328471,"src":"P1090202web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328471.html","width":130,"caption":"","height":98});
															thumbnails[7328473] = clik.newPhoto({"id":7328473,"src":"P1090203web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328473.html","width":130,"caption":"","height":98});
															thumbnails[7328475] = clik.newPhoto({"id":7328475,"src":"P1090207web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328475.html","width":130,"caption":"","height":98});
															thumbnails[7328476] = clik.newPhoto({"id":7328476,"src":"P1090208web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328476.html","width":130,"caption":"","height":98});
															thumbnails[7328478] = clik.newPhoto({"id":7328478,"src":"P1090210web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328478.html","width":130,"caption":"","height":98});
															thumbnails[7328483] = clik.newPhoto({"id":7328483,"src":"P1090212web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328483.html","width":130,"caption":"","height":98});
															thumbnails[7328485] = clik.newPhoto({"id":7328485,"src":"P1090215web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328485.html","width":130,"caption":"","height":98});
															thumbnails[7328486] = clik.newPhoto({"id":7328486,"src":"P1090216web_thumb.jpg","galleries_id":396525,"server_id":15,"link":"photo_7328486.html","width":130,"caption":"","height":98});
															thumbnails[7331151] = clik.newPhoto({"id":7331151,"src":"PICT0090_editedweb_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7331151.html","width":130,"caption":"","height":98});
															thumbnails[7331152] = clik.newPhoto({"id":7331152,"src":"a_passes_gradingweb_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7331152.html","width":130,"caption":"","height":98});
															thumbnails[7331153] = clik.newPhoto({"id":7331153,"src":"deana_young_student_of_the_year_2010web_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7331153.html","width":130,"caption":"","height":98});
															thumbnails[7331154] = clik.newPhoto({"id":7331154,"src":"julie_n_mickweb_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7331154.html","width":130,"caption":"","height":98});
															thumbnails[7331237] = clik.newPhoto({"id":7331237,"src":"29151_1396191579680_1078932164_1138899_7888564_n_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7331237.html","width":130,"caption":"","height":98});
															thumbnails[7331239] = clik.newPhoto({"id":7331239,"src":"29151_1396192379700_1078932164_1138912_3517233_n_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7331239.html","width":130,"caption":"","height":98});
															thumbnails[7331240] = clik.newPhoto({"id":7331240,"src":"29151_1396192499703_1078932164_1138914_7059976_n_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7331240.html","width":130,"caption":"","height":98});
															thumbnails[7331319] = clik.newPhoto({"id":7331319,"src":"untitled_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7331319.html","width":130,"caption":"","height":143});
															thumbnails[7331359] = clik.newPhoto({"id":7331359,"src":"scamptest_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7331359.html","width":130,"caption":"","height":126});
															thumbnails[7377979] = clik.newPhoto({"id":7377979,"src":"P1090239web_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7377979.html","width":130,"caption":"","height":173});
															thumbnails[7590114] = clik.newPhoto({"id":7590114,"src":"P1090292web_thumb.jpg","galleries_id":257915,"server_id":15,"link":"photo_7590114.html","width":130,"caption":"","height":98});
															thumbnails[7601532] = clik.newPhoto({"id":7601532,"src":"IMG_6886web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601532.html","width":130,"caption":"","height":87});
															thumbnails[7601533] = clik.newPhoto({"id":7601533,"src":"IMG_6896web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601533.html","width":130,"caption":"","height":87});
															thumbnails[7601547] = clik.newPhoto({"id":7601547,"src":"IMG_6901web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601547.html","width":130,"caption":"","height":87});
															thumbnails[7601551] = clik.newPhoto({"id":7601551,"src":"IMG_6915web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601551.html","width":130,"caption":"","height":87});
															thumbnails[7601555] = clik.newPhoto({"id":7601555,"src":"IMG_6944web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601555.html","width":130,"caption":"","height":87});
															thumbnails[7601559] = clik.newPhoto({"id":7601559,"src":"IMG_6991web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601559.html","width":130,"caption":"","height":87});
															thumbnails[7601563] = clik.newPhoto({"id":7601563,"src":"mick_teachingweb_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601563.html","width":130,"caption":"","height":90});
															thumbnails[7601567] = clik.newPhoto({"id":7601567,"src":"Taekwondo_group_1web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601567.html","width":130,"caption":"","height":74});
															thumbnails[7601570] = clik.newPhoto({"id":7601570,"src":"Taekwondo_group_2web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601570.html","width":130,"caption":"","height":85});
															thumbnails[7601571] = clik.newPhoto({"id":7601571,"src":"Taekwondo_Jasonweb_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601571.html","width":130,"caption":"","height":195});
															thumbnails[7601572] = clik.newPhoto({"id":7601572,"src":"tagb_1web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601572.html","width":130,"caption":"","height":242});
															thumbnails[7601574] = clik.newPhoto({"id":7601574,"src":"tagb_2web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601574.html","width":130,"caption":"","height":200});
															thumbnails[7601577] = clik.newPhoto({"id":7601577,"src":"tagb_3web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601577.html","width":130,"caption":"","height":211});
															thumbnails[7601579] = clik.newPhoto({"id":7601579,"src":"tagb_4web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601579.html","width":130,"caption":"","height":195});
															thumbnails[7601581] = clik.newPhoto({"id":7601581,"src":"tagb_boys_doing_patternsweb_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601581.html","width":130,"caption":"","height":166});
															thumbnails[7601584] = clik.newPhoto({"id":7601584,"src":"tagb_girl_2web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601584.html","width":130,"caption":"","height":186});
															thumbnails[7601587] = clik.newPhoto({"id":7601587,"src":"tagb_girl_3web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601587.html","width":130,"caption":"","height":124});
															thumbnails[7601589] = clik.newPhoto({"id":7601589,"src":"tagb_harry_1web_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601589.html","width":130,"caption":"","height":211});
															thumbnails[7601597] = clik.newPhoto({"id":7601597,"src":"tagb_trioweb_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601597.html","width":130,"caption":"","height":87});
															thumbnails[7601607] = clik.newPhoto({"id":7601607,"src":"Taekwondo_Colin_teachingweb_thumb.jpg","galleries_id":412305,"server_id":15,"link":"photo_7601607.html","width":130,"caption":"","height":80});
															thumbnails[8039629] = clik.newPhoto({"id":8039629,"src":"IMG_3847web_b_thumb.jpg","galleries_id":431425,"server_id":15,"link":"photo_8039629.html","width":130,"caption":"","height":87});
															thumbnails[8039631] = clik.newPhoto({"id":8039631,"src":"IMG_3850web_b_thumb.jpg","galleries_id":431425,"server_id":15,"link":"photo_8039631.html","width":130,"caption":"","height":121});
															thumbnails[8039635] = clik.newPhoto({"id":8039635,"src":"IMG_3853web_b_thumb.jpg","galleries_id":431425,"server_id":15,"link":"photo_8039635.html","width":130,"caption":"","height":87});
															thumbnails[8039636] = clik.newPhoto({"id":8039636,"src":"IMG_3859web_b_thumb.jpg","galleries_id":431425,"server_id":15,"link":"photo_8039636.html","width":130,"caption":"","height":107});
															thumbnails[8039637] = clik.newPhoto({"id":8039637,"src":"IMG_3860web_b_thumb.jpg","galleries_id":431425,"server_id":15,"link":"photo_8039637.html","width":130,"caption":"","height":124});
															thumbnails[8039640] = clik.newPhoto({"id":8039640,"src":"IMG_3864web_b_thumb.jpg","galleries_id":431425,"server_id":15,"link":"photo_8039640.html","width":130,"caption":"","height":120});
															thumbnails[8039642] = clik.newPhoto({"id":8039642,"src":"IMG_3899web_b_thumb.jpg","galleries_id":431425,"server_id":15,"link":"photo_8039642.html","width":130,"caption":"","height":87});
															thumbnails[8039644] = clik.newPhoto({"id":8039644,"src":"IMG_3894web_b_thumb.jpg","galleries_id":431425,"server_id":15,"link":"photo_8039644.html","width":130,"caption":"","height":149});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[431425] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Midlands 2011","link":"gallery_431425.html","maxRecords":0.0,"photoIDs":[8039629.0,8039631.0,8039635.0,8039636.0,8039637.0,8039640.0,8039642.0,8039644.0],"skipIndex":0,"section_code":"gallery","featured_images":"8039644,8039642,8039640,8039637,8039636,8039635,8039631,8039629","id":431425,"singleSection":false});				  						galleries[257915] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Old and new","link":"gallery_257915.html","maxRecords":0.0,"photoIDs":[4398345.0,4398348.0,4398351.0,4398358.0,4416045.0,4596877.0,4596930.0,4597857.0,4597910.0,6727200.0,6990240.0,7331151.0,7331152.0,7331153.0,7331154.0,7331237.0,7331239.0,7331240.0,7331319.0,7331359.0,7377979.0,7590114.0],"skipIndex":0,"section_code":"gallery","featured_images":"7590114,7377979,7331359,7331319,7331240,7331239,7331237,7331154,7331153,7331152","id":257915,"singleSection":false});				  						galleries[270064] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Social","link":"gallery_270064.html","maxRecords":0.0,"photoIDs":[4596932.0,4596940.0,4597847.0,4597856.0,4597870.0,4597905.0,4597906.0],"skipIndex":0,"section_code":"gallery","featured_images":"4597906,4597905,4597870,4597856,4597847,4596940,4596932","id":270064,"singleSection":false});				  						galleries[412305] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Training Pics","link":"gallery_412305.html","maxRecords":0.0,"photoIDs":[7601532.0,7601533.0,7601547.0,7601551.0,7601555.0,7601559.0,7601563.0,7601567.0,7601570.0,7601571.0,7601572.0,7601574.0,7601577.0,7601579.0,7601581.0,7601584.0,7601587.0,7601589.0,7601597.0,7601607.0],"skipIndex":0,"section_code":"gallery","featured_images":"7601607,7601597,7601589,7601587,7601584,7601581,7601579,7601577,7601574,7601572","id":412305,"singleSection":false});				  						galleries[396525] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Xmas Party 2010","link":"gallery_396525.html","maxRecords":0.0,"photoIDs":[7328383.0,7328393.0,7328397.0,7328398.0,7328400.0,7328401.0,7328403.0,7328405.0,7328407.0,7328408.0,7328409.0,7328410.0,7328411.0,7328412.0,7328415.0,7328416.0,7328419.0,7328421.0,7328425.0,7328428.0,7328442.0,7328471.0,7328473.0,7328475.0,7328476.0,7328478.0,7328483.0,7328485.0,7328486.0],"skipIndex":0,"section_code":"gallery","featured_images":"7328486,7328485,7328483,7328478,7328476,7328475,7328473,7328471,7328442,7328428","id":396525,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8446358';
imageSets[3] = '4597906,4597905,4597870,4597856,4597847,4596940,4596932';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/blackbelt3/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/blackbelt3/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 = 'Harlow Taekwondo: ' + 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;
	}
}

			

