window.thumbnails = {};
															thumbnails[3757939] = clik.newPhoto({"id":3757939,"src":"SDC10270edit-1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"GH","height":172});
															thumbnails[3726741] = clik.newPhoto({"id":3726741,"src":"IMG_2899edit2_thumb.jpg","galleries_id":406727,"server_id":15,"link":"photo_3726741.html","width":130,"caption":"Brighton Bubble","height":87});
															thumbnails[3727279] = clik.newPhoto({"id":3727279,"src":"IMG_0443edit_thumb.jpg","galleries_id":406713,"server_id":15,"link":"photo_3727279.html","width":130,"caption":"Niagara Falls Edge","height":87});
															thumbnails[4871211] = clik.newPhoto({"id":4871211,"src":"IMG_7115_thumb.JPG","galleries_id":406715,"server_id":15,"link":"photo_4871211.html","width":130,"caption":"Eiffel Tower Looking Up","height":87});
															thumbnails[4929115] = clik.newPhoto({"id":4929115,"src":"IMG_4172_thumb.jpg","galleries_id":406712,"server_id":15,"link":"photo_4929115.html","width":130,"caption":"Moss roofed house","height":195});
															thumbnails[5020081] = clik.newPhoto({"id":5020081,"src":"IMG_4828_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_5020081.html","width":130,"caption":"Carnival performers portrait","height":195});
															thumbnails[7527074] = clik.newPhoto({"id":7527074,"src":"IMG_2884x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527074.html","width":130,"caption":"Snow capped peak","height":87});
															thumbnails[7527085] = clik.newPhoto({"id":7527085,"src":"IMG_0980edit_thumb.JPG","galleries_id":406710,"server_id":15,"link":"photo_7527085.html","width":130,"caption":"Wine Glass inverted ink","height":194});
															thumbnails[7527087] = clik.newPhoto({"id":7527087,"src":"IMG_9657_thumb.JPG","galleries_id":406726,"server_id":15,"link":"photo_7527087.html","width":130,"caption":"St. Peter's Basilica ceiling","height":195});
															thumbnails[8305188] = clik.newPhoto({"id":8305188,"src":"IMG_4175copy_thumb.JPG","galleries_id":426607,"server_id":19,"link":"photo_8305188.html","width":130,"caption":"Floodlit night scene across the water of the NY skyline","height":87});
															thumbnails[3727025] = clik.newPhoto({"id":3727025,"src":"IMG_0497_thumb.JPG","galleries_id":406713,"server_id":15,"link":"photo_3727025.html","width":130,"caption":"American Angel Falls","height":87});
															thumbnails[4871175] = clik.newPhoto({"id":4871175,"src":"IMG_59501_thumb.JPG","galleries_id":406727,"server_id":15,"link":"photo_4871175.html","width":130,"caption":"Heart balloon in cannon smoke","height":87});
															thumbnails[4871268] = clik.newPhoto({"id":4871268,"src":"IMG_7339_thumb.JPG","galleries_id":406715,"server_id":15,"link":"photo_4871268.html","width":130,"caption":"Light Trails across the Arc","height":87});
															thumbnails[4929322] = clik.newPhoto({"id":4929322,"src":"IMG_38161_thumb.jpg","galleries_id":406712,"server_id":15,"link":"photo_4929322.html","width":130,"caption":"Fjord sky scene","height":196});
															thumbnails[5020047] = clik.newPhoto({"id":5020047,"src":"IMG_4483_thumb.JPG","galleries_id":406710,"server_id":15,"link":"photo_5020047.html","width":130,"caption":"Invites","height":195});
															thumbnails[5896705] = clik.newPhoto({"id":5896705,"src":"IMG_9436_thumb.JPG","galleries_id":406726,"server_id":15,"link":"photo_5896705.html","width":130,"caption":"A Rome street scene","height":195});
															thumbnails[6508681] = clik.newPhoto({"id":6508681,"src":"IMG_0266copy_thumb.jpg","galleries_id":406708,"server_id":15,"link":"photo_6508681.html","width":130,"caption":"Guitar & glasses","height":195});
															thumbnails[7527080] = clik.newPhoto({"id":7527080,"src":"IMG_3089x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527080.html","width":130,"caption":"Iceburg lagoon","height":87});
															thumbnails[8305150] = clik.newPhoto({"id":8305150,"src":"IMG_3726_thumb.JPG","galleries_id":426607,"server_id":19,"link":"photo_8305150.html","width":130,"caption":"Sepia Empire States Building","height":87});
															thumbnails[3726742] = clik.newPhoto({"id":3726742,"src":"IMG_2934edit1_thumb.jpg","galleries_id":406727,"server_id":15,"link":"photo_3726742.html","width":130,"caption":"Crash","height":87});
															thumbnails[3773432] = clik.newPhoto({"id":3773432,"src":"IMG_0530_thumb.JPG","galleries_id":406713,"server_id":15,"link":"photo_3773432.html","width":130,"caption":"Copper Dome","height":87});
															thumbnails[3778497] = clik.newPhoto({"id":3778497,"src":"IMG_3263edit_thumb.jpg","galleries_id":406708,"server_id":15,"link":"photo_3778497.html","width":130,"caption":"BMX Wheel","height":195});
															thumbnails[4871086] = clik.newPhoto({"id":4871086,"src":"IMG_7518_thumb.JPG","galleries_id":406715,"server_id":15,"link":"photo_4871086.html","width":130,"caption":"Couple","height":87});
															thumbnails[4929692] = clik.newPhoto({"id":4929692,"src":"IMG_37391_thumb.jpg","galleries_id":406712,"server_id":15,"link":"photo_4929692.html","width":130,"caption":"Cruise ship railings shadow","height":194});
															thumbnails[5896713] = clik.newPhoto({"id":5896713,"src":"IMG_9463_thumb.JPG","galleries_id":406726,"server_id":15,"link":"photo_5896713.html","width":130,"caption":"Pantheon","height":195});
															thumbnails[7527059] = clik.newPhoto({"id":7527059,"src":"IMG_2541x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527059.html","width":130,"caption":"Icelandic mountains","height":87});
															thumbnails[8305169] = clik.newPhoto({"id":8305169,"src":"IMG_3894_thumb.JPG","galleries_id":426607,"server_id":19,"link":"photo_8305169.html","width":130,"caption":"Night Lights of the Big Apple","height":87});
															thumbnails[3727228] = clik.newPhoto({"id":3727228,"src":"Img_0230edit_thumb.jpg","galleries_id":406713,"server_id":15,"link":"photo_3727228.html","width":130,"caption":"Niagara Falls","height":195});
															thumbnails[3757722] = clik.newPhoto({"id":3757722,"src":"IMG_2530tint_thumb.jpg","galleries_id":406727,"server_id":15,"link":"photo_3757722.html","width":130,"caption":"Sailboat","height":195});
															thumbnails[3773465] = clik.newPhoto({"id":3773465,"src":"IMG_31301_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_3773465.html","width":130,"caption":"Speaker","height":87});
															thumbnails[4871209] = clik.newPhoto({"id":4871209,"src":"IMG_7036_thumb.JPG","galleries_id":406715,"server_id":15,"link":"photo_4871209.html","width":130,"caption":"The Eiffel Tower","height":195});
															thumbnails[4928968] = clik.newPhoto({"id":4928968,"src":"IMG_4131_thumb.jpg","galleries_id":406712,"server_id":15,"link":"photo_4928968.html","width":130,"caption":"Fjord Scene","height":87});
															thumbnails[5896715] = clik.newPhoto({"id":5896715,"src":"IMG_95272_thumb.JPG","galleries_id":406726,"server_id":15,"link":"photo_5896715.html","width":130,"caption":"Beggar Woman","height":87});
															thumbnails[7527069] = clik.newPhoto({"id":7527069,"src":"IMG_2728x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527069.html","width":130,"caption":"Flagpoles over the pond","height":87});
															thumbnails[8305157] = clik.newPhoto({"id":8305157,"src":"IMG_3789_copy_thumb.JPG","galleries_id":426607,"server_id":19,"link":"photo_8305157.html","width":130,"caption":"China Town coloured signs","height":195});
															thumbnails[3757754] = clik.newPhoto({"id":3757754,"src":"Img_0691_thumb.JPG","galleries_id":406713,"server_id":15,"link":"photo_3757754.html","width":130,"caption":"Pink Butterfly","height":195});
															thumbnails[4871054] = clik.newPhoto({"id":4871054,"src":"IMG_61951_thumb.JPG","galleries_id":406727,"server_id":15,"link":"photo_4871054.html","width":130,"caption":"Duck","height":195});
															thumbnails[4871083] = clik.newPhoto({"id":4871083,"src":"IMG_7537_thumb.JPG","galleries_id":406715,"server_id":15,"link":"photo_4871083.html","width":130,"caption":"Man Reading","height":196});
															thumbnails[5020077] = clik.newPhoto({"id":5020077,"src":"IMG_4816_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_5020077.html","width":130,"caption":"Carnival group","height":87});
															thumbnails[7527058] = clik.newPhoto({"id":7527058,"src":"IMG_2391x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527058.html","width":130,"caption":"Gullfoss waterfall","height":87});
															thumbnails[7527086] = clik.newPhoto({"id":7527086,"src":"IMG_4171_thumb.JPG","galleries_id":406712,"server_id":15,"link":"photo_7527086.html","width":130,"caption":"Colourful houses","height":87});
															thumbnails[8305161] = clik.newPhoto({"id":8305161,"src":"IMG_3854copy_thumb.JPG","galleries_id":426607,"server_id":19,"link":"photo_8305161.html","width":130,"caption":"Reflection upon reflection - a street view","height":196});
															thumbnails[4871201] = clik.newPhoto({"id":4871201,"src":"IMG_63071_thumb.JPG","galleries_id":406727,"server_id":15,"link":"photo_4871201.html","width":130,"caption":"Seeds","height":195});
															thumbnails[4929775] = clik.newPhoto({"id":4929775,"src":"IMG_4222_thumb.jpg","galleries_id":406712,"server_id":15,"link":"photo_4929775.html","width":130,"caption":"Cloudy mountain Top","height":87});
															thumbnails[6632525] = clik.newPhoto({"id":6632525,"src":"IMG_01431_copy_thumb.jpg","galleries_id":406708,"server_id":15,"link":"photo_6632525.html","width":130,"caption":"Blue eyed baby","height":87});
															thumbnails[7527068] = clik.newPhoto({"id":7527068,"src":"IMG_2695x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527068.html","width":130,"caption":"Reykjavík harbour","height":87});
															thumbnails[8305172] = clik.newPhoto({"id":8305172,"src":"IMG_3976_thumb.JPG","galleries_id":426607,"server_id":19,"link":"photo_8305172.html","width":130,"caption":"The Lady in all her glory - the Statue of Liberty","height":195});
															thumbnails[3757728] = clik.newPhoto({"id":3757728,"src":"IMG_2692_thumb.jpg","galleries_id":406708,"server_id":15,"link":"photo_3757728.html","width":130,"caption":"Woman with lolly","height":195});
															thumbnails[3757803] = clik.newPhoto({"id":3757803,"src":"IMG_0701_thumb.JPG","galleries_id":406713,"server_id":15,"link":"photo_3757803.html","width":130,"caption":"Butterfly","height":87});
															thumbnails[4871069] = clik.newPhoto({"id":4871069,"src":"IMG_7531_thumb.JPG","galleries_id":406715,"server_id":15,"link":"photo_4871069.html","width":130,"caption":"Paris pigeon","height":87});
															thumbnails[4871180] = clik.newPhoto({"id":4871180,"src":"IMG_5761_thumb.JPG","galleries_id":406727,"server_id":15,"link":"photo_4871180.html","width":130,"caption":"Spitfire silhoutte","height":87});
															thumbnails[4929463] = clik.newPhoto({"id":4929463,"src":"IMG_3902_thumb.jpg","galleries_id":406712,"server_id":15,"link":"photo_4929463.html","width":130,"caption":"Olden town hall","height":194});
															thumbnails[7527060] = clik.newPhoto({"id":7527060,"src":"IMG_2548x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527060.html","width":130,"caption":"Crack between tectonic plates","height":195});
															thumbnails[8305143] = clik.newPhoto({"id":8305143,"src":"IMG_3680_thumb.JPG","galleries_id":426607,"server_id":19,"link":"photo_8305143.html","width":130,"caption":"Vibrant Time Square","height":87});
															thumbnails[3727234] = clik.newPhoto({"id":3727234,"src":"IMG_0422edit_thumb.jpg","galleries_id":406713,"server_id":15,"link":"photo_3727234.html","width":130,"caption":"Horseshoe Falls","height":87});
															thumbnails[3745377] = clik.newPhoto({"id":3745377,"src":"DSC_0014_thumb.JPG","galleries_id":406727,"server_id":15,"link":"photo_3745377.html","width":130,"caption":"Bee in flight","height":85});
															thumbnails[4929566] = clik.newPhoto({"id":4929566,"src":"IMG_39122_thumb.jpg","galleries_id":406712,"server_id":15,"link":"photo_4929566.html","width":130,"caption":"University of Olden","height":195});
															thumbnails[5020083] = clik.newPhoto({"id":5020083,"src":"IMG_4859_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_5020083.html","width":130,"caption":"Carnival Queen","height":195});
															thumbnails[7527071] = clik.newPhoto({"id":7527071,"src":"IMG_2766x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527071.html","width":130,"caption":"Goose silhouette","height":195});
															thumbnails[8305175] = clik.newPhoto({"id":8305175,"src":"IMG_4111_thumb.JPG","galleries_id":426607,"server_id":19,"link":"photo_8305175.html","width":130,"caption":"Reflections in Central Park","height":87});
															thumbnails[4929824] = clik.newPhoto({"id":4929824,"src":"IMG_42621_thumb.jpg","galleries_id":406712,"server_id":15,"link":"photo_4929824.html","width":130,"caption":"Glacier melt waterfall","height":195});
															thumbnails[5020052] = clik.newPhoto({"id":5020052,"src":"IMG_4771_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_5020052.html","width":130,"caption":"Star faced performer","height":195});
															thumbnails[7527063] = clik.newPhoto({"id":7527063,"src":"IMG_2567x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527063.html","width":130,"caption":"Parliament Plains","height":195});
															thumbnails[7911312] = clik.newPhoto({"id":7911312,"src":"IMG_3646_thumb.JPG","galleries_id":426607,"server_id":37,"link":"photo_7911312.html","width":130,"caption":"Police in NY","height":87});
															thumbnails[3778501] = clik.newPhoto({"id":3778501,"src":"Img_4493edit_thumb.jpg","galleries_id":406708,"server_id":15,"link":"photo_3778501.html","width":130,"caption":"BMX Full flight","height":87});
															thumbnails[7527081] = clik.newPhoto({"id":7527081,"src":"IMG_3113x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527081.html","width":130,"caption":"Iceburg lagoon","height":87});
															thumbnails[3773476] = clik.newPhoto({"id":3773476,"src":"IMG_3114_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_3773476.html","width":130,"caption":"Worship at Church","height":87});
															thumbnails[7527067] = clik.newPhoto({"id":7527067,"src":"IMG_2680x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527067.html","width":130,"caption":"Abstract boat","height":87});
															thumbnails[5020015] = clik.newPhoto({"id":5020015,"src":"IMG_6783_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_5020015.html","width":130,"caption":"Singer","height":87});
															thumbnails[7527072] = clik.newPhoto({"id":7527072,"src":"IMG_2783x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527072.html","width":130,"caption":"Wildlife at play","height":87});
															thumbnails[5019970] = clik.newPhoto({"id":5019970,"src":"IMG_6532_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_5019970.html","width":130,"caption":"Wild Thing","height":193});
															thumbnails[7527061] = clik.newPhoto({"id":7527061,"src":"IMG_2559x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527061.html","width":130,"caption":"Parliament plains","height":87});
															thumbnails[5020073] = clik.newPhoto({"id":5020073,"src":"IMG_4806_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_5020073.html","width":130,"caption":"Feathered performer","height":195});
															thumbnails[7527064] = clik.newPhoto({"id":7527064,"src":"IMG_2654_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527064.html","width":130,"caption":"Snowed berries","height":87});
															thumbnails[5020050] = clik.newPhoto({"id":5020050,"src":"IMG_4748_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_5020050.html","width":130,"caption":"Purple Performer","height":196});
															thumbnails[7527075] = clik.newPhoto({"id":7527075,"src":"IMG_2936x_thumb.jpg","galleries_id":406711,"server_id":15,"link":"photo_7527075.html","width":130,"caption":"Mountains of ice","height":87});
															thumbnails[6508689] = clik.newPhoto({"id":6508689,"src":"IMG_0272copy_thumb.jpg","galleries_id":406708,"server_id":15,"link":"photo_6508689.html","width":130,"caption":"Guitar and performer portrait","height":195});
															thumbnails[5020144] = clik.newPhoto({"id":5020144,"src":"IMG_5071_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_5020144.html","width":130,"caption":"Red dancer in the Carnival","height":195});
															thumbnails[3774438] = clik.newPhoto({"id":3774438,"src":"IMG_3125_thumb.JPG","galleries_id":406708,"server_id":15,"link":"photo_3774438.html","width":130,"caption":"Speaker","height":196});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[426606] = clik.newGallery({"parentGallery":406709,"usePopups":false,"title":"Las Vegas 2011","link":"gallery_426606.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":426606,"singleSection":false});				  						galleries[426607] = clik.newGallery({"parentGallery":406709,"usePopups":false,"title":"New York 2011","link":"gallery_426607.html","maxRecords":0.0,"photoIDs":[8305188.0,8305150.0,8305169.0,8305157.0,8305161.0,8305172.0,8305143.0,8305175.0,7911312.0],"skipIndex":0,"section_code":"gallery","featured_images":"8305172,8305161,8305157","id":426607,"singleSection":false});				  						galleries[406711] = clik.newGallery({"parentGallery":406709,"usePopups":false,"title":"Iceland","link":"gallery_406711.html","maxRecords":0.0,"photoIDs":[7527074.0,7527080.0,7527059.0,7527069.0,7527058.0,7527068.0,7527060.0,7527071.0,7527063.0,7527081.0,7527067.0,7527072.0,7527061.0,7527064.0,7527075.0],"skipIndex":0,"section_code":"gallery","featured_images":"7527071,7527063,7527060","id":406711,"singleSection":false});				  						galleries[406708] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_406708.html","maxRecords":0.0,"photoIDs":[5020081.0,6508681.0,3778497.0,3773465.0,5020077.0,6632525.0,3757728.0,5020083.0,5020052.0,3778501.0,3773476.0,5020015.0,5019970.0,5020073.0,5020050.0,6508689.0,5020144.0,3774438.0],"skipIndex":0,"section_code":"gallery","featured_images":"6508681,5020083,5020081,3778497,3774438,3757728","id":406708,"singleSection":false});				  						galleries[406712] = clik.newGallery({"parentGallery":406709,"usePopups":false,"title":"Norway","link":"gallery_406712.html","maxRecords":0.0,"photoIDs":[4929115.0,4929322.0,4929692.0,4928968.0,7527086.0,4929775.0,4929463.0,4929566.0,4929824.0],"skipIndex":0,"section_code":"gallery","featured_images":4929115.0,"id":406712,"singleSection":false});				  						galleries[406709] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Places","link":"gallery_406709.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"8305172,8305161,8305157,7527087,7527071,7527063,7527060,5896713,5896705,4929115,4871209,3757722,3727228","id":406709,"singleSection":false});				  						galleries[406713] = clik.newGallery({"parentGallery":406709,"usePopups":false,"title":"Canada","link":"gallery_406713.html","maxRecords":0.0,"photoIDs":[3727279.0,3727025.0,3773432.0,3727228.0,3757754.0,3757803.0,3727234.0],"skipIndex":0,"section_code":"gallery","featured_images":3727228.0,"id":406713,"singleSection":false});				  						galleries[406710] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Still Life","link":"gallery_406710.html","maxRecords":0.0,"photoIDs":[7527085.0,5020047.0],"skipIndex":0,"section_code":"gallery","featured_images":"7527085,5020047","id":406710,"singleSection":false});				  						galleries[406715] = clik.newGallery({"parentGallery":406709,"usePopups":false,"title":"Paris","link":"gallery_406715.html","maxRecords":0.0,"photoIDs":[4871211.0,4871268.0,4871086.0,4871209.0,4871083.0,4871069.0],"skipIndex":0,"section_code":"gallery","featured_images":4871209.0,"id":406715,"singleSection":false});				  						galleries[406726] = clik.newGallery({"parentGallery":406709,"usePopups":false,"title":"Rome","link":"gallery_406726.html","maxRecords":0.0,"photoIDs":[7527087.0,5896705.0,5896713.0,5896715.0],"skipIndex":0,"section_code":"gallery","featured_images":"7527087,5896713,5896705","id":406726,"singleSection":false});				  						galleries[406727] = clik.newGallery({"parentGallery":406709,"usePopups":false,"title":"Sussex","link":"gallery_406727.html","maxRecords":0.0,"photoIDs":[3726741.0,4871175.0,3726742.0,3757722.0,4871054.0,4871201.0,4871180.0,3745377.0],"skipIndex":0,"section_code":"gallery","featured_images":3757722.0,"id":406727,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8305188,8305169,7527080,7527074,4928968,4871268,4871211,4871209,4871180,4871175,3778501,3773476,3745377,3727234,3727025,3726742,3726741';
imageSets[2] = '8305172,8305161,8305157,7527087,7527085,7527071,7527063,7527060,6508681,5896713,5896705,5020083,5020081,5020047,4929115,4871209,3778497,3774438,3757728,3757722,3727228';
imageSets[3] = '8305188,8305175,8305172,8305169,8305161,8305157,8305150,8305143,7911312,7527087,7527086,7527085,7527081,7527080,7527075,7527074,7527072,7527071,7527069,7527068,7527067,7527064,7527063,7527061,7527060,7527059,7527058,6632525,6508689,6508681,5896715,5896713,5896705,5020144,5020083,5020081,5020077,5020073,5020052,5020050,5020047,5020015,5019970,4929824,4929775,4929692,4929566,4929463,4929322,4929115';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/guyharwood/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/guyharwood/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 = 'Guy Harwood 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>';
	}
				
				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.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 += '<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="guyharwood@btinternet.com">';
					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="guyharwood@btinternet.com">';
				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({					href: thumbnails[imageID].fnGalleryLink(gallery_id),					title: galleries[gallery_id].title				});
			}
		}
	}
}

/***************************************************************************
* 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;
	}
}

			

