window.thumbnails = {};
															thumbnails[3483215] = clik.newPhoto({"id":3483215,"src":"PAfshadow work1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Bedroom 206, St Erme, 2009","height":87});
															thumbnails[7856764] = clik.newPhoto({"id":7856764,"src":"joanfilmcropsmall000_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7853364] = clik.newPhoto({"id":7853364,"src":"blueroomwebjpegs001_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":129});
															thumbnails[7854999] = clik.newPhoto({"id":7854999,"src":"frenchwindowwasher0011_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":193});
															thumbnails[7855109] = clik.newPhoto({"id":7855109,"src":"frenchwindowwasher0012_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":193});
															thumbnails[7856058] = clik.newPhoto({"id":7856058,"src":"composite_adjust_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":244});
															thumbnails[7856637] = clik.newPhoto({"id":7856637,"src":"Rylahbroomslide1small_2936E1C9-1EC9-D45B-1C004DB60F888624_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":128});
															thumbnails[7856765] = clik.newPhoto({"id":7856765,"src":"joanfilmcropsmall001_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868214] = clik.newPhoto({"id":7868214,"src":"Phgramrooftile101910x10150res_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7868247] = clik.newPhoto({"id":7868247,"src":"pinhole301710x10300res_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7872530] = clik.newPhoto({"id":7872530,"src":"a4bluermmorning8monthslatermed_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"blue room shadow map, 12\/04\/2010, 1.52-2.52, Photographed on window 28\/12\/2010","height":200});
															thumbnails[7886232] = clik.newPhoto({"id":7886232,"src":"grid_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":160,"caption":"","height":158});
															thumbnails[7886565] = clik.newPhoto({"id":7886565,"src":"strip2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":160,"caption":"","height":17});
															thumbnails[7853366] = clik.newPhoto({"id":7853366,"src":"blueroomwebjpegs002_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":129});
															thumbnails[7855001] = clik.newPhoto({"id":7855001,"src":"frenchwindowwasher0021_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":196});
															thumbnails[7855110] = clik.newPhoto({"id":7855110,"src":"frenchwindowwasher0022_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":196});
															thumbnails[7856059] = clik.newPhoto({"id":7856059,"src":"shadowmapremanants001_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":185});
															thumbnails[7856062] = clik.newPhoto({"id":7856062,"src":"shadowmapremanants002_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":177});
															thumbnails[7856767] = clik.newPhoto({"id":7856767,"src":"joanfilmcropsmall002_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868216] = clik.newPhoto({"id":7868216,"src":"Phgramrooftile202010x10150res_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7868248] = clik.newPhoto({"id":7868248,"src":"pinhole401810x10300res_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7872531] = clik.newPhoto({"id":7872531,"src":"a4120mmshadowchart1photoshopmed_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"green room shadow map, 16\/04\/2010, 2.40-3.11, Photographed on window 28\/12\/2010","height":146});
															thumbnails[7853367] = clik.newPhoto({"id":7853367,"src":"blueroomwebjpegs003_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":129});
															thumbnails[7855003] = clik.newPhoto({"id":7855003,"src":"frenchwindowwasher003.13_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7855111] = clik.newPhoto({"id":7855111,"src":"frenchwindowwasher003.14_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7856063] = clik.newPhoto({"id":7856063,"src":"shadowmapremanants003_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":196});
															thumbnails[7856768] = clik.newPhoto({"id":7856768,"src":"joanfilmcropsmall003_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7872532] = clik.newPhoto({"id":7872532,"src":"bluermmorningmed_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"blue room shadow map, 16\/04\/2010, 11.30-11.54 , Photogrpahed on window 28\/12\/2010","height":206});
															thumbnails[7853369] = clik.newPhoto({"id":7853369,"src":"blueroomwebjpegs004_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7856064] = clik.newPhoto({"id":7856064,"src":"shadowmapremanants004_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":202});
															thumbnails[7856769] = clik.newPhoto({"id":7856769,"src":"joanfilmcropsmall004_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7882309] = clik.newPhoto({"id":7882309,"src":"frenchwindowwasher003_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":160,"caption":"","height":137});
															thumbnails[7853370] = clik.newPhoto({"id":7853370,"src":"blueroomwebjpegs005_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7856066] = clik.newPhoto({"id":7856066,"src":"shadowmapremanants005_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":190});
															thumbnails[7856770] = clik.newPhoto({"id":7856770,"src":"joanfilmcropsmall005_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7853376] = clik.newPhoto({"id":7853376,"src":"blueroomwebjpegs006_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7856067] = clik.newPhoto({"id":7856067,"src":"shadowmapremanants006_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":184});
															thumbnails[7856771] = clik.newPhoto({"id":7856771,"src":"joanfilmcropsmall006_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7853378] = clik.newPhoto({"id":7853378,"src":"blueroomwebjpegs007_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7856069] = clik.newPhoto({"id":7856069,"src":"shadowmapremanants007_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":185});
															thumbnails[7856772] = clik.newPhoto({"id":7856772,"src":"joanfilmcropsmall007_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7853379] = clik.newPhoto({"id":7853379,"src":"blueroomwebjpegs008_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":129});
															thumbnails[7856070] = clik.newPhoto({"id":7856070,"src":"shadowmapremanants008_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":184});
															thumbnails[7856773] = clik.newPhoto({"id":7856773,"src":"joanfilmcropsmall008_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7853381] = clik.newPhoto({"id":7853381,"src":"blueroomwebjpegs009_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":129});
															thumbnails[7856072] = clik.newPhoto({"id":7856072,"src":"shadowmapremanants009_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":184});
															thumbnails[7856774] = clik.newPhoto({"id":7856774,"src":"joanfilmcropsmall009_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856074] = clik.newPhoto({"id":7856074,"src":"shadowmapremanants010_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":184});
															thumbnails[7856775] = clik.newPhoto({"id":7856775,"src":"joanfilmcropsmall010_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856076] = clik.newPhoto({"id":7856076,"src":"shadowmapremanants011_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":189});
															thumbnails[7856776] = clik.newPhoto({"id":7856776,"src":"joanfilmcropsmall011_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856777] = clik.newPhoto({"id":7856777,"src":"joanfilmcropsmall012_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856085] = clik.newPhoto({"id":7856085,"src":"wintershadow2.10_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":196});
															thumbnails[7856778] = clik.newPhoto({"id":7856778,"src":"joanfilmcropsmall013_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856090] = clik.newPhoto({"id":7856090,"src":"wintershadowgraph_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":190});
															thumbnails[7856779] = clik.newPhoto({"id":7856779,"src":"joanfilmcropsmall014_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856780] = clik.newPhoto({"id":7856780,"src":"joanfilmcropsmall015_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856782] = clik.newPhoto({"id":7856782,"src":"joanfilmcropsmall016_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856783] = clik.newPhoto({"id":7856783,"src":"joanfilmcropsmall017_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856784] = clik.newPhoto({"id":7856784,"src":"joanfilmcropsmall018_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856785] = clik.newPhoto({"id":7856785,"src":"joanfilmcropsmall019_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7856786] = clik.newPhoto({"id":7856786,"src":"joanfilmcropsmall020_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868014] = clik.newPhoto({"id":7868014,"src":"joanfilmcropsmall021_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868015] = clik.newPhoto({"id":7868015,"src":"joanfilmcropsmall022_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868016] = clik.newPhoto({"id":7868016,"src":"joanfilmcropsmall023_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868017] = clik.newPhoto({"id":7868017,"src":"joanfilmcropsmall024_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868019] = clik.newPhoto({"id":7868019,"src":"joanfilmcropsmall025_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868020] = clik.newPhoto({"id":7868020,"src":"joanfilmcropsmall026_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868021] = clik.newPhoto({"id":7868021,"src":"joanfilmcropsmall027_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868022] = clik.newPhoto({"id":7868022,"src":"joanfilmcropsmall028_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868023] = clik.newPhoto({"id":7868023,"src":"joanfilmcropsmall029_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868024] = clik.newPhoto({"id":7868024,"src":"joanfilmcropsmall030_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868025] = clik.newPhoto({"id":7868025,"src":"joanfilmcropsmall031_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868026] = clik.newPhoto({"id":7868026,"src":"joanfilmcropsmall032_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868029] = clik.newPhoto({"id":7868029,"src":"joanfilmcropsmall033_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868030] = clik.newPhoto({"id":7868030,"src":"joanfilmcropsmall034_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868032] = clik.newPhoto({"id":7868032,"src":"joanfilmcropsmall035_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868033] = clik.newPhoto({"id":7868033,"src":"joanfilmcropsmall036_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868034] = clik.newPhoto({"id":7868034,"src":"joanfilmcropsmall037_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868035] = clik.newPhoto({"id":7868035,"src":"joanfilmcropsmall038_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868036] = clik.newPhoto({"id":7868036,"src":"joanfilmcropsmall039_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868037] = clik.newPhoto({"id":7868037,"src":"joanfilmcropsmall040_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868038] = clik.newPhoto({"id":7868038,"src":"joanfilmcropsmall041_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868039] = clik.newPhoto({"id":7868039,"src":"joanfilmcropsmall042_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868040] = clik.newPhoto({"id":7868040,"src":"joanfilmcropsmall043_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868041] = clik.newPhoto({"id":7868041,"src":"joanfilmcropsmall044_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868042] = clik.newPhoto({"id":7868042,"src":"joanfilmcropsmall045_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868043] = clik.newPhoto({"id":7868043,"src":"joanfilmcropsmall046_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868044] = clik.newPhoto({"id":7868044,"src":"joanfilmcropsmall047_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868045] = clik.newPhoto({"id":7868045,"src":"joanfilmcropsmall048_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7868046] = clik.newPhoto({"id":7868046,"src":"joanfilmcropsmall049_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":127});
															thumbnails[2104483] = clik.newPhoto({"id":2104483,"src":"shadows3_thumb.jpg","galleries_id":138503,"server_id":18,"link":"photo_2104483.html","width":130,"caption":"shadow casting 3","height":87});
															thumbnails[2104486] = clik.newPhoto({"id":2104486,"src":"shadows5_thumb.jpg","galleries_id":138503,"server_id":18,"link":"photo_2104486.html","width":130,"caption":"shadow casting 5","height":195});
															thumbnails[2106129] = clik.newPhoto({"id":2106129,"src":"kilcarvillagehall1_thumb.jpg","galleries_id":138500,"server_id":18,"link":"photo_2106129.html","width":130,"caption":"Donegal, Kilcar village hall1","height":195});
															thumbnails[3332141] = clik.newPhoto({"id":3332141,"src":"Tea chairs web sized14_thumb.jpg","galleries_id":138502,"server_id":18,"link":"photo_3332141.html","width":130,"caption":"  La Maladie de la Mort","height":195});
															thumbnails[3332144] = clik.newPhoto({"id":3332144,"src":"Tea chairs web sized20_thumb.jpg","galleries_id":138502,"server_id":18,"link":"photo_3332144.html","width":130,"caption":"  La Maladie de la Mort","height":195});
															thumbnails[4035105] = clik.newPhoto({"id":4035105,"src":"room_556_thumb.jpg","galleries_id":213014,"server_id":18,"link":"photo_4035105.html","width":130,"caption":"room 556, PAF, St Erme France","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[233702] = clik.newGallery({"parentGallery":233697,"usePopups":false,"title":"Cafes","link":"gallery_233702.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":233702,"singleSection":false});				  						galleries[138502] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Documentary & Commissioned work","link":"gallery_138502.html","maxRecords":0.0,"photoIDs":[3332141.0,3332144.0],"skipIndex":0,"section_code":"gallery","featured_images":"3332144,3332141","id":138502,"singleSection":false});				  						galleries[138500] = clik.newGallery({"parentGallery":233697,"usePopups":false,"title":"Donegal saints","link":"gallery_138500.html","maxRecords":0.0,"photoIDs":[2106129.0],"skipIndex":0,"section_code":"gallery","featured_images":2106129.0,"id":138500,"singleSection":false});				  						galleries[233697] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Elsewhere","link":"gallery_233697.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":2106129.0,"id":233697,"singleSection":false});				  						galleries[233701] = clik.newGallery({"parentGallery":233697,"usePopups":false,"title":"Markets","link":"gallery_233701.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":233701,"singleSection":false});				  						galleries[138503] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"shadow casting","link":"gallery_138503.html","maxRecords":0.0,"photoIDs":[2104483.0,2104486.0],"skipIndex":0,"section_code":"gallery","featured_images":"2104486,2104483","id":138503,"singleSection":false});				  						galleries[213014] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Shadow Dialling 2009","link":"gallery_213014.html","maxRecords":0.0,"photoIDs":[4035105.0],"skipIndex":0,"section_code":"gallery","featured_images":4035105.0,"id":213014,"singleSection":false});				  						galleries[233698] = clik.newGallery({"parentGallery":233697,"usePopups":false,"title":"Spirit Houses","link":"gallery_233698.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":233698,"singleSection":false});				  						galleries[105489] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_105489.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":105489,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[242481] = '7853364,7853366,7853367,7853369,7853370,7853376,7853378,7853379,7853381';
imageSets[242433] = '7872530,7872531,7872532';
imageSets[1] = '7886565,7886232,7882309,7872532,7872531,7872530,7868248,7868247,7868216,7868214,7868046,7868045,7868044,7868043,7868042,7868041,7868040,7868039,7868038,7868037,7868036,7868035,7868034,7868033,7868032,7868030,7868029,7868026,7868025,7868024,7868023,7868022,7868021,7868020,7868019,7868017,7868016,7868015,7868014,7856786,7856785,7856784,7856783,7856782,7856780,7856779,7856778,7856777,7856776,7856775';
imageSets[3] = '4035105,3332144,3332141,2106129,2104486,2104483,7854999,7853364,7855001,7855003';
imageSets[242477] = '7853364,7853366';
imageSets[242320] = '7856062,7856059,7856063,7856064,7856066,7856067,7856069,7856070,7856072,7856074,7856076,7856085,7856090';
imageSets[242323] = '7856764,7856765,7856767,7856768,7856769,7856770,7856771,7856772,7856773,7856774,7856775,7856776,7856777,7856778,7856779,7856780,7856782,7856783,7856784,7856785,7856786,7868014,7868015,7868016,7868017,7868019,7868020,7868021,7868022,7868023,7868024,7868025,7868026,7868029,7868030,7868032,7868033,7868034,7868035,7868036,7868037,7868038,7868039,7868040,7868041,7868042,7868043,7868044,7868045,7868046';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/heyjoanie/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/heyjoanie/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 = 'Joan Alexander : ' + 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> &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" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

