window.thumbnails = {};
															thumbnails[8786780] = clik.newPhoto({"id":8786780,"src":"Sea_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Sea of Tranquility","height":130});
															thumbnails[8482468] = clik.newPhoto({"id":8482468,"src":"MoonRose_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Moon Rose","height":130});
															thumbnails[7396051] = clik.newPhoto({"id":7396051,"src":"LastRays_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Last Rays","height":130});
															thumbnails[7252641] = clik.newPhoto({"id":7252641,"src":"Clematis01_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Clematis","height":130});
															thumbnails[8788011] = clik.newPhoto({"id":8788011,"src":"StoneGems-Grey_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Stone Gems ~ Moonstone","height":130});
															thumbnails[8788213] = clik.newPhoto({"id":8788213,"src":"StoneGems-Green_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Stone Gems ~ Green Onyx","height":130});
															thumbnails[8373430] = clik.newPhoto({"id":8373430,"src":"StoneGems-lilac_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Stone Gems ~ Pink Amethyst","height":130});
															thumbnails[8786860] = clik.newPhoto({"id":8786860,"src":"RaspberryIce1_thumb.jpg","galleries_id":140619,"server_id":1,"link":"photo_8786860.html","width":130,"caption":"Raspberry Ice","height":129});
															thumbnails[8767520] = clik.newPhoto({"id":8767520,"src":"DropofSunshine_thumb.jpg","galleries_id":163677,"server_id":1,"link":"photo_8767520.html","width":130,"caption":"Drop of Sunshine","height":130});
															thumbnails[8482815] = clik.newPhoto({"id":8482815,"src":"Tanzy_thumb.jpg","galleries_id":163677,"server_id":1,"link":"photo_8482815.html","width":130,"caption":"Bluebells","height":130});
															thumbnails[8482824] = clik.newPhoto({"id":8482824,"src":"TryfanEarrings_thumb.jpg","galleries_id":163677,"server_id":1,"link":"photo_8482824.html","width":130,"caption":"Tryfan","height":130});
															thumbnails[8482847] = clik.newPhoto({"id":8482847,"src":"RainyDay_thumb.jpg","galleries_id":163677,"server_id":1,"link":"photo_8482847.html","width":130,"caption":"Rainy Day","height":130});
															thumbnails[8482882] = clik.newPhoto({"id":8482882,"src":"SOtR_thumb.jpg","galleries_id":140619,"server_id":1,"link":"photo_8482882.html","width":130,"caption":"Somewhere Over the Rainbow","height":130});
															thumbnails[7681221] = clik.newPhoto({"id":7681221,"src":"PaintedDesert_thumb.jpg","galleries_id":140619,"server_id":1,"link":"photo_7681221.html","width":130,"caption":"Painted Desert","height":130});
															thumbnails[7027192] = clik.newPhoto({"id":7027192,"src":"Blueberries_thumb.jpg","galleries_id":163677,"server_id":1,"link":"photo_7027192.html","width":130,"caption":"Blueberries","height":130});
															thumbnails[7027208] = clik.newPhoto({"id":7027208,"src":"IceCreamDream_thumb.jpg","galleries_id":140619,"server_id":1,"link":"photo_7027208.html","width":130,"caption":"Ice Cream Dream","height":130});
															thumbnails[6628817] = clik.newPhoto({"id":6628817,"src":"Yemanja_thumb.jpg","galleries_id":140619,"server_id":1,"link":"photo_6628817.html","width":130,"caption":"Yemanja","height":130});
															thumbnails[6629211] = clik.newPhoto({"id":6629211,"src":"Electric_thumb.jpg","galleries_id":140619,"server_id":1,"link":"photo_6629211.html","width":130,"caption":"Electric","height":130});
															thumbnails[7255500] = clik.newPhoto({"id":7255500,"src":"HangingGarden_thumb.jpg","galleries_id":163677,"server_id":1,"link":"photo_7255500.html","width":130,"caption":"Hanging Gardens","height":130});
															thumbnails[6406281] = clik.newPhoto({"id":6406281,"src":"RaspberrySwirl_thumb.jpg","galleries_id":163677,"server_id":1,"link":"photo_6406281.html","width":130,"caption":"Raspberry Swirl","height":130});
															thumbnails[7325871] = clik.newPhoto({"id":7325871,"src":"HoneySpice_thumb.jpg","galleries_id":163677,"server_id":1,"link":"photo_7325871.html","width":130,"caption":"Honey Spice","height":130});
															thumbnails[5311911] = clik.newPhoto({"id":5311911,"src":"Gothika_thumb.jpg","galleries_id":140619,"server_id":1,"link":"photo_5311911.html","width":130,"caption":"Gothika","height":130});
															thumbnails[5210356] = clik.newPhoto({"id":5210356,"src":"DarkWaters_thumb.jpg","galleries_id":392242,"server_id":1,"link":"photo_5210356.html","width":130,"caption":"Dark Waters","height":130});
															thumbnails[5311879] = clik.newPhoto({"id":5311879,"src":"CloudyBay_thumb.jpg","galleries_id":392242,"server_id":1,"link":"photo_5311879.html","width":130,"caption":"Cloudy Bay","height":130});
															thumbnails[4636409] = clik.newPhoto({"id":4636409,"src":"CandyStripe_thumb.jpg","galleries_id":392242,"server_id":1,"link":"photo_4636409.html","width":130,"caption":"Candy Stripe","height":130});
															thumbnails[6628420] = clik.newPhoto({"id":6628420,"src":"Cherries_thumb.jpg","galleries_id":163677,"server_id":1,"link":"photo_6628420.html","width":130,"caption":"Cherries","height":130});
															thumbnails[5749220] = clik.newPhoto({"id":5749220,"src":"SettingSun_thumb.jpg","galleries_id":392242,"server_id":1,"link":"photo_5749220.html","width":130,"caption":"Setting Sun","height":130});
															thumbnails[8788080] = clik.newPhoto({"id":8788080,"src":"StoneGems-Rose_thumb.jpg","galleries_id":462678,"server_id":1,"link":"photo_8788080.html","width":130,"caption":"Stone Gems ~ Rose Quartz","height":130});
															thumbnails[8788158] = clik.newPhoto({"id":8788158,"src":"StoneGems-Raspberry_thumb.jpg","galleries_id":462678,"server_id":1,"link":"photo_8788158.html","width":130,"caption":"Stone Gems ~ Pink Tourmaline","height":130});
															thumbnails[8373464] = clik.newPhoto({"id":8373464,"src":"StoneGems-Yellow_thumb.jpg","galleries_id":462678,"server_id":1,"link":"photo_8373464.html","width":130,"caption":"Stone Gems ~ Citrine","height":131});
															thumbnails[8788150] = clik.newPhoto({"id":8788150,"src":"StoneGems-Lime_thumb.jpg","galleries_id":462678,"server_id":1,"link":"photo_8788150.html","width":130,"caption":"Stone Gems ~ Light Peridot'","height":131});
															thumbnails[8373424] = clik.newPhoto({"id":8373424,"src":"StoneGems-Chartreuse_thumb.jpg","galleries_id":462678,"server_id":1,"link":"photo_8373424.html","width":130,"caption":"Stone Gems ~ Peridot","height":130});
															thumbnails[5376130] = clik.newPhoto({"id":5376130,"src":"AATB-Avatar2BoldWhite_copy_thumb.jpg","galleries_id":303190,"server_id":1,"link":"photo_5376130.html","width":130,"caption":"International Postage","height":130});
															thumbnails[8788149] = clik.newPhoto({"id":8788149,"src":"StoneGems-Aqua_thumb.jpg","galleries_id":462678,"server_id":1,"link":"photo_8788149.html","width":130,"caption":"Stone Gems ~ Aquamarine","height":130});
															thumbnails[8373452] = clik.newPhoto({"id":8373452,"src":"StoneGems-Turquoise_thumb.jpg","galleries_id":462678,"server_id":1,"link":"photo_8373452.html","width":130,"caption":"Stone Gems Pendant ~ Apatite","height":129});
															thumbnails[8373455] = clik.newPhoto({"id":8373455,"src":"StoneGems-Cobalt_thumb.jpg","galleries_id":462678,"server_id":1,"link":"photo_8373455.html","width":130,"caption":"Stone Gems ~ Lapis Lazuli","height":130});
															thumbnails[8788231] = clik.newPhoto({"id":8788231,"src":"StoneGems-Purple_thumb.jpg","galleries_id":462678,"server_id":1,"link":"photo_8788231.html","width":130,"caption":"Stone Gems ~ Amethyst","height":130});
															thumbnails[8767501] = clik.newPhoto({"id":8767501,"src":"Cascades_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_8767501.html","width":130,"caption":"Cascades","height":130});
															thumbnails[8767515] = clik.newPhoto({"id":8767515,"src":"Palomino_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_8767515.html","width":130,"caption":"Palomino","height":130});
															thumbnails[8521199] = clik.newPhoto({"id":8521199,"src":"Kandinski-1_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_8521199.html","width":130,"caption":"Kandinsky","height":130});
															thumbnails[8521311] = clik.newPhoto({"id":8521311,"src":"Heather-1_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_8521311.html","width":130,"caption":"Heather","height":130});
															thumbnails[8489607] = clik.newPhoto({"id":8489607,"src":"Maeve_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_8489607.html","width":130,"caption":"Maeve","height":130});
															thumbnails[8497176] = clik.newPhoto({"id":8497176,"src":"Yvaine_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_8497176.html","width":130,"caption":"Yvaine","height":130});
															thumbnails[8482766] = clik.newPhoto({"id":8482766,"src":"Delta_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_8482766.html","width":130,"caption":"Delta","height":130});
															thumbnails[8482799] = clik.newPhoto({"id":8482799,"src":"Carnival_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_8482799.html","width":130,"caption":"Carninval","height":130});
															thumbnails[8482885] = clik.newPhoto({"id":8482885,"src":"RaspberyLimoncello_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_8482885.html","width":130,"caption":"Raspberry Limoncello","height":130});
															thumbnails[7681404] = clik.newPhoto({"id":7681404,"src":"Lilacs_Earrings_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_7681404.html","width":130,"caption":"Emmi","height":130});
															thumbnails[7325901] = clik.newPhoto({"id":7325901,"src":"Lisbeth_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_7325901.html","width":130,"caption":"Lisbeth","height":130});
															thumbnails[7027184] = clik.newPhoto({"id":7027184,"src":"PinkFizz06_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_7027184.html","width":130,"caption":"Pink Fizz","height":130});
															thumbnails[7027197] = clik.newPhoto({"id":7027197,"src":"SkyWoman_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_7027197.html","width":130,"caption":"Sky Woman","height":130});
															thumbnails[7027205] = clik.newPhoto({"id":7027205,"src":"SmugglersCove_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_7027205.html","width":130,"caption":"Smugglers' Cove","height":130});
															thumbnails[7325954] = clik.newPhoto({"id":7325954,"src":"Tryfan01_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_7325954.html","width":130,"caption":"Tryfan","height":130});
															thumbnails[7147481] = clik.newPhoto({"id":7147481,"src":"HippyChick_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_7147481.html","width":130,"caption":"Hippy Chick ","height":130});
															thumbnails[6628435] = clik.newPhoto({"id":6628435,"src":"Persid_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_6628435.html","width":130,"caption":"Perseid","height":130});
															thumbnails[6628466] = clik.newPhoto({"id":6628466,"src":"SuryaNamaskara_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_6628466.html","width":130,"caption":"Surya Namaskara","height":130});
															thumbnails[5992702] = clik.newPhoto({"id":5992702,"src":"Dragonfly_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_5992702.html","width":130,"caption":"Dragonfly","height":130});
															thumbnails[6406231] = clik.newPhoto({"id":6406231,"src":"Peacock_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_6406231.html","width":130,"caption":"Peacock- SOLD","height":130});
															thumbnails[6629093] = clik.newPhoto({"id":6629093,"src":"Gretel_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_6629093.html","width":130,"caption":"Gretel","height":130});
															thumbnails[5748290] = clik.newPhoto({"id":5748290,"src":"RoseDamask_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_5748290.html","width":130,"caption":"Rose Damask","height":130});
															thumbnails[5749227] = clik.newPhoto({"id":5749227,"src":"PaleBlooms_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_5749227.html","width":130,"caption":"Pale Blooms","height":130});
															thumbnails[2564331] = clik.newPhoto({"id":2564331,"src":"Whispers_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_2564331.html","width":130,"caption":"Whispers","height":130});
															thumbnails[2916825] = clik.newPhoto({"id":2916825,"src":"AngelsonBareSkin04_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_2916825.html","width":130,"caption":"Angels on Bare Skin","height":130});
															thumbnails[4636442] = clik.newPhoto({"id":4636442,"src":"StormyWeather7_thumb.jpg","galleries_id":294346,"server_id":1,"link":"photo_4636442.html","width":130,"caption":"Stormy Weather","height":130});
															thumbnails[5216305] = clik.newPhoto({"id":5216305,"src":"SnowWhite04_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_5216305.html","width":130,"caption":"Snow White, Rose Red","height":130});
															thumbnails[5216321] = clik.newPhoto({"id":5216321,"src":"Sunshine16_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_5216321.html","width":130,"caption":"Sunshine & Clouds","height":130});
															thumbnails[5311886] = clik.newPhoto({"id":5311886,"src":"Equinox01_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_5311886.html","width":130,"caption":"Equinox","height":130});
															thumbnails[5311908] = clik.newPhoto({"id":5311908,"src":"WomanClothedwiththeSun02_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_5311908.html","width":130,"caption":"The Woman Clothed with the Sun","height":130});
															thumbnails[6406233] = clik.newPhoto({"id":6406233,"src":"Rosa06_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_6406233.html","width":130,"caption":"Rosa","height":130});
															thumbnails[1775622] = clik.newPhoto({"id":1775622,"src":"AquaWaves01_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_1775622.html","width":130,"caption":"Aqua Waves","height":130});
															thumbnails[5707014] = clik.newPhoto({"id":5707014,"src":"Kaelidoscope31_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_5707014.html","width":130,"caption":"Kaleidoscope","height":130});
															thumbnails[5747268] = clik.newPhoto({"id":5747268,"src":"WillowBracelet16_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_5747268.html","width":130,"caption":"Willow","height":130});
															thumbnails[5993201] = clik.newPhoto({"id":5993201,"src":"StormySkies15_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_5993201.html","width":130,"caption":"Stormy Skies","height":130});
															thumbnails[2564260] = clik.newPhoto({"id":2564260,"src":"RainbowSunset01_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_2564260.html","width":130,"caption":"Rainbow Sunset","height":130});
															thumbnails[4636444] = clik.newPhoto({"id":4636444,"src":"ValleysofGreengrey05_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_4636444.html","width":130,"caption":"Valleys of Green & Grey","height":130});
															thumbnails[5707050] = clik.newPhoto({"id":5707050,"src":"Winterberry01_thumb.JPG","galleries_id":294346,"server_id":1,"link":"photo_5707050.html","width":130,"caption":"Winterberry","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[140616] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Shop Bracelets","link":"gallery_140616.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":140616,"singleSection":false});				  						galleries[163677] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Shop Earrings","link":"gallery_163677.html","maxRecords":0.0,"photoIDs":[8767520.0,8482815.0,8482824.0,8482847.0,7027192.0,7255500.0,6406281.0,7325871.0,6628420.0],"skipIndex":0,"section_code":"gallery","featured_images":"8767520,8482847,8482824,8482815,7325871,7027192,6628420,6406281","id":163677,"singleSection":false});				  						galleries[140619] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Shop Necklaces","link":"gallery_140619.html","maxRecords":0.0,"photoIDs":[8786860.0,8482882.0,7681221.0,7027208.0,6628817.0,6629211.0,5311911.0],"skipIndex":0,"section_code":"gallery","featured_images":"8786860,8482882,7681221,7027208,6629211,6628817,5311911","id":140619,"singleSection":false});				  						galleries[392242] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Shop Clearance","link":"gallery_392242.html","maxRecords":0.0,"photoIDs":[5210356.0,5311879.0,4636409.0,5749220.0],"skipIndex":0,"section_code":"gallery","featured_images":"5749220,5311879,5210356,4636409","id":392242,"singleSection":false});				  						galleries[462678] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Shop 'Stone-Gems Collection'","link":"gallery_462678.html","maxRecords":0.0,"photoIDs":[8788080.0,8788158.0,8373464.0,8788150.0,8373424.0,8788149.0,8373452.0,8373455.0,8788231.0],"skipIndex":0,"section_code":"gallery","featured_images":"8788231,8788158,8788150,8788149,8788080,8373464,8373455,8373452,8373424","id":462678,"singleSection":false});				  						galleries[303190] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Postage Options","link":"gallery_303190.html","maxRecords":0.0,"photoIDs":[5376130.0],"skipIndex":0,"section_code":"gallery","featured_images":5376130.0,"id":303190,"singleSection":false});				  						galleries[294346] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Gallery of Work","link":"section352151.html","maxRecords":0.0,"photoIDs":[8767501.0,8767515.0,8521199.0,8521311.0,8489607.0,8497176.0,8482766.0,8482799.0,8482885.0,7681404.0,7325901.0,7027184.0,7027197.0,7027205.0,7325954.0,7147481.0,6628435.0,6628466.0,5992702.0,6406231.0,6629093.0,5748290.0,5749227.0,2564331.0,2916825.0,4636442.0,5216305.0,5216321.0,5311886.0,5311908.0,6406233.0,1775622.0,5707014.0,5747268.0,5993201.0,2564260.0,4636444.0,5707050.0],"skipIndex":0,"section_code":"section352151","featured_images":"8767515,8767501,8521311,8521199,8497176,8489607,8482885,8482799,8482766,7681404,7325954,7325901,7147481,7027205,7027197,7027184,6629093,6628466,6628435,6406233,6406231,5993201,5992702,5749227,5748290,5747268,5707050,5707014,5311908,5311886,5216321,5216305,4636444,4636442,2916825,2564331,2564260,1775622","id":294346,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[235242] = '8786860,8786780,8489607,8482885,8482882,7681221,7325954,7027208,6629211,6629093,6628817,6406231,5311911,5311879,8373464,8373455,4636444';
imageSets[235873] = '8767520,8767515,8767501,8497176,8482847,8482824,8482815,7325901,7325871,7255500,7147481,7027192,7027184,6628435,6628420,6406281,5992702,5749220,5748290,4636409';
imageSets[235874] = '8521311,8521199,8482799,8482766,8482468,7396051,7252641,7027205,2564331,5707050';
imageSets[1] = '8786860,8786780,8767515,8767501,8521311,8521199,8497176,8489607,8482882,8482847,8482824,8482799,8482766,7681404,7681221,7396051,7325954,7325901,7325871,7255500,7147481,7027208,7027205,7027197,7027192,7027184,6629211,6629093,6628817,6628435,6406281,6406231,5992702,5749227,5749220,5748290,5311911,5210356,4636409,2564331,8788011,8788080,8788158,8373464,8788150,8373424,5993201,8788213,8788149,8373452,8373455,8788231,8373430,5707050,4636444';
imageSets[2] = '8786860,8786780,8767520,8767515,8767501,8521311,8521199,8497176,8489607,8482885,8482882,8482847,8482824,8482815,8482799,8482766,8482468,7681404,7681221,7396051,7325954,7325901,7325871,7252641,7147481,7027208,7027205,7027197,7027192,7027184,6629211,6629093,6628817,6628466,6628435,6628420,6406281,6406233,6406231,5992702,5749227,5749220,5748290,5311911,5311908,5311886,5311879,5216321,5216305,5210356,4636442,4636409,2916825,2564331,8788011,8788080,8788158,8373464,8788150,8373424,5993201,5747268,5707014,1775622,8788213,8788149,8373452,8373455,8788231,8373430,5707050,4636444,2564260';
imageSets[3] = '7255500';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/alisonperry/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/alisonperry/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'All About the Beads - Jewellery by Alison Perry: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="ALISONPERRY">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

