window.thumbnails = new Object();
												thumbnails[2217093] = new thumbnail(2217093,'152130','Centre','Centre_thumb.jpg',130, 98,5,'																			photo_2217093.html');
												thumbnails[2378416] = new thumbnail(2378416,'152130','Heaven\'s Gate','Copy of Heaven\'s-Gate_thumb.jpg',130, 86,5,'																			photo_2378416.html');
												thumbnails[2343686] = new thumbnail(2343686,'152130','Lagoon','Lagoon_thumb.jpg',130, 86,5,'																			photo_2343686.html');
												thumbnails[2347853] = new thumbnail(2347853,'152130','Pearls','website-pearls_thumb.jpg',130, 87,5,'																			photo_2347853.html');
												thumbnails[2332324] = new thumbnail(2332324,'152130','Buried Treasure<br> Three Pots','Buried-Treasure-Three-Pots_thumb.jpg',130, 86,5,'																			photo_2332324.html');
												thumbnails[2332459] = new thumbnail(2332459,'152130','Cradle','Cradle_thumb.jpg',130, 88,5,'																			photo_2332459.html');
												thumbnails[2343637] = new thumbnail(2343637,'152130','Gabriel','Gabriel_thumb.jpg',130, 86,5,'																			photo_2343637.html');
												thumbnails[2343678] = new thumbnail(2343678,'152130','Jupiter','Jupiter_thumb.jpg',130, 87,5,'																			photo_2343678.html');
												thumbnails[2343671] = new thumbnail(2343671,'152130','Inner Forest','Inner-Forest_thumb.jpg',130, 87,5,'																			photo_2343671.html');
												thumbnails[2349170] = new thumbnail(2349170,'152130','Wave','Wave_thumb.jpg',130, 87,5,'																			photo_2349170.html');
												thumbnails[2332399] = new thumbnail(2332399,'152130','Cave','Cave_thumb.jpg',130, 86,5,'																			photo_2332399.html');
												thumbnails[2343655] = new thumbnail(2343655,'152130','Hope','Hope_thumb.jpg',130, 88,5,'																			photo_2343655.html');
												thumbnails[2349179] = new thumbnail(2349179,'152130','Window','Window_thumb.jpg',130, 196,5,'																			photo_2349179.html');
												thumbnails[2343644] = new thumbnail(2343644,'152130','Dragon\'s Egg','Dragon\'s-Egg_thumb.jpg',130, 86,5,'																			photo_2343644.html');
												thumbnails[2343617] = new thumbnail(2343617,'152130','Drifting','Drifting_thumb.jpg',130, 86,5,'																			photo_2343617.html');
												thumbnails[2378661] = new thumbnail(2378661,'152130','Veil','Veil_thumb.jpg',130, 174,5,'																			photo_2378661.html');
												thumbnails[2347914] = new thumbnail(2347914,'152130','Teardrop','Teardrop1_thumb.jpg',130, 196,5,'																			photo_2347914.html');
												thumbnails[2332486] = new thumbnail(2332486,'152130','Dove','Dove_thumb.jpg',130, 195,5,'																			photo_2332486.html');
												thumbnails[2343647] = new thumbnail(2343647,'152130','Glacier','Glacier_thumb.jpg',130, 196,5,'																			photo_2343647.html');
												thumbnails[2347891] = new thumbnail(2347891,'152130','Shaman','Shaman_thumb.jpg',130, 173,5,'																			photo_2347891.html');
												thumbnails[2343626] = new thumbnail(2343626,'152130','Eclipse','Eclipse_thumb.jpg',130, 191,5,'																			photo_2343626.html');
												thumbnails[2347888] = new thumbnail(2347888,'152130','Sanctus','Sanctus_thumb.jpg',130, 196,5,'																			photo_2347888.html');
												thumbnails[2332307] = new thumbnail(2332307,'152130','Buried Treasure <br>One Pot','web-One-Pot_thumb.jpg',130, 193,5,'																			photo_2332307.html');
												thumbnails[2343587] = new thumbnail(2343587,'152130','Blessing','Blessing 24x16 £350 (2of4)_thumb.jpg',130, 195,5,'																			photo_2343587.html');
												thumbnails[2347896] = new thumbnail(2347896,'152130','Stream','Stream_thumb.jpg',130, 196,5,'																			photo_2347896.html');
												thumbnails[2332332] = new thumbnail(2332332,'152130','Carnival','Carnival_thumb.jpg',130, 196,5,'																			photo_2332332.html');
												thumbnails[2349135] = new thumbnail(2349135,'152130','Tree Of Life','Tree-of-Life_thumb.jpg',130, 195,5,'																			photo_2349135.html');
												thumbnails[4646486] = new thumbnail(4646486,'268033','Tea for Two Winis Teapot','Tea_for_Two_Winis_Teapot_thumb.jpg',130, 87,5,'																			photo_4646486.html');
												thumbnails[4647330] = new thumbnail(4647330,'268033','Teapot','Teapot_thumb.jpg',130, 86,5,'																			photo_4647330.html');
												thumbnails[4647235] = new thumbnail(4647235,'268033','Bubbling ','Bubbling_Spring_thumb.jpg',130, 92,5,'																			photo_4647235.html');
												thumbnails[4647214] = new thumbnail(4647214,'268033','The Deep 2','The_Deep_2_thumb.jpg',130, 87,5,'																			photo_4647214.html');
												thumbnails[4647212] = new thumbnail(4647212,'268033','The Deep 1','web-Blade_thumb.jpg',130, 194,5,'																			photo_4647212.html');
												thumbnails[4646610] = new thumbnail(4646610,'268033','Halo','web-Halo_thumb.jpg',130, 195,5,'																			photo_4646610.html');
												thumbnails[4647224] = new thumbnail(4647224,'268033','Moss','Moss_thumb.jpg',130, 194,5,'																			photo_4647224.html');
												thumbnails[4647226] = new thumbnail(4647226,'268033','Sparkling','web-Sparkling_thumb.jpg',130, 194,5,'																			photo_4647226.html');
												thumbnails[4647232] = new thumbnail(4647232,'268033','Cavern','web-Cavern_thumb.jpg',130, 195,5,'																			photo_4647232.html');
												thumbnails[4647239] = new thumbnail(4647239,'268033','Heart','web-Purple-Heart_thumb.jpg',130, 196,5,'																			photo_4647239.html');
												thumbnails[4861371] = new thumbnail(4861371,'268033','Standing Tall Two','web_Standing_Tall_Two_thumb.jpg',130, 173,5,'																			photo_4861371.html');
												thumbnails[4647215] = new thumbnail(4647215,'268033','The Deep 3','web-Echo_thumb.jpg',130, 197,5,'																			photo_4647215.html');
												thumbnails[4647209] = new thumbnail(4647209,'268033','Bottle','web-Bottle_thumb.jpg',130, 196,5,'																			photo_4647209.html');
												thumbnails[2347596] = new thumbnail(2347596,'152973','Jug','Jugs_thumb.jpg',130, 195,5,'																			photo_2347596.html');
												thumbnails[2347828] = new thumbnail(2347828,'152973','Message In A Bottle','Message-In-A-Bottle_thumb.jpg',130, 191,5,'																			photo_2347828.html');
												thumbnails[2347867] = new thumbnail(2347867,'152973','Rainforest Blue','Rainforest-Blue_thumb.jpg',130, 173,5,'																			photo_2347867.html');
												thumbnails[2347886] = new thumbnail(2347886,'152973','Rainforest Turquoise','Rainforest-Turquoise_thumb.jpg',130, 173,5,'																			photo_2347886.html');
												thumbnails[2347838] = new thumbnail(2347838,'152973','Message In A Bottle Black','Message-In-A-Bottle2_thumb.jpg',130, 191,5,'																			photo_2347838.html');
												thumbnails[2347549] = new thumbnail(2347549,'152973','Fingerprints','Fingerprints_thumb.jpg',130, 173,5,'																			photo_2347549.html');
												thumbnails[2347572] = new thumbnail(2347572,'152973','Fingerprints Blue','Fingerprints-Blue_thumb.jpg',130, 173,5,'																			photo_2347572.html');
												thumbnails[2347563] = new thumbnail(2347563,'152973','Fingerprints Mauve','Fingerprints Mauve_thumb.jpg',130, 173,5,'																			photo_2347563.html');
												thumbnails[2384549] = new thumbnail(2384549,'152973','Love Bug 1','Love-Bug-1_thumb.jpg',130, 134,5,'																			photo_2384549.html');
												thumbnails[2347619] = new thumbnail(2347619,'152973','Love','Love_thumb.jpg',130, 56,5,'																			photo_2347619.html');
												thumbnails[2347848] = new thumbnail(2347848,'152973','Mirage','Mirage_thumb.jpg',130, 98,5,'																			photo_2347848.html');
												thumbnails[5805834] = new thumbnail(5805834,'191052','Anemone','web-Anemone_thumb.jpg',130, 196,5,'																			photo_5805834.html');
												thumbnails[7296422] = new thumbnail(7296422,'191052','Apple Blossom','Apple_Blossom_75D77F9A-1EC9-DFB6-0937A64B8E34CC5B_thumb.jpg',130, 195,5,'																			photo_7296422.html');
												thumbnails[5805835] = new thumbnail(5805835,'191052','Velvet Anemone','web-Velvet-Anemone_thumb.jpg',130, 196,5,'																			photo_5805835.html');
												thumbnails[7296376] = new thumbnail(7296376,'191052','Raku Pot','Raku_Pot_thumb.jpg',130, 195,5,'																			photo_7296376.html');
												thumbnails[7296403] = new thumbnail(7296403,'191052','Terracotta Rainbow','Terracotta_Rainbow_thumb.jpg',130, 195,5,'																			photo_7296403.html');
												thumbnails[7296401] = new thumbnail(7296401,'191052','Terracotta jade','Terracotta_Jade_thumb.jpg',130, 195,5,'																			photo_7296401.html');
												thumbnails[7296331] = new thumbnail(7296331,'191052','Heart Magenta Flame','Heart_Magenta_Flame_thumb.jpg',130, 195,5,'																			photo_7296331.html');
												thumbnails[5805761] = new thumbnail(5805761,'191052','Heart','web-Heart2_thumb.jpg',130, 196,5,'																			photo_5805761.html');
												thumbnails[4861157] = new thumbnail(4861157,'191052','Sanctus','web_sanctus_thumb.jpg',130, 196,5,'																			photo_4861157.html');
												thumbnails[5805836] = new thumbnail(5805836,'191052','Teardrop','web-Teardrop_thumb.jpg',130, 193,5,'																			photo_5805836.html');
												thumbnails[5796574] = new thumbnail(5796574,'191052','Rainforest Blue','web_Rainforest-Blue_thumb.jpg',130, 173,5,'																			photo_5796574.html');
												thumbnails[5796576] = new thumbnail(5796576,'191052','Rainforest Turquiose','web_rainforest_turquiose_thumb.jpg',130, 173,5,'																			photo_5796576.html');
												thumbnails[7294856] = new thumbnail(7294856,'191052','Cosmos','Cosmos_thumb.jpg',130, 87,5,'																			photo_7294856.html');
												thumbnails[7296397] = new thumbnail(7296397,'191052','Swirl Copper','Swirl_Copper_thumb.jpg',130, 87,5,'																			photo_7296397.html');
												thumbnails[7303842] = new thumbnail(7303842,'191052','Swirl Sapphire','Swirl_Sapphire_thumb.jpg',130, 87,5,'																			photo_7303842.html');
												thumbnails[7296396] = new thumbnail(7296396,'191052','Swirl Blush','Swirl_Blush_thumb.jpg',130, 87,5,'																			photo_7296396.html');
												thumbnails[5433556] = new thumbnail(5433556,'191052','Hellebore','Hellebore2_thumb.jpg',130, 87,5,'																			photo_5433556.html');
												thumbnails[3114006] = new thumbnail(3114006,'191052','Cornflower','cornflower_C_thumb.jpg',130, 86,5,'																			photo_3114006.html');
												thumbnails[5796567] = new thumbnail(5796567,'191052','Cascade','web-cascade_thumb.jpg',130, 86,5,'																			photo_5796567.html');
												thumbnails[7303839] = new thumbnail(7303839,'191052','Pawprints','Pawprints_thumb.jpg',130, 98,5,'																			photo_7303839.html');
												thumbnails[4862571] = new thumbnail(4862571,'191052','Cavern','Cavern_web_thumb.jpg',130, 195,5,'																			photo_4862571.html');
												thumbnails[5805823] = new thumbnail(5805823,'191052','Window','web-Window_thumb.jpg',130, 196,5,'																			photo_5805823.html');
												thumbnails[7296356] = new thumbnail(7296356,'191052','Magnolia and Bark','Magnolia_and_Bark_thumb.jpg',130, 195,5,'																			photo_7296356.html');
												thumbnails[7303915] = new thumbnail(7303915,'191052','Magnolia and Bark Pale','Magnolia_and_Bark_Pale_thumb.jpg',130, 195,5,'																			photo_7303915.html');
												thumbnails[4861119] = new thumbnail(4861119,'191052','Bottle','web_Bottle_thumb.jpg',130, 196,5,'																			photo_4861119.html');
												thumbnails[5805843] = new thumbnail(5805843,'191052','Phoenix Egg','web-Phoenix-Egg1_thumb.jpg',130, 196,5,'																			photo_5805843.html');
												thumbnails[4862568] = new thumbnail(4862568,'191052','Halo','Halo_web_thumb.jpg',130, 197,5,'																			photo_4862568.html');
												thumbnails[7296367] = new thumbnail(7296367,'191052','Peace Tutti-Frutti','Peace_Tutti_Frutti_thumb.jpg',130, 195,5,'																			photo_7296367.html');
												thumbnails[5805818] = new thumbnail(5805818,'191052','fLove Purple and Lime','web-Love-Purple-and-Lime_thumb.jpg',130, 195,5,'																			photo_5805818.html');
												thumbnails[5805817] = new thumbnail(5805817,'191052','Love Red and Green','web-Love-Red-and-Green_thumb.jpg',130, 195,5,'																			photo_5805817.html');
												thumbnails[7294851] = new thumbnail(7294851,'191052','Cool','Cool_thumb.jpg',130, 195,5,'																			photo_7294851.html');
												thumbnails[7294854] = new thumbnail(7294854,'191052','Cool 2','Cool_2_thumb.jpg',130, 195,5,'																			photo_7294854.html');
												thumbnails[7296333] = new thumbnail(7296333,'191052','Joy','Joy_thumb.jpg',130, 87,5,'																			photo_7296333.html');
												thumbnails[7296343] = new thumbnail(7296343,'191052','Joy Tutti-Frutti','Joy_Tutti_Frutti_thumb.jpg',130, 87,5,'																			photo_7296343.html');
												thumbnails[7296335] = new thumbnail(7296335,'191052','Joy Pink and Turquoise','Joy_Pink_and_Turquoise_thumb.jpg',130, 87,5,'																			photo_7296335.html');
												thumbnails[7296336] = new thumbnail(7296336,'191052','Joy red and Green','Joy_Red_and_Green_thumb.jpg',130, 87,5,'																			photo_7296336.html');
												thumbnails[7294859] = new thumbnail(7294859,'191052','Evening Star','Evening_Star_thumb.jpg',130, 87,5,'																			photo_7294859.html');
												thumbnails[7296354] = new thumbnail(7296354,'191052','Leaf','Leaf_thumb.jpg',130, 87,5,'																			photo_7296354.html');
												thumbnails[7296358] = new thumbnail(7296358,'191052','Midwinter','Midwinter_thumb.jpg',130, 87,5,'																			photo_7296358.html');
												thumbnails[5796566] = new thumbnail(5796566,'191052','Black Mountains','web-Black-Mountains_thumb.jpg',130, 86,5,'																			photo_5796566.html');
												thumbnails[4861077] = new thumbnail(4861077,'191052','Teapot','Teapot1_thumb.jpg',130, 86,5,'																			photo_4861077.html');
												thumbnails[5796606] = new thumbnail(5796606,'191052','Sea_Jewel','web-Sea-jewel_thumb.jpg',130, 86,5,'																			photo_5796606.html');
												thumbnails[7294803] = new thumbnail(7294803,'191052','Amaryllis','Amaryllis_thumb.jpg',130, 87,5,'																			photo_7294803.html');
												thumbnails[7296404] = new thumbnail(7296404,'191052','Three gifts','Three_Gifts_thumb.jpg',130, 86,5,'																			photo_7296404.html');
												thumbnails[5796572] = new thumbnail(5796572,'191052','Gloria','web-Gloria_thumb.jpg',130, 87,5,'																			photo_5796572.html');
												thumbnails[4862567] = new thumbnail(4862567,'191052','Bubbling','Bubbling_web_thumb.jpg',130, 92,5,'																			photo_4862567.html');
												thumbnails[4861006] = new thumbnail(4861006,'191052','Heaven\'s Gate','Copy_of_Heavens-Gate1_thumb.jpg',130, 86,5,'																			photo_4861006.html');
												thumbnails[7303929] = new thumbnail(7303929,'191052','Purple Heart','Purple_Heart_thumb.jpg',130, 90,5,'																			photo_7303929.html');
												thumbnails[5796570] = new thumbnail(5796570,'191052','Flame','web-Flame_thumb.jpg',130, 86,5,'																			photo_5796570.html');
												thumbnails[7303846] = new thumbnail(7303846,'191052','Swirl Violet','Swirl_Violet_thumb.jpg',130, 87,5,'																			photo_7303846.html');
												thumbnails[7296373] = new thumbnail(7296373,'191052','Rainbow House 2','Rainbow_House_2_thumb.jpg',130, 87,5,'																			photo_7296373.html');
												thumbnails[7296369] = new thumbnail(7296369,'191052','Rainbow House','Rainbow_House_thumb.jpg',130, 87,5,'																			photo_7296369.html');
												thumbnails[7294850] = new thumbnail(7294850,'191052','Christmas Tree Red and Green','Christmas_Tree_Red_and_Green_thumb.jpg',130, 195,5,'																			photo_7294850.html');
												thumbnails[7294842] = new thumbnail(7294842,'191052','Christmas Tree Blue and Yellow','Christmas_Tree_Blue_and_Yel_thumb.jpg',130, 195,5,'																			photo_7294842.html');
												thumbnails[7294847] = new thumbnail(7294847,'191052','Christmas Tree Pink and Tuquoise','Christmas_Tree_Pink_and_Turquoise_thumb.jpg',130, 195,5,'																			photo_7294847.html');
												thumbnails[7294846] = new thumbnail(7294846,'191052','Christmas Tree Pale Green','Christmas_Tree_Pale_Green_thumb.jpg',130, 195,5,'																			photo_7294846.html');
												thumbnails[7303837] = new thumbnail(7303837,'191052','Christmas Tree Sapphire','Christmas_Tree_Sapphire_thumb.jpg',130, 195,5,'																			photo_7303837.html');
												thumbnails[7303810] = new thumbnail(7303810,'191052','Christmas Tree Green','Christmas_Tree_Green_thumb.jpg',130, 195,5,'																			photo_7303810.html');
												thumbnails[7303836] = new thumbnail(7303836,'191052','Christmas Tree Rose Flame','Christmas_Tree_Rose_Flame_thumb.jpg',130, 195,5,'																			photo_7303836.html');
												thumbnails[7294844] = new thumbnail(7294844,'191052','Christmas Tree Pale Blue','Christmas_Tree_Pale_Blue_thumb.jpg',130, 195,5,'																			photo_7294844.html');
												thumbnails[7303850] = new thumbnail(7303850,'191052','Love Tutti Frutti','Love_Tutti_Frutti_thumb.jpg',130, 195,5,'																			photo_7303850.html');
												thumbnails[5805827] = new thumbnail(5805827,'191052','Veil','web-Veil_thumb.jpg',130, 173,5,'																			photo_5805827.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[152130] = new gallery(152130,'2378661,2378416,2349179,2349170,2349135,2347914,2347896,2347891,2347888,2347853','Buried Treasure','section236306',[2217093,2378416,2343686,2347853,2332324,2332459,2343637,2343678,2343671,2349170,2332399,2343655,2349179,2343644,2343617,2378661,2347914,2332486,2343647,2347891,2343626,2347888,2332307,2343587,2347896,2332332,2349135],0, 0, '', '																																																																																																																																	section236306.html',0,1);
				  					galleries[152973] = new gallery(152973,'2384549,2347886,2347867,2347848,2347838,2347828,2347619,2347596,2347572,2347563','Message In A Bottle','section236307',[2347596,2347828,2347867,2347886,2347838,2347549,2347572,2347563,2384549,2347619,2347848],0, 0, '', '																																																																																																																																	section236307.html',0,1);
				  					galleries[268033] = new gallery(268033,'4861371,4647330,4647239,4647235,4647232,4647226,4647224,4647215,4647214,4647212','Tea for Two','section322674',[4646486,4647330,4647235,4647214,4647212,4646610,4647224,4647226,4647232,4647239,4861371,4647215,4647209],0, 0, '', '																																																																																																																																	section322674.html',0,1);
				  					galleries[191052] = new gallery(191052,'7303929,7303915,7303850,7303846,7303842,7303839,7303837,7303836,7303810,7296422','Greetings Cards','section236308',[5805834,7296422,5805835,7296376,7296403,7296401,7296331,5805761,4861157,5805836,5796574,5796576,7294856,7296397,7303842,7296396,5433556,3114006,5796567,7303839,4862571,5805823,7296356,7303915,4861119,5805843,4862568,7296367,5805818,5805817,7294851,7294854,7296333,7296343,7296335,7296336,7294859,7296354,7296358,5796566,4861077,5796606,7294803,7296404,5796572,4862567,4861006,7303929,5796570,7303846,7296373,7296369,7294850,7294842,7294847,7294846,7303837,7303810,7303836,7294844,7303850,5805827],0, 0, '', '																																																																																																																																	section236308.html',0,1);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7296397,7296396,7296373,7296358,7296354,7296343,7296335,7296333,7294856,5796606,5796570,5433556,4861077,4647330,4647235,4647214,2378416,2349170,2347853,2347848,2343686,2343678,2343671,2343655,2343647,2343644,2343637,2343617,2332459,2332399,2332324,2217093';
imageSets[3] = '4647239,4647226,4647224,4647215,4647212,4647209,4646610';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/alexweaver/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/alexweaver/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 += 'section236306.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 && 'section236306' != '') {
					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 = 'Alexandra-Weaver.com: ' + 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> 				&pound;' + (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 + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="item_name" value="'+item_name+'">';
								ref = '';
				if(this.photo_ref != ''){
					ref = this.photo_ref+' - '+this.caption;
				}
				else{
					ref = this.id+' - '+this.caption;
				}
				price = amount;					temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="alexandra9weaver@btinternet.com">';
	temp = temp + '<input type="hidden" name="currency_code" value="GBP">';
	temp = temp + '<input type="hidden" name="add" value="1">';
					temp = temp + '<input type="hidden" name="amount" value="'+amount+'">';
	temp = temp + '<input type="hidden" name="item_number" value="'+ref+'">';
					temp = temp + '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
									temp = temp + '</form>';
								temp = temp + '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="alexandra9weaver@btinternet.com">';
	temp = temp + '<input type="hidden" name="display" value="1">';
	temp = temp + '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
	temp = temp + '</form>';
							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;
	}
}

			

