window.thumbnails = {};
															thumbnails[7072482] = clik.newPhoto({"id":7072482,"src":"Size-standard-mounted_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":101});
															thumbnails[7074018] = clik.newPhoto({"id":7074018,"src":"books_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":188});
															thumbnails[6862577] = clik.newPhoto({"id":6862577,"src":"Ballycastle1_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862577.html","width":130,"caption":"","height":98});
															thumbnails[6865871] = clik.newPhoto({"id":6865871,"src":"Antrim01_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6865871.html","width":130,"caption":"","height":87});
															thumbnails[6865927] = clik.newPhoto({"id":6865927,"src":"archers-big011_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6865927.html","width":130,"caption":"","height":87});
															thumbnails[6865942] = clik.newPhoto({"id":6865942,"src":"dolman041_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6865942.html","width":130,"caption":"","height":88});
															thumbnails[6865989] = clik.newPhoto({"id":6865989,"src":"forest-sun02_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6865989.html","width":130,"caption":"","height":89});
															thumbnails[6866103] = clik.newPhoto({"id":6866103,"src":"port03_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6866103.html","width":130,"caption":"","height":84});
															thumbnails[6863094] = clik.newPhoto({"id":6863094,"src":"Black-Glen_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6863094.html","width":130,"caption":"","height":87});
															thumbnails[6865934] = clik.newPhoto({"id":6865934,"src":"Church01_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6865934.html","width":130,"caption":"","height":192});
															thumbnails[6865948] = clik.newPhoto({"id":6865948,"src":"drum-big041_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6865948.html","width":130,"caption":"","height":86});
															thumbnails[6866015] = clik.newPhoto({"id":6866015,"src":"glen01_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6866015.html","width":130,"caption":"","height":86});
															thumbnails[6866096] = clik.newPhoto({"id":6866096,"src":"magic-tree01_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6866096.html","width":130,"caption":"","height":89});
															thumbnails[6866131] = clik.newPhoto({"id":6866131,"src":"portrush1_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6866131.html","width":130,"caption":"","height":102});
															thumbnails[6862647] = clik.newPhoto({"id":6862647,"src":"Downhill2_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862647.html","width":130,"caption":"","height":87});
															thumbnails[6865952] = clik.newPhoto({"id":6865952,"src":"ecos01_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6865952.html","width":130,"caption":"","height":87});
															thumbnails[6865965] = clik.newPhoto({"id":6865965,"src":"fair2_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6865965.html","width":130,"caption":"","height":195});
															thumbnails[6866168] = clik.newPhoto({"id":6866168,"src":"ticloy04_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6866168.html","width":130,"caption":"","height":86});
															thumbnails[6876003] = clik.newPhoto({"id":6876003,"src":"carrick_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6876003.html","width":130,"caption":"","height":94});
															thumbnails[6882457] = clik.newPhoto({"id":6882457,"src":"Bridge--Buttermilk-Walk-Bro_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6882457.html","width":130,"caption":"","height":98});
															thumbnails[6862646] = clik.newPhoto({"id":6862646,"src":"Mountsandal-forest2_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862646.html","width":130,"caption":"","height":195});
															thumbnails[6865975] = clik.newPhoto({"id":6865975,"src":"fair3_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6865975.html","width":130,"caption":"","height":98});
															thumbnails[6865999] = clik.newPhoto({"id":6865999,"src":"Four-winds03_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6865999.html","width":130,"caption":"","height":85});
															thumbnails[6866211] = clik.newPhoto({"id":6866211,"src":"trees-glenone01_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6866211.html","width":130,"caption":"","height":83});
															thumbnails[6876005] = clik.newPhoto({"id":6876005,"src":"carrrick3_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6876005.html","width":130,"caption":"","height":81});
															thumbnails[6882478] = clik.newPhoto({"id":6882478,"src":"Coleraine_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6882478.html","width":130,"caption":"","height":77});
															thumbnails[6862606] = clik.newPhoto({"id":6862606,"src":"arch_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862606.html","width":130,"caption":"","height":195});
															thumbnails[6865980] = clik.newPhoto({"id":6865980,"src":"fair_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6865980.html","width":130,"caption":"","height":195});
															thumbnails[6866160] = clik.newPhoto({"id":6866160,"src":"Temple-Big01_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6866160.html","width":130,"caption":"","height":194});
															thumbnails[6876007] = clik.newPhoto({"id":6876007,"src":"carrick4_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6876007.html","width":130,"caption":"","height":173});
															thumbnails[6882501] = clik.newPhoto({"id":6882501,"src":"Dolmen_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6882501.html","width":130,"caption":"","height":83});
															thumbnails[6882536] = clik.newPhoto({"id":6882536,"src":"mountsandel-fort_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6882536.html","width":130,"caption":"","height":87});
															thumbnails[6863045] = clik.newPhoto({"id":6863045,"src":"Temple-B-W-1_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6863045.html","width":130,"caption":"","height":93});
															thumbnails[6865985] = clik.newPhoto({"id":6865985,"src":"film04_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6865985.html","width":130,"caption":"","height":187});
															thumbnails[6866197] = clik.newPhoto({"id":6866197,"src":"toome_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6866197.html","width":130,"caption":"","height":195});
															thumbnails[6876034] = clik.newPhoto({"id":6876034,"src":"carrick2_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6876034.html","width":130,"caption":"","height":92});
															thumbnails[6882517] = clik.newPhoto({"id":6882517,"src":"dundrum-castle_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6882517.html","width":130,"caption":"","height":93});
															thumbnails[6882558] = clik.newPhoto({"id":6882558,"src":"Joey-Dunlop14_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6882558.html","width":130,"caption":"","height":189});
															thumbnails[6862664] = clik.newPhoto({"id":6862664,"src":"Dunluce-Castle01_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862664.html","width":130,"caption":"","height":98});
															thumbnails[6876026] = clik.newPhoto({"id":6876026,"src":"mount-stewart_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6876026.html","width":130,"caption":"","height":93});
															thumbnails[6876046] = clik.newPhoto({"id":6876046,"src":"Friary_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6876046.html","width":130,"caption":"","height":173});
															thumbnails[6882442] = clik.newPhoto({"id":6882442,"src":"ballycastle_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6882442.html","width":130,"caption":"","height":87});
															thumbnails[6882531] = clik.newPhoto({"id":6882531,"src":"galgorm-snow_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6882531.html","width":130,"caption":"","height":177});
															thumbnails[6882848] = clik.newPhoto({"id":6882848,"src":"Sheep-Grazing3--Glenravel_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6882848.html","width":130,"caption":"","height":98});
															thumbnails[6862824] = clik.newPhoto({"id":6862824,"src":"DownhillPalace19_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862824.html","width":130,"caption":"","height":87});
															thumbnails[6866048] = clik.newPhoto({"id":6866048,"src":"Kids05_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6866048.html","width":130,"caption":"","height":95});
															thumbnails[6882438] = clik.newPhoto({"id":6882438,"src":"Arthurs-Cottage6_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6882438.html","width":130,"caption":"","height":98});
															thumbnails[6882586] = clik.newPhoto({"id":6882586,"src":"portrush-white_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6882586.html","width":130,"caption":"","height":98});
															thumbnails[6883102] = clik.newPhoto({"id":6883102,"src":"white-gates_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6883102.html","width":130,"caption":"","height":98});
															thumbnails[6920367] = clik.newPhoto({"id":6920367,"src":"ballypatrick_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6920367.html","width":130,"caption":"","height":81});
															thumbnails[6862828] = clik.newPhoto({"id":6862828,"src":"portglenone1_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862828.html","width":130,"caption":"","height":173});
															thumbnails[6866060] = clik.newPhoto({"id":6866060,"src":"Kids08_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6866060.html","width":130,"caption":"","height":74});
															thumbnails[6882495] = clik.newPhoto({"id":6882495,"src":"Coleraine-Town-Hall3_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6882495.html","width":130,"caption":"","height":213});
															thumbnails[6882616] = clik.newPhoto({"id":6882616,"src":"portstewart-ship_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6882616.html","width":130,"caption":"","height":87});
															thumbnails[6920379] = clik.newPhoto({"id":6920379,"src":"Garvagh-Wood01_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6920379.html","width":130,"caption":"","height":195});
															thumbnails[6920398] = clik.newPhoto({"id":6920398,"src":"misty_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6920398.html","width":130,"caption":"","height":98});
															thumbnails[6862894] = clik.newPhoto({"id":6862894,"src":"Mountsandal-forest1_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862894.html","width":130,"caption":"","height":195});
															thumbnails[6882542] = clik.newPhoto({"id":6882542,"src":"giants-cause_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6882542.html","width":130,"caption":"","height":195});
															thumbnails[6882770] = clik.newPhoto({"id":6882770,"src":"shanes-castle1_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6882770.html","width":130,"caption":"","height":98});
															thumbnails[6920360] = clik.newPhoto({"id":6920360,"src":"ballycastle1_C56220D7-1D09-001F-99C1D7108D7AA914_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6920360.html","width":130,"caption":"","height":49});
															thumbnails[6920402] = clik.newPhoto({"id":6920402,"src":"Old-Tree_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6920402.html","width":130,"caption":"","height":195});
															thumbnails[6920411] = clik.newPhoto({"id":6920411,"src":"tirnony_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6920411.html","width":130,"caption":"","height":193});
															thumbnails[6920413] = clik.newPhoto({"id":6920413,"src":"Portglenone-Forest01_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_6920413.html","width":130,"caption":"","height":188});
															thumbnails[6863119] = clik.newPhoto({"id":6863119,"src":"window_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6863119.html","width":130,"caption":"","height":98});
															thumbnails[6866140] = clik.newPhoto({"id":6866140,"src":"pub-big01_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6866140.html","width":130,"caption":"","height":88});
															thumbnails[6882803] = clik.newPhoto({"id":6882803,"src":"shanes-castle2_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6882803.html","width":130,"caption":"","height":173});
															thumbnails[6920372] = clik.newPhoto({"id":6920372,"src":"fairhead_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6920372.html","width":130,"caption":"","height":87});
															thumbnails[7068219] = clik.newPhoto({"id":7068219,"src":"Ballypriest_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_7068219.html","width":130,"caption":"","height":85});
															thumbnails[6862901] = clik.newPhoto({"id":6862901,"src":"Portstewart1_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862901.html","width":130,"caption":"","height":87});
															thumbnails[6876028] = clik.newPhoto({"id":6876028,"src":"mount-stewart2_thumb.jpg","galleries_id":366403,"server_id":5,"link":"photo_6876028.html","width":130,"caption":"","height":98});
															thumbnails[6883059] = clik.newPhoto({"id":6883059,"src":"St-Saviours-Parish--Connor_thumb.jpg","galleries_id":372530,"server_id":5,"link":"photo_6883059.html","width":130,"caption":"","height":100});
															thumbnails[6920388] = clik.newPhoto({"id":6920388,"src":"Giants-Causeway01_thumb.jpg","galleries_id":372532,"server_id":5,"link":"photo_6920388.html","width":130,"caption":"","height":85});
															thumbnails[6920417] = clik.newPhoto({"id":6920417,"src":"Ticloy-web_thumb.jpg","galleries_id":372531,"server_id":5,"link":"photo_6920417.html","width":130,"caption":"","height":183});
															thumbnails[7068270] = clik.newPhoto({"id":7068270,"src":"GAL02_thumb.jpg","galleries_id":366402,"server_id":5,"link":"photo_7068270.html","width":130,"caption":"","height":196});
															thumbnails[6862654] = clik.newPhoto({"id":6862654,"src":"Slemish7_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862654.html","width":130,"caption":"","height":98});
															thumbnails[6862907] = clik.newPhoto({"id":6862907,"src":"bridge1_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862907.html","width":130,"caption":"","height":173});
															thumbnails[6862908] = clik.newPhoto({"id":6862908,"src":"Mountsandal-forest21_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862908.html","width":130,"caption":"","height":195});
															thumbnails[6863105] = clik.newPhoto({"id":6863105,"src":"Mussenden-Temple15_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6863105.html","width":130,"caption":"","height":86});
															thumbnails[6863110] = clik.newPhoto({"id":6863110,"src":"Galgorm-Castle-Crypt_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6863110.html","width":130,"caption":"","height":98});
															thumbnails[6863114] = clik.newPhoto({"id":6863114,"src":"Portglenone-forest1_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6863114.html","width":130,"caption":"","height":87});
															thumbnails[6862896] = clik.newPhoto({"id":6862896,"src":"church_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6862896.html","width":130,"caption":"","height":98});
															thumbnails[6863117] = clik.newPhoto({"id":6863117,"src":"DownhillPalace13_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6863117.html","width":130,"caption":"","height":87});
															thumbnails[6863138] = clik.newPhoto({"id":6863138,"src":"Garvagh-Wood_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6863138.html","width":130,"caption":"","height":78});
															thumbnails[6863140] = clik.newPhoto({"id":6863140,"src":"tree2-Portglenone-Forest_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6863140.html","width":130,"caption":"","height":98});
															thumbnails[6866222] = clik.newPhoto({"id":6866222,"src":"Downhill1_thumb.jpg","galleries_id":372533,"server_id":5,"link":"photo_6866222.html","width":130,"caption":"","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[372530] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Architecture","link":"gallery_372530.html","maxRecords":0.0,"photoIDs":[6865871.0,6865934.0,6865952.0,6865999.0,6866160.0,6866197.0,6876046.0,6882438.0,6882495.0,6882770.0,6882803.0,6883059.0],"skipIndex":0,"section_code":"gallery","featured_images":"6883059,6882803,6882770,6882495,6882438,6876046,6866197,6866160,6865999,6865952","id":372530,"singleSection":false});				  						galleries[366403] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Documentary","link":"gallery_366403.html","maxRecords":0.0,"photoIDs":[6865927.0,6865948.0,6865965.0,6865975.0,6865980.0,6865985.0,6876026.0,6866048.0,6866060.0,6882542.0,6866140.0,6876028.0],"skipIndex":0,"section_code":"gallery","featured_images":"6882542,6876028,6876026,6866140,6866060,6866048,6865985,6865980,6865975,6865965","id":366403,"singleSection":false});				  						galleries[372531] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"B\/W Landscapes","link":"gallery_372531.html","maxRecords":0.0,"photoIDs":[6865942.0,6866096.0,6882457.0,6882478.0,6882536.0,6882558.0,6882848.0,6883102.0,6920398.0,6920402.0,6920411.0,6920417.0],"skipIndex":0,"section_code":"gallery","featured_images":"6920417,6920411,6920402,6920398,6883102,6882848,6882558,6882536,6882478,6882457","id":372531,"singleSection":false});				  						galleries[366402] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_366402.html","maxRecords":0.0,"photoIDs":[6865989.0,6866015.0,6866168.0,6866211.0,6882501.0,6882517.0,6882531.0,6920367.0,6920379.0,6920413.0,7068219.0,7068270.0],"skipIndex":0,"section_code":"gallery","featured_images":"7068270,7068219,6920413,6920379,6920367,6882531,6882517,6882501,6866211,6866168","id":366402,"singleSection":false});				  						galleries[372532] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Seascapes","link":"gallery_372532.html","maxRecords":0.0,"photoIDs":[6866103.0,6866131.0,6876003.0,6876005.0,6876007.0,6876034.0,6882442.0,6882586.0,6882616.0,6920360.0,6920372.0,6920388.0],"skipIndex":0,"section_code":"gallery","featured_images":"6920388,6920372,6920360,6882616,6882586,6882442,6876034,6876007,6876005,6876003","id":372532,"singleSection":false});				  						galleries[372533] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Prints For Sale","link":"gallery_372533.html","maxRecords":0.0,"photoIDs":[6862577.0,6863094.0,6862647.0,6862646.0,6862606.0,6863045.0,6862664.0,6862824.0,6862828.0,6862894.0,6863119.0,6862901.0,6862654.0,6862907.0,6862908.0,6863105.0,6863110.0,6863114.0,6862896.0,6863117.0,6863138.0,6863140.0,6866222.0],"skipIndex":0,"section_code":"gallery","featured_images":"6866222,6863140,6863138,6863119,6863117,6863114,6863110,6863105,6863094,6863045","id":372533,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7074018,7072482,7068270,7068219,6920417,6920413,6920411,6920402,6920398,6920388,6920379,6920372,6920367,6920360,6883102,6883059,6882848,6882803,6882770,6882616,6882586,6882558,6882542,6882536,6882531,6882517,6882501,6882495,6882478,6882457,6882442,6882438,6876046,6876034,6876028,6876026,6876007,6876005,6876003,6866222,6866211,6866197,6866168,6866160,6866140,6866131,6866103,6866096,6866060,6866048';
imageSets[3] = '7074018,7072482,7068270,7068219,6920417,6920413,6920411,6920402,6920398,6920388,6920379,6920372,6920367,6920360,6883102,6883059,6882848,6882803,6882770,6882616,6882586,6882558,6882542,6882536,6882531,6882517,6882501,6882495,6882478,6882457,6882442,6882438,6876046,6876034,6876028,6876026,6876007,6876005,6876003,6866222,6866211,6866197,6866168,6866160,6866140,6866131,6866103,6866096,6866060,6866048';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Steves8/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Steves8/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Steves8/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Steves8/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Steves8/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Steves8/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Steves8/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 && backgrounds[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 = 'Stephen Stewart 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>';
	}
				
	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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											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="STEVES8">';
			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;
	}
}

			

