window.thumbnails = {};
															thumbnails[8466158] = clik.newPhoto({"id":8466158,"src":"posts033_web-edited-1_thumb.jpg","galleries_id":447851,"server_id":18,"link":"photo_8466158.html","width":130,"caption":"The Elm Tree, Weymouth Dorset","height":128});
															thumbnails[8466232] = clik.newPhoto({"id":8466232,"src":"posts032_web-edited-1_thumb.jpg","galleries_id":447851,"server_id":18,"link":"photo_8466232.html","width":130,"caption":"","height":134});
															thumbnails[419081] = clik.newPhoto({"id":419081,"src":"Osmington Mills 2_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_419081.html","width":130,"caption":"View from Osmington Mills","height":59});
															thumbnails[419083] = clik.newPhoto({"id":419083,"src":"Osmington Mills 3_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_419083.html","width":130,"caption":"View from Osmington Mills, near to the view as painted by John Constable","height":54});
															thumbnails[419105] = clik.newPhoto({"id":419105,"src":"Weymouth Sunset_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_419105.html","width":130,"caption":"Sun set from Overcome corner Weymouth","height":59});
															thumbnails[419109] = clik.newPhoto({"id":419109,"src":"White Nothe_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_419109.html","width":130,"caption":"White Nothe near Weymouth<br>\r\n","height":80});
															thumbnails[419115] = clik.newPhoto({"id":419115,"src":"Abbotsbury 1_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_419115.html","width":130,"caption":"View of St Catherine's Chapel, Abbotsbury Dorset.","height":36});
															thumbnails[419119] = clik.newPhoto({"id":419119,"src":"Christmas Lights 2_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_419119.html","width":130,"caption":"","height":193});
															thumbnails[419125] = clik.newPhoto({"id":419125,"src":"Weymouth Avenue Dorchester_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_419125.html","width":130,"caption":"Weymouth Avenue Dorchester","height":98});
															thumbnails[419128] = clik.newPhoto({"id":419128,"src":"High East Street December Afternoon_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_419128.html","width":130,"caption":"High East Street, Dorchester","height":139});
															thumbnails[419151] = clik.newPhoto({"id":419151,"src":"West Stafford 2_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_419151.html","width":116,"caption":"Outside West Stafford, Dorset","height":200});
															thumbnails[419157] = clik.newPhoto({"id":419157,"src":"Brockhampton River_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_419157.html","width":130,"caption":"","height":90});
															thumbnails[419191] = clik.newPhoto({"id":419191,"src":"New York 1_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_419191.html","width":130,"caption":"","height":73});
															thumbnails[419192] = clik.newPhoto({"id":419192,"src":"New York 2_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_419192.html","width":130,"caption":"","height":73});
															thumbnails[419194] = clik.newPhoto({"id":419194,"src":"New York 3_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_419194.html","width":130,"caption":"","height":98});
															thumbnails[419196] = clik.newPhoto({"id":419196,"src":"Trees_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_419196.html","width":130,"caption":"","height":86});
															thumbnails[419197] = clik.newPhoto({"id":419197,"src":"Meadows_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_419197.html","width":130,"caption":"","height":67});
															thumbnails[419198] = clik.newPhoto({"id":419198,"src":"From Water Meadows_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_419198.html","width":130,"caption":"","height":53});
															thumbnails[419972] = clik.newPhoto({"id":419972,"src":"Barcelona 1_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_419972.html","width":130,"caption":"","height":89});
															thumbnails[419973] = clik.newPhoto({"id":419973,"src":"Barcelona 2_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_419973.html","width":130,"caption":"","height":73});
															thumbnails[419975] = clik.newPhoto({"id":419975,"src":"Lyme 2_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_419975.html","width":130,"caption":"Lyme Regis Dorset","height":77});
															thumbnails[419977] = clik.newPhoto({"id":419977,"src":"Lyme_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_419977.html","width":130,"caption":"","height":73});
															thumbnails[419978] = clik.newPhoto({"id":419978,"src":"Weymouth Star_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_419978.html","width":130,"caption":"Star in Cafe","height":140});
															thumbnails[422725] = clik.newPhoto({"id":422725,"src":"Holga-Dorchester001_thumb.jpg","galleries_id":41288,"server_id":18,"link":"photo_422725.html","width":130,"caption":"Photo of High West Street Dorchester using a Holga Camera","height":127});
															thumbnails[422726] = clik.newPhoto({"id":422726,"src":"Holga-Dorchester002_thumb.jpg","galleries_id":41288,"server_id":18,"link":"photo_422726.html","width":130,"caption":"South Street Dorchester","height":127});
															thumbnails[422727] = clik.newPhoto({"id":422727,"src":"Holga-Dorchester003_thumb.jpg","galleries_id":41288,"server_id":18,"link":"photo_422727.html","width":130,"caption":"","height":132});
															thumbnails[424839] = clik.newPhoto({"id":424839,"src":"South Street_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_424839.html","width":130,"caption":"South Street Dorchester","height":73});
															thumbnails[424840] = clik.newPhoto({"id":424840,"src":"West Bay_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_424840.html","width":130,"caption":"West Bay, Bridport","height":56});
															thumbnails[424843] = clik.newPhoto({"id":424843,"src":"West Bexington_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_424843.html","width":130,"caption":"West Bexington, Dorset","height":49});
															thumbnails[424844] = clik.newPhoto({"id":424844,"src":"Arles2_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_424844.html","width":106,"caption":"","height":200});
															thumbnails[424852] = clik.newPhoto({"id":424852,"src":"Arles31_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_424852.html","width":130,"caption":"","height":98});
															thumbnails[532564] = clik.newPhoto({"id":532564,"src":"Dorchester Pinhole004ver2_thumb.jpg","galleries_id":41288,"server_id":18,"link":"photo_532564.html","width":130,"caption":"Fordington Green, Dorchester.","height":102});
															thumbnails[532568] = clik.newPhoto({"id":532568,"src":"Dorchester Pinhole Web Image 1_thumb.jpg","galleries_id":41288,"server_id":18,"link":"photo_532568.html","width":130,"caption":"Dungate Street, Dorchester.","height":111});
															thumbnails[532571] = clik.newPhoto({"id":532571,"src":"Web Image 2_thumb.jpg","galleries_id":41288,"server_id":18,"link":"photo_532571.html","width":130,"caption":"High East Street, Dorchester.","height":165});
															thumbnails[542852] = clik.newPhoto({"id":542852,"src":"Sheep in Frome Valley_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_542852.html","width":130,"caption":"Sheep in Frome Valley","height":70});
															thumbnails[542853] = clik.newPhoto({"id":542853,"src":"Trees1_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_542853.html","width":130,"caption":"Trees in Frome Valley","height":81});
															thumbnails[542854] = clik.newPhoto({"id":542854,"src":"Letter Box_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_542854.html","width":130,"caption":"High West Street Dorchester.","height":74});
															thumbnails[543162] = clik.newPhoto({"id":543162,"src":"Dorchester0021_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_543162.html","width":130,"caption":"Trees in Frome Valley","height":102});
															thumbnails[543166] = clik.newPhoto({"id":543166,"src":"Flood 2_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_543166.html","width":130,"caption":"Floods 2003","height":98});
															thumbnails[543182] = clik.newPhoto({"id":543182,"src":"seascape001_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_543182.html","width":130,"caption":"White Nothe, Nr Weymouth","height":130});
															thumbnails[839996] = clik.newPhoto({"id":839996,"src":"DSCF2056ver2_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_839996.html","width":130,"caption":"Dorchester Show 2007","height":73});
															thumbnails[840004] = clik.newPhoto({"id":840004,"src":"DSCF2028_thumb.JPG","galleries_id":33609,"server_id":18,"link":"photo_840004.html","width":130,"caption":"Hyde Beach","height":79});
															thumbnails[840010] = clik.newPhoto({"id":840010,"src":"DSCF2581_thumb.JPG","galleries_id":33609,"server_id":18,"link":"photo_840010.html","width":130,"caption":"Jordon Hill, Weymouth","height":77});
															thumbnails[840012] = clik.newPhoto({"id":840012,"src":"DSCF2612ver2_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_840012.html","width":130,"caption":"West Bay","height":90});
															thumbnails[840029] = clik.newPhoto({"id":840029,"src":"IMG_0177_thumb.JPG","galleries_id":33602,"server_id":18,"link":"photo_840029.html","width":130,"caption":"The White Hart","height":82});
															thumbnails[840049] = clik.newPhoto({"id":840049,"src":"DSCF0026ver3_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_840049.html","width":130,"caption":"The Walks","height":98});
															thumbnails[840068] = clik.newPhoto({"id":840068,"src":"DSCF2496ver2_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_840068.html","width":130,"caption":"Frome Valley","height":61});
															thumbnails[2885019] = clik.newPhoto({"id":2885019,"src":"DSC_1347_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_2885019.html","width":130,"caption":"","height":86});
															thumbnails[2885020] = clik.newPhoto({"id":2885020,"src":"DSC_1348_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_2885020.html","width":130,"caption":"","height":86});
															thumbnails[2885021] = clik.newPhoto({"id":2885021,"src":"DSC_1355_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_2885021.html","width":130,"caption":"","height":87});
															thumbnails[2885023] = clik.newPhoto({"id":2885023,"src":"DSCF0055_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_2885023.html","width":130,"caption":"","height":97});
															thumbnails[2885032] = clik.newPhoto({"id":2885032,"src":"Sheep_thumb.jpg","galleries_id":33613,"server_id":18,"link":"photo_2885032.html","width":129,"caption":"","height":68});
															thumbnails[2885037] = clik.newPhoto({"id":2885037,"src":"venice_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_2885037.html","width":112,"caption":"","height":200});
															thumbnails[2885038] = clik.newPhoto({"id":2885038,"src":"Venice001_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_2885038.html","width":130,"caption":"","height":118});
															thumbnails[2885039] = clik.newPhoto({"id":2885039,"src":"Venice002_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_2885039.html","width":129,"caption":"","height":119});
															thumbnails[2902650] = clik.newPhoto({"id":2902650,"src":"DSC_0151ver2ot_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_2902650.html","width":130,"caption":"","height":69});
															thumbnails[2902653] = clik.newPhoto({"id":2902653,"src":"DSC_4887ver2_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_2902653.html","width":130,"caption":"","height":194});
															thumbnails[2902666] = clik.newPhoto({"id":2902666,"src":"ot_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_2902666.html","width":130,"caption":"","height":87});
															thumbnails[3643484] = clik.newPhoto({"id":3643484,"src":"web_photos_20093_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_3643484.html","width":130,"caption":"Dorchester Snow 2009","height":87});
															thumbnails[3643485] = clik.newPhoto({"id":3643485,"src":"web_photos_200914_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_3643485.html","width":130,"caption":"","height":87});
															thumbnails[3643488] = clik.newPhoto({"id":3643488,"src":"web_photos_200918_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_3643488.html","width":130,"caption":"","height":73});
															thumbnails[3643490] = clik.newPhoto({"id":3643490,"src":"web_photos_20095_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_3643490.html","width":130,"caption":"","height":80});
															thumbnails[6491539] = clik.newPhoto({"id":6491539,"src":"DSC_86081_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_6491539.html","width":130,"caption":"","height":52});
															thumbnails[6491540] = clik.newPhoto({"id":6491540,"src":"seats2_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_6491540.html","width":130,"caption":"","height":161});
															thumbnails[6491542] = clik.newPhoto({"id":6491542,"src":"marchcoast052_thumb.jpg","galleries_id":33602,"server_id":18,"link":"photo_6491542.html","width":130,"caption":"The White Hart","height":82});
															thumbnails[6491548] = clik.newPhoto({"id":6491548,"src":"New_York003_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_6491548.html","width":122,"caption":"","height":200});
															thumbnails[6491551] = clik.newPhoto({"id":6491551,"src":"washington017_thumb.jpg","galleries_id":33614,"server_id":18,"link":"photo_6491551.html","width":130,"caption":"","height":78});
															thumbnails[6492628] = clik.newPhoto({"id":6492628,"src":"DSC_0470_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_6492628.html","width":130,"caption":"","height":194});
															thumbnails[6492632] = clik.newPhoto({"id":6492632,"src":"DSC_0449_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_6492632.html","width":130,"caption":"","height":87});
															thumbnails[6492637] = clik.newPhoto({"id":6492637,"src":"DSC_0445_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_6492637.html","width":130,"caption":"","height":87});
															thumbnails[6492748] = clik.newPhoto({"id":6492748,"src":"DSC_0316_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_6492748.html","width":130,"caption":"","height":194});
															thumbnails[6492750] = clik.newPhoto({"id":6492750,"src":"DSC_0298_thumb.jpg","galleries_id":33609,"server_id":18,"link":"photo_6492750.html","width":130,"caption":"","height":87});
															thumbnails[8475925] = clik.newPhoto({"id":8475925,"src":"posts001web_thumb.jpg","galleries_id":447851,"server_id":18,"link":"photo_8475925.html","width":130,"caption":"","height":122});
															thumbnails[8475926] = clik.newPhoto({"id":8475926,"src":"posts004web_thumb.jpg","galleries_id":447851,"server_id":18,"link":"photo_8475926.html","width":130,"caption":"","height":127});
															thumbnails[8475927] = clik.newPhoto({"id":8475927,"src":"posts005web_thumb.jpg","galleries_id":447851,"server_id":18,"link":"photo_8475927.html","width":130,"caption":"","height":126});
															thumbnails[8475928] = clik.newPhoto({"id":8475928,"src":"posts006web_thumb.jpg","galleries_id":447851,"server_id":18,"link":"photo_8475928.html","width":130,"caption":"","height":131});
															thumbnails[8475929] = clik.newPhoto({"id":8475929,"src":"posts009web_thumb.jpg","galleries_id":447851,"server_id":18,"link":"photo_8475929.html","width":130,"caption":"","height":129});
															thumbnails[8475930] = clik.newPhoto({"id":8475930,"src":"posts030-web_thumb.jpg","galleries_id":447851,"server_id":18,"link":"photo_8475930.html","width":130,"caption":"","height":131});
															thumbnails[8478018] = clik.newPhoto({"id":8478018,"src":"Gum_print_312_thumb.jpg","galleries_id":41288,"server_id":18,"link":"photo_8478018.html","width":130,"caption":"","height":96});
															thumbnails[8478024] = clik.newPhoto({"id":8478024,"src":"gum_print_1_thumb.jpg","galleries_id":41288,"server_id":18,"link":"photo_8478024.html","width":130,"caption":"","height":93});
															thumbnails[8478026] = clik.newPhoto({"id":8478026,"src":"Cyanotype_thumb.jpg","galleries_id":41288,"server_id":18,"link":"photo_8478026.html","width":130,"caption":"","height":165});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[33609] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dorset Coast Project","link":"gallery_33609.html","maxRecords":0.0,"photoIDs":[419081.0,419083.0,419105.0,419109.0,419115.0,419975.0,419977.0,419978.0,424840.0,424843.0,543182.0,840004.0,840010.0,840012.0,2902666.0,6492628.0,6492632.0,6492637.0,6492748.0,6492750.0],"skipIndex":0,"section_code":"gallery","featured_images":2902666.0,"id":33609,"singleSection":false});				  						galleries[447851] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dorset Finger Posts","link":"gallery_447851.html","maxRecords":0.0,"photoIDs":[8466158.0,8466232.0,8475925.0,8475926.0,8475927.0,8475928.0,8475929.0,8475930.0],"skipIndex":0,"section_code":"gallery","featured_images":"8475930,8475929,8475928,8475927,8475926,8475925,8466232,8466158","id":447851,"singleSection":false});				  						galleries[41288] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Experimental","link":"gallery_41288.html","maxRecords":0.0,"photoIDs":[422725.0,422726.0,422727.0,532564.0,532568.0,532571.0,8478018.0,8478024.0,8478026.0],"skipIndex":0,"section_code":"gallery","featured_images":"8478026,8478024,8478018,532571,532568,532564,422727,422726,422725","id":41288,"singleSection":false});				  						galleries[33614] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"International","link":"gallery_33614.html","maxRecords":0.0,"photoIDs":[419191.0,419192.0,419194.0,419972.0,419973.0,424844.0,424852.0,2885019.0,2885020.0,2885021.0,2885023.0,2885037.0,2885038.0,2885039.0,6491548.0,6491551.0],"skipIndex":0,"section_code":"gallery","featured_images":2885039.0,"id":33614,"singleSection":false});				  						galleries[33613] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscape","link":"gallery_33613.html","maxRecords":0.0,"photoIDs":[419151.0,419157.0,419196.0,419197.0,419198.0,542852.0,542853.0,543162.0,840068.0,2885032.0],"skipIndex":0,"section_code":"gallery","featured_images":"2885032,840068,543162,542853,542852,419198,419197,419196,419157,419151","id":33613,"singleSection":false});				  						galleries[33602] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dorchester","link":"gallery_33602.html","maxRecords":0.0,"photoIDs":[419119.0,419125.0,419128.0,424839.0,542854.0,543166.0,839996.0,840029.0,840049.0,2902650.0,2902653.0,3643484.0,3643485.0,3643488.0,3643490.0,6491539.0,6491540.0,6491542.0],"skipIndex":0,"section_code":"gallery","featured_images":419128.0,"id":33602,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '840012';
imageSets[2] = '2902666,2885039,419128';
imageSets[3] = '8478026,8478024,8478018,8475930,8475929,8475928,8475927,8475926,8475925,8466232,8466158,6492750,6492748,6492637,6492632,6492628,6491551,6491548,6491542,6491540,6491539,3643490,3643488,3643485,3643484,2902666,2902653,2902650,2885039,2885038,2885037,2885032,2885023,2885021,2885020,2885019,840068,840049,840029,840012,840010,840004,839996,543182,543166,543162,542854,542853,542852,532571';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/andygill01/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/andygill01/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/andygill01/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/andygill01/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/andygill01/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/andygill01/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/andygill01/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 = 'Andrew Gillett Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				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.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;
	}
}

			

