window.thumbnails = {};
															thumbnails[4776989] = clik.newPhoto({"id":4776989,"src":"webseiteneu_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[5014748] = clik.newPhoto({"id":5014748,"src":"dolphin_banner_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Calm summer´s evening with dolphin","height":27});
															thumbnails[5014750] = clik.newPhoto({"id":5014750,"src":"glen_banner_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Puffin Island from Moyrisk, St. Finian´s Bay","height":22});
															thumbnails[5014751] = clik.newPhoto({"id":5014751,"src":"Portmagee_banner_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Evening in Portmagee","height":22});
															thumbnails[5014752] = clik.newPhoto({"id":5014752,"src":"giftvoucher_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":96});
															thumbnails[8805135] = clik.newPhoto({"id":8805135,"src":"arrow_click_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":18});
															thumbnails[8835830] = clik.newPhoto({"id":8835830,"src":"skelligphototours_9502E11E-1EC9-D45B-1CD7DCD943210BF4_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":89});
															thumbnails[4708322] = clik.newPhoto({"id":4708322,"src":"workshop1_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4708322.html","width":130,"caption":"At a one day photo workshop in Portmagee","height":87});
															thumbnails[4737683] = clik.newPhoto({"id":4737683,"src":"IMG_0209_Kopieweb_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4737683.html","width":130,"caption":"Workshop on Illaunlaughan1","height":87});
															thumbnails[4737686] = clik.newPhoto({"id":4737686,"src":"IMG_9587_Kopieweb_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4737686.html","width":130,"caption":"Ringfort in Caherciveen","height":87});
															thumbnails[4737692] = clik.newPhoto({"id":4737692,"src":"IMG_9774_Kopieweb_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4737692.html","width":130,"caption":"Capturing Details","height":87});
															thumbnails[4737694] = clik.newPhoto({"id":4737694,"src":"P1000418web_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4737694.html","width":130,"caption":"Workshop in Derrynane Park","height":87});
															thumbnails[4737698] = clik.newPhoto({"id":4737698,"src":"P1000417web_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4737698.html","width":130,"caption":"Derrynane Park and Gardens","height":195});
															thumbnails[4737704] = clik.newPhoto({"id":4737704,"src":"P1000759web_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4737704.html","width":130,"caption":"During a Guided Photo Tour on Culloo Rock, Valentia Island","height":87});
															thumbnails[4738060] = clik.newPhoto({"id":4738060,"src":"P1000803web_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4738060.html","width":130,"caption":"One Day Guided Photo Tour along the Skellig Ring","height":87});
															thumbnails[4738068] = clik.newPhoto({"id":4738068,"src":"P1000873web_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4738068.html","width":130,"caption":"One Day Photo Workshop on Skellig Michael","height":87});
															thumbnails[4738076] = clik.newPhoto({"id":4738076,"src":"IMG_3477web_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4738076.html","width":130,"caption":"Capturing the Sunrise near Portmagee during the September Photo Holiday Week","height":87});
															thumbnails[4738142] = clik.newPhoto({"id":4738142,"src":"IMG_8091churchisland_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4738142.html","width":130,"caption":"During a Heritage and Photo Workshop on Church Island, Waterville, with Paddy Bushe and myself","height":87});
															thumbnails[4738152] = clik.newPhoto({"id":4738152,"src":"IMG_8033churchisland_thumb.jpg","galleries_id":270751,"server_id":18,"link":"photo_4738152.html","width":130,"caption":"Church Island, Waterville,<br>\r\nthe next day we edited our pictures on computers in Tech Amergin","height":87});
															thumbnails[6570932] = clik.newPhoto({"id":6570932,"src":"skelligphototours_2010-1_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570932.html","width":130,"caption":"Cliffs on Valentia Island","height":87});
															thumbnails[6570933] = clik.newPhoto({"id":6570933,"src":"skelligphototours_2010-2_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570933.html","width":130,"caption":"Valentia Island","height":87});
															thumbnails[6570934] = clik.newPhoto({"id":6570934,"src":"skelligphototours_2010-3_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570934.html","width":130,"caption":" Valentia Island","height":87});
															thumbnails[6570935] = clik.newPhoto({"id":6570935,"src":"skelligphototours_2010-4_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570935.html","width":130,"caption":"On Skellig Michael","height":87});
															thumbnails[6570936] = clik.newPhoto({"id":6570936,"src":"skelligphototours_2010-5_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570936.html","width":130,"caption":"Skellig Michael","height":90});
															thumbnails[6570937] = clik.newPhoto({"id":6570937,"src":"skelligphototours_2010-6_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570937.html","width":130,"caption":"Skellig Michael","height":195});
															thumbnails[6570938] = clik.newPhoto({"id":6570938,"src":"skelligphototours_2010-7_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570938.html","width":130,"caption":"Glencar Mountains and Caragh Lake","height":87});
															thumbnails[6570939] = clik.newPhoto({"id":6570939,"src":"skelligphototours_2010-8_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570939.html","width":130,"caption":"Glencar Mountains and Caragh Lake","height":87});
															thumbnails[6570940] = clik.newPhoto({"id":6570940,"src":"skelligphototours_2010-9_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570940.html","width":130,"caption":"Glencar Mountains and Caragh Lake","height":87});
															thumbnails[6570941] = clik.newPhoto({"id":6570941,"src":"skelligphototours_2010-10_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570941.html","width":130,"caption":"Caragh Lake","height":87});
															thumbnails[6570942] = clik.newPhoto({"id":6570942,"src":"skelligphototours_2010-11_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570942.html","width":130,"caption":"Nice day for a chat and photos","height":87});
															thumbnails[6570943] = clik.newPhoto({"id":6570943,"src":"skelligphototours_2010-12_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570943.html","width":130,"caption":"Glencar Mountains and Caragh Lake","height":87});
															thumbnails[6570944] = clik.newPhoto({"id":6570944,"src":"skelligphototours_2010-13_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570944.html","width":130,"caption":"Glencar Mountains and Caragh Lake","height":87});
															thumbnails[6570945] = clik.newPhoto({"id":6570945,"src":"skelligphototours_2010-14_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570945.html","width":130,"caption":"Glencar Mountains ","height":87});
															thumbnails[6570946] = clik.newPhoto({"id":6570946,"src":"skelligphototours_2010-15_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570946.html","width":130,"caption":"Puck Fair in Killorglin","height":87});
															thumbnails[6570948] = clik.newPhoto({"id":6570948,"src":"skelligphototours_2010-16_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570948.html","width":130,"caption":"Cromane Harbour","height":87});
															thumbnails[6570950] = clik.newPhoto({"id":6570950,"src":"skelligphototours_2010-17_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570950.html","width":130,"caption":"Cromane Harbour","height":87});
															thumbnails[6570951] = clik.newPhoto({"id":6570951,"src":"skelligphototours_2010-18_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570951.html","width":130,"caption":"Stone Ringfort in Cahirciveen","height":87});
															thumbnails[6570952] = clik.newPhoto({"id":6570952,"src":"skelligphototours_2010-19_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570952.html","width":130,"caption":"Ballycarbery Castle, Cahirciveen","height":87});
															thumbnails[6570953] = clik.newPhoto({"id":6570953,"src":"skelligphototours_2010-20_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570953.html","width":130,"caption":"Viewpoint between Portmagee and St. Finian´s Bay","height":87});
															thumbnails[6570954] = clik.newPhoto({"id":6570954,"src":"skelligphototours_2010-21_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570954.html","width":130,"caption":"Bogfield Portmagee","height":87});
															thumbnails[6570957] = clik.newPhoto({"id":6570957,"src":"skelligphototours_2010-22_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570957.html","width":130,"caption":"Bogfield Portmagee","height":87});
															thumbnails[6570960] = clik.newPhoto({"id":6570960,"src":"skelligphototours_2010-23_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570960.html","width":130,"caption":"Derrynane","height":87});
															thumbnails[6570962] = clik.newPhoto({"id":6570962,"src":"skelligphototours_2010-24_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570962.html","width":130,"caption":"Abbey Island, Derrynane","height":87});
															thumbnails[6570965] = clik.newPhoto({"id":6570965,"src":"skelligphototours_2010-25_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570965.html","width":130,"caption":"Derrynane","height":87});
															thumbnails[6570968] = clik.newPhoto({"id":6570968,"src":"skelligphototours_2010-26_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570968.html","width":130,"caption":"Valentia Island","height":87});
															thumbnails[6570970] = clik.newPhoto({"id":6570970,"src":"skelligphototours_2010-27_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570970.html","width":130,"caption":"Valentia Island","height":87});
															thumbnails[6570972] = clik.newPhoto({"id":6570972,"src":"skelligphototours_2010-28_thumb.jpg","galleries_id":360524,"server_id":18,"link":"photo_6570972.html","width":130,"caption":"Valentia Island","height":87});
															thumbnails[6821844] = clik.newPhoto({"id":6821844,"src":"Skelligphototours-4027_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821844.html","width":130,"caption":"","height":87});
															thumbnails[6821845] = clik.newPhoto({"id":6821845,"src":"Skelligphototours-3895_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821845.html","width":130,"caption":"","height":87});
															thumbnails[6821846] = clik.newPhoto({"id":6821846,"src":"Skelligphototours-1142_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821846.html","width":130,"caption":"","height":87});
															thumbnails[6821847] = clik.newPhoto({"id":6821847,"src":"Skelligphototours-1132_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821847.html","width":130,"caption":"","height":87});
															thumbnails[6821848] = clik.newPhoto({"id":6821848,"src":"Skelligphototours-1107_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821848.html","width":130,"caption":"","height":87});
															thumbnails[6821849] = clik.newPhoto({"id":6821849,"src":"Skelligphototours-1104_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821849.html","width":130,"caption":"","height":87});
															thumbnails[6821850] = clik.newPhoto({"id":6821850,"src":"Skelligphototours-1074_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821850.html","width":130,"caption":"","height":87});
															thumbnails[6821851] = clik.newPhoto({"id":6821851,"src":"Skelligphototours-91_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821851.html","width":130,"caption":"","height":87});
															thumbnails[6821852] = clik.newPhoto({"id":6821852,"src":"Skelligphototours-5_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821852.html","width":130,"caption":"","height":195});
															thumbnails[6821855] = clik.newPhoto({"id":6821855,"src":"Skelligphototours-3_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821855.html","width":130,"caption":"","height":87});
															thumbnails[6821857] = clik.newPhoto({"id":6821857,"src":"Skelligphototours-2-4_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821857.html","width":130,"caption":"","height":195});
															thumbnails[6821858] = clik.newPhoto({"id":6821858,"src":"Skelligphototours-2-3_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821858.html","width":130,"caption":"","height":163});
															thumbnails[6821859] = clik.newPhoto({"id":6821859,"src":"Skelligphototours-2-2_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821859.html","width":130,"caption":"","height":130});
															thumbnails[6821860] = clik.newPhoto({"id":6821860,"src":"Skelligphoto_tours-_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821860.html","width":130,"caption":"","height":85});
															thumbnails[6821861] = clik.newPhoto({"id":6821861,"src":"Skelligphoto_tours--2_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821861.html","width":130,"caption":"","height":195});
															thumbnails[6821862] = clik.newPhoto({"id":6821862,"src":"Skelligphoto_tours-0889_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821862.html","width":130,"caption":"","height":87});
															thumbnails[6821864] = clik.newPhoto({"id":6821864,"src":"Skelligphoto_tours-0417_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821864.html","width":130,"caption":"","height":87});
															thumbnails[6821866] = clik.newPhoto({"id":6821866,"src":"Skelligphoto_tours-0378_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821866.html","width":130,"caption":"","height":87});
															thumbnails[6821869] = clik.newPhoto({"id":6821869,"src":"Skelligphoto_tours-0347_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821869.html","width":130,"caption":"","height":87});
															thumbnails[6821871] = clik.newPhoto({"id":6821871,"src":"Skelligphoto_tours-4_thumb.jpg","galleries_id":370442,"server_id":18,"link":"photo_6821871.html","width":130,"caption":"","height":84});
															thumbnails[4800949] = clik.newPhoto({"id":4800949,"src":"P1010401web_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4800949.html","width":130,"caption":"By the seashore","height":195});
															thumbnails[4956243] = clik.newPhoto({"id":4956243,"src":"Back_from_fishing_lines_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956243.html","width":130,"caption":"Fishing boat in Portmagee","height":87});
															thumbnails[4956255] = clik.newPhoto({"id":4956255,"src":"IMG_0151_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956255.html","width":130,"caption":"Stone Row near Waterville","height":87});
															thumbnails[4956640] = clik.newPhoto({"id":4956640,"src":"DSC_0485kerstingrid_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956640.html","width":130,"caption":"Montbretias","height":195});
															thumbnails[4956301] = clik.newPhoto({"id":4956301,"src":"IMG_2364_2_3blines_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956301.html","width":130,"caption":"Puffin Island and Skellig Islands","height":87});
															thumbnails[4956409] = clik.newPhoto({"id":4956409,"src":"IMG_9771_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956409.html","width":130,"caption":"Portmagee Harbour","height":87});
															thumbnails[4956449] = clik.newPhoto({"id":4956449,"src":"IMG_9803_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956449.html","width":130,"caption":"Portmagee Harbour 2","height":87});
															thumbnails[4956331] = clik.newPhoto({"id":4956331,"src":"IMG_9741_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956331.html","width":130,"caption":"Portmagee Harbour 3","height":87});
															thumbnails[4956271] = clik.newPhoto({"id":4956271,"src":"IMG_1539_Kopie_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956271.html","width":130,"caption":"Bogcotton near Portmagee","height":195});
															thumbnails[4956457] = clik.newPhoto({"id":4956457,"src":"IMG_9838_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956457.html","width":130,"caption":"Lobsterpots in Portmagee","height":195});
															thumbnails[4956461] = clik.newPhoto({"id":4956461,"src":"skellig_michael_photos_16_lines_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956461.html","width":130,"caption":"Little Skellig","height":195});
															thumbnails[4956262] = clik.newPhoto({"id":4956262,"src":"IMG_1195_thumb.jpg","galleries_id":282161,"server_id":18,"link":"photo_4956262.html","width":130,"caption":"Sunset in St. Finian´s Bay","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[370442] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Autumn and Winter in Kerry","link":"gallery_370442.html","maxRecords":0.0,"photoIDs":[6821844.0,6821845.0,6821846.0,6821847.0,6821848.0,6821849.0,6821850.0,6821851.0,6821852.0,6821855.0,6821857.0,6821858.0,6821859.0,6821860.0,6821861.0,6821862.0,6821864.0,6821866.0,6821869.0,6821871.0],"skipIndex":0,"section_code":"gallery","featured_images":"6821871,6821869,6821866,6821864,6821862,6821861,6821860,6821859,6821858,6821857","id":370442,"singleSection":false});				  						galleries[360524] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Photo Holiday Week, August 2010","link":"gallery_360524.html","maxRecords":0.0,"photoIDs":[6570932.0,6570933.0,6570934.0,6570935.0,6570936.0,6570937.0,6570938.0,6570939.0,6570940.0,6570941.0,6570942.0,6570943.0,6570944.0,6570945.0,6570946.0,6570948.0,6570950.0,6570951.0,6570952.0,6570953.0,6570954.0,6570957.0,6570960.0,6570962.0,6570965.0,6570968.0,6570970.0,6570972.0],"skipIndex":0,"section_code":"gallery","featured_images":"6570972,6570970,6570968,6570965,6570962,6570960,6570957,6570954,6570953,6570952","id":360524,"singleSection":false});				  						galleries[270751] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"On Locations during Photo Workshops in Kerry, 2009","link":"gallery_270751.html","maxRecords":0.0,"photoIDs":[4708322.0,4737683.0,4737686.0,4737692.0,4737694.0,4737698.0,4737704.0,4738060.0,4738068.0,4738076.0,4738142.0,4738152.0],"skipIndex":0,"section_code":"gallery","featured_images":4737686.0,"id":270751,"singleSection":false});				  						galleries[282161] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Phototips Illustrations","link":"gallery_282161.html","maxRecords":0.0,"photoIDs":[4800949.0,4956243.0,4956255.0,4956640.0,4956301.0,4956409.0,4956449.0,4956331.0,4956271.0,4956457.0,4956461.0,4956262.0],"skipIndex":0,"section_code":"gallery","featured_images":4956271.0,"id":282161,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8835830';
imageSets[2] = '4737686,4956271';
imageSets[3] = '8835830,8805135,6821871,6821869,6821866,6821864,6821862,6821861,6821860,6821859,6821858,6821857,6821855,6821852,6821851,6821850,6821849,6821848,6821847,6821846,6821845,6821844,6570972,6570970,6570968,6570965,6570962,6570960,6570957,6570954,6570953,6570952,6570951,6570950,6570948,6570946,6570945,6570944,6570943,6570942,6570941,6570940,6570939,6570938,6570937,6570936,6570935,6570934,6570933,6570932';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/phototours/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/phototours/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/phototours/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/phototours/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/phototours/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/phototours/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/phototours/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/phototours/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 = 'SKELLIGPHOTOTOURS - IRELAND: ' + 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;
	}
}

			

