window.thumbnails = {};
															thumbnails[364285] = clik.newPhoto({"id":364285,"src":"436_MA_1143web_image_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":195});
															thumbnails[8428783] = clik.newPhoto({"id":8428783,"src":"088_CT_0084_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428783.html","width":87,"caption":"","height":130});
															thumbnails[8188459] = clik.newPhoto({"id":8188459,"src":"012_thumb.jpg","galleries_id":437103,"server_id":1,"link":"photo_8188459.html","width":130,"caption":"","height":130});
															thumbnails[6050778] = clik.newPhoto({"id":6050778,"src":"019_AS0251_thumb.jpg","galleries_id":340589,"server_id":1,"link":"photo_6050778.html","width":130,"caption":"","height":130});
															thumbnails[8188460] = clik.newPhoto({"id":8188460,"src":"021_thumb.jpg","galleries_id":437103,"server_id":1,"link":"photo_8188460.html","width":130,"caption":"","height":130});
															thumbnails[8188462] = clik.newPhoto({"id":8188462,"src":"023_thumb.jpg","galleries_id":437103,"server_id":1,"link":"photo_8188462.html","width":130,"caption":"","height":130});
															thumbnails[6050792] = clik.newPhoto({"id":6050792,"src":"070_AC0135_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050792.html","width":130,"caption":"","height":86});
															thumbnails[6050789] = clik.newPhoto({"id":6050789,"src":"059_AC0121_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050789.html","width":130,"caption":"","height":86});
															thumbnails[8428790] = clik.newPhoto({"id":8428790,"src":"075_CT_0313_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428790.html","width":87,"caption":"","height":130});
															thumbnails[8428816] = clik.newPhoto({"id":8428816,"src":"095_CT_0361_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428816.html","width":87,"caption":"","height":130});
															thumbnails[6050794] = clik.newPhoto({"id":6050794,"src":"109_AS147_thumb.jpg","galleries_id":340589,"server_id":1,"link":"photo_6050794.html","width":130,"caption":"","height":130});
															thumbnails[6050799] = clik.newPhoto({"id":6050799,"src":"116_AC0224_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050799.html","width":86,"caption":"","height":130});
															thumbnails[8428823] = clik.newPhoto({"id":8428823,"src":"121_CT_0392_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428823.html","width":130,"caption":"","height":87});
															thumbnails[8428831] = clik.newPhoto({"id":8428831,"src":"108_CT_0393_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428831.html","width":130,"caption":"","height":87});
															thumbnails[8428836] = clik.newPhoto({"id":8428836,"src":"122_CT_0423_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428836.html","width":87,"caption":"","height":130});
															thumbnails[6050803] = clik.newPhoto({"id":6050803,"src":"128_AC0258_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050803.html","width":130,"caption":"","height":86});
															thumbnails[8428840] = clik.newPhoto({"id":8428840,"src":"129_CT_0470_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428840.html","width":130,"caption":"","height":87});
															thumbnails[6050805] = clik.newPhoto({"id":6050805,"src":"141_EG203_thumb.jpg","galleries_id":340587,"server_id":1,"link":"photo_6050805.html","width":130,"caption":"","height":86});
															thumbnails[8428844] = clik.newPhoto({"id":8428844,"src":"141_CT_0473_-_Version_2_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428844.html","width":87,"caption":"","height":130});
															thumbnails[6050808] = clik.newPhoto({"id":6050808,"src":"145_AC0305_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050808.html","width":130,"caption":"","height":86});
															thumbnails[8428846] = clik.newPhoto({"id":8428846,"src":"124_CT_0431_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428846.html","width":130,"caption":"","height":87});
															thumbnails[8428850] = clik.newPhoto({"id":8428850,"src":"147_CT_0493_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428850.html","width":87,"caption":"","height":130});
															thumbnails[8428855] = clik.newPhoto({"id":8428855,"src":"150_CT_0511_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428855.html","width":87,"caption":"","height":130});
															thumbnails[6050810] = clik.newPhoto({"id":6050810,"src":"151_AC0319_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050810.html","width":87,"caption":"","height":130});
															thumbnails[8428882] = clik.newPhoto({"id":8428882,"src":"214_CT_0012_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428882.html","width":130,"caption":"","height":87});
															thumbnails[6050814] = clik.newPhoto({"id":6050814,"src":"160_AS268_thumb.jpg","galleries_id":340589,"server_id":1,"link":"photo_6050814.html","width":130,"caption":"","height":87});
															thumbnails[6050815] = clik.newPhoto({"id":6050815,"src":"162_AC0334_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050815.html","width":86,"caption":"","height":130});
															thumbnails[6050818] = clik.newPhoto({"id":6050818,"src":"163_AC0336_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050818.html","width":86,"caption":"","height":130});
															thumbnails[6050828] = clik.newPhoto({"id":6050828,"src":"172_AS287_thumb.jpg","galleries_id":340589,"server_id":1,"link":"photo_6050828.html","width":130,"caption":"","height":86});
															thumbnails[6050835] = clik.newPhoto({"id":6050835,"src":"174_AC0360_-_Version_2_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050835.html","width":130,"caption":"","height":130});
															thumbnails[8428883] = clik.newPhoto({"id":8428883,"src":"180_CT_0589_-_Version_2_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428883.html","width":87,"caption":"","height":130});
															thumbnails[6050844] = clik.newPhoto({"id":6050844,"src":"182_AC0396_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050844.html","width":130,"caption":"","height":86});
															thumbnails[8428889] = clik.newPhoto({"id":8428889,"src":"152_CT_0519_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428889.html","width":130,"caption":"","height":87});
															thumbnails[6050850] = clik.newPhoto({"id":6050850,"src":"188_EG275_thumb.jpg","galleries_id":340587,"server_id":1,"link":"photo_6050850.html","width":86,"caption":"","height":130});
															thumbnails[6050854] = clik.newPhoto({"id":6050854,"src":"192_AS329_thumb.jpg","galleries_id":340589,"server_id":1,"link":"photo_6050854.html","width":130,"caption":"","height":86});
															thumbnails[6050856] = clik.newPhoto({"id":6050856,"src":"196_AS340_thumb.jpg","galleries_id":340589,"server_id":1,"link":"photo_6050856.html","width":130,"caption":"","height":87});
															thumbnails[8428897] = clik.newPhoto({"id":8428897,"src":"206_CT_0660_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428897.html","width":87,"caption":"","height":130});
															thumbnails[8428879] = clik.newPhoto({"id":8428879,"src":"165_CT_0558_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428879.html","width":87,"caption":"","height":130});
															thumbnails[6050870] = clik.newPhoto({"id":6050870,"src":"214_AC0490_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050870.html","width":86,"caption":"","height":130});
															thumbnails[6050874] = clik.newPhoto({"id":6050874,"src":"217_AC0500_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050874.html","width":130,"caption":"","height":130});
															thumbnails[8428900] = clik.newPhoto({"id":8428900,"src":"217_CT_0681_-_Version_2_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428900.html","width":87,"caption":"","height":130});
															thumbnails[6050946] = clik.newPhoto({"id":6050946,"src":"357_AC0878_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050946.html","width":86,"caption":"","height":130});
															thumbnails[6050950] = clik.newPhoto({"id":6050950,"src":"359_AC0890_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050950.html","width":130,"caption":"","height":86});
															thumbnails[6050944] = clik.newPhoto({"id":6050944,"src":"355_AC0867_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050944.html","width":130,"caption":"","height":87});
															thumbnails[6050951] = clik.newPhoto({"id":6050951,"src":"367_AC0914_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050951.html","width":87,"caption":"","height":130});
															thumbnails[6050881] = clik.newPhoto({"id":6050881,"src":"229_EG353_thumb.jpg","galleries_id":340587,"server_id":1,"link":"photo_6050881.html","width":86,"caption":"","height":130});
															thumbnails[6050891] = clik.newPhoto({"id":6050891,"src":"270_EG398_thumb.jpg","galleries_id":340587,"server_id":1,"link":"photo_6050891.html","width":130,"caption":"","height":86});
															thumbnails[6050912] = clik.newPhoto({"id":6050912,"src":"283_EG427_thumb.jpg","galleries_id":340587,"server_id":1,"link":"photo_6050912.html","width":130,"caption":"","height":86});
															thumbnails[8428903] = clik.newPhoto({"id":8428903,"src":"240_CT_0764_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428903.html","width":87,"caption":"","height":130});
															thumbnails[8428907] = clik.newPhoto({"id":8428907,"src":"242_CT_0767_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428907.html","width":87,"caption":"","height":130});
															thumbnails[8428911] = clik.newPhoto({"id":8428911,"src":"246_CT_1453_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428911.html","width":130,"caption":"","height":87});
															thumbnails[8428914] = clik.newPhoto({"id":8428914,"src":"257_CT_0814_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428914.html","width":87,"caption":"","height":130});
															thumbnails[6050885] = clik.newPhoto({"id":6050885,"src":"260_AC0433_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050885.html","width":130,"caption":"","height":86});
															thumbnails[8428918] = clik.newPhoto({"id":8428918,"src":"280_CT_1022_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428918.html","width":130,"caption":"","height":87});
															thumbnails[6050887] = clik.newPhoto({"id":6050887,"src":"262_EG399_thumb.jpg","galleries_id":340587,"server_id":1,"link":"photo_6050887.html","width":86,"caption":"","height":130});
															thumbnails[8428931] = clik.newPhoto({"id":8428931,"src":"265_CT_0901_-_Version_2_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428931.html","width":87,"caption":"","height":130});
															thumbnails[6050894] = clik.newPhoto({"id":6050894,"src":"271_AS480_thumb.jpg","galleries_id":340589,"server_id":1,"link":"photo_6050894.html","width":86,"caption":"","height":130});
															thumbnails[6050897] = clik.newPhoto({"id":6050897,"src":"271_EG402_thumb.jpg","galleries_id":340587,"server_id":1,"link":"photo_6050897.html","width":86,"caption":"","height":130});
															thumbnails[8428934] = clik.newPhoto({"id":8428934,"src":"272_CT_0853_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428934.html","width":130,"caption":"","height":87});
															thumbnails[8428945] = clik.newPhoto({"id":8428945,"src":"278_CT_0898_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428945.html","width":87,"caption":"","height":130});
															thumbnails[8429235] = clik.newPhoto({"id":8429235,"src":"269_CT_0865_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8429235.html","width":87,"caption":"","height":130});
															thumbnails[8428950] = clik.newPhoto({"id":8428950,"src":"281_CT_0909_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428950.html","width":87,"caption":"","height":130});
															thumbnails[6050909] = clik.newPhoto({"id":6050909,"src":"281_EG414_thumb.jpg","galleries_id":340587,"server_id":1,"link":"photo_6050909.html","width":130,"caption":"","height":87});
															thumbnails[8428952] = clik.newPhoto({"id":8428952,"src":"283_CT_0921_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428952.html","width":130,"caption":"","height":87});
															thumbnails[8428954] = clik.newPhoto({"id":8428954,"src":"287_CT_0943_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428954.html","width":130,"caption":"","height":87});
															thumbnails[6050920] = clik.newPhoto({"id":6050920,"src":"292_AS507_thumb.jpg","galleries_id":340589,"server_id":1,"link":"photo_6050920.html","width":87,"caption":"","height":130});
															thumbnails[8428957] = clik.newPhoto({"id":8428957,"src":"296_CT_0979_-_Version_2_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428957.html","width":87,"caption":"","height":130});
															thumbnails[8428964] = clik.newPhoto({"id":8428964,"src":"311_CT_0028_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428964.html","width":87,"caption":"","height":130});
															thumbnails[8428966] = clik.newPhoto({"id":8428966,"src":"307_CT_1459_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428966.html","width":87,"caption":"","height":130});
															thumbnails[8428967] = clik.newPhoto({"id":8428967,"src":"304_CT_1031_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428967.html","width":87,"caption":"","height":130});
															thumbnails[6050928] = clik.newPhoto({"id":6050928,"src":"307_AS532_thumb.jpg","galleries_id":340589,"server_id":1,"link":"photo_6050928.html","width":130,"caption":"","height":87});
															thumbnails[8428979] = clik.newPhoto({"id":8428979,"src":"309_CT_1046_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428979.html","width":87,"caption":"","height":130});
															thumbnails[8428987] = clik.newPhoto({"id":8428987,"src":"314_CT_0669_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428987.html","width":130,"caption":"","height":87});
															thumbnails[8428991] = clik.newPhoto({"id":8428991,"src":"332_CT_1085_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428991.html","width":130,"caption":"","height":87});
															thumbnails[6050943] = clik.newPhoto({"id":6050943,"src":"335_AC0806_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050943.html","width":86,"caption":"","height":130});
															thumbnails[6050942] = clik.newPhoto({"id":6050942,"src":"334_AC0808_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050942.html","width":87,"caption":"","height":130});
															thumbnails[8428997] = clik.newPhoto({"id":8428997,"src":"351_CT_1123_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8428997.html","width":130,"caption":"","height":87});
															thumbnails[8429001] = clik.newPhoto({"id":8429001,"src":"342_CT_1104_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8429001.html","width":130,"caption":"","height":87});
															thumbnails[8429005] = clik.newPhoto({"id":8429005,"src":"366_CT_1174_-_Version_2_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8429005.html","width":87,"caption":"","height":130});
															thumbnails[8429009] = clik.newPhoto({"id":8429009,"src":"371_CT_1200_thumb.jpg","galleries_id":446257,"server_id":1,"link":"photo_8429009.html","width":87,"caption":"","height":130});
															thumbnails[6050953] = clik.newPhoto({"id":6050953,"src":"434_AC1064_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050953.html","width":130,"caption":"","height":86});
															thumbnails[6050954] = clik.newPhoto({"id":6050954,"src":"469_AC1190_thumb.jpg","galleries_id":29968,"server_id":1,"link":"photo_6050954.html","width":130,"caption":"","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[446257] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Claire & Tom","link":"gallery_446257.html","maxRecords":0.0,"photoIDs":[8428783.0,8428790.0,8428816.0,8428823.0,8428831.0,8428836.0,8428840.0,8428844.0,8428846.0,8428850.0,8428855.0,8428882.0,8428883.0,8428889.0,8428897.0,8428879.0,8428900.0,8428903.0,8428907.0,8428911.0,8428914.0,8428918.0,8428931.0,8428934.0,8428945.0,8429235.0,8428950.0,8428952.0,8428954.0,8428957.0,8428964.0,8428966.0,8428967.0,8428979.0,8428987.0,8428991.0,8428997.0,8429001.0,8429005.0,8429009.0],"skipIndex":0,"section_code":"gallery","featured_images":8429005.0,"id":446257,"singleSection":false});				  						galleries[340584] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Italian Storybooks","link":"section407426_340584.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section407426","featured_images":"","id":340584,"singleSection":false});				  						galleries[434108] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Digital albums","link":"section407426_434108.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section407426","featured_images":"","id":434108,"singleSection":false});				  						galleries[437103] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Chrissie & Huub","link":"gallery_437103.html","maxRecords":0.0,"photoIDs":[8188459.0,8188460.0,8188462.0],"skipIndex":0,"section_code":"gallery","featured_images":8188460.0,"id":437103,"singleSection":false});				  						galleries[29968] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Andrew & Charlotte","link":"gallery_29968.html","maxRecords":0.0,"photoIDs":[6050792.0,6050789.0,6050799.0,6050803.0,6050808.0,6050810.0,6050815.0,6050818.0,6050835.0,6050844.0,6050870.0,6050874.0,6050946.0,6050950.0,6050944.0,6050951.0,6050885.0,6050943.0,6050942.0,6050953.0,6050954.0],"skipIndex":0,"section_code":"gallery","featured_images":6050835.0,"id":29968,"singleSection":false});				  						galleries[340587] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Eve & Graham","link":"gallery_340587.html","maxRecords":0.0,"photoIDs":[6050805.0,6050850.0,6050881.0,6050891.0,6050912.0,6050887.0,6050897.0,6050909.0],"skipIndex":0,"section_code":"gallery","featured_images":6050805.0,"id":340587,"singleSection":false});				  						galleries[340589] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Aaron & Sarah","link":"gallery_340589.html","maxRecords":0.0,"photoIDs":[6050778.0,6050794.0,6050814.0,6050828.0,6050854.0,6050856.0,6050894.0,6050920.0,6050928.0],"skipIndex":0,"section_code":"gallery","featured_images":6050928.0,"id":340589,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6050946';
imageSets[2] = '8188460,6050805,6050835,6050928,8429005';
imageSets[3] = '8429235,8429009,8429005,8429001,8428997,8428991,8428987,8428979,8428967,8428966,8428964,8428957,8428954,8428952,8428950,8428945,8428934,8428931,8428918,8428914,8428911,8428907,8428903,8428900,8428897,8428889,8428883,8428882,8428879,8428855,8428850,8428846,8428844,8428840,8428836,8428831,8428823,8428816,8428790,8428783,8188462,8188460,8188459,6050954,6050953,6050951,6050950,6050946,6050944,6050943';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/suealdridge/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/suealdridge/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 += 'section78485.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 && 'section78485' != '') {
					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 = 'Evelyne Sansot 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 !== '') {
			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;
	}
}

			

