window.thumbnails = {};
															thumbnails[4406905] = clik.newPhoto({"id":4406905,"src":"conion1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Onion","height":173});
															thumbnails[3817732] = clik.newPhoto({"id":3817732,"src":"cfruitbox_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3817732.html","width":130,"caption":"","height":98});
															thumbnails[3817754] = clik.newPhoto({"id":3817754,"src":"cpinktulips_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3817754.html","width":130,"caption":"","height":98});
															thumbnails[4404863] = clik.newPhoto({"id":4404863,"src":"cpotagergate_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4404863.html","width":130,"caption":"Potager","height":98});
															thumbnails[4404870] = clik.newPhoto({"id":4404870,"src":"cfolly_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4404870.html","width":130,"caption":"Folly","height":98});
															thumbnails[4405120] = clik.newPhoto({"id":4405120,"src":"coldkitchen_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4405120.html","width":130,"caption":"Old kitchen","height":98});
															thumbnails[4405129] = clik.newPhoto({"id":4405129,"src":"cwoodlandseat_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4405129.html","width":130,"caption":"Woodland seat","height":98});
															thumbnails[4405130] = clik.newPhoto({"id":4405130,"src":"cpondlilies_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4405130.html","width":130,"caption":"Pond with lilies and Sunshine","height":98});
															thumbnails[4406927] = clik.newPhoto({"id":4406927,"src":"conion2_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_4406927.html","width":130,"caption":"Onion","height":173});
															thumbnails[4407052] = clik.newPhoto({"id":4407052,"src":"cduck_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4407052.html","width":130,"caption":"Duck","height":98});
															thumbnails[4587880] = clik.newPhoto({"id":4587880,"src":"cflow_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4587880.html","width":130,"caption":"Ash Tree","height":98});
															thumbnails[4588015] = clik.newPhoto({"id":4588015,"src":"croseborder_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4588015.html","width":130,"caption":"Rose border","height":173});
															thumbnails[4588024] = clik.newPhoto({"id":4588024,"src":"crose_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4588024.html","width":130,"caption":"Rose","height":173});
															thumbnails[4588064] = clik.newPhoto({"id":4588064,"src":"crobin_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_4588064.html","width":130,"caption":"Robin","height":98});
															thumbnails[4642660] = clik.newPhoto({"id":4642660,"src":"cpheasants_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_4642660.html","width":130,"caption":"Pheasnts","height":98});
															thumbnails[4642734] = clik.newPhoto({"id":4642734,"src":"csummerdance_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_4642734.html","width":130,"caption":"Summer Dance","height":173});
															thumbnails[4642739] = clik.newPhoto({"id":4642739,"src":"csunshine_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_4642739.html","width":130,"caption":"Sunshine","height":173});
															thumbnails[4642774] = clik.newPhoto({"id":4642774,"src":"cbeauverresx3_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_4642774.html","width":130,"caption":"Beau Verre","height":98});
															thumbnails[4642853] = clik.newPhoto({"id":4642853,"src":"cequinestudy_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_4642853.html","width":130,"caption":"Equine Study","height":173});
															thumbnails[4642937] = clik.newPhoto({"id":4642937,"src":"cswallowbath_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_4642937.html","width":130,"caption":"Swallow","height":98});
															thumbnails[5249920] = clik.newPhoto({"id":5249920,"src":"cAdamsonShowborough_3_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_5249920.html","width":130,"caption":"Terrace","height":87});
															thumbnails[5249931] = clik.newPhoto({"id":5249931,"src":"ctrametefungi_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_5249931.html","width":130,"caption":"Fungi","height":130});
															thumbnails[5249949] = clik.newPhoto({"id":5249949,"src":"cheidisnow_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_5249949.html","width":130,"caption":"Heidi","height":98});
															thumbnails[5363407] = clik.newPhoto({"id":5363407,"src":"April_2009_Martins_waves_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_5363407.html","width":130,"caption":"Waves","height":87});
															thumbnails[5376365] = clik.newPhoto({"id":5376365,"src":"cturnerball_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_5376365.html","width":130,"caption":"Ball","height":195});
															thumbnails[5376376] = clik.newPhoto({"id":5376376,"src":"cbirdboxgerrard_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_5376376.html","width":130,"caption":"Birdbox","height":188});
															thumbnails[5460432] = clik.newPhoto({"id":5460432,"src":"cbarnettsheep_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_5460432.html","width":130,"caption":"Sheep","height":88});
															thumbnails[6486044] = clik.newPhoto({"id":6486044,"src":"csunbather10_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_6486044.html","width":130,"caption":"Sunbather","height":173});
															thumbnails[6486051] = clik.newPhoto({"id":6486051,"src":"crayfern10_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_6486051.html","width":130,"caption":"Fern","height":98});
															thumbnails[6486053] = clik.newPhoto({"id":6486053,"src":"cnavigator10_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_6486053.html","width":130,"caption":"Navigator","height":173});
															thumbnails[6486055] = clik.newPhoto({"id":6486055,"src":"ckiss10_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_6486055.html","width":130,"caption":"Kiss","height":98});
															thumbnails[6486057] = clik.newPhoto({"id":6486057,"src":"cfauna10_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_6486057.html","width":130,"caption":"Fauna","height":98});
															thumbnails[6486059] = clik.newPhoto({"id":6486059,"src":"cface10_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_6486059.html","width":130,"caption":"Daughter","height":98});
															thumbnails[6486065] = clik.newPhoto({"id":6486065,"src":"cemmahorse2_thumb.jpg","galleries_id":303205,"server_id":15,"link":"photo_6486065.html","width":130,"caption":"Horse","height":98});
															thumbnails[6530304] = clik.newPhoto({"id":6530304,"src":"chouse10_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_6530304.html","width":130,"caption":"","height":98});
															thumbnails[6530308] = clik.newPhoto({"id":6530308,"src":"cfolly10_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_6530308.html","width":130,"caption":"","height":98});
															thumbnails[6530311] = clik.newPhoto({"id":6530311,"src":"cmagnoliabench10_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_6530311.html","width":130,"caption":"","height":98});
															thumbnails[7360057] = clik.newPhoto({"id":7360057,"src":"cIndia_5_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7360057.html","width":130,"caption":"India","height":98});
															thumbnails[7751245] = clik.newPhoto({"id":7751245,"src":"cbees_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751245.html","width":130,"caption":"","height":98});
															thumbnails[7751247] = clik.newPhoto({"id":7751247,"src":"cbirds_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751247.html","width":130,"caption":"","height":98});
															thumbnails[7751248] = clik.newPhoto({"id":7751248,"src":"cchloe_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751248.html","width":130,"caption":"","height":173});
															thumbnails[7751251] = clik.newPhoto({"id":7751251,"src":"ccrows_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751251.html","width":130,"caption":"","height":98});
															thumbnails[7751253] = clik.newPhoto({"id":7751253,"src":"cfollyhorse_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751253.html","width":130,"caption":"","height":98});
															thumbnails[7751254] = clik.newPhoto({"id":7751254,"src":"cgalatea_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751254.html","width":130,"caption":"","height":98});
															thumbnails[7751256] = clik.newPhoto({"id":7751256,"src":"chare_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751256.html","width":130,"caption":"","height":98});
															thumbnails[7751258] = clik.newPhoto({"id":7751258,"src":"cjumbo_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751258.html","width":130,"caption":"","height":98});
															thumbnails[7751261] = clik.newPhoto({"id":7751261,"src":"cleaf_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751261.html","width":130,"caption":"","height":98});
															thumbnails[7751263] = clik.newPhoto({"id":7751263,"src":"cspheres_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751263.html","width":130,"caption":"","height":98});
															thumbnails[7751266] = clik.newPhoto({"id":7751266,"src":"cwave_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751266.html","width":130,"caption":"","height":98});
															thumbnails[7751267] = clik.newPhoto({"id":7751267,"src":"cbarrow_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751267.html","width":130,"caption":"","height":98});
															thumbnails[7751269] = clik.newPhoto({"id":7751269,"src":"cbluefig_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751269.html","width":130,"caption":"","height":98});
															thumbnails[7751271] = clik.newPhoto({"id":7751271,"src":"cdovecotemag_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751271.html","width":130,"caption":"","height":98});
															thumbnails[7751274] = clik.newPhoto({"id":7751274,"src":"cfoleywood_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751274.html","width":130,"caption":"","height":173});
															thumbnails[7751278] = clik.newPhoto({"id":7751278,"src":"cplinthery_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751278.html","width":130,"caption":"","height":98});
															thumbnails[7751281] = clik.newPhoto({"id":7751281,"src":"crockface_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_7751281.html","width":130,"caption":"","height":98});
															thumbnails[8170928] = clik.newPhoto({"id":8170928,"src":"cpegasus11_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_8170928.html","width":130,"caption":"","height":98});
															thumbnails[8170929] = clik.newPhoto({"id":8170929,"src":"cmarchhare_thumb.jpg","galleries_id":398252,"server_id":15,"link":"photo_8170929.html","width":130,"caption":"","height":98});
															thumbnails[3332111] = clik.newPhoto({"id":3332111,"src":"angel_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3332111.html","width":130,"caption":"Angel","height":98});
															thumbnails[3699482] = clik.newPhoto({"id":3699482,"src":"cdryingherfeet_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_3699482.html","width":130,"caption":"Drying her Feet","height":98});
															thumbnails[3343918] = clik.newPhoto({"id":3343918,"src":"stonewomandovecote_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343918.html","width":130,"caption":"Untitled","height":173});
															thumbnails[3699532] = clik.newPhoto({"id":3699532,"src":"cstickleback_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_3699532.html","width":130,"caption":"Stickleback ","height":98});
															thumbnails[3817703] = clik.newPhoto({"id":3817703,"src":"cmauvetulips_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3817703.html","width":130,"caption":"","height":98});
															thumbnails[3343900] = clik.newPhoto({"id":3343900,"src":"sheep1_thumb.JPG","galleries_id":203164,"server_id":15,"link":"photo_3343900.html","width":130,"caption":"Sheep","height":98});
															thumbnails[3704540] = clik.newPhoto({"id":3704540,"src":"cfledge_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_3704540.html","width":130,"caption":"Fledge","height":173});
															thumbnails[3343893] = clik.newPhoto({"id":3343893,"src":"memorysticks_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343893.html","width":130,"caption":"Memory Sticks","height":173});
															thumbnails[3343899] = clik.newPhoto({"id":3343899,"src":"saintandbird_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343899.html","width":130,"caption":"St. Francis","height":98});
															thumbnails[3699548] = clik.newPhoto({"id":3699548,"src":"cbobby_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_3699548.html","width":130,"caption":"Bobby","height":98});
															thumbnails[3343866] = clik.newPhoto({"id":3343866,"src":"fiddlehead_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343866.html","width":130,"caption":"Ferns","height":173});
															thumbnails[3700820] = clik.newPhoto({"id":3700820,"src":"cnigelash_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3700820.html","width":130,"caption":"Magnolia","height":98});
															thumbnails[3817860] = clik.newPhoto({"id":3817860,"src":"cpenelope11_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3817860.html","width":130,"caption":"","height":173});
															thumbnails[3343920] = clik.newPhoto({"id":3343920,"src":"stonewomanwoodland_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343920.html","width":130,"caption":"Seated Figure","height":173});
															thumbnails[3956867] = clik.newPhoto({"id":3956867,"src":"cstrettonpond2_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3956867.html","width":130,"caption":"Pond","height":87});
															thumbnails[3699594] = clik.newPhoto({"id":3699594,"src":"cpilgrim_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_3699594.html","width":130,"caption":"The Pilgrim","height":98});
															thumbnails[3817861] = clik.newPhoto({"id":3817861,"src":"cdovecotetulips_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3817861.html","width":130,"caption":"","height":98});
															thumbnails[3956809] = clik.newPhoto({"id":3956809,"src":"cstrettonpond_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3956809.html","width":130,"caption":"Sunk garden","height":87});
															thumbnails[3343857] = clik.newPhoto({"id":3343857,"src":"deer_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343857.html","width":130,"caption":"Fallow Deer","height":98});
															thumbnails[3704486] = clik.newPhoto({"id":3704486,"src":"cnimue_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_3704486.html","width":130,"caption":"Nimue","height":98});
															thumbnails[3817862] = clik.newPhoto({"id":3817862,"src":"cwhatever_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3817862.html","width":130,"caption":"","height":98});
															thumbnails[3343846] = clik.newPhoto({"id":3343846,"src":"ceramicteeth_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343846.html","width":130,"caption":"Cactus","height":173});
															thumbnails[3821529] = clik.newPhoto({"id":3821529,"src":"cnewlife_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_3821529.html","width":130,"caption":"New Life","height":173});
															thumbnails[3817864] = clik.newPhoto({"id":3817864,"src":"crainbow_thumb.jpg","galleries_id":232656,"server_id":15,"link":"photo_3817864.html","width":130,"caption":"Rainbow","height":98});
															thumbnails[3704632] = clik.newPhoto({"id":3704632,"src":"ccdido_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_3704632.html","width":130,"caption":"Dido","height":173});
															thumbnails[3343929] = clik.newPhoto({"id":3343929,"src":"tulipchair_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343929.html","width":130,"caption":"Tulip Seat","height":173});
															thumbnails[3343885] = clik.newPhoto({"id":3343885,"src":"joyveranda_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343885.html","width":130,"caption":"Liberty","height":173});
															thumbnails[3818090] = clik.newPhoto({"id":3818090,"src":"clilies_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_3818090.html","width":130,"caption":"Lilies","height":98});
															thumbnails[4407007] = clik.newPhoto({"id":4407007,"src":"cfaithhopelove_thumb.jpg","galleries_id":214315,"server_id":15,"link":"photo_4407007.html","width":130,"caption":"Faith, Hope and Love","height":98});
															thumbnails[3343930] = clik.newPhoto({"id":3343930,"src":"wolf_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343930.html","width":130,"caption":"Wolf","height":173});
															thumbnails[3343904] = clik.newPhoto({"id":3343904,"src":"stfrancis_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343904.html","width":130,"caption":"Praying Woman","height":98});
															thumbnails[3343919] = clik.newPhoto({"id":3343919,"src":"stonewomanveranda_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343919.html","width":130,"caption":"Untitled","height":173});
															thumbnails[3343821] = clik.newPhoto({"id":3343821,"src":"boysunkgarden_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343821.html","width":130,"caption":"Fledgling","height":98});
															thumbnails[3343883] = clik.newPhoto({"id":3343883,"src":"iguana_thumb.jpg","galleries_id":203164,"server_id":15,"link":"photo_3343883.html","width":130,"caption":"Rock Lizard","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[303205] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2010.0,"link":"gallery_303205.html","maxRecords":0.0,"photoIDs":[5376365.0,5376376.0,5460432.0,6486044.0,6486051.0,6486053.0,6486055.0,6486057.0,6486059.0,6486065.0],"skipIndex":0,"section_code":"gallery","featured_images":"6486065,6486059,6486057,6486055,6486053,6486051,6486044,5460432,5376376,5376365","id":303205,"singleSection":false});				  						galleries[398252] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2011.0,"link":"gallery_398252.html","maxRecords":0.0,"photoIDs":[7360057.0,7751245.0,7751247.0,7751248.0,7751251.0,7751253.0,7751254.0,7751256.0,7751258.0,7751261.0,7751263.0,7751266.0,7751267.0,7751269.0,7751271.0,7751274.0,7751278.0,7751281.0,8170928.0,8170929.0],"skipIndex":0,"section_code":"gallery","featured_images":"8170929,8170928,7751281,7751278,7751274,7751271,7751269,7751267,7751266,7751263","id":398252,"singleSection":false});				  						galleries[203164] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2008.0,"link":"gallery_203164.html","maxRecords":0.0,"photoIDs":[3332111.0,3343918.0,3343900.0,3343893.0,3343899.0,3343866.0,3343920.0,3343857.0,3343846.0,3343929.0,3343885.0,3343930.0,3343904.0,3343919.0,3343821.0,3343883.0],"skipIndex":0,"section_code":"gallery","featured_images":"3343930,3343929,3343920,3343919,3343918,3343904,3343900,3343899,3343893,3343885","id":203164,"singleSection":false});				  						galleries[214315] = clik.newGallery({"parentGallery":"","usePopups":false,"title":2009.0,"link":"gallery_214315.html","maxRecords":0.0,"photoIDs":[4406927.0,4642660.0,4642734.0,4642739.0,4642774.0,4642853.0,4642937.0,5363407.0,3699482.0,3699532.0,3704540.0,3699548.0,3699594.0,3704486.0,3821529.0,3704632.0,3818090.0,4407007.0],"skipIndex":0,"section_code":"gallery","featured_images":"5363407,4642937,4642853,4642774,4642739,4642734,4642660,4407007,4406927,3821529","id":214315,"singleSection":false});				  						galleries[232656] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Garden","link":"gallery_232656.html","maxRecords":0.0,"photoIDs":[3817732.0,3817754.0,4404863.0,4404870.0,4405120.0,4405129.0,4405130.0,4407052.0,4587880.0,4588015.0,4588024.0,4588064.0,5249920.0,5249931.0,5249949.0,6530304.0,6530308.0,6530311.0,3817703.0,3700820.0,3817860.0,3956867.0,3817861.0,3956809.0,3817862.0,3817864.0],"skipIndex":0,"section_code":"gallery","featured_images":"6530311,6530308,6530304,5249949,5249931,5249920,4588064,4588024,4588015,4587880","id":232656,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6486065,6486059,6486057,6486055,6486053,6486044,4642739,3699482,3332111,3699532,3343918,3704540';
imageSets[3] = '4642739,3699482,3699532,3704540';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/shoboro/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/shoboro/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/shoboro/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/shoboro/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/shoboro/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/shoboro/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/shoboro/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/shoboro/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 = 'Showborough House Sculpture Garden: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			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;
	}
}

			

