window.thumbnails = {};
															thumbnails[1177592] = clik.newPhoto({"id":1177592,"src":"Img000041_thumb.JPG","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":91});
															thumbnails[1168867] = clik.newPhoto({"id":1168867,"src":"DSCN0347_thumb.JPG","galleries_id":82591,"server_id":18,"link":"photo_1168867.html","width":130,"caption":"","height":98});
															thumbnails[1168868] = clik.newPhoto({"id":1168868,"src":"DSCN0334_thumb.JPG","galleries_id":82591,"server_id":18,"link":"photo_1168868.html","width":130,"caption":"","height":98});
															thumbnails[1168869] = clik.newPhoto({"id":1168869,"src":"DSCN0328_thumb.JPG","galleries_id":82591,"server_id":18,"link":"photo_1168869.html","width":130,"caption":"","height":98});
															thumbnails[1168870] = clik.newPhoto({"id":1168870,"src":"DSCN0323a_thumb.JPG","galleries_id":82591,"server_id":18,"link":"photo_1168870.html","width":130,"caption":"","height":98});
															thumbnails[1168871] = clik.newPhoto({"id":1168871,"src":"DSCN0323_thumb.JPG","galleries_id":82591,"server_id":18,"link":"photo_1168871.html","width":130,"caption":"","height":98});
															thumbnails[1168872] = clik.newPhoto({"id":1168872,"src":"Space Lines (detail)_thumb.jpg","galleries_id":84751,"server_id":18,"link":"photo_1168872.html","width":130,"caption":"Space Lines (Detail) for 'Peepshow' at the Custard Factory, Birmingham 2000","height":90});
															thumbnails[1168873] = clik.newPhoto({"id":1168873,"src":"DSCN0220_thumb.JPG","galleries_id":84749,"server_id":18,"link":"photo_1168873.html","width":130,"caption":"","height":173});
															thumbnails[1174557] = clik.newPhoto({"id":1174557,"src":"DSCN02231_thumb.JPG","galleries_id":84749,"server_id":18,"link":"photo_1174557.html","width":130,"caption":"","height":98});
															thumbnails[1174560] = clik.newPhoto({"id":1174560,"src":"DSCN0228_thumb.JPG","galleries_id":84749,"server_id":18,"link":"photo_1174560.html","width":130,"caption":"","height":98});
															thumbnails[1174562] = clik.newPhoto({"id":1174562,"src":"DSCN0224_thumb.JPG","galleries_id":84749,"server_id":18,"link":"photo_1174562.html","width":130,"caption":"","height":98});
															thumbnails[1174572] = clik.newPhoto({"id":1174572,"src":"DSCN02221_thumb.JPG","galleries_id":84749,"server_id":18,"link":"photo_1174572.html","width":130,"caption":"","height":98});
															thumbnails[1174576] = clik.newPhoto({"id":1174576,"src":"Img00000_thumb.JPG","galleries_id":84753,"server_id":18,"link":"photo_1174576.html","width":130,"caption":"","height":196});
															thumbnails[1176167] = clik.newPhoto({"id":1176167,"src":"Img00004_thumb.JPG","galleries_id":84753,"server_id":18,"link":"photo_1176167.html","width":130,"caption":"","height":91});
															thumbnails[1176170] = clik.newPhoto({"id":1176170,"src":"Img00013_thumb.JPG","galleries_id":84753,"server_id":18,"link":"photo_1176170.html","width":130,"caption":"","height":86});
															thumbnails[1176176] = clik.newPhoto({"id":1176176,"src":"Img00008_thumb.JPG","galleries_id":84798,"server_id":18,"link":"photo_1176176.html","width":130,"caption":"","height":178});
															thumbnails[1176179] = clik.newPhoto({"id":1176179,"src":"Img00009_thumb.JPG","galleries_id":84798,"server_id":18,"link":"photo_1176179.html","width":130,"caption":"","height":185});
															thumbnails[1176183] = clik.newPhoto({"id":1176183,"src":"Img00010_thumb.JPG","galleries_id":84798,"server_id":18,"link":"photo_1176183.html","width":130,"caption":"","height":190});
															thumbnails[1176186] = clik.newPhoto({"id":1176186,"src":"Img00011_thumb.JPG","galleries_id":84798,"server_id":18,"link":"photo_1176186.html","width":130,"caption":"","height":198});
															thumbnails[1177607] = clik.newPhoto({"id":1177607,"src":"Transcription3_thumb.JPG","galleries_id":84749,"server_id":18,"link":"photo_1177607.html","width":130,"caption":"","height":98});
															thumbnails[1177610] = clik.newPhoto({"id":1177610,"src":"Life Line flyer_thumb.jpg","galleries_id":84753,"server_id":18,"link":"photo_1177610.html","width":130,"caption":"","height":143});
															thumbnails[1449228] = clik.newPhoto({"id":1449228,"src":"Image169[1]_thumb.jpg","galleries_id":100236,"server_id":18,"link":"photo_1449228.html","width":130,"caption":"","height":98});
															thumbnails[1449257] = clik.newPhoto({"id":1449257,"src":"Image140[1]1_thumb.jpg","galleries_id":100236,"server_id":18,"link":"photo_1449257.html","width":130,"caption":"","height":98});
															thumbnails[1459815] = clik.newPhoto({"id":1459815,"src":"Hypertext II2_thumb.JPG","galleries_id":84751,"server_id":18,"link":"photo_1459815.html","width":130,"caption":"Hypertext II, performed at Phoenix Arts Centre, Leicester for the Out of Leicester Festival, 2002","height":90});
															thumbnails[2641467] = clik.newPhoto({"id":2641467,"src":"daniele-badge_-medium;init__thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_2641467.html","width":130,"caption":"","height":133});
															thumbnails[2642924] = clik.newPhoto({"id":2642924,"src":"K770 037_thumb.jpg","galleries_id":167381,"server_id":18,"link":"photo_2642924.html","width":130,"caption":"","height":98});
															thumbnails[2643089] = clik.newPhoto({"id":2643089,"src":"K770 0301_thumb.jpg","galleries_id":167381,"server_id":18,"link":"photo_2643089.html","width":130,"caption":"","height":98});
															thumbnails[3013870] = clik.newPhoto({"id":3013870,"src":"TFE_Fierce_Photo_©_Graham_Shackleton_2008_143_thumb.jpg","galleries_id":100236,"server_id":18,"link":"photo_3013870.html","width":130,"caption":"","height":86});
															thumbnails[3013876] = clik.newPhoto({"id":3013876,"src":"TFE_Fierce_Photo_©_Graham_Shackleton_2008_144_thumb.jpg","galleries_id":100236,"server_id":18,"link":"photo_3013876.html","width":130,"caption":"","height":86});
															thumbnails[3013881] = clik.newPhoto({"id":3013881,"src":"TFE_Fierce_Photo_©_Graham_Shackleton_2008_145_thumb.jpg","galleries_id":100236,"server_id":18,"link":"photo_3013881.html","width":130,"caption":"","height":86});
															thumbnails[3014001] = clik.newPhoto({"id":3014001,"src":"TFE_Fierce_Photo_©_Graham_Shackleton_2008_133_thumb.jpg","galleries_id":100236,"server_id":18,"link":"photo_3014001.html","width":130,"caption":"","height":86});
															thumbnails[3014376] = clik.newPhoto({"id":3014376,"src":"fete21_thumb.jpg","galleries_id":100236,"server_id":18,"link":"photo_3014376.html","width":130,"caption":"","height":87});
															thumbnails[4305916] = clik.newPhoto({"id":4305916,"src":"MassVI_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_4305916.html","width":130,"caption":"","height":98});
															thumbnails[4305918] = clik.newPhoto({"id":4305918,"src":"becomingA004_thumb.jpg","galleries_id":231641,"server_id":18,"link":"photo_4305918.html","width":130,"caption":"","height":87});
															thumbnails[4305919] = clik.newPhoto({"id":4305919,"src":"becomingA39_thumb.jpg","galleries_id":231641,"server_id":18,"link":"photo_4305919.html","width":130,"caption":"","height":87});
															thumbnails[4305941] = clik.newPhoto({"id":4305941,"src":"becomingA53_thumb.jpg","galleries_id":231641,"server_id":18,"link":"photo_4305941.html","width":130,"caption":"","height":87});
															thumbnails[4305943] = clik.newPhoto({"id":4305943,"src":"becomingA0591_thumb.jpg","galleries_id":231641,"server_id":18,"link":"photo_4305943.html","width":130,"caption":"","height":194});
															thumbnails[4305944] = clik.newPhoto({"id":4305944,"src":"becomingA91_thumb.jpg","galleries_id":231641,"server_id":18,"link":"photo_4305944.html","width":130,"caption":"","height":87});
															thumbnails[4305946] = clik.newPhoto({"id":4305946,"src":"becomingA95_thumb.jpg","galleries_id":231641,"server_id":18,"link":"photo_4305946.html","width":130,"caption":"","height":87});
															thumbnails[4307454] = clik.newPhoto({"id":4307454,"src":"becomingA96_thumb.jpg","galleries_id":231641,"server_id":18,"link":"photo_4307454.html","width":130,"caption":"","height":87});
															thumbnails[4307463] = clik.newPhoto({"id":4307463,"src":"becomingA146_thumb.jpg","galleries_id":231641,"server_id":18,"link":"photo_4307463.html","width":130,"caption":"","height":87});
															thumbnails[4317504] = clik.newPhoto({"id":4317504,"src":"GetAttachment2_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_4317504.html","width":130,"caption":"","height":98});
															thumbnails[4317507] = clik.newPhoto({"id":4317507,"src":"GetAttachment_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_4317507.html","width":130,"caption":"","height":98});
															thumbnails[4317510] = clik.newPhoto({"id":4317510,"src":"3_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_4317510.html","width":130,"caption":"","height":98});
															thumbnails[4362648] = clik.newPhoto({"id":4362648,"src":"K770_055_thumb.jpg","galleries_id":167381,"server_id":18,"link":"photo_4362648.html","width":130,"caption":"","height":173});
															thumbnails[4362650] = clik.newPhoto({"id":4362650,"src":"K770_057_thumb.jpg","galleries_id":167381,"server_id":18,"link":"photo_4362650.html","width":130,"caption":"","height":173});
															thumbnails[5092693] = clik.newPhoto({"id":5092693,"src":"Yeah_1_thumb.jpg","galleries_id":287911,"server_id":18,"link":"photo_5092693.html","width":130,"caption":"","height":192});
															thumbnails[5092694] = clik.newPhoto({"id":5092694,"src":"Yeah_2_thumb.jpg","galleries_id":287911,"server_id":18,"link":"photo_5092694.html","width":130,"caption":"","height":162});
															thumbnails[5358688] = clik.newPhoto({"id":5358688,"src":"Untitled_thumb.jpg","galleries_id":301864,"server_id":18,"link":"photo_5358688.html","width":130,"caption":"","height":173});
															thumbnails[5358710] = clik.newPhoto({"id":5358710,"src":"dipweb2_thumb.jpg","galleries_id":301864,"server_id":18,"link":"photo_5358710.html","width":130,"caption":"","height":98});
															thumbnails[5358711] = clik.newPhoto({"id":5358711,"src":"dipweb3_thumb.jpg","galleries_id":301864,"server_id":18,"link":"photo_5358711.html","width":130,"caption":"","height":98});
															thumbnails[5358712] = clik.newPhoto({"id":5358712,"src":"dipweb5_thumb.jpg","galleries_id":301864,"server_id":18,"link":"photo_5358712.html","width":130,"caption":"","height":173});
															thumbnails[5358714] = clik.newPhoto({"id":5358714,"src":"dipweb6_thumb.jpg","galleries_id":301864,"server_id":18,"link":"photo_5358714.html","width":130,"caption":"","height":98});
															thumbnails[5358715] = clik.newPhoto({"id":5358715,"src":"dipweb4_thumb.jpg","galleries_id":301864,"server_id":18,"link":"photo_5358715.html","width":130,"caption":"","height":98});
															thumbnails[5358716] = clik.newPhoto({"id":5358716,"src":"Vicar1_thumb.jpg","galleries_id":283804,"server_id":18,"link":"photo_5358716.html","width":130,"caption":"","height":98});
															thumbnails[5358717] = clik.newPhoto({"id":5358717,"src":"vicar2_thumb.jpg","galleries_id":283804,"server_id":18,"link":"photo_5358717.html","width":130,"caption":"","height":98});
															thumbnails[5358719] = clik.newPhoto({"id":5358719,"src":"vicar3_thumb.jpg","galleries_id":283804,"server_id":18,"link":"photo_5358719.html","width":130,"caption":"","height":98});
															thumbnails[5358720] = clik.newPhoto({"id":5358720,"src":"vicar4_thumb.jpg","galleries_id":283804,"server_id":18,"link":"photo_5358720.html","width":130,"caption":"","height":98});
															thumbnails[6334926] = clik.newPhoto({"id":6334926,"src":"jsw_curve_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_6334926.html","width":130,"caption":"","height":131});
															thumbnails[6334932] = clik.newPhoto({"id":6334932,"src":"jsw_ring_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_6334932.html","width":130,"caption":"","height":130});
															thumbnails[7346272] = clik.newPhoto({"id":7346272,"src":"004_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_7346272.html","width":130,"caption":"","height":98});
															thumbnails[7346283] = clik.newPhoto({"id":7346283,"src":"009_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_7346283.html","width":130,"caption":"","height":98});
															thumbnails[7346284] = clik.newPhoto({"id":7346284,"src":"014_2_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_7346284.html","width":130,"caption":"","height":98});
															thumbnails[7346285] = clik.newPhoto({"id":7346285,"src":"017_2_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_7346285.html","width":130,"caption":"","height":98});
															thumbnails[7970075] = clik.newPhoto({"id":7970075,"src":"Copy_11_thumb.jpg","galleries_id":84749,"server_id":18,"link":"photo_7970075.html","width":130,"caption":"","height":87});
															thumbnails[8247507] = clik.newPhoto({"id":8247507,"src":"rsz_gi20_london_008_thumb.jpg","galleries_id":439236,"server_id":18,"link":"photo_8247507.html","width":130,"caption":"","height":98});
															thumbnails[8247508] = clik.newPhoto({"id":8247508,"src":"rsz_gi20_london_012_thumb.jpg","galleries_id":439236,"server_id":18,"link":"photo_8247508.html","width":130,"caption":"","height":98});
															thumbnails[8247510] = clik.newPhoto({"id":8247510,"src":"rsz_gi20_london_017_thumb.jpg","galleries_id":439236,"server_id":18,"link":"photo_8247510.html","width":130,"caption":"","height":98});
															thumbnails[8247512] = clik.newPhoto({"id":8247512,"src":"rsz_gi20_london_018_thumb.jpg","galleries_id":439236,"server_id":18,"link":"photo_8247512.html","width":130,"caption":"","height":173});
															thumbnails[8735245] = clik.newPhoto({"id":8735245,"src":"6_new_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_8735245.html","width":130,"caption":"","height":130});
															thumbnails[8735421] = clik.newPhoto({"id":8735421,"src":"1_new_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_8735421.html","width":130,"caption":"","height":130});
															thumbnails[8735423] = clik.newPhoto({"id":8735423,"src":"2_new_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_8735423.html","width":130,"caption":"","height":130});
															thumbnails[8735425] = clik.newPhoto({"id":8735425,"src":"3_new_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_8735425.html","width":130,"caption":"","height":130});
															thumbnails[8735427] = clik.newPhoto({"id":8735427,"src":"4_new_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_8735427.html","width":130,"caption":"","height":130});
															thumbnails[8735429] = clik.newPhoto({"id":8735429,"src":"5_new_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_8735429.html","width":130,"caption":"","height":130});
															thumbnails[8735431] = clik.newPhoto({"id":8735431,"src":"7_new_thumb.jpg","galleries_id":82591,"server_id":18,"link":"photo_8735431.html","width":130,"caption":"","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[100236] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"21st C Ethical Bear Baiting Extravaganza!","link":"gallery_100236.html","maxRecords":0.0,"photoIDs":[1449228.0,1449257.0,3013870.0,3013876.0,3013881.0,3014001.0,3014376.0],"skipIndex":0,"section_code":"gallery","featured_images":3014376.0,"id":100236,"singleSection":false});				  						galleries[231641] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"becoming A","link":"gallery_231641.html","maxRecords":0.0,"photoIDs":[4305918.0,4305919.0,4305941.0,4305943.0,4305944.0,4305946.0,4307454.0,4307463.0],"skipIndex":0,"section_code":"gallery","featured_images":4305943.0,"id":231641,"singleSection":false});				  						galleries[301864] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"Diplomacy","link":"gallery_301864.html","maxRecords":0.0,"photoIDs":[5358688.0,5358710.0,5358711.0,5358712.0,5358714.0,5358715.0],"skipIndex":0,"section_code":"gallery","featured_images":"5358715,5358714,5358712,5358711,5358710,5358688","id":301864,"singleSection":false});				  						galleries[84751] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"Fat House","link":"gallery_84751.html","maxRecords":0.0,"photoIDs":[1168872.0,1459815.0],"skipIndex":0,"section_code":"gallery","featured_images":"1459815,1168872","id":84751,"singleSection":false});				  						galleries[439236] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"Kitunda Argyle","link":"gallery_439236.html","maxRecords":0.0,"photoIDs":[8247507.0,8247508.0,8247510.0,8247512.0],"skipIndex":0,"section_code":"gallery","featured_images":"8247512,8247510,8247508,8247507","id":439236,"singleSection":false});				  						galleries[84753] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"Life Line","link":"gallery_84753.html","maxRecords":0.0,"photoIDs":[1174576.0,1176167.0,1176170.0,1177610.0],"skipIndex":0,"section_code":"gallery","featured_images":1174576.0,"id":84753,"singleSection":false});				  						galleries[283804] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"Liquor Vicar Bingo","link":"gallery_283804.html","maxRecords":0.0,"photoIDs":[5358716.0,5358717.0,5358719.0,5358720.0],"skipIndex":0,"section_code":"gallery","featured_images":"5358720,5358719,5358717,5358716","id":283804,"singleSection":false});				  						galleries[84485] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Performance","link":"gallery_84485.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"4305943,3014376,1174576","id":84485,"singleSection":false});				  						galleries[84798] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"Pitfalls","link":"gallery_84798.html","maxRecords":0.0,"photoIDs":[1176176.0,1176179.0,1176183.0,1176186.0],"skipIndex":0,"section_code":"gallery","featured_images":"1176186,1176183,1176179,1176176","id":84798,"singleSection":false});				  						galleries[167381] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"Psychic Santa","link":"gallery_167381.html","maxRecords":0.0,"photoIDs":[2642924.0,2643089.0,4362648.0,4362650.0],"skipIndex":0,"section_code":"gallery","featured_images":"4362650,4362648,2643089,2642924","id":167381,"singleSection":false});				  						galleries[84749] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"Transcription","link":"gallery_84749.html","maxRecords":0.0,"photoIDs":[1168873.0,1174557.0,1174560.0,1174562.0,1174572.0,1177607.0,7970075.0],"skipIndex":0,"section_code":"gallery","featured_images":"7970075,1177607,1174572,1174562,1174560,1174557,1168873","id":84749,"singleSection":false});				  						galleries[287911] = clik.newGallery({"parentGallery":84485,"usePopups":false,"title":"Yeah!","link":"gallery_287911.html","maxRecords":0.0,"photoIDs":[5092693.0,5092694.0],"skipIndex":0,"section_code":"gallery","featured_images":"5092694,5092693","id":287911,"singleSection":false});				  						galleries[82591] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2D Work","link":"gallery_82591.html","maxRecords":0.0,"photoIDs":[1168867.0,1168868.0,1168869.0,1168870.0,1168871.0,2641467.0,4305916.0,4317504.0,4317507.0,4317510.0,6334926.0,6334932.0,7346272.0,7346283.0,7346284.0,7346285.0,8735245.0,8735421.0,8735423.0,8735425.0,8735427.0,8735429.0,8735431.0],"skipIndex":0,"section_code":"gallery","featured_images":"1168871,1168867","id":82591,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3014001';
imageSets[2] = '4305943,3014376,1174576,1168871,1168867';
imageSets[3] = '8735431,8735429,8735427,8735425,8735423,8735421,8735245,8247512,8247510,8247508,8247507,7970075,7346285,7346284,7346283,7346272,6334932,6334926,5358720,5358719,5358717,5358716,5358715,5358714,5358712,5358711,5358710,5358688,5092694,5092693,4362650,4362648,4317510,4317507,4317504,4307463,4307454,4305946,4305944,4305943,4305941,4305919,4305918,4305916,3014376,3014001,3013881,3013876,3013870,2643089';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/danielhunt/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/danielhunt/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 = 'Daniel Hunt: ' + 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.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="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		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 += '<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;
	}
}

			

