window.thumbnails = {};
															thumbnails[2008449] = clik.newPhoto({"id":2008449,"src":"pool reflection hammerite_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_2008449.html","width":130,"caption":"Pool reflections","height":177});
															thumbnails[4797143] = clik.newPhoto({"id":4797143,"src":"1531095-1-stones-throw1_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_4797143.html","width":130,"caption":"Stones throw","height":98});
															thumbnails[6460683] = clik.newPhoto({"id":6460683,"src":"Koi_in_pool1_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6460683.html","width":130,"caption":"Koi in pool","height":98});
															thumbnails[6460690] = clik.newPhoto({"id":6460690,"src":"Koi_in_reflected_pool_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6460690.html","width":130,"caption":"Koi in reflected pool ","height":173});
															thumbnails[6460695] = clik.newPhoto({"id":6460695,"src":"Rock_Pool1_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6460695.html","width":130,"caption":"Rock Pool","height":173});
															thumbnails[6876228] = clik.newPhoto({"id":6876228,"src":"resting_boats1_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6876228.html","width":130,"caption":"Resting Boats","height":93});
															thumbnails[6876276] = clik.newPhoto({"id":6876276,"src":"resting_boats_2_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6876276.html","width":130,"caption":"Resting Boats 2","height":112});
															thumbnails[4418053] = clik.newPhoto({"id":4418053,"src":"Young_Blue_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_4418053.html","width":130,"caption":"Young Blue","height":172});
															thumbnails[6460611] = clik.newPhoto({"id":6460611,"src":"Touching__the_water_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6460611.html","width":130,"caption":"Touching the water","height":96});
															thumbnails[7430330] = clik.newPhoto({"id":7430330,"src":"Galloping_Horses_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_7430330.html","width":130,"caption":"Horses","height":108});
															thumbnails[8364314] = clik.newPhoto({"id":8364314,"src":"DSCF4370_thumb.JPG","galleries_id":444047,"server_id":18,"link":"photo_8364314.html","width":130,"caption":"Magpie","height":98});
															thumbnails[6682236] = clik.newPhoto({"id":6682236,"src":"Forest_-_clikpic_small_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6682236.html","width":130,"caption":"Forest","height":130});
															thumbnails[7430334] = clik.newPhoto({"id":7430334,"src":"Camino_Horses_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_7430334.html","width":130,"caption":"Camino Horses","height":108});
															thumbnails[8369756] = clik.newPhoto({"id":8369756,"src":"Walking_on_the_beach_thumb.JPG","galleries_id":444047,"server_id":18,"link":"photo_8369756.html","width":130,"caption":"Walking on the beach","height":198});
															thumbnails[6682244] = clik.newPhoto({"id":6682244,"src":"Jenny_in_grey_-clikpic_small_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6682244.html","width":130,"caption":"Jenny in grey","height":166});
															thumbnails[7430336] = clik.newPhoto({"id":7430336,"src":"Heswall_Shore_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_7430336.html","width":130,"caption":"Heswall Shore","height":105});
															thumbnails[8369758] = clik.newPhoto({"id":8369758,"src":"Heron_thumb.JPG","galleries_id":444047,"server_id":18,"link":"photo_8369758.html","width":130,"caption":"Heron","height":232});
															thumbnails[5892158] = clik.newPhoto({"id":5892158,"src":"Bus_stop_Liverpool_XXX_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_5892158.html","width":130,"caption":"Bus stop, Liverpool","height":167});
															thumbnails[7893259] = clik.newPhoto({"id":7893259,"src":"Evening_St_Georges_Hall_Liverpool_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_7893259.html","width":130,"caption":"Evening, St George's Hall Liverpool","height":114});
															thumbnails[7893286] = clik.newPhoto({"id":7893286,"src":"Cathedral_of_Christ_the_King_evening_thumb.JPG","galleries_id":78846,"server_id":18,"link":"photo_7893286.html","width":130,"caption":"Cathedral of Christ the King, evening","height":119});
															thumbnails[8369764] = clik.newPhoto({"id":8369764,"src":"Owl_thumb.JPG","galleries_id":444047,"server_id":18,"link":"photo_8369764.html","width":130,"caption":"Owl","height":153});
															thumbnails[6682149] = clik.newPhoto({"id":6682149,"src":"Jenny_10_-clikpic_small_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6682149.html","width":130,"caption":"Jenny No. 10","height":185});
															thumbnails[6856587] = clik.newPhoto({"id":6856587,"src":"Jenny_large_drawing_1_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6856587.html","width":130,"caption":"Jenny, large drawing","height":135});
															thumbnails[7428925] = clik.newPhoto({"id":7428925,"src":"Resting_Ballerina_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_7428925.html","width":130,"caption":"Young resting ballerina","height":164});
															thumbnails[8369766] = clik.newPhoto({"id":8369766,"src":"Shovler_Ducks_thumb.JPG","galleries_id":444047,"server_id":18,"link":"photo_8369766.html","width":130,"caption":"","height":89});
															thumbnails[1059482] = clik.newPhoto({"id":1059482,"src":"Anna_thumb.JPG","galleries_id":78713,"server_id":18,"link":"photo_1059482.html","width":130,"caption":"Anna","height":173});
															thumbnails[6759699] = clik.newPhoto({"id":6759699,"src":"Jenny_12_small_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6759699.html","width":130,"caption":"Jenny 17","height":85});
															thumbnails[8369769] = clik.newPhoto({"id":8369769,"src":"Rabbit_thumb.JPG","galleries_id":444047,"server_id":18,"link":"photo_8369769.html","width":130,"caption":"Rabbit","height":149});
															thumbnails[6682231] = clik.newPhoto({"id":6682231,"src":"Cornfield_clikpic_small_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6682231.html","width":130,"caption":"Cornfield","height":129});
															thumbnails[5892198] = clik.newPhoto({"id":5892198,"src":"Sunset_over_Tesco_XXX_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_5892198.html","width":130,"caption":"Sunset over Tesco","height":86});
															thumbnails[7893272] = clik.newPhoto({"id":7893272,"src":"Evening_Liverpool_Metropolitan_Cathedral_thumb.JPG","galleries_id":78846,"server_id":18,"link":"photo_7893272.html","width":130,"caption":"Evening, Liverpool Metropolitain Cathedral","height":131});
															thumbnails[5894567] = clik.newPhoto({"id":5894567,"src":"After_the_Fall_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_5894567.html","width":130,"caption":"After the Fall","height":134});
															thumbnails[6682283] = clik.newPhoto({"id":6682283,"src":"Jenny_2_-_clickpic_small_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6682283.html","width":130,"caption":"Jenny No. 2","height":132});
															thumbnails[6690204] = clik.newPhoto({"id":6690204,"src":"Jenny_reclining_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6690204.html","width":130,"caption":"Jenny reclining","height":107});
															thumbnails[8374551] = clik.newPhoto({"id":8374551,"src":"Stretching_pintail_duck_thumb.JPG","galleries_id":444047,"server_id":18,"link":"photo_8374551.html","width":130,"caption":"stretching pintail duck","height":106});
															thumbnails[2141551] = clik.newPhoto({"id":2141551,"src":"r bus station_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_2141551.html","width":130,"caption":"First Light, Bridge Street","height":130});
															thumbnails[6460698] = clik.newPhoto({"id":6460698,"src":"Teddy_and_Wellies1_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_6460698.html","width":130,"caption":"Teddy and Wellies","height":173});
															thumbnails[6682805] = clik.newPhoto({"id":6682805,"src":"Jigsaw_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6682805.html","width":130,"caption":"Unfinished portrait [jigsaw]","height":129});
															thumbnails[3085980] = clik.newPhoto({"id":3085980,"src":"boy-on-a-beach_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_3085980.html","width":130,"caption":"Boy on a beach\/SOLD","height":173});
															thumbnails[6682811] = clik.newPhoto({"id":6682811,"src":"Trajectory_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6682811.html","width":130,"caption":"Trajectory","height":131});
															thumbnails[7986321] = clik.newPhoto({"id":7986321,"src":"Winter_Wolf_thumb.JPG","galleries_id":78846,"server_id":18,"link":"photo_7986321.html","width":130,"caption":"Winter Wolf","height":113});
															thumbnails[1067016] = clik.newPhoto({"id":1067016,"src":"DSCF0980_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_1067016.html","width":130,"caption":"the Dancers \/SOLD","height":87});
															thumbnails[6682286] = clik.newPhoto({"id":6682286,"src":"Alice_No_6_-_clikpic_small_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6682286.html","width":130,"caption":"Alice No. 6","height":169});
															thumbnails[6683704] = clik.newPhoto({"id":6683704,"src":"Alice_-_half__length_portrait_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6683704.html","width":130,"caption":"Alice, half-length portrait","height":197});
															thumbnails[7985381] = clik.newPhoto({"id":7985381,"src":"beach_West_Kirby_Wirral_thumb.JPG","galleries_id":78846,"server_id":18,"link":"photo_7985381.html","width":130,"caption":"beach","height":94});
															thumbnails[1065632] = clik.newPhoto({"id":1065632,"src":"Toddlers-on-the-beach[1]_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_1065632.html","width":130,"caption":"Toddlers on the beach\/SOLD","height":70});
															thumbnails[6682731] = clik.newPhoto({"id":6682731,"src":"Flame_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6682731.html","width":130,"caption":"Flame","height":130});
															thumbnails[6682262] = clik.newPhoto({"id":6682262,"src":"New_England_-_clikpic_small_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6682262.html","width":130,"caption":"New England","height":96});
															thumbnails[1569248] = clik.newPhoto({"id":1569248,"src":"DSCF5584_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_1569248.html","width":130,"caption":"Liverpool Crane in an Everton Sky\/SOLD","height":98});
															thumbnails[6234149] = clik.newPhoto({"id":6234149,"src":"Near_Tuy_Galicia_small_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6234149.html","width":130,"caption":"House near Tuy, Galicia","height":130});
															thumbnails[7986327] = clik.newPhoto({"id":7986327,"src":"Harbour_early_morning_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_7986327.html","width":130,"caption":"Harbour early morning","height":129});
															thumbnails[1810989] = clik.newPhoto({"id":1810989,"src":"Greek sunset_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_1810989.html","width":130,"caption":"Greek sunset\/SOLD","height":136});
															thumbnails[6682810] = clik.newPhoto({"id":6682810,"src":"Kate_evolving_-_3_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_6682810.html","width":130,"caption":"Kate evolving 3","height":165});
															thumbnails[2008477] = clik.newPhoto({"id":2008477,"src":"Fountain ripples_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_2008477.html","width":130,"caption":"Fountain ripples\/SOLD","height":173});
															thumbnails[5892170] = clik.newPhoto({"id":5892170,"src":"A_corner_of_Montmartre_Cemetery_XXX_thumb.jpg","galleries_id":78713,"server_id":18,"link":"photo_5892170.html","width":130,"caption":"A corner of Montmartre Cemtery","height":128});
															thumbnails[5894545] = clik.newPhoto({"id":5894545,"src":"umbrellas_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_5894545.html","width":130,"caption":"Umbrellas","height":98});
															thumbnails[3313967] = clik.newPhoto({"id":3313967,"src":"Velodrome_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_3313967.html","width":130,"caption":"Velodrome","height":180});
															thumbnails[1810979] = clik.newPhoto({"id":1810979,"src":"Windy_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_1810979.html","width":130,"caption":"Windy","height":133});
															thumbnails[6682808] = clik.newPhoto({"id":6682808,"src":"Kate_evolving_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6682808.html","width":130,"caption":"Kate evolving 2","height":129});
															thumbnails[1062567] = clik.newPhoto({"id":1062567,"src":"Bucket_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_1062567.html","width":130,"caption":"Red Bucket","height":217});
															thumbnails[1065608] = clik.newPhoto({"id":1065608,"src":"Spain[1]_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_1065608.html","width":130,"caption":"Spain","height":159});
															thumbnails[3086008] = clik.newPhoto({"id":3086008,"src":"two beach boys 2_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_3086008.html","width":130,"caption":"Boys on the beach 2","height":173});
															thumbnails[3085997] = clik.newPhoto({"id":3085997,"src":"red umbrella_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_3085997.html","width":130,"caption":"red umbrella\/SOLD","height":276});
															thumbnails[1065630] = clik.newPhoto({"id":1065630,"src":"Art Deco Freedom_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_1065630.html","width":130,"caption":"Art Deco Freedom\/SOLD","height":98});
															thumbnails[1239170] = clik.newPhoto({"id":1239170,"src":"beach reflections_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_1239170.html","width":130,"caption":"beach reflections\/SOLD","height":87});
															thumbnails[3313954] = clik.newPhoto({"id":3313954,"src":"before the crash_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_3313954.html","width":130,"caption":"Before the crash ","height":175});
															thumbnails[4797216] = clik.newPhoto({"id":4797216,"src":"z_ballet_cancer_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_4797216.html","width":130,"caption":"ballet dancer\/SOLD\/PRINTS AVAILABLE","height":195});
															thumbnails[5894537] = clik.newPhoto({"id":5894537,"src":"The_Pickpocket_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_5894537.html","width":130,"caption":"the pickpocket\/SOLD\/PRINTS AVAILABLE","height":96});
															thumbnails[6460680] = clik.newPhoto({"id":6460680,"src":"Butch1_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_6460680.html","width":130,"caption":"Butch","height":98});
															thumbnails[3313957] = clik.newPhoto({"id":3313957,"src":"Liverpool under construction 3_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_3313957.html","width":130,"caption":"Liverpool under construction 6 \/SOLD","height":98});
															thumbnails[5894517] = clik.newPhoto({"id":5894517,"src":"Lost_Forest_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_5894517.html","width":130,"caption":"Lost Forest\/SOLD","height":92});
															thumbnails[6460708] = clik.newPhoto({"id":6460708,"src":"Touched_-_Untouched1_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_6460708.html","width":130,"caption":"Pool with Lotus","height":98});
															thumbnails[2006978] = clik.newPhoto({"id":2006978,"src":"Cornwall bay_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_2006978.html","width":130,"caption":"Cornwall Bay\/SOLD","height":76});
															thumbnails[3127311] = clik.newPhoto({"id":3127311,"src":"for website 1_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_3127311.html","width":130,"caption":"team cycle race\/SOLD","height":100});
															thumbnails[6876063] = clik.newPhoto({"id":6876063,"src":"Boat_house_Birkenhead_Park_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_6876063.html","width":130,"caption":"Boat House Birkenhead Park  Now Sold","height":86});
															thumbnails[2599310] = clik.newPhoto({"id":2599310,"src":"Crysanth_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_2599310.html","width":130,"caption":"Chrysanth","height":153});
															thumbnails[7430337] = clik.newPhoto({"id":7430337,"src":"Weather_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_7430337.html","width":130,"caption":"Weather\/SOLD","height":159});
															thumbnails[5894408] = clik.newPhoto({"id":5894408,"src":"Finders_1_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_5894408.html","width":130,"caption":"Sold","height":99});
															thumbnails[6460582] = clik.newPhoto({"id":6460582,"src":"Juene_Coq_thumb.jpg","galleries_id":78846,"server_id":18,"link":"photo_6460582.html","width":130,"caption":"Juene Coq","height":119});
															thumbnails[6690182] = clik.newPhoto({"id":6690182,"src":"Mike_-_clikpic_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_6690182.html","width":130,"caption":"Mike","height":130});
															thumbnails[1075928] = clik.newPhoto({"id":1075928,"src":"Nine_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_1075928.html","width":130,"caption":"Nine figures against the sun.","height":131});
															thumbnails[1059478] = clik.newPhoto({"id":1059478,"src":"Abbourhay_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_1059478.html","width":130,"caption":"Sunlight, Arbourhay.","height":173});
															thumbnails[1059501] = clik.newPhoto({"id":1059501,"src":"Men_thumb.jpg","galleries_id":274463,"server_id":18,"link":"photo_1059501.html","width":130,"caption":"Two men.","height":129});
															thumbnails[1059505] = clik.newPhoto({"id":1059505,"src":"Storm_thumb.JPG","galleries_id":274463,"server_id":18,"link":"photo_1059505.html","width":130,"caption":"Landscape, storm approaching","height":175});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[78713] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery 1","link":"gallery_78713.html","maxRecords":0.0,"photoIDs":[4418053.0,6682236.0,5892158.0,6682149.0,6856587.0,1059482.0,6759699.0,6682231.0,5892198.0,6682283.0,6682811.0,6682286.0,6683704.0,6682731.0,6234149.0,6682810.0,5892170.0],"skipIndex":0,"section_code":"gallery","featured_images":"6682283,5892170,4418053","id":78713,"singleSection":false});				  						galleries[78846] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery 2","link":"gallery_78846.html","maxRecords":0.0,"photoIDs":[7430330.0,7430334.0,7430336.0,7893259.0,7893286.0,7428925.0,7893272.0,5894567.0,6460698.0,7986321.0,7985381.0,7986327.0,3313967.0,3313954.0,6460680.0,6460708.0,6876063.0,2599310.0,6460582.0],"skipIndex":0,"section_code":"gallery","featured_images":"7985381,7893286,7893272,7893259,7430336,7430330,7428925","id":78846,"singleSection":false});				  						galleries[274463] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery 3","link":"gallery_274463.html","maxRecords":0.0,"photoIDs":[2008449.0,4797143.0,6460683.0,6460690.0,6460695.0,6876228.0,6876276.0,6460611.0,6682244.0,6690204.0,2141551.0,6682805.0,3085980.0,1067016.0,1065632.0,6682262.0,1569248.0,1810989.0,2008477.0,5894545.0,1810979.0,6682808.0,1062567.0,1065608.0,3086008.0,3085997.0,1065630.0,1239170.0,4797216.0,5894537.0,3313957.0,5894517.0,2006978.0,3127311.0,7430337.0,5894408.0,6690182.0,1075928.0,1059478.0,1059501.0,1059505.0],"skipIndex":0,"section_code":"gallery","featured_images":6460695.0,"id":274463,"singleSection":false});				  						galleries[444047] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery 4 ","link":"gallery_444047.html","maxRecords":0.0,"photoIDs":[8364314.0,8369756.0,8369758.0,8369764.0,8369766.0,8369769.0,8374551.0],"skipIndex":0,"section_code":"gallery","featured_images":8364314,"id":444047,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[238704] = '6460695,8364314,7430330,4418053,8369756,7430334,7430336,7893286,7893259,8369766,7428925,8369769,7893272,8374551,6682283,7986321,7985381,7986327,5892170,1075928';
imageSets[1] = '6460695,8364314,7430330,4418053,8369756,8369758,7430336,8369764,7893286,7893259,8369766,7428925,8369769,7893272,8374551,6690204,6682283,7986321,7985381,7986327,5892170,1075928';
imageSets[2] = '6460695,8364314,7430330,4418053,8369756,8369758,7430336,8369764,7893286,7893259,8369766,7428925,8369769,7893272,8374551,6682283,7985381,5892170';
imageSets[3] = '6876276,6876228,6460695,6460690,6460683,4797143,8364314,6460611,4418053,7430334,6682236,7430336,6682244,7893286,7893259,5892158,6856587,6682149,6759699,6682231,7893272,5892198,8374551,6690204,6682283,5894567,6460698,6682805,6682811,7985381,6683704,6682286,6682731,6682262,6234149,6682810,5894545,6460680,5894537,6460708,6876063,3127311,6460582,5894408,1075928';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/artshedgallery/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/artshedgallery/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 = 'Art Shed Gallery: ' + 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.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="browndshd@boltblue.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="browndshd@boltblue.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({					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;
	}
}

			

