window.thumbnails = {};
															thumbnails[7337901] = clik.newPhoto({"id":7337901,"src":"05_North_CAD_1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Model 1","height":78});
															thumbnails[7337902] = clik.newPhoto({"id":7337902,"src":"GDP_Sectional_Model_01_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Model 2","height":129});
															thumbnails[7337903] = clik.newPhoto({"id":7337903,"src":"Image_1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Model 3","height":45});
															thumbnails[7337905] = clik.newPhoto({"id":7337905,"src":"Image_4_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Model 4","height":98});
															thumbnails[7337907] = clik.newPhoto({"id":7337907,"src":"IMG_0995_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":173});
															thumbnails[7337909] = clik.newPhoto({"id":7337909,"src":"IMG_1019_2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":173});
															thumbnails[7337911] = clik.newPhoto({"id":7337911,"src":"kensal_rise_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":108});
															thumbnails[7337912] = clik.newPhoto({"id":7337912,"src":"model_2_2_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":83});
															thumbnails[7337913] = clik.newPhoto({"id":7337913,"src":"model_4_-_original_model_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":193});
															thumbnails[7337914] = clik.newPhoto({"id":7337914,"src":"model_image_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":97});
															thumbnails[7337915] = clik.newPhoto({"id":7337915,"src":"Night02_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":74});
															thumbnails[7337917] = clik.newPhoto({"id":7337917,"src":"shade_mod_2_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7337919] = clik.newPhoto({"id":7337919,"src":"shade_mod_3_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[7337920] = clik.newPhoto({"id":7337920,"src":"silver_01_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":68});
															thumbnails[7337921] = clik.newPhoto({"id":7337921,"src":"silver_02_2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":97});
															thumbnails[7337922] = clik.newPhoto({"id":7337922,"src":"silver_02_21_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":97});
															thumbnails[7337923] = clik.newPhoto({"id":7337923,"src":"site_plan_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":122});
															thumbnails[7337924] = clik.newPhoto({"id":7337924,"src":"sun_set_-_evening_terrace_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":173});
															thumbnails[7337927] = clik.newPhoto({"id":7337927,"src":"White_Render_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":80});
															thumbnails[7337937] = clik.newPhoto({"id":7337937,"src":"silver_03_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":174});
															thumbnails[7365482] = clik.newPhoto({"id":7365482,"src":"01_combined_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"before and after","height":63});
															thumbnails[7365219] = clik.newPhoto({"id":7365219,"src":"IMGP0022_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Rear of property","height":73});
															thumbnails[7313807] = clik.newPhoto({"id":7313807,"src":"CGP39306-aw-002_Dining_Room_thumb.jpg","galleries_id":394236,"server_id":1,"link":"photo_7313807.html","width":130,"caption":"Dining Room","height":87});
															thumbnails[7313859] = clik.newPhoto({"id":7313859,"src":"001_thumb.JPG","galleries_id":394238,"server_id":1,"link":"photo_7313859.html","width":130,"caption":"Exterior","height":195});
															thumbnails[7313957] = clik.newPhoto({"id":7313957,"src":"052_2_thumb.jpg","galleries_id":394237,"server_id":1,"link":"photo_7313957.html","width":130,"caption":"Hall","height":195});
															thumbnails[7313976] = clik.newPhoto({"id":7313976,"src":"003_thumb.JPG","galleries_id":394239,"server_id":1,"link":"photo_7313976.html","width":130,"caption":"Exterior","height":195});
															thumbnails[7314016] = clik.newPhoto({"id":7314016,"src":"026_thumb.JPG","galleries_id":394240,"server_id":1,"link":"photo_7314016.html","width":130,"caption":"Stairway","height":195});
															thumbnails[7314052] = clik.newPhoto({"id":7314052,"src":"017_thumb.jpg","galleries_id":394241,"server_id":1,"link":"photo_7314052.html","width":130,"caption":"","height":175});
															thumbnails[7314063] = clik.newPhoto({"id":7314063,"src":"12_basement_main_33_thumb.JPG","galleries_id":394245,"server_id":1,"link":"photo_7314063.html","width":130,"caption":"Living area","height":87});
															thumbnails[7314087] = clik.newPhoto({"id":7314087,"src":"3d_visual_1_thumb.jpg","galleries_id":394248,"server_id":1,"link":"photo_7314087.html","width":130,"caption":"3D image","height":86});
															thumbnails[7365538] = clik.newPhoto({"id":7365538,"src":"narbonne_exterior_thumb.jpg","galleries_id":394244,"server_id":1,"link":"photo_7365538.html","width":130,"caption":"Exterior","height":182});
															thumbnails[7313810] = clik.newPhoto({"id":7313810,"src":"CGP39306-aw-003_Bedroom_thumb.jpg","galleries_id":394236,"server_id":1,"link":"photo_7313810.html","width":130,"caption":"Bedroom","height":87});
															thumbnails[7313903] = clik.newPhoto({"id":7313903,"src":"027_thumb.JPG","galleries_id":394238,"server_id":1,"link":"photo_7313903.html","width":130,"caption":"Patio view","height":195});
															thumbnails[7313954] = clik.newPhoto({"id":7313954,"src":"038_2_thumb.jpg","galleries_id":394237,"server_id":1,"link":"photo_7313954.html","width":130,"caption":"Bedroom","height":87});
															thumbnails[7314026] = clik.newPhoto({"id":7314026,"src":"097_thumb.JPG","galleries_id":394240,"server_id":1,"link":"photo_7314026.html","width":130,"caption":"","height":195});
															thumbnails[7314050] = clik.newPhoto({"id":7314050,"src":"009_thumb.jpg","galleries_id":394241,"server_id":1,"link":"photo_7314050.html","width":130,"caption":"","height":87});
															thumbnails[7314076] = clik.newPhoto({"id":7314076,"src":"Prince_A_thumb.jpg","galleries_id":394247,"server_id":1,"link":"photo_7314076.html","width":130,"caption":"","height":109});
															thumbnails[7314088] = clik.newPhoto({"id":7314088,"src":"3d_visual_2_thumb.jpg","galleries_id":394248,"server_id":1,"link":"photo_7314088.html","width":130,"caption":"3D image","height":87});
															thumbnails[7313813] = clik.newPhoto({"id":7313813,"src":"CGP39306-aw-005_Bathroom_thumb.jpg","galleries_id":394236,"server_id":1,"link":"photo_7313813.html","width":130,"caption":"Bathroom","height":87});
															thumbnails[7313900] = clik.newPhoto({"id":7313900,"src":"011_thumb.JPG","galleries_id":394238,"server_id":1,"link":"photo_7313900.html","width":130,"caption":"Study","height":87});
															thumbnails[7314012] = clik.newPhoto({"id":7314012,"src":"022_thumb.JPG","galleries_id":394240,"server_id":1,"link":"photo_7314012.html","width":130,"caption":"Bedroom","height":87});
															thumbnails[7314064] = clik.newPhoto({"id":7314064,"src":"16_basement_kitchen_thumb.JPG","galleries_id":394245,"server_id":1,"link":"photo_7314064.html","width":130,"caption":"Kitchen","height":87});
															thumbnails[7314079] = clik.newPhoto({"id":7314079,"src":"IMG_0420_thumb.jpg","galleries_id":394247,"server_id":1,"link":"photo_7314079.html","width":130,"caption":"Work in progess","height":98});
															thumbnails[7314090] = clik.newPhoto({"id":7314090,"src":"front_sketch_thumb.jpg","galleries_id":394248,"server_id":1,"link":"photo_7314090.html","width":130,"caption":"Sketch of front","height":74});
															thumbnails[7314498] = clik.newPhoto({"id":7314498,"src":"034_2_thumb.jpg","galleries_id":394237,"server_id":1,"link":"photo_7314498.html","width":130,"caption":"Bedroom","height":87});
															thumbnails[7313817] = clik.newPhoto({"id":7313817,"src":"CGP39306-aw-009_Entrance_thumb.jpg","galleries_id":394236,"server_id":1,"link":"photo_7313817.html","width":130,"caption":"Entrance Hall","height":87});
															thumbnails[7313906] = clik.newPhoto({"id":7313906,"src":"058_thumb.JPG","galleries_id":394238,"server_id":1,"link":"photo_7313906.html","width":130,"caption":"Bedroom","height":87});
															thumbnails[7313966] = clik.newPhoto({"id":7313966,"src":"ep_5_thumb.jpg","galleries_id":394237,"server_id":1,"link":"photo_7313966.html","width":130,"caption":"Work in progress","height":98});
															thumbnails[7314021] = clik.newPhoto({"id":7314021,"src":"072_thumb.JPG","galleries_id":394240,"server_id":1,"link":"photo_7314021.html","width":130,"caption":"Dining area","height":87});
															thumbnails[7314049] = clik.newPhoto({"id":7314049,"src":"004_thumb.jpg","galleries_id":394241,"server_id":1,"link":"photo_7314049.html","width":130,"caption":"","height":88});
															thumbnails[7314066] = clik.newPhoto({"id":7314066,"src":"29_bathroom_22_thumb.JPG","galleries_id":394245,"server_id":1,"link":"photo_7314066.html","width":130,"caption":"Bathroom","height":174});
															thumbnails[7314081] = clik.newPhoto({"id":7314081,"src":"055_thumb.jpg","galleries_id":394247,"server_id":1,"link":"photo_7314081.html","width":130,"caption":"","height":87});
															thumbnails[7314092] = clik.newPhoto({"id":7314092,"src":"terrace_sketch_thumb.jpg","galleries_id":394248,"server_id":1,"link":"photo_7314092.html","width":130,"caption":"Sketch of Terrace","height":89});
															thumbnails[7313821] = clik.newPhoto({"id":7313821,"src":"CGP39306-aw-010_Reception_thumb.jpg","galleries_id":394236,"server_id":1,"link":"photo_7313821.html","width":130,"caption":"Reception","height":87});
															thumbnails[7314010] = clik.newPhoto({"id":7314010,"src":"007_thumb.JPG","galleries_id":394240,"server_id":1,"link":"photo_7314010.html","width":130,"caption":"Bathroom","height":87});
															thumbnails[7314018] = clik.newPhoto({"id":7314018,"src":"043_thumb.JPG","galleries_id":394240,"server_id":1,"link":"photo_7314018.html","width":130,"caption":"Bathroom 2","height":87});
															thumbnails[7314061] = clik.newPhoto({"id":7314061,"src":"00_existing_thumb.JPG","galleries_id":394245,"server_id":1,"link":"photo_7314061.html","width":130,"caption":"Exterior","height":174});
															thumbnails[7738008] = clik.newPhoto({"id":7738008,"src":"1371_thumb.jpg","galleries_id":394244,"server_id":1,"link":"photo_7738008.html","width":130,"caption":"Kitchen","height":87});
															thumbnails[7738004] = clik.newPhoto({"id":7738004,"src":"1271_thumb.jpg","galleries_id":394244,"server_id":1,"link":"photo_7738004.html","width":130,"caption":"Kitchen","height":87});
															thumbnails[7737968] = clik.newPhoto({"id":7737968,"src":"0591_thumb.jpg","galleries_id":394244,"server_id":1,"link":"photo_7737968.html","width":130,"caption":"Living Area","height":87});
															thumbnails[7737981] = clik.newPhoto({"id":7737981,"src":"0751_thumb.jpg","galleries_id":394244,"server_id":1,"link":"photo_7737981.html","width":130,"caption":"Bathroom 2","height":87});
															thumbnails[7737996] = clik.newPhoto({"id":7737996,"src":"1101_thumb.jpg","galleries_id":394244,"server_id":1,"link":"photo_7737996.html","width":130,"caption":"Sitting Room","height":114});
															thumbnails[7737973] = clik.newPhoto({"id":7737973,"src":"0661_thumb.jpg","galleries_id":394244,"server_id":1,"link":"photo_7737973.html","width":130,"caption":"Bathroom","height":87});
															thumbnails[7738012] = clik.newPhoto({"id":7738012,"src":"1441_thumb.jpg","galleries_id":394244,"server_id":1,"link":"photo_7738012.html","width":130,"caption":"New rear view","height":86});
															thumbnails[1208426] = clik.newPhoto({"id":1208426,"src":"tim_thumb.jpg","galleries_id":85623,"server_id":1,"link":"photo_1208426.html","width":130,"caption":"","height":173});
															thumbnails[7337359] = clik.newPhoto({"id":7337359,"src":"serena3_thumb.jpg","galleries_id":394209,"server_id":1,"link":"photo_7337359.html","width":130,"caption":"Serena Green","height":97});
															thumbnails[1191404] = clik.newPhoto({"id":1191404,"src":"IMG_0721_thumb.JPG","galleries_id":55935,"server_id":1,"link":"photo_1191404.html","width":130,"caption":"Matthew Dyer","height":173});
															thumbnails[7420746] = clik.newPhoto({"id":7420746,"src":"higher_mapstone_-_misha_final_aerial_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420746.html","width":130,"caption":"","height":165});
															thumbnails[7420756] = clik.newPhoto({"id":7420756,"src":"ext_mpsh_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420756.html","width":130,"caption":"","height":174});
															thumbnails[7420741] = clik.newPhoto({"id":7420741,"src":"Int_tennis_2_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420741.html","width":130,"caption":"","height":181});
															thumbnails[7420742] = clik.newPhoto({"id":7420742,"src":"Int_tennis_1_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420742.html","width":130,"caption":"","height":87});
															thumbnails[7420748] = clik.newPhoto({"id":7420748,"src":"high_4_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420748.html","width":130,"caption":"","height":71});
															thumbnails[7420750] = clik.newPhoto({"id":7420750,"src":"high_3_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420750.html","width":130,"caption":"","height":59});
															thumbnails[7420752] = clik.newPhoto({"id":7420752,"src":"high_1_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420752.html","width":130,"caption":"","height":70});
															thumbnails[7420754] = clik.newPhoto({"id":7420754,"src":"Ext_tennis_1_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420754.html","width":130,"caption":"","height":87});
															thumbnails[7420758] = clik.newPhoto({"id":7420758,"src":"05_thumb.JPG","galleries_id":55935,"server_id":1,"link":"photo_7420758.html","width":130,"caption":"","height":97});
															thumbnails[7420761] = clik.newPhoto({"id":7420761,"src":"04_thumb.JPG","galleries_id":55935,"server_id":1,"link":"photo_7420761.html","width":130,"caption":"","height":87});
															thumbnails[7420736] = clik.newPhoto({"id":7420736,"src":"view_1_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420736.html","width":130,"caption":"","height":102});
															thumbnails[7420738] = clik.newPhoto({"id":7420738,"src":"Int_tennis_3_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420738.html","width":130,"caption":"","height":194});
															thumbnails[7420743] = clik.newPhoto({"id":7420743,"src":"inishturk_model_thumb.jpg","galleries_id":55935,"server_id":1,"link":"photo_7420743.html","width":130,"caption":"","height":79});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[55935] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Matthew Dyer","link":"section81639_55935.html","maxRecords":0.0,"photoIDs":[1191404.0,7420746.0,7420756.0,7420741.0,7420742.0,7420748.0,7420750.0,7420752.0,7420754.0,7420758.0,7420761.0,7420736.0,7420738.0,7420743.0],"skipIndex":0,"section_code":"section81639","featured_images":1191404.0,"id":55935,"singleSection":false});				  						galleries[85623] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Timothy Crum","link":"section81639_85623.html","maxRecords":0.0,"photoIDs":[1208426.0],"skipIndex":0,"section_code":"section81639","featured_images":1208426.0,"id":85623,"singleSection":false});				  						galleries[394209] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Serena Green","link":"section81639_394209.html","maxRecords":0.0,"photoIDs":[7337359.0],"skipIndex":0,"section_code":"section81639","featured_images":7337359.0,"id":394209,"singleSection":false});				  						galleries[394244] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Northleach 1","link":"gallery_394244.html","maxRecords":0.0,"photoIDs":[7365538.0,7738008.0,7738004.0,7737968.0,7737981.0,7737996.0,7737973.0,7738012.0],"skipIndex":0,"section_code":"gallery","featured_images":7365538.0,"id":394244,"singleSection":false});				  						galleries[394237] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Belgravia 2","link":"gallery_394237.html","maxRecords":0.0,"photoIDs":[7313957.0,7313954.0,7314498.0,7313966.0],"skipIndex":0,"section_code":"gallery","featured_images":7313957.0,"id":394237,"singleSection":false});				  						galleries[394241] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mole Hill","link":"gallery_394241.html","maxRecords":0.0,"photoIDs":[7314052.0,7314050.0,7314049.0],"skipIndex":0,"section_code":"gallery","featured_images":7314052.0,"id":394241,"singleSection":false});				  						galleries[394245] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Notting Hill 1","link":"gallery_394245.html","maxRecords":0.0,"photoIDs":[7314063.0,7314064.0,7314066.0,7314061.0],"skipIndex":0,"section_code":"gallery","featured_images":7314061.0,"id":394245,"singleSection":false});				  						galleries[394239] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Down Hatherley","link":"gallery_394239.html","maxRecords":0.0,"photoIDs":[7313976.0],"skipIndex":0,"section_code":"gallery","featured_images":7313976.0,"id":394239,"singleSection":false});				  						galleries[394238] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Chelsea 1","link":"gallery_394238.html","maxRecords":0.0,"photoIDs":[7313859.0,7313903.0,7313900.0,7313906.0],"skipIndex":0,"section_code":"gallery","featured_images":7313859.0,"id":394238,"singleSection":false});				  						galleries[394240] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mayfair 1","link":"gallery_394240.html","maxRecords":0.0,"photoIDs":[7314016.0,7314026.0,7314012.0,7314021.0,7314010.0,7314018.0],"skipIndex":0,"section_code":"gallery","featured_images":7314021.0,"id":394240,"singleSection":false});				  						galleries[394236] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Belgravia 1","link":"gallery_394236.html","maxRecords":0.0,"photoIDs":[7313807.0,7313810.0,7313813.0,7313817.0,7313821.0],"skipIndex":0,"section_code":"gallery","featured_images":7313807.0,"id":394236,"singleSection":false});				  						galleries[394247] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sheffield 1","link":"gallery_394247.html","maxRecords":0.0,"photoIDs":[7314076.0,7314079.0,7314081.0],"skipIndex":0,"section_code":"gallery","featured_images":7314076.0,"id":394247,"singleSection":false});				  						galleries[394248] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sheffield 2","link":"gallery_394248.html","maxRecords":0.0,"photoIDs":[7314087.0,7314088.0,7314090.0,7314092.0],"skipIndex":0,"section_code":"gallery","featured_images":7314087.0,"id":394248,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[238919] = '7337937,7337927,7337924,7337923,7337922,7337921,7337920,7337919,7337917,7337915,7337914,7337913,7337912,7337911,7337909,7337907,7337905,7337903,7337902,7337901,7314092,7314090,7314052';
imageSets[1] = '7738008,7737981,7314087,7314016,7313957,7313813,7313807';
imageSets[2] = '7365538,7337359,7314087,7314076,7314061,7314052,7314021,7313976,7313957,7313859,7313807,1191404';
imageSets[3] = '7738012,7738008,7738004,7737996,7737981,7737973,7737968,7420761,7420758,7420756,7420754,7420752,7420750,7420748,7420746,7420743,7420742,7420741,7420738,7420736,7365538,7365482,7365219,7337937,7337927,7337924,7337923,7337922,7337921,7337920,7337919,7337917,7337915,7337914,7337913,7337912,7337911,7337909,7337907,7337905,7337903,7337902,7337901,7337359,7314498,7314092,7314090,7314088,7314087,7314081';
imageSets[238917] = '7337937,7337927,7337924,7337923,7337922,7337921,7337920,7337919,7337917,7337915,7337914,7337913,7337912,7337911,7337909,7337907,7337905,7337903,7337902,7337901,7314092,7314090,7314052';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mdyer/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mdyer/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mdyer/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mdyer/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/mdyer/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mdyer/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/mdyer/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 = 'mdarchitecture limited: ' + 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({					href: thumbnails[imageID].fnGalleryLink(gallery_id),					title: galleries[gallery_id].title				});
			}
		}
	}
}

/***************************************************************************
* 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;
	}
}

			

