window.thumbnails = {};
															thumbnails[4419273] = clik.newPhoto({"id":4419273,"src":"fuji-a4-header-1box_copy_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":19});
															thumbnails[4445754] = clik.newPhoto({"id":4445754,"src":"DL400s_single_fr_071116_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":97});
															thumbnails[4463572] = clik.newPhoto({"id":4463572,"src":"Untitled-1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[4919621] = clik.newPhoto({"id":4919621,"src":"10__voucher_web_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":84});
															thumbnails[5786367] = clik.newPhoto({"id":5786367,"src":"fun_suff_F23AF2AD-24E8-5EC4-4F0BE259C6BA9A79_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":104});
															thumbnails[5786421] = clik.newPhoto({"id":5786421,"src":"montage_setup3low_res_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":163});
															thumbnails[6340565] = clik.newPhoto({"id":6340565,"src":"LOW_RES_WEB_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7010401] = clik.newPhoto({"id":7010401,"src":"Portrait_Leaflet_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[7204672] = clik.newPhoto({"id":7204672,"src":"NEW_FILM_PRICELISTSEPTEMBER2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":116});
															thumbnails[7928822] = clik.newPhoto({"id":7928822,"src":"New_mug_service_poster_edited-2_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":173});
															thumbnails[8016770] = clik.newPhoto({"id":8016770,"src":"flower_poster_edited-11_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":109});
															thumbnails[8016774] = clik.newPhoto({"id":8016774,"src":"travel_angels_poster1_edited-1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":109});
															thumbnails[8318331] = clik.newPhoto({"id":8318331,"src":"hornsbury_mill_poster_copy_edited-11_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":104});
															thumbnails[8687324] = clik.newPhoto({"id":8687324,"src":"NEW_FILM_PRICELISTSEPTEMBER2low_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":163});
															thumbnails[8687337] = clik.newPhoto({"id":8687337,"src":"new_extra_services_prices_2010low_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":163});
															thumbnails[8700707] = clik.newPhoto({"id":8700707,"src":"PHOTOGIFT_SELECTION_low_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":107});
															thumbnails[9038581] = clik.newPhoto({"id":9038581,"src":"7x5_promotion_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":189});
															thumbnails[9121874] = clik.newPhoto({"id":9121874,"src":"passport-photographs-1_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":47});
															thumbnails[9121879] = clik.newPhoto({"id":9121879,"src":"passport-photographs-2_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":70});
															thumbnails[9122977] = clik.newPhoto({"id":9122977,"src":"portrait_3_app_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":104});
															thumbnails[9123130] = clik.newPhoto({"id":9123130,"src":"canvas_full_wrap_round_4_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":171});
															thumbnails[8051835] = clik.newPhoto({"id":8051835,"src":"A_snowy_East_cliff_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8051835.html","width":130,"caption":"Snowy East Cliff","height":87});
															thumbnails[8051852] = clik.newPhoto({"id":8051852,"src":"beach_hut_on_beach_huts_copyright_3_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8051852.html","width":130,"caption":"Deckchairs","height":195});
															thumbnails[8051856] = clik.newPhoto({"id":8051856,"src":"beach_huts_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8051856.html","width":130,"caption":"Beach Huts","height":195});
															thumbnails[8051864] = clik.newPhoto({"id":8051864,"src":"Beach_huts_Lyme_regis_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8051864.html","width":130,"caption":"Beach Huts","height":87});
															thumbnails[8051872] = clik.newPhoto({"id":8051872,"src":"Bluebells_copyright_Marie_Mears_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_8051872.html","width":130,"caption":"","height":195});
															thumbnails[8051883] = clik.newPhoto({"id":8051883,"src":"Bluebells_Langdon_woods_copyright_Marie_Mears_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_8051883.html","width":130,"caption":"Bluebells","height":195});
															thumbnails[8051887] = clik.newPhoto({"id":8051887,"src":"Comers_Hill_Symondsbury_copyright_Marie_Mears_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_8051887.html","width":130,"caption":"Comers Hill","height":195});
															thumbnails[8051894] = clik.newPhoto({"id":8051894,"src":"Early_morning_snow_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8051894.html","width":130,"caption":"Early Morning Snow","height":87});
															thumbnails[8051946] = clik.newPhoto({"id":8051946,"src":"Damn_things_never_worked_properly_anyway_thumb.jpg","galleries_id":431822,"server_id":18,"link":"photo_8051946.html","width":130,"caption":"\"Damn things never worked properly anyway\"","height":195});
															thumbnails[8052018] = clik.newPhoto({"id":8052018,"src":"Early_morning_surf_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052018.html","width":130,"caption":"Early Morning Surfer","height":87});
															thumbnails[8052027] = clik.newPhoto({"id":8052027,"src":"Evening_on_the_Jurassic_coast_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052027.html","width":130,"caption":"Evening on the Jurassic Coast","height":87});
															thumbnails[8052032] = clik.newPhoto({"id":8052032,"src":"Evening_Sun2_Copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052032.html","width":130,"caption":"Evening Sun","height":195});
															thumbnails[8052168] = clik.newPhoto({"id":8052168,"src":"Evening_sun_lyme_harbour_copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052168.html","width":130,"caption":"Evening Sun","height":87});
															thumbnails[8052207] = clik.newPhoto({"id":8052207,"src":"Goldencap_Charmouth_copyright_Marie_mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052207.html","width":130,"caption":"Goldencap","height":87});
															thumbnails[8052275] = clik.newPhoto({"id":8052275,"src":"gone_to_seed_copyright_Marie_Mears_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_8052275.html","width":130,"caption":"Gone to seed!","height":195});
															thumbnails[8052292] = clik.newPhoto({"id":8052292,"src":"Green_ivy_copyright_Marie_Mears_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8052292.html","width":130,"caption":"Green Ivy","height":195});
															thumbnails[8052317] = clik.newPhoto({"id":8052317,"src":"Heart_of_stone_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8052317.html","width":130,"caption":"Heart of stone","height":87});
															thumbnails[8052335] = clik.newPhoto({"id":8052335,"src":"Heart_of_stone_bw_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8052335.html","width":130,"caption":"Heart of stone","height":87});
															thumbnails[8052341] = clik.newPhoto({"id":8052341,"src":"Horse_bit_and_reins_thumb.jpg","galleries_id":431821,"server_id":18,"link":"photo_8052341.html","width":130,"caption":"Horse, Bit and Reins","height":172});
															thumbnails[8052343] = clik.newPhoto({"id":8052343,"src":"Horse_head_thumb.jpg","galleries_id":431821,"server_id":18,"link":"photo_8052343.html","width":130,"caption":"Horse head","height":98});
															thumbnails[8052345] = clik.newPhoto({"id":8052345,"src":"Icy_waters_Copyright_Marie_Mears_edited-1_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052345.html","width":130,"caption":"Icy Waters","height":87});
															thumbnails[8052710] = clik.newPhoto({"id":8052710,"src":"If_only_to_touch_my_toes_thumb.jpg","galleries_id":431822,"server_id":18,"link":"photo_8052710.html","width":130,"caption":"\"If only to touch my toes!\"","height":195});
															thumbnails[8052713] = clik.newPhoto({"id":8052713,"src":"Jurassic_cliffs_West_Bay_Copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052713.html","width":130,"caption":"Jurassic Cliffs","height":87});
															thumbnails[8052715] = clik.newPhoto({"id":8052715,"src":"Jurassic_Views_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052715.html","width":130,"caption":"Jurassic Views","height":87});
															thumbnails[8052742] = clik.newPhoto({"id":8052742,"src":"Lighthouse_copyright_Marie_Mears_copy_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052742.html","width":130,"caption":"Rattray Light House","height":195});
															thumbnails[8052748] = clik.newPhoto({"id":8052748,"src":"Lyme_Harbour_copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052748.html","width":130,"caption":"Lyme Harbour","height":87});
															thumbnails[8052757] = clik.newPhoto({"id":8052757,"src":"Lyme_harbour_evening_sun_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052757.html","width":130,"caption":"Lyme Harbour","height":87});
															thumbnails[8052763] = clik.newPhoto({"id":8052763,"src":"Lyme_lights_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052763.html","width":130,"caption":"Lyme Lights","height":195});
															thumbnails[8052765] = clik.newPhoto({"id":8052765,"src":"Not_much_further_thumb.jpg","galleries_id":431822,"server_id":18,"link":"photo_8052765.html","width":130,"caption":"\"Not much further!\"","height":195});
															thumbnails[8052768] = clik.newPhoto({"id":8052768,"src":"Pebbles_copyright_Marie_Mears_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8052768.html","width":130,"caption":"Pebbles","height":195});
															thumbnails[8052773] = clik.newPhoto({"id":8052773,"src":"Pier_Terrace_Copyright_Marie_Mears_edited-1_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052773.html","width":130,"caption":"Pier Terrace","height":87});
															thumbnails[8052781] = clik.newPhoto({"id":8052781,"src":"Rattray_lighthouse_scotland_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052781.html","width":130,"caption":"Rattray Light House","height":87});
															thumbnails[8052786] = clik.newPhoto({"id":8052786,"src":"River_boats_West_Bay_2_Copyright_Marie_Mears_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8052786.html","width":130,"caption":"River Boats","height":195});
															thumbnails[8052791] = clik.newPhoto({"id":8052791,"src":"River_boats_West_Bay_Copyright_Marie_Mears_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8052791.html","width":130,"caption":"River Boats","height":195});
															thumbnails[8052800] = clik.newPhoto({"id":8052800,"src":"Riverside_living_Copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052800.html","width":130,"caption":"Riverside Living","height":87});
															thumbnails[8052807] = clik.newPhoto({"id":8052807,"src":"SaddleStirrup_thumb.jpg","galleries_id":431821,"server_id":18,"link":"photo_8052807.html","width":130,"caption":"Saddle and Stirrup","height":177});
															thumbnails[8052815] = clik.newPhoto({"id":8052815,"src":"Sleeping_Beauty2_thumb.jpg","galleries_id":431821,"server_id":18,"link":"photo_8052815.html","width":130,"caption":"Sleeping Beauty","height":195});
															thumbnails[8052843] = clik.newPhoto({"id":8052843,"src":"Snowdrops_BW2_Copyright_Marie_Mears_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_8052843.html","width":130,"caption":"Snowdrops","height":87});
															thumbnails[8052895] = clik.newPhoto({"id":8052895,"src":"Snowdrops_Copyright_Marie_Mears_copy_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_8052895.html","width":130,"caption":"Snowdrops","height":195});
															thumbnails[8052904] = clik.newPhoto({"id":8052904,"src":"Snowy_walk_Old_Railway_line_West_Bay_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_8052904.html","width":130,"caption":"Snowy Walk","height":87});
															thumbnails[8052912] = clik.newPhoto({"id":8052912,"src":"sunrise_west_bay2_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052912.html","width":130,"caption":"Sunrise ","height":87});
															thumbnails[8052920] = clik.newPhoto({"id":8052920,"src":"swans2_thumb.jpg","galleries_id":431821,"server_id":18,"link":"photo_8052920.html","width":130,"caption":"Swans","height":87});
															thumbnails[8052934] = clik.newPhoto({"id":8052934,"src":"The_cobb_Lyme_Regis_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052934.html","width":130,"caption":"The Cobb","height":87});
															thumbnails[8052939] = clik.newPhoto({"id":8052939,"src":"The_cobb_Lyme_Regis2_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_8052939.html","width":130,"caption":"The Cobb","height":87});
															thumbnails[8052950] = clik.newPhoto({"id":8052950,"src":"Tulips_Copyright_Marie_Mears_edited-1_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_8052950.html","width":130,"caption":"Tulips","height":87});
															thumbnails[8052956] = clik.newPhoto({"id":8052956,"src":"Volkswagen_Classic_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8052956.html","width":130,"caption":"Classic Volkswagon","height":87});
															thumbnails[8053110] = clik.newPhoto({"id":8053110,"src":"Morris_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_8053110.html","width":130,"caption":"Morris","height":195});
															thumbnails[9038796] = clik.newPhoto({"id":9038796,"src":"Beach_huts_lyme_Copyright_Marie_Mears_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_9038796.html","width":130,"caption":"Beach Huts","height":87});
															thumbnails[9038851] = clik.newPhoto({"id":9038851,"src":"Early_morning_call_Copyright_Marie_Mears_thumb.jpg","galleries_id":431821,"server_id":18,"link":"photo_9038851.html","width":130,"caption":"Early Morning Call!","height":183});
															thumbnails[9038879] = clik.newPhoto({"id":9038879,"src":"horses_head_Copyright_Marie_Mears_thumb.jpg","galleries_id":431821,"server_id":18,"link":"photo_9038879.html","width":130,"caption":"","height":195});
															thumbnails[9038906] = clik.newPhoto({"id":9038906,"src":"Little_red_boat_Copyright_Marie_Mears_thumb.jpg","galleries_id":431823,"server_id":18,"link":"photo_9038906.html","width":130,"caption":"Little Red Boat","height":92});
															thumbnails[9039102] = clik.newPhoto({"id":9039102,"src":"Lyme_regis_Copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_9039102.html","width":130,"caption":"Lyme Regis Triple","height":183});
															thumbnails[9039214] = clik.newPhoto({"id":9039214,"src":"Lyme_regis_triple_copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_9039214.html","width":130,"caption":"Lyme Regis Triple","height":87});
															thumbnails[9039274] = clik.newPhoto({"id":9039274,"src":"Passion_Flower_copyright_Marie_Mears_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_9039274.html","width":130,"caption":"Passion Flower","height":189});
															thumbnails[9039310] = clik.newPhoto({"id":9039310,"src":"Portland_copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_9039310.html","width":130,"caption":"Portland, Dorset","height":183});
															thumbnails[9039427] = clik.newPhoto({"id":9039427,"src":"Portland1_copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_9039427.html","width":130,"caption":"Portland Lighthouse","height":183});
															thumbnails[9039528] = clik.newPhoto({"id":9039528,"src":"Portland2_copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_9039528.html","width":130,"caption":"Portland Lighthouse","height":92});
															thumbnails[9039530] = clik.newPhoto({"id":9039530,"src":"Portland3_copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_9039530.html","width":130,"caption":"Portland Heights","height":92});
															thumbnails[9039603] = clik.newPhoto({"id":9039603,"src":"the_cobb_view_lyme_copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_9039603.html","width":130,"caption":"The Cobb","height":87});
															thumbnails[9039616] = clik.newPhoto({"id":9039616,"src":"Triple_flower_copyright_Marie_Mears_thumb.jpg","galleries_id":263461,"server_id":18,"link":"photo_9039616.html","width":130,"caption":"Pink Flower","height":195});
															thumbnails[9039654] = clik.newPhoto({"id":9039654,"src":"View_from_lyme_of_Goldencap_copyright_Marie_Mears_thumb.jpg","galleries_id":262342,"server_id":18,"link":"photo_9039654.html","width":130,"caption":"A View of Goldencap","height":92});
															thumbnails[9039728] = clik.newPhoto({"id":9039728,"src":"Waiting_Copyright_Marie_Mears_thumb.jpg","galleries_id":431821,"server_id":18,"link":"photo_9039728.html","width":130,"caption":"Waiting!","height":183});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[431823] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Abstracts","link":"gallery_431823.html","maxRecords":0.0,"photoIDs":[8051852.0,8051864.0,8052292.0,8052317.0,8052335.0,8052768.0,8052786.0,8052791.0,8052956.0,8053110.0,9038796.0,9038906.0],"skipIndex":0,"section_code":"gallery","featured_images":"9038906,9038796,8053110,8052956,8052791,8052786,8052768,8052335,8052317,8052292","id":431823,"singleSection":false});				  						galleries[262342] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Coastal","link":"gallery_262342.html","maxRecords":0.0,"photoIDs":[8051835.0,8051856.0,8051894.0,8052018.0,8052027.0,8052032.0,8052168.0,8052207.0,8052345.0,8052713.0,8052715.0,8052742.0,8052748.0,8052757.0,8052763.0,8052773.0,8052781.0,8052800.0,8052912.0,8052934.0,8052939.0,9039102.0,9039214.0,9039310.0,9039427.0,9039528.0,9039530.0,9039603.0,9039654.0],"skipIndex":0,"section_code":"gallery","featured_images":8051835.0,"id":262342,"singleSection":false});				  						galleries[263461] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flora and Fauna","link":"gallery_263461.html","maxRecords":0.0,"photoIDs":[8051872.0,8051883.0,8051887.0,8052275.0,8052843.0,8052895.0,8052904.0,8052950.0,9039274.0,9039616.0],"skipIndex":0,"section_code":"gallery","featured_images":"9039616,9039274,8052950,8052904,8052895,8052843,8052275,8051887,8051883,8051872","id":263461,"singleSection":false});				  						galleries[431821] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Equine, Fur and Feather","link":"gallery_431821.html","maxRecords":0.0,"photoIDs":[8052341.0,8052343.0,8052807.0,8052815.0,8052920.0,9038851.0,9038879.0,9039728.0],"skipIndex":0,"section_code":"gallery","featured_images":8052807.0,"id":431821,"singleSection":false});				  						galleries[431822] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Humourous","link":"gallery_431822.html","maxRecords":0.0,"photoIDs":[8051946.0,8052710.0,8052765.0],"skipIndex":0,"section_code":"gallery","featured_images":"8052765,8052710,8051946","id":431822,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8052956,8052950,8052939,8052934,8052920,8052912,8052904,8052843,8052800,8052781,8052773,8052757,8052748,8052715,8052713,8052345,8052343,8052341,8052335,8052317,8052207,8052168,8052027,8052018,8051894,8051887,8051883,8051864,8051835';
imageSets[2] = '8052807,8051835';
imageSets[3] = '9123130,9122977,9121879,9121874,9039728,9039654,9039616,9039603,9039530,9039528,9039427,9039310,9039274,9039214,9039102,9038906,9038879,9038851,9038796,9038581,8700707,8687337,8687324,8318331,8053110,8052956,8052950,8052939,8052934,8052920,8052912,8052904,8052895,8052843,8052815,8052807,8052800,8052791,8052786,8052781,8052773,8052768,8052765,8052763,8052757,8052748,8052742,8052715,8052713,8052710';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mariemears/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mariemears/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mariemears/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mariemears/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/mariemears/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/mariemears/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mariemears/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/mariemears/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 = 'Foto Finsh: ' + 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>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="MARIEMEARS">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

