window.thumbnails = new Object();
												thumbnails[1366437] = new thumbnail(1366437,'','In my studio','MarieinStudio_thumb.jpg',130, 231,18,'															#');
												thumbnails[1365673] = new thumbnail(1365673,'95017','Almost Gone','AlmostGone_thumb.jpg',130, 98,18,'																			photo_1365673.html');
												thumbnails[1365678] = new thumbnail(1365678,'95017','Fading Glory','FadingGlory_thumb.jpg',130, 193,18,'																			photo_1365678.html');
												thumbnails[1365680] = new thumbnail(1365680,'95017','Findhorn Sun','FindhornSun_thumb.jpg',130, 150,18,'																			photo_1365680.html');
												thumbnails[1365681] = new thumbnail(1365681,'95017','Icescape','Icescape_thumb.jpg',130, 97,18,'																			photo_1365681.html');
												thumbnails[1365682] = new thumbnail(1365682,'95017','Max Triptych I','MaxTriptychI_thumb.jpg',130, 385,18,'																			photo_1365682.html');
												thumbnails[1365684] = new thumbnail(1365684,'95017','Max Triptych II','MaxTriptychII_thumb.jpg',130, 267,18,'																			photo_1365684.html');
												thumbnails[1365686] = new thumbnail(1365686,'95017','Max Triptych III','MaxTriptychIII_thumb.jpg',130, 325,18,'																			photo_1365686.html');
												thumbnails[1365687] = new thumbnail(1365687,'95017','Red Field','RedField_thumb.jpg',130, 261,18,'																			photo_1365687.html');
												thumbnails[1365688] = new thumbnail(1365688,'95017','Red Forest','RedForest_thumb.jpg',130, 154,18,'																			photo_1365688.html');
												thumbnails[1365689] = new thumbnail(1365689,'95017','Stormy Landscape','StormyLandscape_thumb.jpg',130, 210,18,'																			photo_1365689.html');
												thumbnails[1365691] = new thumbnail(1365691,'95017','Tsunami Sketch','TsunamiSketch_thumb.jpg',130, 146,18,'																			photo_1365691.html');
												thumbnails[1365693] = new thumbnail(1365693,'95017','Tulips & Lemons','Tulips&Lemons_thumb.jpg',130, 158,18,'																			photo_1365693.html');
												thumbnails[1365694] = new thumbnail(1365694,'95017','Untitled 1','Untitled1_thumb.jpg',130, 64,18,'																			photo_1365694.html');
												thumbnails[1365696] = new thumbnail(1365696,'95017','Untitled 2','Untitled2_thumb.jpg',130, 160,18,'																			photo_1365696.html');
												thumbnails[1365699] = new thumbnail(1365699,'95017','Whirlpool Moonscape','WhirlpoolMoonscape_thumb.jpg',130, 89,18,'																			photo_1365699.html');
												thumbnails[1365710] = new thumbnail(1365710,'95491','Dying Cyclamen','DyingCyclamen_thumb.jpg',130, 194,18,'																			photo_1365710.html');
												thumbnails[1365715] = new thumbnail(1365715,'95491','Frozen Field 1','FrozenField1_thumb.jpg',130, 212,18,'																			photo_1365715.html');
												thumbnails[1365717] = new thumbnail(1365717,'95491','Frozen Field 2','FrozenField2_thumb.jpg',130, 209,18,'																			photo_1365717.html');
												thumbnails[1365718] = new thumbnail(1365718,'95491','Frozen Field 3','FrozenField3_thumb.jpg',130, 186,18,'																			photo_1365718.html');
												thumbnails[1365720] = new thumbnail(1365720,'95491','Frozen Field 4','FrozenField4_thumb.jpg',130, 191,18,'																			photo_1365720.html');
												thumbnails[1365721] = new thumbnail(1365721,'95491','Frozen Field 5','FrozenField5_thumb.jpg',130, 188,18,'																			photo_1365721.html');
												thumbnails[1365724] = new thumbnail(1365724,'95491','Frozen Field 6','FrozenField6_thumb.jpg',130, 188,18,'																			photo_1365724.html');
												thumbnails[1365734] = new thumbnail(1365734,'95491','Red Flowers','RedFlowers_thumb.jpg',130, 193,18,'																			photo_1365734.html');
												thumbnails[1365740] = new thumbnail(1365740,'95491','Sown and Blown Away 1','SownandBlownAway1_thumb.jpg',130, 125,18,'																			photo_1365740.html');
												thumbnails[1365742] = new thumbnail(1365742,'95491','Sown and Blown Away 2','SownandBlownAway2_thumb.jpg',130, 125,18,'																			photo_1365742.html');
												thumbnails[1365744] = new thumbnail(1365744,'95491','Sown and Blown Away 3','SownandBlownAway3_thumb.jpg',130, 120,18,'																			photo_1365744.html');
												thumbnails[1365745] = new thumbnail(1365745,'95492','Angel\'s Share','AngelsShare_thumb.jpg',130, 172,18,'																			photo_1365745.html');
												thumbnails[1365746] = new thumbnail(1365746,'95492','Blue Landscape','BlueLandscape_thumb.jpg',130, 85,18,'																			photo_1365746.html');
												thumbnails[1365748] = new thumbnail(1365748,'95492','Blue Pendulum','BluePendulum_thumb.jpg',130, 308,18,'																			photo_1365748.html');
												thumbnails[1365749] = new thumbnail(1365749,'95492','Burghead Dreamtime','BurgheadDreamtime_thumb.jpg',130, 265,18,'																			photo_1365749.html');
												thumbnails[1365751] = new thumbnail(1365751,'95492','Burghead Moondance','BurgheadMoondance_thumb.jpg',130, 287,18,'																			photo_1365751.html');
												thumbnails[1365754] = new thumbnail(1365754,'95492','Celestial Body','CelestialBody_thumb.jpg',130, 119,18,'																			photo_1365754.html');
												thumbnails[1365755] = new thumbnail(1365755,'95492','Clouds','Clouds_thumb.jpg',130, 191,18,'																			photo_1365755.html');
												thumbnails[1365758] = new thumbnail(1365758,'95492','Cooper\'s Magic','CoopersMagic_thumb.jpg',130, 120,18,'																			photo_1365758.html');
												thumbnails[1365759] = new thumbnail(1365759,'95492','Findhorn 4','Findhorn4_thumb.jpg',130, 195,18,'																			photo_1365759.html');
												thumbnails[1365762] = new thumbnail(1365762,'95492','Garden of Gethsemani','GardenofGethsemani1_thumb.jpg',130, 84,18,'																			photo_1365762.html');
												thumbnails[1365764] = new thumbnail(1365764,'95492','Heart of Oak','HeartofOak_thumb.jpg',130, 171,18,'																			photo_1365764.html');
												thumbnails[1365765] = new thumbnail(1365765,'95492','Holy Spirit','HolySpirit_thumb.jpg',130, 222,18,'																			photo_1365765.html');
												thumbnails[1365767] = new thumbnail(1365767,'95492','Monsterance','Monsterance_thumb.jpg',130, 250,18,'																			photo_1365767.html');
												thumbnails[1365768] = new thumbnail(1365768,'95492','Offering','Offering_thumb.jpg',130, 253,18,'																			photo_1365768.html');
												thumbnails[1365771] = new thumbnail(1365771,'95492','Out of the Blue','OutoftheBlue_thumb.jpg',130, 126,18,'																			photo_1365771.html');
												thumbnails[1365778] = new thumbnail(1365778,'95492','Roseisle Altarpiece','RoseisleAltarpiece_thumb.jpg',130, 135,18,'																			photo_1365778.html');
												thumbnails[1365779] = new thumbnail(1365779,'95492','Sea Bree','Sea Bree_thumb.jpg',130, 196,18,'																			photo_1365779.html');
												thumbnails[1365780] = new thumbnail(1365780,'95492','Self Heal','SelfHeal_thumb.jpg',130, 276,18,'																			photo_1365780.html');
												thumbnails[1365781] = new thumbnail(1365781,'95492','Self Portrait','SelfPortrait_thumb.jpg',130, 142,18,'																			photo_1365781.html');
												thumbnails[1365788] = new thumbnail(1365788,'95492','Uplift','Uplift_thumb.jpg',130, 350,18,'																			photo_1365788.html');
												thumbnails[1365789] = new thumbnail(1365789,'95492','Virgin & Trinity','Virgin&Trinity_thumb.jpg',130, 205,18,'																			photo_1365789.html');
												thumbnails[1365790] = new thumbnail(1365790,'95492','Voice in the Wilderness','VoiceintheWilderness_thumb.jpg',130, 89,18,'																			photo_1365790.html');
												thumbnails[1365792] = new thumbnail(1365792,'95492','Whirlpool','Whirlpool_thumb.jpg',130, 156,18,'																			photo_1365792.html');
												thumbnails[1464637] = new thumbnail(1464637,'95492','All That Jazz','AllThatJazz_thumb.jpg',130, 129,18,'																			photo_1464637.html');
												thumbnails[1464638] = new thumbnail(1464638,'95492','Boogie Woogie Moon','BoogieWoogieMoon_thumb.jpg',130, 137,18,'																			photo_1464638.html');
												thumbnails[1464641] = new thumbnail(1464641,'138281','Barn Shadow','BARN SHADOW_thumb.jpg',130, 83,18,'																			photo_1464641.html');
												thumbnails[1540931] = new thumbnail(1540931,'95492','Untitled','Untitled_thumb.jpg',130, 129,18,'																			photo_1540931.html');
												thumbnails[1540969] = new thumbnail(1540969,'95492','Talking Head','TalkingHead_thumb.jpg',130, 147,18,'																			photo_1540969.html');
												thumbnails[1540970] = new thumbnail(1540970,'95492','Rockpool 2','Rockpool2_thumb.jpg',130, 128,18,'																			photo_1540970.html');
												thumbnails[1731181] = new thumbnail(1731181,'138281','Blue Boat 1','BLUE BOAT 1_thumb.jpg',130, 189,18,'																			photo_1731181.html');
												thumbnails[1731187] = new thumbnail(1731187,'138281','Blue Boat 2','BLUE BOAT 21_thumb.jpg',130, 190,18,'																			photo_1731187.html');
												thumbnails[1731212] = new thumbnail(1731212,'138281','Red & White Keel','RED & WHITE KEEL_thumb.jpg',130, 180,18,'																			photo_1731212.html');
												thumbnails[1731216] = new thumbnail(1731216,'138281','Red Boat','RED BOAT_thumb.jpg',130, 219,18,'																			photo_1731216.html');
												thumbnails[1731219] = new thumbnail(1731219,'138281','Red Jetty 1','RED JETTY 1_thumb.jpg',130, 248,18,'																			photo_1731219.html');
												thumbnails[1731220] = new thumbnail(1731220,'138281','Red Jetty 2','RED JETTY 2_thumb.jpg',130, 171,18,'																			photo_1731220.html');
												thumbnails[1731222] = new thumbnail(1731222,'138281','Red Jetty 3','RED JETTY 3_thumb.jpg',130, 160,18,'																			photo_1731222.html');
												thumbnails[1752759] = new thumbnail(1752759,'138281','Blue Vase','BLUE VASE_thumb.jpg',130, 232,18,'																			photo_1752759.html');
												thumbnails[1825346] = new thumbnail(1825346,'138281','Blue Vase View','BLUE VASE VIEW_thumb.jpg',130, 178,18,'																			photo_1825346.html');
												thumbnails[1917391] = new thumbnail(1917391,'95017','Broken Wave','BrokenWave_thumb.jpg',130, 67,18,'																			photo_1917391.html');
												thumbnails[1917393] = new thumbnail(1917393,'95017','Wave 1','Wave1_thumb.jpg',130, 100,18,'																			photo_1917393.html');
												thumbnails[1917395] = new thumbnail(1917395,'95017','Wave Wall','WaveWall_thumb.jpg',130, 86,18,'																			photo_1917395.html');
												thumbnails[2069925] = new thumbnail(2069925,'138281','Alhambra','ALHAMBRA_thumb.jpg',130, 155,18,'																			photo_2069925.html');
												thumbnails[2069933] = new thumbnail(2069933,'138281','Burghead Wave 1','BURGHEAD WAVE 1_thumb.jpg',130, 155,18,'																			photo_2069933.html');
												thumbnails[2069938] = new thumbnail(2069938,'138281','Burghead Wave 2','BURGHEAD WAVE 2_thumb.jpg',130, 159,18,'																			photo_2069938.html');
												thumbnails[2069944] = new thumbnail(2069944,'138281','Spring Flowers','SPRING FLOWERS_thumb.jpg',130, 172,18,'																			photo_2069944.html');
												thumbnails[2275731] = new thumbnail(2275731,'95492','Opus 1','Opus1a_thumb.jpg',130, 221,18,'																			photo_2275731.html');
												thumbnails[2275764] = new thumbnail(2275764,'95492','Opus 2','Opus2a_thumb.jpg',130, 250,18,'																			photo_2275764.html');
												thumbnails[2335500] = new thumbnail(2335500,'95492','Opus 3','Opus3_thumb.jpg',130, 291,18,'																			photo_2335500.html');
												thumbnails[2610542] = new thumbnail(2610542,'95492','Opus 4','Opus4_thumb.jpg',130, 140,18,'																			photo_2610542.html');
												thumbnails[2610564] = new thumbnail(2610564,'95492','Jean Genie','Jean-Jeanie_thumb.jpg',130, 197,18,'																			photo_2610564.html');
												thumbnails[2610570] = new thumbnail(2610570,'95492','Strathdon Man','StrathdonMan_thumb.jpg',130, 259,18,'																			photo_2610570.html');
												thumbnails[2727003] = new thumbnail(2727003,'95492','Jorunn \"Men\'s Wit-Breaker\"','Jorunn_thumb.jpg',130, 181,18,'																			photo_2727003.html');
												thumbnails[2750624] = new thumbnail(2750624,'95492','Norseman','Norseman_thumb.jpg',130, 227,18,'																			photo_2750624.html');
												thumbnails[2792911] = new thumbnail(2792911,'95492','Hjalmar','Hjalmar_thumb.jpg',130, 117,18,'																			photo_2792911.html');
												thumbnails[2792934] = new thumbnail(2792934,'95492','Naois','Naois_thumb.jpg',130, 186,18,'																			photo_2792934.html');
												thumbnails[2865017] = new thumbnail(2865017,'95492','Chien Noir','ChienNoir_thumb.jpg',130, 217,18,'																			photo_2865017.html');
												thumbnails[2865021] = new thumbnail(2865021,'95492','Wraith','Wraith_thumb.jpg',130, 202,18,'																			photo_2865021.html');
												thumbnails[3577878] = new thumbnail(3577878,'95491','Dark Wood 1','DarkWood1_thumb.jpg',130, 41,18,'																			photo_3577878.html');
												thumbnails[3577880] = new thumbnail(3577880,'95491','Dark Wood 2','DarkWood2_thumb.jpg',130, 71,18,'																			photo_3577880.html');
												thumbnails[3577883] = new thumbnail(3577883,'95491','Dark Wood 3','DarkWood3_thumb.jpg',130, 54,18,'																			photo_3577883.html');
												thumbnails[3577886] = new thumbnail(3577886,'95491','Dark Wood 4','DarkWood4_thumb.jpg',130, 69,18,'																			photo_3577886.html');
												thumbnails[3577887] = new thumbnail(3577887,'95491','Dark Wood 5','DarkWood5_thumb.jpg',130, 73,18,'																			photo_3577887.html');
												thumbnails[3577891] = new thumbnail(3577891,'95491','Dark Wood 6','DarkWood6_thumb.jpg',130, 185,18,'																			photo_3577891.html');
												thumbnails[3577894] = new thumbnail(3577894,'95491','Hard Frost','HardFrost_thumb.jpg',130, 72,18,'																			photo_3577894.html');
												thumbnails[3577896] = new thumbnail(3577896,'95491','Icepath 1','Icepath1_thumb.jpg',130, 179,18,'																			photo_3577896.html');
												thumbnails[3577897] = new thumbnail(3577897,'95491','Icepath 2','Icepath2_thumb.jpg',130, 178,18,'																			photo_3577897.html');
												thumbnails[3577899] = new thumbnail(3577899,'95491','Icepath 3','Icepath3_thumb.jpg',130, 178,18,'																			photo_3577899.html');
												thumbnails[3577902] = new thumbnail(3577902,'95491','Roseisle Haar 1','RoseisleHaar_thumb.jpg',130, 41,18,'																			photo_3577902.html');
												thumbnails[3577906] = new thumbnail(3577906,'95491','Winter Sunset','WinterSunset_thumb.jpg',130, 23,18,'																			photo_3577906.html');
												thumbnails[7321313] = new thumbnail(7321313,'95492','After Madame Matisse','AfterMadameMatisse_thumb.jpg',130, 236,18,'																			photo_7321313.html');
												thumbnails[7321339] = new thumbnail(7321339,'95492','Fascinator','Fascinator_thumb.jpg',130, 266,18,'																			photo_7321339.html');
												thumbnails[7323783] = new thumbnail(7323783,'95495','Andalucian Dream','Andalucian-Dream_thumb.jpg',130, 197,18,'																			photo_7323783.html');
												thumbnails[7323786] = new thumbnail(7323786,'95495','Bull Behind The Stile','Bull-Behind-the-Stile_thumb.jpg',130, 53,18,'																			photo_7323786.html');
												thumbnails[7323788] = new thumbnail(7323788,'95495','Eggborough 1','Eggborough-1_thumb.jpg',130, 72,18,'																			photo_7323788.html');
												thumbnails[7323791] = new thumbnail(7323791,'95495','Eggborough 2','Eggborough-2_thumb.jpg',130, 84,18,'																			photo_7323791.html');
												thumbnails[7323794] = new thumbnail(7323794,'95495','Eggborough 3','Eggborough-3_thumb.jpg',130, 65,18,'																			photo_7323794.html');
												thumbnails[7323797] = new thumbnail(7323797,'95495','Eggborough 4','Eggborough-4_thumb.jpg',130, 69,18,'																			photo_7323797.html');
												thumbnails[7323803] = new thumbnail(7323803,'95495','Eggborough 5','Eggborough-5_thumb.jpg',130, 64,18,'																			photo_7323803.html');
												thumbnails[7323805] = new thumbnail(7323805,'95495','Hensall Dream','Hensall-Dream_thumb.jpg',130, 147,18,'																			photo_7323805.html');
												thumbnails[7323806] = new thumbnail(7323806,'95495','Spindlemuir Track','Spindlemuir-Track_thumb.jpg',130, 162,18,'																			photo_7323806.html');
												thumbnails[7323807] = new thumbnail(7323807,'95495','Spurn Point','Spurn-Point_thumb.jpg',130, 214,18,'																			photo_7323807.html');
												thumbnails[7323808] = new thumbnail(7323808,'95495','Spurn Point Maelstrom','Spurn-Point-Maelstrom_thumb.jpg',130, 154,18,'																			photo_7323808.html');
												thumbnails[7323809] = new thumbnail(7323809,'95495','Surreal Landscape 1','Surreal-Landscape-1_thumb.jpg',130, 109,18,'																			photo_7323809.html');
												thumbnails[7323812] = new thumbnail(7323812,'95495','Surreal Landscape 2','Surreal-Landscape-2_thumb.jpg',130, 78,18,'																			photo_7323812.html');
												thumbnails[7323813] = new thumbnail(7323813,'95495','Surreal Landscape 3','Surreal-Landscape-3_thumb.jpg',130, 104,18,'																			photo_7323813.html');
												thumbnails[7323828] = new thumbnail(7323828,'95491','Ghost Boat 1','Ghost-Boat-1_thumb.jpg',130, 56,18,'																			photo_7323828.html');
												thumbnails[7323833] = new thumbnail(7323833,'95491','Ghost Boat 2','Ghost-Boat-2_thumb.jpg',130, 72,18,'																			photo_7323833.html');
												thumbnails[7323839] = new thumbnail(7323839,'95491','Ghost Boat 3','Ghost-Boat-3_thumb.jpg',130, 43,18,'																			photo_7323839.html');
												thumbnails[7323845] = new thumbnail(7323845,'95491','Ghost Boat 4','Ghost-Boat-4_thumb.jpg',130, 91,18,'																			photo_7323845.html');
												thumbnails[7343568] = new thumbnail(7343568,'95491','Roseisle Haar 2','Roseisle-Haar-2_thumb.jpg',130, 42,18,'																			photo_7343568.html');
												thumbnails[7343576] = new thumbnail(7343576,'95491','Roseisle Haar 3','Roseisle-Haar-3_thumb.jpg',130, 41,18,'																			photo_7343576.html');
												thumbnails[7343583] = new thumbnail(7343583,'95491','Roseisle Haar 4','Roseisle-Haar-4_thumb.jpg',130, 42,18,'																			photo_7343583.html');
												thumbnails[7343590] = new thumbnail(7343590,'95491','Roseisle Haar 5','Roseisle-Haar-5_thumb.jpg',130, 42,18,'																			photo_7343590.html');
												thumbnails[7343596] = new thumbnail(7343596,'95491','Reflected Wood 1','Reflected-Wood-1_thumb.jpg',130, 234,18,'																			photo_7343596.html');
												thumbnails[7343603] = new thumbnail(7343603,'95491','Reflected Boat 1','Reflected-Boat-1_thumb.jpg',130, 108,18,'																			photo_7343603.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[95492] = new gallery(95492,'2275731','Sculptures','gallery',[1365745,1365746,1365748,1365749,1365751,1365754,1365755,1365758,1365759,1365762,1365764,1365765,1365767,1365768,1365771,1365778,1365779,1365780,1365781,1365788,1365789,1365790,1365792,1464637,1464638,1540931,1540969,1540970,2275731,2275764,2335500,2610542,2610564,2610570,2727003,2750624,2792911,2792934,2865017,2865021,7321313,7321339],0, 0, '', '																																																																																																							gallery_95492.html',0,0);
				  					galleries[95017] = new gallery(95017,'1365687','Mixed Media','gallery',[1365673,1365678,1365680,1365681,1365682,1365684,1365686,1365687,1365688,1365689,1365691,1365693,1365694,1365696,1365699,1917391,1917393,1917395],0, 0, '', '																																																																																																							gallery_95017.html',0,0);
				  					galleries[95491] = new gallery(95491,'1365715','Works in Oil','gallery',[1365710,1365715,1365717,1365718,1365720,1365721,1365724,1365734,1365740,1365742,1365744,3577878,3577880,3577883,3577886,3577887,3577891,3577894,3577896,3577897,3577899,3577902,3577906,7323828,7323833,7323839,7323845,7343568,7343576,7343583,7343590,7343596,7343603],0, 0, '', '																																																																																																							gallery_95491.html',0,0);
				  					galleries[138281] = new gallery(138281,'1825346','Collage','gallery',[1464641,1731181,1731187,1731212,1731216,1731219,1731220,1731222,1752759,1825346,2069925,2069933,2069938,2069944],0, 0, '', '																																																																																																							gallery_138281.html',0,0);
				  					galleries[95495] = new gallery(95495,'7323805','Drawing','gallery',[7323783,7323786,7323788,7323791,7323794,7323797,7323803,7323805,7323806,7323807,7323808,7323809,7323812,7323813],0, 0, '', '																																																																																																							gallery_95495.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7321313,1825346,1366437,1365764,1365710,1365687';
imageSets[2] = '7323805,2275731,1825346,1365715,1365687';
imageSets[3] = '7343603,7343596,7343590,7343583,7343576,7343568,7323845,7323839,7323833,7323828,7323813,7323812,7323809,7323808,7323807,7323806,7323805,7323803,7323797,7323794,7323791,7323788,7323786,7323783,7321339,7321313,3577906,3577902,3577899,3577897,3577896,3577894,3577891,3577887,3577886,3577883,3577880,3577878,2865021,2865017,2792934,2792911,2750624,2727003,2610570,2610564,2610542,2335500,2275764,2275731';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/magicvera/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/magicvera/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/magicvera/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/magicvera/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/magicvera/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/magicvera/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 = 'Marie Wood Artist: ' + 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;
	}
}

			

