window.thumbnails = {};
															thumbnails[770967] = clik.newPhoto({"id":770967,"src":"LagoTrasimenoSeries5_thumb.jpg","galleries_id":59700,"server_id":15,"link":"photo_770967.html","width":130,"caption":"Lago Trasemino Series 5","height":173});
															thumbnails[9067770] = clik.newPhoto({"id":9067770,"src":"Games_Series_1_thumb.jpg","galleries_id":59704,"server_id":15,"link":"photo_9067770.html","width":130,"caption":"Games Series 1","height":293});
															thumbnails[9067773] = clik.newPhoto({"id":9067773,"src":"Games_Series_2_thumb_6F2E43CC-1EC9-D45B-1C55643958F1E129.jpg","galleries_id":59704,"server_id":15,"link":"photo_9067773.html","width":130,"caption":"Games Series 2","height":293});
															thumbnails[9067775] = clik.newPhoto({"id":9067775,"src":"Games_Series__Yellow_to_Purple_Spiral_thumb.jpg","galleries_id":59704,"server_id":15,"link":"photo_9067775.html","width":130,"caption":"Games Series Yellow to Purple Spiral","height":122});
															thumbnails[9067776] = clik.newPhoto({"id":9067776,"src":"Games_Series_Orange_to_Blue_Pulse_thumb.jpg","galleries_id":59704,"server_id":15,"link":"photo_9067776.html","width":130,"caption":"Games Series Orange to Blue Pulse","height":173});
															thumbnails[9067784] = clik.newPhoto({"id":9067784,"src":"Games_Series__Blue_Falling_thumb.jpg","galleries_id":59704,"server_id":15,"link":"photo_9067784.html","width":130,"caption":"Games Series Blue Falling","height":151});
															thumbnails[9067785] = clik.newPhoto({"id":9067785,"src":"Games_Series__Orange_Drift_thumb.jpg","galleries_id":59704,"server_id":15,"link":"photo_9067785.html","width":130,"caption":"Games Series Orange Drift","height":152});
															thumbnails[9067861] = clik.newPhoto({"id":9067861,"src":"Surface_Matters_1_thumb.jpg","galleries_id":478248,"server_id":15,"link":"photo_9067861.html","width":130,"caption":"Surface Matters 1","height":130});
															thumbnails[9067871] = clik.newPhoto({"id":9067871,"src":"Paintrag4_thumb.JPG","galleries_id":478248,"server_id":15,"link":"photo_9067871.html","width":130,"caption":"Surface Matters 3","height":130});
															thumbnails[9067882] = clik.newPhoto({"id":9067882,"src":"Daphne_Cartwright_Surface_Matters_West_Leigh_Barn_Project_4_thumb.jpg","galleries_id":478248,"server_id":15,"link":"photo_9067882.html","width":130,"caption":"Reflections II","height":128});
															thumbnails[9067884] = clik.newPhoto({"id":9067884,"src":"Daphne_Cartwright_Surface_Matters_West_Leigh_Barn_Project_5_thumb.jpg","galleries_id":478248,"server_id":15,"link":"photo_9067884.html","width":130,"caption":"Reflections I","height":132});
															thumbnails[770936] = clik.newPhoto({"id":770936,"src":"RedNightFalling_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_770936.html","width":130,"caption":"Red Night Falling<br>\r\nAcrylic on Board<br>\r\n180cm x 122cm","height":88});
															thumbnails[770958] = clik.newPhoto({"id":770958,"src":"LabyrinthSeries1_thumb.jpg","galleries_id":72434,"server_id":15,"link":"photo_770958.html","width":130,"caption":"Dreaming Pathways Series #3<br>\r\nWatercolour on handmade paper<br>\r\n47cm x 63cm","height":168});
															thumbnails[770974] = clik.newPhoto({"id":770974,"src":"Spanishseries1_thumb.jpg","galleries_id":59702,"server_id":15,"link":"photo_770974.html","width":130,"caption":"Spanish Series 1<br>\r\nAcrylic on paper<br>\r\n47cm x 58cm","height":162});
															thumbnails[770978] = clik.newPhoto({"id":770978,"src":"SmallStoriesseries1_thumb.jpg","galleries_id":59703,"server_id":15,"link":"photo_770978.html","width":130,"caption":"Small Stories #1<br>\r\nMixed media collage on paper<br>\r\n57cm x 45cm<br>\r\n","height":87});
															thumbnails[770982] = clik.newPhoto({"id":770982,"src":"VariationMagenta_thumb.jpg","galleries_id":59704,"server_id":15,"link":"photo_770982.html","width":130,"caption":"Variation Magenta<br>\r\nMixed media collage on paper<br>\r\n49cm x 59cm<br>\r\nPrivate Collection","height":187});
															thumbnails[788620] = clik.newPhoto({"id":788620,"src":"SummerHeatLodeve_thumb.jpg","galleries_id":61253,"server_id":15,"link":"photo_788620.html","width":130,"caption":"Summer Heat Lodeve<br>\r\nAcrylic on paper<br>\r\n53cm x 68cm","height":184});
															thumbnails[788631] = clik.newPhoto({"id":788631,"src":"Flora_thumb.jpg","galleries_id":61255,"server_id":15,"link":"photo_788631.html","width":130,"caption":"Flora 1<br>\r\nMixed media on board<br>\r\n122cm x 122cm","height":133});
															thumbnails[960851] = clik.newPhoto({"id":960851,"src":"Dancer 3_thumb.jpg","galleries_id":61252,"server_id":15,"link":"photo_960851.html","width":130,"caption":"Dancers Series 1 <br>\r\nAcrylic on paper <br>\r\n69cm x 62cm <br>\r\nAlso as Giclee Print","height":105});
															thumbnails[961194] = clik.newPhoto({"id":961194,"src":"From Under the Blanket Series 1_thumb.jpg","galleries_id":59699,"server_id":15,"link":"photo_961194.html","width":130,"caption":"From Under the Blanket series 1 <br>\r\nAcrylic on board <br>\r\n92cm x 122cm","height":151});
															thumbnails[770941] = clik.newPhoto({"id":770941,"src":"Impasse2_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_770941.html","width":130,"caption":"Impasse 2<br>\r\nAcrylic on Board<br>\r\n160cm x 122cm","height":105});
															thumbnails[770959] = clik.newPhoto({"id":770959,"src":"LabyrinthSeries2_thumb.jpg","galleries_id":72434,"server_id":15,"link":"photo_770959.html","width":130,"caption":"Dreaming Pathways Series #1<br>\r\nWatercolour on handmade paper<br>\r\n47cm x 63cm","height":163});
															thumbnails[770962] = clik.newPhoto({"id":770962,"src":"LagoTrasimenoSeries2_thumb.jpg","galleries_id":59700,"server_id":15,"link":"photo_770962.html","width":130,"caption":"Lago Trasemino #2<br>\r\nMIxed media collage on paper<br>\r\n53cm x 53cm<br>\r\n","height":126});
															thumbnails[770983] = clik.newPhoto({"id":770983,"src":"VariationViolet_thumb.jpg","galleries_id":59704,"server_id":15,"link":"photo_770983.html","width":130,"caption":"Variation Violet<br>\r\nMixed media collage on paper<br>\r\n49cm x 59cm<br>\r\nPrivate Collection","height":194});
															thumbnails[788615] = clik.newPhoto({"id":788615,"src":"Dancer2_thumb.jpg","galleries_id":61252,"server_id":15,"link":"photo_788615.html","width":130,"caption":"Dancer Series 2<br>\r\nAcrylic on paper<br>\r\n41cm x 53cm<br>\r\nPrivate Collection<br>\r\nAlso as Gilcee print","height":182});
															thumbnails[788623] = clik.newPhoto({"id":788623,"src":"SummerHeatLodeve2_thumb.jpg","galleries_id":61253,"server_id":15,"link":"photo_788623.html","width":130,"caption":"Summer Heat Lodeve 2<br>\r\nAcrylic on paper<br>\r\n68cm x 53cm<br>\r\nPrivate Collection","height":100});
															thumbnails[788632] = clik.newPhoto({"id":788632,"src":"Flora2_thumb.jpg","galleries_id":61255,"server_id":15,"link":"photo_788632.html","width":130,"caption":"Flora 2<br>\r\nMixed media on board<br>\r\n122cm x 122cm","height":135});
															thumbnails[959748] = clik.newPhoto({"id":959748,"src":"Spanishseries21_thumb.jpg","galleries_id":59702,"server_id":15,"link":"photo_959748.html","width":130,"caption":"Spanish Series 2<br>\r\nAcrylic on paper<br>\r\n47cm x 63cm","height":182});
															thumbnails[961197] = clik.newPhoto({"id":961197,"src":"From Under the Blanket Series 2_thumb.jpg","galleries_id":59699,"server_id":15,"link":"photo_961197.html","width":130,"caption":"From Under the Blanket series 2 <br>\r\nAcrylic on board <br>\r\n92cm x 122cm","height":151});
															thumbnails[770942] = clik.newPhoto({"id":770942,"src":"RedNightFalling2_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_770942.html","width":130,"caption":"Red Night Falling 2<br>\r\nAcrylic on Board<br>\r\n91cm x 122cm<br>\r\nAlso as Giclee Print","height":173});
															thumbnails[770950] = clik.newPhoto({"id":770950,"src":"FromUndertheBlanketSeries3_thumb.jpg","galleries_id":59699,"server_id":15,"link":"photo_770950.html","width":130,"caption":"From Under the Blanket series 3<br>\r\nAcrylic on board<br>\r\n92cm x 122cm","height":159});
															thumbnails[770960] = clik.newPhoto({"id":770960,"src":"LabyrinthSeries3_thumb.jpg","galleries_id":72434,"server_id":15,"link":"photo_770960.html","width":130,"caption":"Dreaming Pathways Series #2<br>\r\nWatercolour on handmade paper<br>\r\n47cm x 63cm","height":172});
															thumbnails[770964] = clik.newPhoto({"id":770964,"src":"LagoTrasimenoSeries3_thumb.jpg","galleries_id":59700,"server_id":15,"link":"photo_770964.html","width":130,"caption":"Lago Trasemino #3<br>\r\nMixed media collage on paper<br>\r\n27cm x 35cm<br>\r\nPrivate Collection","height":204});
															thumbnails[770979] = clik.newPhoto({"id":770979,"src":"SmallStoriesseries3_thumb.jpg","galleries_id":59703,"server_id":15,"link":"photo_770979.html","width":130,"caption":"Small Stories #3<br>\r\nMixed media collage on paper<br>\r\n59cm x 48cm","height":91});
															thumbnails[770984] = clik.newPhoto({"id":770984,"src":"VariationYellow_thumb.jpg","galleries_id":59704,"server_id":15,"link":"photo_770984.html","width":130,"caption":"Variation Yellow<br>\r\nMixed media collage on paper<br>\r\n49cm x 59cm<br>\r\nPrivate Collection","height":186});
															thumbnails[788612] = clik.newPhoto({"id":788612,"src":"Dancer1_thumb.jpg","galleries_id":61252,"server_id":15,"link":"photo_788612.html","width":130,"caption":"Dancer Series 3<br>\r\nAcrylic on paper<br>\r\n41cm x 53cm","height":194});
															thumbnails[788624] = clik.newPhoto({"id":788624,"src":"SummerHeatStTropez_thumb.jpg","galleries_id":61253,"server_id":15,"link":"photo_788624.html","width":130,"caption":"Summer Heat St Tropeze<br>\r\nAcrylic on paper<br>\r\n68cm x 53cm","height":93});
															thumbnails[960844] = clik.newPhoto({"id":960844,"src":"Spanish series 3_thumb.jpg","galleries_id":59702,"server_id":15,"link":"photo_960844.html","width":130,"caption":"Spanish Series 3<br>\r\nAcylic on paper<br>\r\n80cm x 102cm<br>\r\nPrivate Collection<br>\r\nAlso as Giclee Print","height":178});
															thumbnails[770951] = clik.newPhoto({"id":770951,"src":"FromUndertheBlanketSeries4_thumb.jpg","galleries_id":59699,"server_id":15,"link":"photo_770951.html","width":130,"caption":"From Under the Blanket series 4<br>\r\nAcrylic on board<br>\r\n92cm x 122cm<br>\r\nAlso as Giclee Print","height":159});
															thumbnails[770954] = clik.newPhoto({"id":770954,"src":"DistantHills2_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_770954.html","width":130,"caption":"Distant Hills 2<br>\r\nAcrylic on Board<br>\r\n160cm x 122cm","height":107});
															thumbnails[770965] = clik.newPhoto({"id":770965,"src":"LagoTrasimenoSeries4_thumb.jpg","galleries_id":59700,"server_id":15,"link":"photo_770965.html","width":130,"caption":"Lago Trasemino #4<br>\r\nMixed media collage on paper<br>\r\n21cm x 36cm","height":296});
															thumbnails[770980] = clik.newPhoto({"id":770980,"src":"SmallStoriesseries4_thumb.jpg","galleries_id":59703,"server_id":15,"link":"photo_770980.html","width":130,"caption":"Small Stories #4<br>\r\nMixed media collage on paper<br>\r\n52cm x 48cm","height":105});
															thumbnails[788626] = clik.newPhoto({"id":788626,"src":"SummerHeatStTropez2_thumb.jpg","galleries_id":61253,"server_id":15,"link":"photo_788626.html","width":130,"caption":"Summer Heat St Tropeze 2<br>\r\nAcrylic on paper<br>\r\n68cm x 53cm","height":98});
															thumbnails[959734] = clik.newPhoto({"id":959734,"src":"DreamingPathwaysSeries31_thumb.jpg","galleries_id":72434,"server_id":15,"link":"photo_959734.html","width":130,"caption":"Dreaming Pathways #1 <br>\r\nAcrylic on paper<br>\r\n76cm x 89cm","height":184});
															thumbnails[959754] = clik.newPhoto({"id":959754,"src":"Spanishseries4 1_thumb.jpg","galleries_id":59702,"server_id":15,"link":"photo_959754.html","width":130,"caption":"Spanish Series 4<br>\r\nAcrylic on paper<br>\r\n76cm x 89cm","height":176});
															thumbnails[770943] = clik.newPhoto({"id":770943,"src":"RedNightFalling3_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_770943.html","width":130,"caption":"Red Night Falling 3<br>\r\nAcrylic on Board<br>\r\n160cm x 122cm","height":104});
															thumbnails[770956] = clik.newPhoto({"id":770956,"src":"DreamingPathwaysSeries2_thumb.jpg","galleries_id":72434,"server_id":15,"link":"photo_770956.html","width":130,"caption":"Dreaming Pathway #2<br>\r\nAcrylic on paper<br>\r\n57cm x 75cm","height":168});
															thumbnails[960305] = clik.newPhoto({"id":960305,"src":"SmallStoriesseries51_thumb.jpg","galleries_id":59703,"server_id":15,"link":"photo_960305.html","width":130,"caption":"Small Stories #5<br>\r\nMixed media collage on paper<br>\r\n59cm x 48cm","height":167});
															thumbnails[961205] = clik.newPhoto({"id":961205,"src":"From Under the Blanket Series 5_thumb.jpg","galleries_id":59699,"server_id":15,"link":"photo_961205.html","width":130,"caption":"From Under the Blanket series 5 <br>\r\nAcrylic on board <br>\r\n92cm x 122cm","height":151});
															thumbnails[770952] = clik.newPhoto({"id":770952,"src":"FromUndertheBlanketSeries6_thumb.jpg","galleries_id":59699,"server_id":15,"link":"photo_770952.html","width":130,"caption":"From Under the Blanket Series 6<br>\r\nAcrylic on board<br>\r\n92cm x 122cm","height":150});
															thumbnails[770955] = clik.newPhoto({"id":770955,"src":"DreamingPathwaysSeries1_thumb.jpg","galleries_id":72434,"server_id":15,"link":"photo_770955.html","width":130,"caption":"Dreaming pathway #3 <br>\r\nAcrylic on paper<br>\r\n57cm x 75cm","height":185});
															thumbnails[770961] = clik.newPhoto({"id":770961,"src":"The Valley_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_770961.html","width":130,"caption":"The Valley<br>\r\nAcrylic on Board<br>\r\n122cm x 122cm","height":125});
															thumbnails[770947] = clik.newPhoto({"id":770947,"src":"StacPollaigh_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_770947.html","width":130,"caption":"Stac Pollaigh 1<br>\r\nMixed media on paper<br>\r\n55cm x 46cm","height":97});
															thumbnails[770953] = clik.newPhoto({"id":770953,"src":"FromUndertheBlanketSeries7_thumb.jpg","galleries_id":59699,"server_id":15,"link":"photo_770953.html","width":130,"caption":"From Under the Blanket Series 7<br>\r\nAcrylic on board<br>\r\n92cm x 122cm<br>\r\nAlso as Giclee Print","height":157});
															thumbnails[959722] = clik.newPhoto({"id":959722,"src":"Buttress1_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_959722.html","width":130,"caption":"Buttress<br>\r\nAcrylic on Board<br>\r\n91cm x 122cm","height":175});
															thumbnails[961227] = clik.newPhoto({"id":961227,"src":"From Under the Blanket Series 81_thumb.jpg","galleries_id":59699,"server_id":15,"link":"photo_961227.html","width":130,"caption":"From Under the Blanket series 8 <br>\r\nAcrylic on board <br>\r\n92cm x 122cm","height":151});
															thumbnails[770948] = clik.newPhoto({"id":770948,"src":"StacPollaigh2_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_770948.html","width":130,"caption":"Stac Pollaigh 2<br>\r\nWatercolour on paper<br>\r\n55cm x 46cm<br>\r\nPrivate Collection","height":105});
															thumbnails[770944] = clik.newPhoto({"id":770944,"src":"RedNightFalling4_thumb.jpg","galleries_id":58947,"server_id":15,"link":"photo_770944.html","width":130,"caption":"Red Night Falling 4<br>\r\nAcrylic on Board<br>\r\n122cm x 122cm<br>\r\nPrivate Collection","height":124});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[478248] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Surface Matters","link":"gallery_478248.html","maxRecords":0.0,"photoIDs":[9067861.0,9067871.0,9067882.0,9067884.0],"skipIndex":0,"section_code":"gallery","featured_images":"9067884,9067882,9067871,9067861","id":478248,"singleSection":false});				  						galleries[58947] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scottish Series","link":"gallery_58947.html","maxRecords":0.0,"photoIDs":[770936.0,770941.0,770942.0,770954.0,770943.0,770961.0,770947.0,959722.0,770948.0,770944.0],"skipIndex":0,"section_code":"gallery","featured_images":"959722,770961,770954,770948,770947,770944,770943,770942,770941,770936","id":58947,"singleSection":false});				  						galleries[72434] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Peat Bog series","link":"gallery_72434.html","maxRecords":0.0,"photoIDs":[770958.0,770959.0,770960.0,959734.0,770956.0,770955.0],"skipIndex":0,"section_code":"gallery","featured_images":"959734,770960,770959,770958,770956,770955","id":72434,"singleSection":false});				  						galleries[59704] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Games Series","link":"gallery_59704.html","maxRecords":0.0,"photoIDs":[9067770.0,9067773.0,9067775.0,9067776.0,9067784.0,9067785.0,770982.0,770983.0,770984.0],"skipIndex":0,"section_code":"gallery","featured_images":"9067785,9067784,9067776,9067775,9067773,9067770,770984,770983,770982","id":59704,"singleSection":false});				  						galleries[59702] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Spanish Series","link":"gallery_59702.html","maxRecords":0.0,"photoIDs":[770974.0,959748.0,960844.0,959754.0],"skipIndex":0,"section_code":"gallery","featured_images":"960844,959754,959748,770974","id":59702,"singleSection":false});				  						galleries[61253] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Summer Heat","link":"gallery_61253.html","maxRecords":0.0,"photoIDs":[788620.0,788623.0,788624.0,788626.0],"skipIndex":0,"section_code":"gallery","featured_images":"788626,788624,788623,788620","id":61253,"singleSection":false});				  						galleries[59699] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"From Under the Blanket Series","link":"gallery_59699.html","maxRecords":0.0,"photoIDs":[961194.0,961197.0,770950.0,770951.0,961205.0,770952.0,770953.0,961227.0],"skipIndex":0,"section_code":"gallery","featured_images":"961227,961205,961197,961194,770953,770952,770951,770950","id":59699,"singleSection":false});				  						galleries[61255] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flora Series","link":"gallery_61255.html","maxRecords":0.0,"photoIDs":[788631.0,788632.0],"skipIndex":0,"section_code":"gallery","featured_images":"788632,788631","id":61255,"singleSection":false});				  						galleries[61252] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dancers","link":"gallery_61252.html","maxRecords":0.0,"photoIDs":[960851.0,788615.0,788612.0],"skipIndex":0,"section_code":"gallery","featured_images":"960851,788615,788612","id":61252,"singleSection":false});				  						galleries[59700] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Lago Trasemino Series","link":"gallery_59700.html","maxRecords":0.0,"photoIDs":[770967.0,770962.0,770964.0,770965.0],"skipIndex":0,"section_code":"gallery","featured_images":"770967,770965,770964,770962","id":59700,"singleSection":false});				  						galleries[59703] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Small Stories Series","link":"gallery_59703.html","maxRecords":0.0,"photoIDs":[770978.0,770979.0,770980.0,960305.0],"skipIndex":0,"section_code":"gallery","featured_images":"960305,770980,770979,770978","id":59703,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9067884,9067882,9067871,9067861,9067785,9067784,9067776,9067775,9067773,9067770,961227,961205,961197,961194,960851,960844,960305,959754,959748,959734,959722,788632,788631,788626,788624,788623,788620,788615,788612,770984,770983,770982,770980,770979,770978,770974,770967,770965,770964,770962,770961,770960,770959,770958,770956,770955,770954,770953,770952,770951';
imageSets[3] = '9067884,9067882,9067871,9067861,9067785,9067784,9067776,9067775,9067773,9067770,961227,961205,961197,961194,960851,960844,960305,959754,959748,959734,959722,788632,788631,788626,788624,788623,788620,788615,788612,770984,770983,770982,770980,770979,770978,770974,770967,770965,770964,770962,770961,770960,770959,770958,770956,770955,770954,770953,770952,770951';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/daphnecartwright/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/daphnecartwright/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += '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 = 'Daphne Cartwright, Artist: ' + 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 !== '') {
			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;
	}
}

			

