window.thumbnails = {};
															thumbnails[13635] = clik.newPhoto({"id":13635,"src":"jacuzziJPG_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_13635.html","width":130,"caption":"Jaccuzi","height":125});
															thumbnails[13637] = clik.newPhoto({"id":13637,"src":"IMG_1875-02 copy_thumb.jpg","galleries_id":1703,"server_id":1,"link":"photo_13637.html","width":130,"caption":"","height":122});
															thumbnails[13638] = clik.newPhoto({"id":13638,"src":"agledwithframe300JPG_thumb.jpg","galleries_id":1705,"server_id":1,"link":"photo_13638.html","width":130,"caption":"giant collage","height":99});
															thumbnails[13640] = clik.newPhoto({"id":13640,"src":"crimson centre 2 copy_thumb.jpg","galleries_id":1703,"server_id":1,"link":"photo_13640.html","width":130,"caption":"","height":135});
															thumbnails[13642] = clik.newPhoto({"id":13642,"src":"IMG_3367 webcopy_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_13642.html","width":130,"caption":"ancient tree","height":87});
															thumbnails[13643] = clik.newPhoto({"id":13643,"src":"fridgeincJPG_thumb.jpg","galleries_id":1705,"server_id":1,"link":"photo_13643.html","width":130,"caption":"bright orange kitchen","height":99});
															thumbnails[13644] = clik.newPhoto({"id":13644,"src":"books_thumb.jpg","galleries_id":1705,"server_id":1,"link":"photo_13644.html","width":130,"caption":"design interior","height":195});
															thumbnails[13646] = clik.newPhoto({"id":13646,"src":"IMG_2858 copy_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_13646.html","width":130,"caption":"Smoking","height":87});
															thumbnails[13647] = clik.newPhoto({"id":13647,"src":"IMG_1509 copy_thumb.jpg","galleries_id":1705,"server_id":1,"link":"photo_13647.html","width":130,"caption":"cool pool","height":87});
															thumbnails[13648] = clik.newPhoto({"id":13648,"src":"turquoiseJPG_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_13648.html","width":130,"caption":"ever hopeful","height":103});
															thumbnails[13649] = clik.newPhoto({"id":13649,"src":"cherryblossomkateprint copyJPG1_thumb.jpg","galleries_id":1703,"server_id":1,"link":"photo_13649.html","width":130,"caption":"","height":197});
															thumbnails[13658] = clik.newPhoto({"id":13658,"src":"DecembersunsetJPG_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_13658.html","width":130,"caption":"december sunset","height":85});
															thumbnails[13661] = clik.newPhoto({"id":13661,"src":"desktulip copyJPG1_thumb.jpg","galleries_id":1703,"server_id":1,"link":"photo_13661.html","width":130,"caption":"","height":85});
															thumbnails[13729] = clik.newPhoto({"id":13729,"src":"blueflowerJPG_thumb.jpg","galleries_id":1703,"server_id":1,"link":"photo_13729.html","width":130,"caption":"","height":85});
															thumbnails[13730] = clik.newPhoto({"id":13730,"src":"IMG_1817 copy_thumb.jpg","galleries_id":1703,"server_id":1,"link":"photo_13730.html","width":130,"caption":"","height":87});
															thumbnails[13731] = clik.newPhoto({"id":13731,"src":"IMG_1924 copy_thumb.jpg","galleries_id":1703,"server_id":1,"link":"photo_13731.html","width":130,"caption":"","height":87});
															thumbnails[13734] = clik.newPhoto({"id":13734,"src":"buskingIMG_2724-01 copy_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_13734.html","width":130,"caption":"Busking","height":87});
															thumbnails[13735] = clik.newPhoto({"id":13735,"src":"walkyourtalk copy_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_13735.html","width":130,"caption":"walk your talk","height":87});
															thumbnails[13741] = clik.newPhoto({"id":13741,"src":"studioflashfillJPG_thumb.jpg","galleries_id":1705,"server_id":1,"link":"photo_13741.html","width":130,"caption":"showroom","height":99});
															thumbnails[13744] = clik.newPhoto({"id":13744,"src":"no_thumb.5 300JPG.jpg","galleries_id":1705,"server_id":1,"link":"photo_13744.html","width":130,"caption":"Ali's magic wardrobe","height":100});
															thumbnails[13746] = clik.newPhoto({"id":13746,"src":"leestaffordsalon_thumb.jpg","galleries_id":1705,"server_id":1,"link":"photo_13746.html","width":130,"caption":"Hairdressers","height":87});
															thumbnails[13747] = clik.newPhoto({"id":13747,"src":"cw_highcontrastgroup__serum-6092__thumb.jpg","galleries_id":1705,"server_id":1,"link":"photo_13747.html","width":130,"caption":"Roots and Wings","height":87});
															thumbnails[13753] = clik.newPhoto({"id":13753,"src":"springawakening copyJPG1_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_13753.html","width":130,"caption":"spring awakening","height":84});
															thumbnails[13756] = clik.newPhoto({"id":13756,"src":"decnorthwindJPG_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_13756.html","width":130,"caption":"icey gusts","height":81});
															thumbnails[13758] = clik.newPhoto({"id":13758,"src":"path of soft light0002JPG_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_13758.html","width":130,"caption":"path of soft light","height":82});
															thumbnails[13762] = clik.newPhoto({"id":13762,"src":"lilly_thumb.jpg","galleries_id":1703,"server_id":1,"link":"photo_13762.html","width":130,"caption":"","height":129});
															thumbnails[14707] = clik.newPhoto({"id":14707,"src":"november3JPG_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_14707.html","width":130,"caption":"steel blue","height":78});
															thumbnails[14708] = clik.newPhoto({"id":14708,"src":"closetogodJPG_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_14708.html","width":130,"caption":"close to God","height":86});
															thumbnails[1397014] = clik.newPhoto({"id":1397014,"src":"web pic_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_1397014.html","width":130,"caption":"hidden consequenses","height":33});
															thumbnails[1939844] = clik.newPhoto({"id":1939844,"src":"babs copy_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_1939844.html","width":130,"caption":"Babbs at Gay Pride","height":87});
															thumbnails[1939916] = clik.newPhoto({"id":1939916,"src":"lesson_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_1939916.html","width":130,"caption":"workshop","height":87});
															thumbnails[1940031] = clik.newPhoto({"id":1940031,"src":"moonscape_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_1940031.html","width":130,"caption":"brighton moon","height":87});
															thumbnails[1940058] = clik.newPhoto({"id":1940058,"src":"jewel_thumb.jpg","galleries_id":1705,"server_id":1,"link":"photo_1940058.html","width":130,"caption":"Furniture","height":195});
															thumbnails[2657658] = clik.newPhoto({"id":2657658,"src":"worthing2 copy_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_2657658.html","width":130,"caption":"Jazzer","height":88});
															thumbnails[5186674] = clik.newPhoto({"id":5186674,"src":"chris-4-2-5_web1_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_5186674.html","width":130,"caption":"musician","height":195});
															thumbnails[5186822] = clik.newPhoto({"id":5186822,"src":"chrisWEB_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_5186822.html","width":130,"caption":"composer","height":195});
															thumbnails[8342401] = clik.newPhoto({"id":8342401,"src":"makeup-9727_web_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_8342401.html","width":130,"caption":"Jenny","height":87});
															thumbnails[1939967] = clik.newPhoto({"id":1939967,"src":"makeupweb_63_of_302-Edit_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_1939967.html","width":130,"caption":"Alice Stevens Makeup Artist","height":87});
															thumbnails[8012967] = clik.newPhoto({"id":8012967,"src":"katie_maternity-9129_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_8012967.html","width":130,"caption":"mum to be","height":195});
															thumbnails[8013182] = clik.newPhoto({"id":8013182,"src":"katie_maternity-9141_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_8013182.html","width":130,"caption":"mum to be","height":87});
															thumbnails[8984388] = clik.newPhoto({"id":8984388,"src":"makeup_web10_of_302-Edit_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_8984388.html","width":130,"caption":"Alice Stevens Makeup Artist","height":87});
															thumbnails[8013177] = clik.newPhoto({"id":8013177,"src":"katie_maternity-9082_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_8013177.html","width":130,"caption":"mum to be","height":195});
															thumbnails[8984394] = clik.newPhoto({"id":8984394,"src":"makeup_web12_of_302-Edit_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_8984394.html","width":130,"caption":"Alice Stevens Makeup Artist","height":87});
															thumbnails[8013193] = clik.newPhoto({"id":8013193,"src":"katie_maternity-9170_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_8013193.html","width":130,"caption":"mum to be","height":195});
															thumbnails[8984404] = clik.newPhoto({"id":8984404,"src":"makeupbwweb-Edit_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_8984404.html","width":130,"caption":"Alice Stevens Makeup Artist","height":87});
															thumbnails[13733] = clik.newPhoto({"id":13733,"src":"lorna-6347_copy_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_13733.html","width":130,"caption":"Colour Analysis","height":130});
															thumbnails[13636] = clik.newPhoto({"id":13636,"src":"all three white background web_thumb.jpg","galleries_id":1705,"server_id":1,"link":"photo_13636.html","width":130,"caption":"Roots and Wings product shoot","height":130});
															thumbnails[13639] = clik.newPhoto({"id":13639,"src":"lorna-6565 copy_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_13639.html","width":130,"caption":"spring fashion","height":195});
															thumbnails[1939895] = clik.newPhoto({"id":1939895,"src":"tangereweb copy_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_1939895.html","width":130,"caption":"Tangere","height":187});
															thumbnails[13732] = clik.newPhoto({"id":13732,"src":"lorna-6573 copy_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_13732.html","width":130,"caption":"spring fashion","height":195});
															thumbnails[2657164] = clik.newPhoto({"id":2657164,"src":"dani-0222_copy_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_2657164.html","width":130,"caption":"Dani Blue","height":195});
															thumbnails[1223042] = clik.newPhoto({"id":1223042,"src":"dani-0388_copy_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_1223042.html","width":130,"caption":"Dani Blue","height":195});
															thumbnails[47243] = clik.newPhoto({"id":47243,"src":"lornastyling_1_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_47243.html","width":130,"caption":"Lorna, styling","height":195});
															thumbnails[8986034] = clik.newPhoto({"id":8986034,"src":"makeup_97_of_302-Edit_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_8986034.html","width":130,"caption":"Alice Stevens Makeup Artist","height":162});
															thumbnails[8342654] = clik.newPhoto({"id":8342654,"src":"makeup-9691_web_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_8342654.html","width":130,"caption":"Natural makeup","height":137});
															thumbnails[13728] = clik.newPhoto({"id":13728,"src":"aliceweb_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_13728.html","width":130,"caption":"Black and White","height":198});
															thumbnails[47236] = clik.newPhoto({"id":47236,"src":"alice2JPG_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_47236.html","width":130,"caption":"daffodil","height":100});
															thumbnails[47241] = clik.newPhoto({"id":47241,"src":"dorinda&con copy_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_47241.html","width":130,"caption":"Climate Chaos ","height":87});
															thumbnails[47239] = clik.newPhoto({"id":47239,"src":"kate2JPG_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_47239.html","width":130,"caption":"Cherry Blossom","height":99});
															thumbnails[14627] = clik.newPhoto({"id":14627,"src":"lindasilouettJPG1_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_14627.html","width":130,"caption":"Black Tulip","height":99});
															thumbnails[9031794] = clik.newPhoto({"id":9031794,"src":"makeupweb_105_of_302-Edit_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_9031794.html","width":130,"caption":"Alice Stevens Makeup Artist","height":115});
															thumbnails[8342698] = clik.newPhoto({"id":8342698,"src":"makeup-9731_web_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_8342698.html","width":130,"caption":"Egyptian eye ","height":131});
															thumbnails[13736] = clik.newPhoto({"id":13736,"src":"barrio_copy_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_13736.html","width":130,"caption":"Barrio","height":87});
															thumbnails[1223039] = clik.newPhoto({"id":1223039,"src":"compadre_copy_thumb.jpg","galleries_id":1704,"server_id":1,"link":"photo_1223039.html","width":130,"caption":"Compadre","height":95});
															thumbnails[14624] = clik.newPhoto({"id":14624,"src":"website image_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_14624.html","width":130,"caption":"soft light portrait","height":221});
															thumbnails[13660] = clik.newPhoto({"id":13660,"src":"fay5801_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_13660.html","width":130,"caption":"Fay","height":195});
															thumbnails[47245] = clik.newPhoto({"id":47245,"src":"cw_onceover-6940_copy_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_47245.html","width":130,"caption":"Once Over","height":87});
															thumbnails[47249] = clik.newPhoto({"id":47249,"src":"IMG_1702 copy_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_47249.html","width":130,"caption":"Friend of the Earth","height":195});
															thumbnails[47248] = clik.newPhoto({"id":47248,"src":"main room copy_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_47248.html","width":130,"caption":"Climate Chaos","height":87});
															thumbnails[13659] = clik.newPhoto({"id":13659,"src":"splashJPG_thumb.jpg","galleries_id":4839,"server_id":1,"link":"photo_13659.html","width":130,"caption":"splash","height":207});
															thumbnails[47247] = clik.newPhoto({"id":47247,"src":"westpierIMG_2779-01 copy_thumb.jpg","galleries_id":1698,"server_id":1,"link":"photo_47247.html","width":130,"caption":"starlings","height":83});
															thumbnails[13645] = clik.newPhoto({"id":13645,"src":"Simon-7450_copy_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_13645.html","width":130,"caption":"Jazz Pianist","height":87});
															thumbnails[4149626] = clik.newPhoto({"id":4149626,"src":"for_website_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_4149626.html","width":130,"caption":"arranger","height":195});
															thumbnails[4149630] = clik.newPhoto({"id":4149630,"src":"Simon-7501_copy_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_4149630.html","width":130,"caption":"Simon","height":195});
															thumbnails[13641] = clik.newPhoto({"id":13641,"src":"stephweb-9691-Edit_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_13641.html","width":130,"caption":"","height":141});
															thumbnails[8857474] = clik.newPhoto({"id":8857474,"src":"steph-_web9691-Edit_copy_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_8857474.html","width":130,"caption":"","height":105});
															thumbnails[8857524] = clik.newPhoto({"id":8857524,"src":"makeup-web9694_copy1_thumb.jpg","galleries_id":1702,"server_id":1,"link":"photo_8857524.html","width":130,"caption":"","height":166});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[1698] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sea and landscapes","link":"gallery_1698.html","maxRecords":0.0,"photoIDs":[13635.0,13642.0,13648.0,13658.0,13753.0,13756.0,13758.0,14707.0,14708.0,1940031.0,47247.0],"skipIndex":0,"section_code":"gallery","featured_images":"47247,14707,13753,13642","id":1698,"singleSection":false});				  						galleries[1702] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_1702.html","maxRecords":0.0,"photoIDs":[5186674.0,5186822.0,8342401.0,8012967.0,8013182.0,8013177.0,8013193.0,1939895.0,2657164.0,1223042.0,13728.0,14624.0,13660.0,13645.0,4149626.0,4149630.0,13641.0,8857474.0,8857524.0],"skipIndex":0,"section_code":"gallery","featured_images":"8857474,8342401,8013193,8013182,8013177,8012967,5186822,5186674,4149630,4149626,2657164,1223042,14624,13660,13645,13641","id":1702,"singleSection":false});				  						galleries[1703] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flowers","link":"gallery_1703.html","maxRecords":0.0,"photoIDs":[13637.0,13640.0,13649.0,13661.0,13729.0,13730.0,13731.0,13762.0],"skipIndex":0,"section_code":"gallery","featured_images":"13731,13729,13661,13640,13637","id":1703,"singleSection":false});				  						galleries[1704] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fashion ","link":"gallery_1704.html","maxRecords":0.0,"photoIDs":[1939967.0,8984388.0,8984394.0,8984404.0,13733.0,13639.0,13732.0,47243.0,8986034.0,8342654.0,47236.0,47239.0,14627.0,9031794.0,8342698.0,13736.0,1223039.0],"skipIndex":0,"section_code":"gallery","featured_images":"9031794,8986034,8984404,8984394,8984388,1939967,47243,47236,13733,13732,13639","id":1704,"singleSection":false});				  						galleries[1705] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Design","link":"gallery_1705.html","maxRecords":0.0,"photoIDs":[13638.0,13643.0,13644.0,13647.0,13741.0,13744.0,13746.0,13747.0,1940058.0,13636.0],"skipIndex":0,"section_code":"gallery","featured_images":"13747,13746,13636","id":1705,"singleSection":false});				  						galleries[4839] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Social Documentary","link":"gallery_4839.html","maxRecords":0.0,"photoIDs":[13646.0,13734.0,13735.0,1397014.0,1939844.0,1939916.0,2657658.0,47241.0,47245.0,47249.0,47248.0,13659.0],"skipIndex":0,"section_code":"gallery","featured_images":"2657658,1939916,1939844,47245","id":4839,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5186822,1940031,1939916,1939844,14707,13762,13756,13753,13730,13729,13658,13647,13640,13637,13635,8012967,1939967,8984388,8013182,8984404,8013193,1939895,13639,2657164,13732,1223042,47243,47236,47239,9031794,13736,47247,13645,4149626,8857474';
imageSets[2] = '8342401,5186822,5186674,2657658,1939916,1939844,14707,13753,13747,13746,13731,13729,13661,13642,13640,13637,8012967,1939967,8984388,8013182,8984394,8013177,8984404,8013193,13733,13639,13636,2657164,13732,1223042,47243,8986034,47236,9031794,14624,13660,47245,47247,13645,4149626,4149630,13641,8857474';
imageSets[3] = '47247';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/chrissy/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/chrissy/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/chrissy/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/chrissy/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/chrissy/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/chrissy/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/chrissy/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/chrissy/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 = 'christine wiltshire 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;
	}
}

			

