window.thumbnails = {};
															thumbnails[9032159] = clik.newPhoto({"id":9032159,"src":"us_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":200,"caption":"","height":143});
															thumbnails[9038798] = clik.newPhoto({"id":9038798,"src":"home_page_image_10_thumb.gif","galleries_id":"","server_id":15,"link":"#","width":260,"caption":"","height":168});
															thumbnails[9104064] = clik.newPhoto({"id":9104064,"src":"DSC_3429_5_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":120,"caption":"","height":150});
															thumbnails[9104098] = clik.newPhoto({"id":9104098,"src":"DSC_3430_5_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":120,"caption":"","height":150});
															thumbnails[8911735] = clik.newPhoto({"id":8911735,"src":"samanna11_thumb.jpg","galleries_id":468713,"server_id":15,"link":"photo_8911735.html","width":200,"caption":"Christmas themed green screen image","height":133});
															thumbnails[8911738] = clik.newPhoto({"id":8911738,"src":"boy_plane_1_thumb.jpg","galleries_id":468713,"server_id":15,"link":"photo_8911738.html","width":200,"caption":"Boy themed green screen image","height":133});
															thumbnails[8911859] = clik.newPhoto({"id":8911859,"src":"samanna10_thumb.png","galleries_id":468713,"server_id":15,"link":"photo_8911859.html","width":200,"caption":"Family green screen image","height":133});
															thumbnails[8940294] = clik.newPhoto({"id":8940294,"src":"DSC_4276_thumb.JPG","galleries_id":468713,"server_id":15,"link":"photo_8940294.html","width":133,"caption":"Live Event images","height":200});
															thumbnails[9026827] = clik.newPhoto({"id":9026827,"src":"sam_wanted_thumb.png","galleries_id":468713,"server_id":15,"link":"photo_9026827.html","width":134,"caption":"Cowboy themed green screen image","height":200});
															thumbnails[9026840] = clik.newPhoto({"id":9026840,"src":"Anna_castle_1_thumb.png","galleries_id":468713,"server_id":15,"link":"photo_9026840.html","width":200,"caption":"Fairy & Princess themed green screen image","height":133});
															thumbnails[9026864] = clik.newPhoto({"id":9026864,"src":"Sam_pirate_map_thumb.jpg","galleries_id":468713,"server_id":15,"link":"photo_9026864.html","width":200,"caption":"Pirate themed green screen image","height":133});
															thumbnails[9026867] = clik.newPhoto({"id":9026867,"src":"DSC_46891_thumb.JPG","galleries_id":468713,"server_id":15,"link":"photo_9026867.html","width":133,"caption":"Actors 10x8's","height":200});
															thumbnails[9026887] = clik.newPhoto({"id":9026887,"src":"gileslorraine6_thumb.jpg","galleries_id":468713,"server_id":15,"link":"photo_9026887.html","width":200,"caption":"Valentine green screen image","height":133});
															thumbnails[9026932] = clik.newPhoto({"id":9026932,"src":"Anna_hearts_thumb.jpg","galleries_id":468713,"server_id":15,"link":"photo_9026932.html","width":200,"caption":"Girl themed green screen image","height":133});
															thumbnails[9032225] = clik.newPhoto({"id":9032225,"src":"harris_family_merged_thumb.jpg","galleries_id":468713,"server_id":15,"link":"photo_9032225.html","width":200,"caption":"Family portraits","height":150});
															thumbnails[9036351] = clik.newPhoto({"id":9036351,"src":"Untitled_-_1_thumb.jpg","galleries_id":468713,"server_id":15,"link":"photo_9036351.html","width":150,"caption":"Family portraits","height":200});
															thumbnails[9036404] = clik.newPhoto({"id":9036404,"src":"Anna_unicorn_1_thumb.jpg","galleries_id":468713,"server_id":15,"link":"photo_9036404.html","width":134,"caption":"Girl themed green screen image","height":200});
															thumbnails[8911831] = clik.newPhoto({"id":8911831,"src":"Img0328_thumb.jpg","galleries_id":468722,"server_id":15,"link":"photo_8911831.html","width":200,"caption":"","height":133});
															thumbnails[8911873] = clik.newPhoto({"id":8911873,"src":"DSC_3965_thumb.JPG","galleries_id":468724,"server_id":15,"link":"photo_8911873.html","width":133,"caption":"","height":200});
															thumbnails[8911879] = clik.newPhoto({"id":8911879,"src":"DSC_3971_thumb.JPG","galleries_id":468724,"server_id":15,"link":"photo_8911879.html","width":133,"caption":"","height":200});
															thumbnails[8911881] = clik.newPhoto({"id":8911881,"src":"DSC_3992_thumb.JPG","galleries_id":468724,"server_id":15,"link":"photo_8911881.html","width":134,"caption":"","height":200});
															thumbnails[8911884] = clik.newPhoto({"id":8911884,"src":"DSC_4000_thumb.JPG","galleries_id":468724,"server_id":15,"link":"photo_8911884.html","width":133,"caption":"","height":200});
															thumbnails[8911885] = clik.newPhoto({"id":8911885,"src":"DSC_4007_thumb.JPG","galleries_id":468724,"server_id":15,"link":"photo_8911885.html","width":134,"caption":"","height":200});
															thumbnails[8911888] = clik.newPhoto({"id":8911888,"src":"DSC_4016_thumb.JPG","galleries_id":468724,"server_id":15,"link":"photo_8911888.html","width":133,"caption":"","height":200});
															thumbnails[8911891] = clik.newPhoto({"id":8911891,"src":"Georgia_thumb.jpg","galleries_id":468722,"server_id":15,"link":"photo_8911891.html","width":134,"caption":"","height":200});
															thumbnails[8911892] = clik.newPhoto({"id":8911892,"src":"Charlotte_thumb.jpg","galleries_id":468722,"server_id":15,"link":"photo_8911892.html","width":134,"caption":"","height":200});
															thumbnails[8911894] = clik.newPhoto({"id":8911894,"src":"Img0298_thumb.jpg","galleries_id":468722,"server_id":15,"link":"photo_8911894.html","width":134,"caption":"","height":200});
															thumbnails[8940396] = clik.newPhoto({"id":8940396,"src":"bell_thumb.png","galleries_id":470541,"server_id":15,"link":"photo_8940396.html","width":200,"caption":"","height":133});
															thumbnails[8940401] = clik.newPhoto({"id":8940401,"src":"Dawn_thumb.png","galleries_id":470541,"server_id":15,"link":"photo_8940401.html","width":200,"caption":"Hodgson","height":133});
															thumbnails[8940402] = clik.newPhoto({"id":8940402,"src":"fisher_thumb.png","galleries_id":470541,"server_id":15,"link":"photo_8940402.html","width":200,"caption":"","height":133});
															thumbnails[8940403] = clik.newPhoto({"id":8940403,"src":"Summers_thumb.png","galleries_id":470541,"server_id":15,"link":"photo_8940403.html","width":200,"caption":"Summers","height":133});
															thumbnails[8940410] = clik.newPhoto({"id":8940410,"src":"moxon_thumb.png","galleries_id":470541,"server_id":15,"link":"photo_8940410.html","width":200,"caption":"Moxon","height":133});
															thumbnails[9137128] = clik.newPhoto({"id":9137128,"src":"De_Gruchy_3_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137128.html","width":260,"caption":"","height":390});
															thumbnails[9137135] = clik.newPhoto({"id":9137135,"src":"De_Gruchy_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137135.html","width":260,"caption":"","height":390});
															thumbnails[9137137] = clik.newPhoto({"id":9137137,"src":"grace_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137137.html","width":260,"caption":"","height":390});
															thumbnails[9137148] = clik.newPhoto({"id":9137148,"src":"mckenna1_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137148.html","width":260,"caption":"","height":390});
															thumbnails[9137154] = clik.newPhoto({"id":9137154,"src":"pyrah1_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137154.html","width":260,"caption":"","height":390});
															thumbnails[9137160] = clik.newPhoto({"id":9137160,"src":"pyrah2_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137160.html","width":260,"caption":"","height":173});
															thumbnails[9137164] = clik.newPhoto({"id":9137164,"src":"pyrah3_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137164.html","width":260,"caption":"","height":390});
															thumbnails[9137219] = clik.newPhoto({"id":9137219,"src":"pyrah4_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137219.html","width":260,"caption":"","height":173});
															thumbnails[9137220] = clik.newPhoto({"id":9137220,"src":"slumbers_4_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137220.html","width":260,"caption":"","height":173});
															thumbnails[9137223] = clik.newPhoto({"id":9137223,"src":"slumbers_42_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137223.html","width":260,"caption":"","height":173});
															thumbnails[9137226] = clik.newPhoto({"id":9137226,"src":"slumbers1_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137226.html","width":260,"caption":"","height":390});
															thumbnails[9137228] = clik.newPhoto({"id":9137228,"src":"slumbers2_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137228.html","width":260,"caption":"","height":173});
															thumbnails[9137230] = clik.newPhoto({"id":9137230,"src":"Taylor_2_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137230.html","width":260,"caption":"","height":390});
															thumbnails[9137232] = clik.newPhoto({"id":9137232,"src":"Taylor_22_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137232.html","width":260,"caption":"","height":390});
															thumbnails[9137234] = clik.newPhoto({"id":9137234,"src":"Taylor_4_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9137234.html","width":260,"caption":"","height":390});
															thumbnails[9145612] = clik.newPhoto({"id":9145612,"src":"akhter1_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145612.html","width":260,"caption":"","height":173});
															thumbnails[9145614] = clik.newPhoto({"id":9145614,"src":"akhter2_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145614.html","width":260,"caption":"","height":173});
															thumbnails[9145616] = clik.newPhoto({"id":9145616,"src":"akhtar3_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145616.html","width":260,"caption":"","height":173});
															thumbnails[9145697] = clik.newPhoto({"id":9145697,"src":"Bhullar_2_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145697.html","width":260,"caption":"","height":390});
															thumbnails[9145698] = clik.newPhoto({"id":9145698,"src":"Bhullar_22_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145698.html","width":260,"caption":"","height":390});
															thumbnails[9145699] = clik.newPhoto({"id":9145699,"src":"Bhullar_4_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145699.html","width":260,"caption":"","height":390});
															thumbnails[9145701] = clik.newPhoto({"id":9145701,"src":"Borrowdale_2_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145701.html","width":260,"caption":"","height":173});
															thumbnails[9145703] = clik.newPhoto({"id":9145703,"src":"Borrowdale_23_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145703.html","width":260,"caption":"","height":390});
															thumbnails[9145707] = clik.newPhoto({"id":9145707,"src":"Borrowdale_4_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145707.html","width":260,"caption":"","height":390});
															thumbnails[9145708] = clik.newPhoto({"id":9145708,"src":"Brook_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145708.html","width":260,"caption":"","height":173});
															thumbnails[9145709] = clik.newPhoto({"id":9145709,"src":"magson1_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145709.html","width":260,"caption":"","height":173});
															thumbnails[9145710] = clik.newPhoto({"id":9145710,"src":"magson3_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145710.html","width":260,"caption":"","height":390});
															thumbnails[9145713] = clik.newPhoto({"id":9145713,"src":"magson2_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145713.html","width":260,"caption":"","height":390});
															thumbnails[9145714] = clik.newPhoto({"id":9145714,"src":"Osamam_3_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145714.html","width":260,"caption":"","height":390});
															thumbnails[9145715] = clik.newPhoto({"id":9145715,"src":"Osamam_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145715.html","width":260,"caption":"","height":390});
															thumbnails[9145716] = clik.newPhoto({"id":9145716,"src":"sarh1_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145716.html","width":260,"caption":"","height":173});
															thumbnails[9145717] = clik.newPhoto({"id":9145717,"src":"sarh2_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145717.html","width":260,"caption":"","height":173});
															thumbnails[9145719] = clik.newPhoto({"id":9145719,"src":"sarh3_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145719.html","width":260,"caption":"","height":173});
															thumbnails[9145721] = clik.newPhoto({"id":9145721,"src":"sarh4_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145721.html","width":260,"caption":"","height":173});
															thumbnails[9145722] = clik.newPhoto({"id":9145722,"src":"sykes1_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145722.html","width":260,"caption":"","height":173});
															thumbnails[9145724] = clik.newPhoto({"id":9145724,"src":"sykes2_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145724.html","width":260,"caption":"","height":390});
															thumbnails[9145725] = clik.newPhoto({"id":9145725,"src":"sykes3_1_thumb.jpg","galleries_id":482387,"server_id":15,"link":"photo_9145725.html","width":260,"caption":"","height":390});
															thumbnails[9170442] = clik.newPhoto({"id":9170442,"src":"caldwell_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170442.html","width":260,"caption":"","height":390});
															thumbnails[9170446] = clik.newPhoto({"id":9170446,"src":"cartwright_2_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170446.html","width":260,"caption":"","height":390});
															thumbnails[9170447] = clik.newPhoto({"id":9170447,"src":"cartwright_22_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170447.html","width":260,"caption":"","height":390});
															thumbnails[9170448] = clik.newPhoto({"id":9170448,"src":"cartwright_4_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170448.html","width":260,"caption":"","height":390});
															thumbnails[9170449] = clik.newPhoto({"id":9170449,"src":"clive_2_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170449.html","width":260,"caption":"","height":390});
															thumbnails[9170450] = clik.newPhoto({"id":9170450,"src":"clive_22_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170450.html","width":260,"caption":"","height":390});
															thumbnails[9170451] = clik.newPhoto({"id":9170451,"src":"Farooq_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170451.html","width":260,"caption":"","height":173});
															thumbnails[9170452] = clik.newPhoto({"id":9170452,"src":"ford_3_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170452.html","width":260,"caption":"","height":173});
															thumbnails[9170453] = clik.newPhoto({"id":9170453,"src":"ford_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170453.html","width":260,"caption":"","height":173});
															thumbnails[9170455] = clik.newPhoto({"id":9170455,"src":"Guinn_2_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170455.html","width":260,"caption":"","height":173});
															thumbnails[9170456] = clik.newPhoto({"id":9170456,"src":"Guinn_22_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170456.html","width":260,"caption":"","height":173});
															thumbnails[9170457] = clik.newPhoto({"id":9170457,"src":"guinn_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170457.html","width":260,"caption":"","height":173});
															thumbnails[9170458] = clik.newPhoto({"id":9170458,"src":"hhh_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170458.html","width":260,"caption":"","height":390});
															thumbnails[9170459] = clik.newPhoto({"id":9170459,"src":"Kaye_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170459.html","width":260,"caption":"","height":173});
															thumbnails[9170461] = clik.newPhoto({"id":9170461,"src":"owen_3_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170461.html","width":260,"caption":"","height":390});
															thumbnails[9170462] = clik.newPhoto({"id":9170462,"src":"Owen_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170462.html","width":260,"caption":"","height":390});
															thumbnails[9170464] = clik.newPhoto({"id":9170464,"src":"sheard_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170464.html","width":260,"caption":"","height":390});
															thumbnails[9170466] = clik.newPhoto({"id":9170466,"src":"sykes_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170466.html","width":260,"caption":"","height":173});
															thumbnails[9170467] = clik.newPhoto({"id":9170467,"src":"waterworth_1_thumb.jpg","galleries_id":484373,"server_id":15,"link":"photo_9170467.html","width":260,"caption":"","height":173});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[468722] = clik.newGallery({"parentGallery":470540,"usePopups":false,"title":"Carla Smith shoot","link":"section568740_468722.html","maxRecords":0.0,"photoIDs":[8911831.0,8911891.0,8911892.0,8911894.0],"skipIndex":0,"section_code":"section568740","featured_images":"8911894,8911892,8911891,8911831","id":468722,"singleSection":true});				  						galleries[470540] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Customer Gallery","link":"section568740_470540.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section568740","featured_images":"9170467,9170466,9170464,9170462,9170461,9170459,9170458,9170457,9170456,9170455","id":470540,"singleSection":true});				  						galleries[482387] = clik.newGallery({"parentGallery":470540,"usePopups":false,"title":"Fizzy Lizard play gym","link":"section568740_482387.html","maxRecords":0.0,"photoIDs":[9137128.0,9137135.0,9137137.0,9137148.0,9137154.0,9137160.0,9137164.0,9137219.0,9137220.0,9137223.0,9137226.0,9137228.0,9137230.0,9137232.0,9137234.0,9145612.0,9145614.0,9145616.0,9145697.0,9145698.0,9145699.0,9145701.0,9145703.0,9145707.0,9145708.0,9145709.0,9145710.0,9145713.0,9145714.0,9145715.0,9145716.0,9145717.0,9145719.0,9145721.0,9145722.0,9145724.0,9145725.0],"skipIndex":0,"section_code":"section568740","featured_images":"9145725,9145724,9145722,9145721,9145719,9145717,9145716,9145715,9145714,9145713","id":482387,"singleSection":true});				  						galleries[468724] = clik.newGallery({"parentGallery":470540,"usePopups":false,"title":"Jon Ellis shoot","link":"section568740_468724.html","maxRecords":0.0,"photoIDs":[8911873.0,8911879.0,8911881.0,8911884.0,8911885.0,8911888.0],"skipIndex":0,"section_code":"section568740","featured_images":"8911888,8911885,8911884,8911881,8911879,8911873","id":468724,"singleSection":true});				  						galleries[484373] = clik.newGallery({"parentGallery":470540,"usePopups":false,"title":"Ruddi's Retreat Valentines Ball","link":"section568740_484373.html","maxRecords":0.0,"photoIDs":[9170442.0,9170446.0,9170447.0,9170448.0,9170449.0,9170450.0,9170451.0,9170452.0,9170453.0,9170455.0,9170456.0,9170457.0,9170458.0,9170459.0,9170461.0,9170462.0,9170464.0,9170466.0,9170467.0],"skipIndex":0,"section_code":"section568740","featured_images":"9170467,9170466,9170464,9170462,9170461,9170459,9170458,9170457,9170456,9170455","id":484373,"singleSection":true});				  						galleries[468713] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sample Gallery","link":"gallery.html","maxRecords":0.0,"photoIDs":[8911735.0,8911738.0,8911859.0,8940294.0,9026827.0,9026840.0,9026864.0,9026867.0,9026887.0,9026932.0,9032225.0,9036351.0,9036404.0],"skipIndex":0,"section_code":"gallery","featured_images":"9036404,9036351,9032225,9026932,9026887,9026867,9026864,9026840,9026827,8940294","id":468713,"singleSection":true});				  						galleries[470541] = clik.newGallery({"parentGallery":470540,"usePopups":false,"title":"St Thomas Christmas Fayre 2011","link":"section568740_470541.html","maxRecords":0.0,"photoIDs":[8940396.0,8940401.0,8940402.0,8940403.0,8940410.0],"skipIndex":0,"section_code":"section568740","featured_images":"8940410,8940403,8940402,8940401,8940396","id":470541,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9038798';
imageSets[3] = '9032159';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jonharris/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jonharris/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jonharris/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jonharris/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jonharris/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/jonharris/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jonharris/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jonharris/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 = 'Fotovent Event 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="JONHARRIS">';
			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;
	}
}

			

