window.thumbnails = new Object();
												thumbnails[4149600] = new thumbnail(4149600,'','A deserted beach','K_128_copy_thumb.jpg',130, 86,15,'															#');
												thumbnails[4149611] = new thumbnail(4149611,'','Sunset, Scotland','K_164_copy_thumb.jpg',130, 87,15,'															#');
												thumbnails[4149620] = new thumbnail(4149620,'','Rock pool, Scotland','K_216_copy_thumb.jpg',130, 83,15,'															#');
												thumbnails[4149627] = new thumbnail(4149627,'','Common Seal ','K_278_copy_thumb.jpg',130, 87,15,'															#');
												thumbnails[4149631] = new thumbnail(4149631,'','Rough seas, Scotland','K_381_copy_thumb.jpg',130, 87,15,'															#');
												thumbnails[4149667] = new thumbnail(4149667,'','Wreck','K_493_copy_thumb.jpg',130, 89,15,'															#');
												thumbnails[4149671] = new thumbnail(4149671,'','Passing Storm','K_517_copy_thumb.jpg',130, 92,15,'															#');
												thumbnails[4149813] = new thumbnail(4149813,'','Stormy skies','K_403_copy_thumb.jpg',130, 88,15,'															#');
												thumbnails[4149821] = new thumbnail(4149821,'','Common seal','K_264_copy_thumb.jpg',130, 86,15,'															#');
												thumbnails[4149825] = new thumbnail(4149825,'','The Chapel at Skipness','K_334_copy_thumb.jpg',130, 98,15,'															#');
												thumbnails[4149831] = new thumbnail(4149831,'','Carnessie Castle','K_448_copy_thumb.jpg',130, 87,15,'															#');
												thumbnails[4443793] = new thumbnail(4443793,'','','Flag_thumb.jpg',130, 114,15,'															#');
												thumbnails[4443808] = new thumbnail(4443808,'','','Mamer1_thumb.jpg',130, 87,15,'															#');
												thumbnails[4443847] = new thumbnail(4443847,'','The Healing Fields','Chi_Gung_thumb.jpg',130, 83,15,'															#');
												thumbnails[5288413] = new thumbnail(5288413,'209679','New Brighton Lighthouse ','newbrightonlh_thumb.jpg',130, 87,15,'																			photo_5288413.html');
												thumbnails[3978151] = new thumbnail(3978151,'209679','Lindesfarne Castle, Holy Island, Northumberland','Lindesfarne_thumb.jpg',130, 98,15,'																			photo_3978151.html');
												thumbnails[3977796] = new thumbnail(3977796,'212391','Gannets, Bass Rock, Scotland','Gannets_thumb.jpg',130, 88,15,'																			photo_3977796.html');
												thumbnails[3978092] = new thumbnail(3978092,'212391','Gannet Colony, Bass Rock','Gannet_Colony_thumb.jpg',130, 87,15,'																			photo_3978092.html');
												thumbnails[3473376] = new thumbnail(3473376,'212391','Eider Ducks at Sunset, Orkney Islands','EiderDucks_thumb.jpg',130, 98,15,'																			photo_3473376.html');
												thumbnails[3473761] = new thumbnail(3473761,'216216','Rime frost in Beech woodland','aw029_thumb.jpg',130, 98,15,'																			photo_3473761.html');
												thumbnails[3473770] = new thumbnail(3473770,'209679','Buddhist monks, Laos','r60_thumb.jpg',130, 98,15,'																			photo_3473770.html');
												thumbnails[3473783] = new thumbnail(3473783,'209679','Rainbow','aw0064_thumb.jpg',130, 98,15,'																			photo_3473783.html');
												thumbnails[3473818] = new thumbnail(3473818,'209679','Early morning mist, Surrey Hills','005_thumb.jpg',130, 98,15,'																			photo_3473818.html');
												thumbnails[3473869] = new thumbnail(3473869,'209679','Ta Prohm, Angkor, Cambodia','c94_thumb.jpg',130, 98,15,'																			photo_3473869.html');
												thumbnails[3473883] = new thumbnail(3473883,'209679','The church of St. Peter and St. Paul, Godalming','aw031_thumb.jpg',130, 98,15,'																			photo_3473883.html');
												thumbnails[3473902] = new thumbnail(3473902,'209679','Volcano Pacaya, Guatemala ','zz101_thumb.jpg',130, 89,15,'																			photo_3473902.html');
												thumbnails[3473906] = new thumbnail(3473906,'212391','Puffin, Scotland','B008_thumb.jpg',130, 89,15,'																			photo_3473906.html');
												thumbnails[3473972] = new thumbnail(3473972,'212391','Nuthatch','GF020_thumb.jpg',130, 89,15,'																			photo_3473972.html');
												thumbnails[3474043] = new thumbnail(3474043,'212391','Seabirds, Dee Estuary, Wirral, UK','B015_thumb.jpg',130, 98,15,'																			photo_3474043.html');
												thumbnails[3474051] = new thumbnail(3474051,'209679','Pancake Ice, Wirral, Merseyside','W002_thumb.jpg',130, 98,15,'																			photo_3474051.html');
												thumbnails[3474059] = new thumbnail(3474059,'209679','Volcano, Bolivia','n0019_thumb.jpg',130, 86,15,'																			photo_3474059.html');
												thumbnails[3474078] = new thumbnail(3474078,'209679','People\'s Taxi, Cambodia','r20_thumb.jpg',130, 98,15,'																			photo_3474078.html');
												thumbnails[3475535] = new thumbnail(3475535,'216216','Autumn Colour','aw013_thumb.jpg',130, 98,15,'																			photo_3475535.html');
												thumbnails[3475537] = new thumbnail(3475537,'212391','Turnstone','B001_thumb.jpg',130, 98,15,'																			photo_3475537.html');
												thumbnails[3475549] = new thumbnail(3475549,'209679','The Giants Causeway, Northern Ireland','s029_thumb.jpg',130, 98,15,'																			photo_3475549.html');
												thumbnails[3475556] = new thumbnail(3475556,'212391','Grey Heron','b023_thumb.jpg',130, 98,15,'																			photo_3475556.html');
												thumbnails[3475563] = new thumbnail(3475563,'209679','Carpenter, Morocco','m001_thumb.jpg',130, 98,15,'																			photo_3475563.html');
												thumbnails[3475578] = new thumbnail(3475578,'209679','Iceberg, Patagonia','o011_thumb.jpg',130, 85,15,'																			photo_3475578.html');
												thumbnails[3478440] = new thumbnail(3478440,'209679','Evening on the Mekong','r51_thumb.jpg',130, 98,15,'																			photo_3478440.html');
												thumbnails[3487118] = new thumbnail(3487118,'209679','Tate Modern, London','Tate Modern copy_thumb.jpg',130, 90,15,'																			photo_3487118.html');
												thumbnails[3487246] = new thumbnail(3487246,'212391','Robin','Robin_thumb.jpg',130, 110,15,'																			photo_3487246.html');
												thumbnails[3540106] = new thumbnail(3540106,'209679','Lismore Lighthouse, Scotland','light2_thumb.jpg',130, 75,15,'																			photo_3540106.html');
												thumbnails[3540215] = new thumbnail(3540215,'216216','Trichoreus Cactus, Salar De Uyuni, bolivia','cacti_thumb.jpg',130, 107,15,'																			photo_3540215.html');
												thumbnails[3540228] = new thumbnail(3540228,'216216','Autumn colour, Surrey','aw016_thumb.jpg',130, 98,15,'																			photo_3540228.html');
												thumbnails[3540243] = new thumbnail(3540243,'212391','Bower Bird','aab028_thumb.jpg',130, 94,15,'																			photo_3540243.html');
												thumbnails[3555757] = new thumbnail(3555757,'216216','April snow on Cherry Blossom','w_163_thumb.jpg',130, 97,15,'																			photo_3555757.html');
												thumbnails[3555772] = new thumbnail(3555772,'216216','Scots Pine','scots_thumb.jpg',130, 95,15,'																			photo_3555772.html');
												thumbnails[3555810] = new thumbnail(3555810,'216216','Mossy Trunks, Scotland','moss_thumb.jpg',130, 106,15,'																			photo_3555810.html');
												thumbnails[3555864] = new thumbnail(3555864,'212391','Curlew, Scotland','whimbrel_thumb.jpg',130, 92,15,'																			photo_3555864.html');
												thumbnails[3555930] = new thumbnail(3555930,'212391','Gannet in flight','Gannet_thumb.jpg',130, 81,15,'																			photo_3555930.html');
												thumbnails[3603063] = new thumbnail(3603063,'212391','Fledgeling Sparrow','Fledgeling_thumb.jpg',130, 87,15,'																			photo_3603063.html');
												thumbnails[3603143] = new thumbnail(3603143,'216216','Magnolia Blossom','Magnolia_blossom_thumb.jpg',130, 99,15,'																			photo_3603143.html');
												thumbnails[3621679] = new thumbnail(3621679,'212391','Long Tailed Tit','longtailedtit_thumb.jpg',130, 89,15,'																			photo_3621679.html');
												thumbnails[3621859] = new thumbnail(3621859,'216216','Fern on Oak tree','Fern_thumb.jpg',130, 92,15,'																			photo_3621859.html');
												thumbnails[3621943] = new thumbnail(3621943,'209679','Table top reflection','tabletop_thumb.jpg',130, 98,15,'																			photo_3621943.html');
												thumbnails[3700589] = new thumbnail(3700589,'216216','Wistmans Wood, Devon','wistmans_wood_thumb.jpg',130, 88,15,'																			photo_3700589.html');
												thumbnails[3852712] = new thumbnail(3852712,'209679','Children, Cambodia','Cambodiankids_thumb.jpg',130, 100,15,'																			photo_3852712.html');
												thumbnails[3978440] = new thumbnail(3978440,'209679','Evening Light','North_Berwick_thumb.jpg',130, 92,15,'																			photo_3978440.html');
												thumbnails[3978442] = new thumbnail(3978442,'209679','Morning Light, North Sea','water_thumb.jpg',130, 86,15,'																			photo_3978442.html');
												thumbnails[3978496] = new thumbnail(3978496,'209680','Southern Hawker','Southernhawker_thumb.jpg',130, 168,15,'																			photo_3978496.html');
												thumbnails[4149550] = new thumbnail(4149550,'209679','Clear water and a still morning at Kilbury Head','K_094_copy_thumb.jpg',130, 90,15,'																			photo_4149550.html');
												thumbnails[4149639] = new thumbnail(4149639,'209679','Stormy weather, Scotland','K_390_copy_thumb.jpg',130, 87,15,'																			photo_4149639.html');
												thumbnails[5141416] = new thumbnail(5141416,'216216','Sweet Chestnut Leaves','aw0009_thumb.jpg',130, 98,15,'																			photo_5141416.html');
												thumbnails[5141489] = new thumbnail(5141489,'209679','Downtown Toronto','toronto_thumb.jpg',130, 88,15,'																			photo_5141489.html');
												thumbnails[5498973] = new thumbnail(5498973,'209679','Winter Dawn','Winter1_thumb.jpg',130, 84,15,'																			photo_5498973.html');
												thumbnails[5498999] = new thumbnail(5498999,'216216','Winters Grip','winter2_thumb.jpg',130, 87,15,'																			photo_5498999.html');
												thumbnails[5499017] = new thumbnail(5499017,'209679','Snow Shadows','winter3_thumb.jpg',130, 87,15,'																			photo_5499017.html');
												thumbnails[5523919] = new thumbnail(5523919,'209679','Thursley Common','Thurs1_thumb.jpg',130, 79,15,'																			photo_5523919.html');
												thumbnails[5523921] = new thumbnail(5523921,'212391','Redshank Flock','redshank_thumb.jpg',130, 98,15,'																			photo_5523921.html');
												thumbnails[5523922] = new thumbnail(5523922,'212391','Grey Heron in flight','heron_thumb.jpg',130, 98,15,'																			photo_5523922.html');
												thumbnails[5523932] = new thumbnail(5523932,'209679','Iceberg on Grey Lake','icei_thumb.jpg',130, 87,15,'																			photo_5523932.html');
												thumbnails[5523937] = new thumbnail(5523937,'209679','Chinese Fishing Nets','chinesenets_thumb.jpg',130, 98,15,'																			photo_5523937.html');
												thumbnails[5523948] = new thumbnail(5523948,'209679','Hauling in, Sri Lanka','haulingin_thumb.jpg',130, 85,15,'																			photo_5523948.html');
												thumbnails[5871346] = new thumbnail(5871346,'212391','Great Crested Grebe with large fish','grebe1_thumb.jpg',130, 91,15,'																			photo_5871346.html');
												thumbnails[5871351] = new thumbnail(5871351,'212391','Great Crested Grebe','grebe2_thumb.jpg',130, 100,15,'																			photo_5871351.html');
												thumbnails[5871356] = new thumbnail(5871356,'212391','Heron in Flight','heron1_thumb.jpg',130, 96,15,'																			photo_5871356.html');
												thumbnails[6436166] = new thumbnail(6436166,'212391','Wheatear','wheatear_thumb.jpg',130, 92,15,'																			photo_6436166.html');
												thumbnails[6480654] = new thumbnail(6480654,'209679','Downtown Uplight','toronto_42C479D8-1EC9-D45B-1CD168904856D79B_thumb.jpg',130, 84,15,'																			photo_6480654.html');
												thumbnails[6515966] = new thumbnail(6515966,'356747','Gneiss rock, Isle of Lewis','s151_thumb.jpg',130, 78,15,'																			photo_6515966.html');
												thumbnails[6515976] = new thumbnail(6515976,'356747','Kayaks, Isle of Harris','canoes12_thumb.jpg',130, 78,15,'																			photo_6515976.html');
												thumbnails[6515978] = new thumbnail(6515978,'356747','Uig at Sunset','s171_thumb.jpg',130, 78,15,'																			photo_6515978.html');
												thumbnails[6515981] = new thumbnail(6515981,'356747','Callanish, Isle of Lewis','s181_thumb.jpg',130, 78,15,'																			photo_6515981.html');
												thumbnails[6515987] = new thumbnail(6515987,'356747','Scarista Beach, Isle of Harris','s191_thumb.jpg',130, 78,15,'																			photo_6515987.html');
												thumbnails[6515988] = new thumbnail(6515988,'356747','Dun Carloway Broch, Isle of Lewis','sg21_thumb.jpg',130, 78,15,'																			photo_6515988.html');
												thumbnails[6515990] = new thumbnail(6515990,'356747','Restored Black House, Isle of Lewis','sg3_thumb.jpg',130, 78,15,'																			photo_6515990.html');
												thumbnails[6515992] = new thumbnail(6515992,'356747','The Beach at Losgaintir, Isle of Harris','sg4_thumb.jpg',130, 78,15,'																			photo_6515992.html');
												thumbnails[6515995] = new thumbnail(6515995,'356747','Sand Patterns, Isle fo Harris','sg5_thumb.jpg',130, 78,15,'																			photo_6515995.html');
												thumbnails[6515998] = new thumbnail(6515998,'356747','Losgaintir, Isle of Harris','sg61_thumb.jpg',130, 78,15,'																			photo_6515998.html');
												thumbnails[6516000] = new thumbnail(6516000,'356747','The Gloaming, Isle of Lewis','sg7_thumb.jpg',130, 78,15,'																			photo_6516000.html');
												thumbnails[6516003] = new thumbnail(6516003,'356747','Sunset at Uig, Isle of Lewis','sg8_thumb.jpg',130, 78,15,'																			photo_6516003.html');
												thumbnails[6516008] = new thumbnail(6516008,'356747','The Gloaming, Isle of Harris','sg9_thumb.jpg',130, 78,15,'																			photo_6516008.html');
												thumbnails[6516014] = new thumbnail(6516014,'356747','Sunset on Lewis','sg11_thumb.jpg',130, 78,15,'																			photo_6516014.html');
												thumbnails[6516019] = new thumbnail(6516019,'356747','Scarista, Isle of Harris','sg12_thumb.jpg',130, 78,15,'																			photo_6516019.html');
												thumbnails[6516023] = new thumbnail(6516023,'356747','Where river meets sea, Isle of Harris','sg13_thumb.jpg',130, 78,15,'																			photo_6516023.html');
												thumbnails[6516029] = new thumbnail(6516029,'356747','Inclement Weather at Scarista Beach, Harris','sg211_thumb.jpg',130, 78,15,'																			photo_6516029.html');
												thumbnails[6516033] = new thumbnail(6516033,'356747','Lichen and crab skeleton, Harris','sg22_thumb.jpg',130, 78,15,'																			photo_6516033.html');
												thumbnails[6516163] = new thumbnail(6516163,'356747','The Stones of Callanish, Isle of Lewis','sg201_thumb.jpg',130, 78,15,'																			photo_6516163.html');
												thumbnails[6516275] = new thumbnail(6516275,'356747','Dun Carloway Broch, Isle of Lewis','s23_thumb.jpg',130, 78,15,'																			photo_6516275.html');
												thumbnails[6516329] = new thumbnail(6516329,'209679','Puncture outfit','puncture_outfit_copy_thumb.jpg',130, 78,15,'																			photo_6516329.html');
												thumbnails[6516503] = new thumbnail(6516503,'209680','Lowland Mountain Gorilla','Lowland_Mountain_gorilla_thumb.jpg',130, 195,15,'																			photo_6516503.html');
												thumbnails[7398340] = new thumbnail(7398340,'209679','Misty morning ','Mistymorning_thumb.jpg',130, 67,15,'																			photo_7398340.html');
												thumbnails[7398349] = new thumbnail(7398349,'216216','Enchanted wood','enchantedwood_thumb.jpg',130, 87,15,'																			photo_7398349.html');
												thumbnails[7398354] = new thumbnail(7398354,'216216','Dawn Glow','frostyMoon_thumb.jpg',130, 85,15,'																			photo_7398354.html');
												thumbnails[7398362] = new thumbnail(7398362,'216216','Snow line','snowline_thumb.jpg',130, 83,15,'																			photo_7398362.html');
												thumbnails[7398374] = new thumbnail(7398374,'216216','Burnt','burnt_thumb.jpg',130, 79,15,'																			photo_7398374.html');
												thumbnails[7398434] = new thumbnail(7398434,'209679','Waves Action','aw1_thumb.jpg',130, 87,15,'																			photo_7398434.html');
												thumbnails[7398435] = new thumbnail(7398435,'209679','Salt flats','aw3_thumb.jpg',130, 84,15,'																			photo_7398435.html');
												thumbnails[7398436] = new thumbnail(7398436,'209679','Volcanic shoreline','aw2_thumb.jpg',130, 73,15,'																			photo_7398436.html');
												thumbnails[3700715] = new thumbnail(3700715,'209680','Ammonites, Lyme Regis','ammonites1_thumb.jpg',130, 173,15,'																			photo_3700715.html');
												thumbnails[3555964] = new thumbnail(3555964,'209680','Fox cub','fox_thumb.jpg',130, 185,15,'																			photo_3555964.html');
												thumbnails[3475559] = new thumbnail(3475559,'209680','Seal Pup','C002_thumb.jpg',130, 89,15,'																			photo_3475559.html');
												thumbnails[3475540] = new thumbnail(3475540,'209680','Western Lowland Gorilla','c040_thumb.jpg',130, 98,15,'																			photo_3475540.html');
												thumbnails[3473824] = new thumbnail(3473824,'209680','Badger','c033_thumb.jpg',130, 87,15,'																			photo_3473824.html');
												thumbnails[3474063] = new thumbnail(3474063,'209680','Guanaco, Chile','o012_thumb.jpg',130, 89,15,'																			photo_3474063.html');
												thumbnails[3473971] = new thumbnail(3473971,'209680','Fallow Deer','C006_thumb.jpg',130, 98,15,'																			photo_3473971.html');
												thumbnails[4001977] = new thumbnail(4001977,'209680','Alligators','croc_thumb.jpg',130, 90,15,'																			photo_4001977.html');
												thumbnails[3475565] = new thumbnail(3475565,'209680','Common Starfish','s015_thumb.jpg',130, 98,15,'																			photo_3475565.html');
												thumbnails[4149852] = new thumbnail(4149852,'209680','Common Seal','K_253_copy_thumb.jpg',130, 82,15,'																			photo_4149852.html');
												thumbnails[5523927] = new thumbnail(5523927,'209680','Dolphin at Monkey Mia','dolphin_thumb.jpg',130, 100,15,'																			photo_5523927.html');
												thumbnails[6516496] = new thumbnail(6516496,'209680','Busy Bee','bee_thumb.jpg',130, 78,15,'																			photo_6516496.html');
												thumbnails[7398381] = new thumbnail(7398381,'209680','Curious Cows ','cows_thumb.jpg',130, 81,15,'																			photo_7398381.html');
												thumbnails[7398386] = new thumbnail(7398386,'209680','Dragonfly and Nymph ','Dragonfly1_thumb.jpg',130, 120,15,'																			photo_7398386.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[209679] = new gallery(209679,'5523919,3478440,3473883','People and Places','gallery',[5288413,3978151,3473770,3473783,3473818,3473869,3473883,3473902,3474051,3474059,3474078,3475549,3475563,3475578,3478440,3487118,3540106,3621943,3852712,3978440,3978442,4149550,4149639,5141489,5498973,5499017,5523919,5523932,5523937,5523948,6480654,6516329,7398340,7398434,7398435,7398436],0, 0, '', '																																																																																																							gallery_209679.html',0,0);
				  					galleries[209680] = new gallery(209680,'3475540','Animals','gallery',[3978496,6516503,3700715,3555964,3475559,3475540,3473824,3474063,3473971,4001977,3475565,4149852,5523927,6516496,7398381,7398386],0, 0, '', '																																																																																																							gallery_209680.html',0,0);
				  					galleries[212391] = new gallery(212391,'6436166,5871356,5871351,5871346,5523922,5523921,3978092,3977796,3621679,3603063','Birds','gallery',[3977796,3978092,3473376,3473906,3473972,3474043,3475537,3475556,3487246,3540243,3555864,3555930,3603063,3621679,5523921,5523922,5871346,5871351,5871356,6436166],0, 0, '', '																																																																																																							gallery_212391.html',0,0);
				  					galleries[216216] = new gallery(216216,'7398374,7398362,7398354,7398349,5498999,5141416,3700589,3621859,3603143,3555810','Trees and Plants','gallery',[3473761,3475535,3540215,3540228,3555757,3555772,3555810,3603143,3621859,3700589,5141416,5498999,7398349,7398354,7398362,7398374],0, 0, '', '																																																																																																							gallery_216216.html',0,0);
				  					galleries[356747] = new gallery(356747,'6516275,6516163,6516033,6516029,6516023,6516019,6516014,6516008,6516003,6516000','The Outer Hebrides ','gallery',[6515966,6515976,6515978,6515981,6515987,6515988,6515990,6515992,6515995,6515998,6516000,6516003,6516008,6516014,6516019,6516023,6516029,6516033,6516163,6516275],0, 0, '', '																																																																																																							gallery_356747.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '5498973,4149667,4149627,3487118,3478440,3475565,3475540,3473906,3473869,3473770';
imageSets[2] = '5523919,4149667,4149627,3478440,3475540,3473883';
imageSets[3] = '7398436,7398435,7398434,7398386,7398381,7398374,7398362,7398354,7398349,7398340,6516503,6516496,6516329,6516275,6516163,6516033,6516029,6516023,6516019,6516014,6516008,6516003,6516000,6515998,6515995,6515992,6515990,6515988,6515987,6515981,6515978,6515976,6515966,6480654,6436166,5871356,5871351,5871346,5523948,5523937,5523932,5523927,5523922,5523921,5523919,5499017,5498999,5498973,5288413,5141489';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/dsouthern/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/dsouthern/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:'',
                    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 (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    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.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Southern Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			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').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> 							' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = 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 = 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 + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

