window.thumbnails = {};
															thumbnails[448182] = clik.newPhoto({"id":448182,"src":"flamingos_text_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Handmade lampwork beads and lampworking frit blends, by Mary Parker. Made with love in Aberdeenshire.","height":130});
															thumbnails[533945] = clik.newPhoto({"id":533945,"src":"pink_bendy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Bendy beads, Pink Opal ","height":98});
															thumbnails[3482544] = clik.newPhoto({"id":3482544,"src":"My lampwork 20941_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":121});
															thumbnails[449354] = clik.newPhoto({"id":449354,"src":"copper_green_leaf_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_449354.html","width":130,"caption":"Copper Green Leaf NFS","height":98});
															thumbnails[466600] = clik.newPhoto({"id":466600,"src":"raku_circus_2_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_466600.html","width":130,"caption":"Raku Circus SOLD","height":98});
															thumbnails[494365] = clik.newPhoto({"id":494365,"src":"opal_mist_set_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_494365.html","width":130,"caption":"Opal Mist SOLD","height":129});
															thumbnails[531807] = clik.newPhoto({"id":531807,"src":"bendy_bracelet_Kronos_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_531807.html","width":130,"caption":"Bracelet with Kronos beads NFS","height":93});
															thumbnails[546025] = clik.newPhoto({"id":546025,"src":"gaia 007_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_546025.html","width":130,"caption":"Kronos Bendy Bracelet Beads SOLD","height":106});
															thumbnails[769334] = clik.newPhoto({"id":769334,"src":"My lampwork 326_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_769334.html","width":130,"caption":"Chintz SOLD","height":100});
															thumbnails[828319] = clik.newPhoto({"id":828319,"src":"My lampwork 560_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_828319.html","width":130,"caption":"Desert Pearls SOLD","height":103});
															thumbnails[1012900] = clik.newPhoto({"id":1012900,"src":"My lampwork 852_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1012900.html","width":130,"caption":"Rothesay Seaweed SOLD","height":112});
															thumbnails[1017345] = clik.newPhoto({"id":1017345,"src":"My lampwork 8521_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1017345.html","width":130,"caption":"Carnelian Vessel SOLD","height":156});
															thumbnails[1058132] = clik.newPhoto({"id":1058132,"src":"My lampwork 913_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1058132.html","width":130,"caption":"Terra Sunset Harmony SOLD","height":98});
															thumbnails[1067033] = clik.newPhoto({"id":1067033,"src":"My lampwork 926_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1067033.html","width":130,"caption":"Cairngorms SOLD","height":125});
															thumbnails[1415479] = clik.newPhoto({"id":1415479,"src":"My lampwork 1108_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1415479.html","width":130,"caption":"Moon Gems SOLD","height":101});
															thumbnails[1463556] = clik.newPhoto({"id":1463556,"src":"My lampwork 1224_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1463556.html","width":130,"caption":"Summer Storm Focal SOLD","height":117});
															thumbnails[1464519] = clik.newPhoto({"id":1464519,"src":"My lampwork 875_thumb.jpg","galleries_id":101042,"server_id":18,"link":"photo_1464519.html","width":130,"caption":"Lentil Sizes","height":98});
															thumbnails[1464529] = clik.newPhoto({"id":1464529,"src":"My lampwork 1247_thumb.jpg","galleries_id":101042,"server_id":18,"link":"photo_1464529.html","width":130,"caption":"Lentil","height":116});
															thumbnails[1464530] = clik.newPhoto({"id":1464530,"src":"My lampwork 11901_thumb.jpg","galleries_id":101042,"server_id":18,"link":"photo_1464530.html","width":130,"caption":"Chunky Lentil","height":98});
															thumbnails[1464533] = clik.newPhoto({"id":1464533,"src":"My lampwork 1239_thumb.jpg","galleries_id":101042,"server_id":18,"link":"photo_1464533.html","width":130,"caption":"Button or Spree","height":123});
															thumbnails[1464535] = clik.newPhoto({"id":1464535,"src":"My lampwork 1245_thumb.jpg","galleries_id":101042,"server_id":18,"link":"photo_1464535.html","width":130,"caption":"Sleek Pillow or Nugget","height":112});
															thumbnails[1464551] = clik.newPhoto({"id":1464551,"src":"My lampwork 9531_thumb.jpg","galleries_id":101042,"server_id":18,"link":"photo_1464551.html","width":130,"caption":"Curved Bendy Beads","height":105});
															thumbnails[1492036] = clik.newPhoto({"id":1492036,"src":"My lampwork 1251_thumb.jpg","galleries_id":101042,"server_id":18,"link":"photo_1492036.html","width":130,"caption":"Large Button","height":102});
															thumbnails[1492039] = clik.newPhoto({"id":1492039,"src":"My lampwork 1262_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1492039.html","width":130,"caption":"Scottish Heather Focal SOLD","height":121});
															thumbnails[1492041] = clik.newPhoto({"id":1492041,"src":"My lampwork 1258_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1492041.html","width":130,"caption":"Scottish Heather Set SOLD","height":109});
															thumbnails[1628746] = clik.newPhoto({"id":1628746,"src":"My lampwork 861_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1628746.html","width":130,"caption":"Bennachie  SOLD","height":127});
															thumbnails[1629379] = clik.newPhoto({"id":1629379,"src":"My lampwork 1351_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1629379.html","width":130,"caption":"Moon Gem Bendy Beads SOLD","height":95});
															thumbnails[1629395] = clik.newPhoto({"id":1629395,"src":"My lampwork 1374_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1629395.html","width":130,"caption":"Beach Pebbles SOLD","height":106});
															thumbnails[1703747] = clik.newPhoto({"id":1703747,"src":"My lampwork 1392_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1703747.html","width":130,"caption":"Aviemore boro beads SOLD","height":111});
															thumbnails[1858529] = clik.newPhoto({"id":1858529,"src":"amber_silver_bendy_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1858529.html","width":130,"caption":"Amber Silver bendy SOLD","height":90});
															thumbnails[1858542] = clik.newPhoto({"id":1858542,"src":"My lampwork 5_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1858542.html","width":130,"caption":"Pink Opal bendy bracelet SOLD","height":98});
															thumbnails[1858549] = clik.newPhoto({"id":1858549,"src":"My lampwork 017_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1858549.html","width":130,"caption":"Chainmaiile  by Hedgeland Jewellery NFS","height":96});
															thumbnails[1858554] = clik.newPhoto({"id":1858554,"src":"My lampwork 953_1_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1858554.html","width":130,"caption":"Black Peacock bendy beads SOLD","height":105});
															thumbnails[2059018] = clik.newPhoto({"id":2059018,"src":"My lampwork 1473w_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_2059018.html","width":130,"caption":"Midnight Garden Lentil SOLD","height":121});
															thumbnails[2163159] = clik.newPhoto({"id":2163159,"src":"My lampwork 1511_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_2163159.html","width":130,"caption":"Lily Pond focal","height":121});
															thumbnails[2163197] = clik.newPhoto({"id":2163197,"src":"My lampwork 1516_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_2163197.html","width":130,"caption":"Autumn storm","height":112});
															thumbnails[2163225] = clik.newPhoto({"id":2163225,"src":"My lampwork 1573_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_2163225.html","width":130,"caption":"Shining Sea focal SOLD","height":120});
															thumbnails[2213448] = clik.newPhoto({"id":2213448,"src":"My lampwork 1598_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_2213448.html","width":130,"caption":"Malachite Glow focal SOLD","height":121});
															thumbnails[2213757] = clik.newPhoto({"id":2213757,"src":"My lampwork 1609_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_2213757.html","width":130,"caption":"Verdigris focal SOLD","height":118});
															thumbnails[2214468] = clik.newPhoto({"id":2214468,"src":"My lampwork 1619_thumb.jpg","galleries_id":101042,"server_id":18,"link":"photo_2214468.html","width":130,"caption":"Large Pillow focals","height":114});
															thumbnails[2332278] = clik.newPhoto({"id":2332278,"src":"My lampwork 1721_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_2332278.html","width":130,"caption":"Lollipop focal SOLD","height":133});
															thumbnails[2332491] = clik.newPhoto({"id":2332491,"src":"My lampwork 1719_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_2332491.html","width":130,"caption":"Mermaid large focal SOLD","height":132});
															thumbnails[2482704] = clik.newPhoto({"id":2482704,"src":"My lampwork 1802_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_2482704.html","width":130,"caption":"Splendour heart SOLD","height":132});
															thumbnails[2482722] = clik.newPhoto({"id":2482722,"src":"My lampwork 1796_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_2482722.html","width":130,"caption":"Ebb Tide focal SOLD","height":115});
															thumbnails[2482790] = clik.newPhoto({"id":2482790,"src":"My lampwork 1784_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_2482790.html","width":130,"caption":"Triton Jewels set SOLD","height":110});
															thumbnails[2744639] = clik.newPhoto({"id":2744639,"src":"My lampwork 1936_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_2744639.html","width":130,"caption":"Violet Night Vessel SOLD","height":141});
															thumbnails[3482500] = clik.newPhoto({"id":3482500,"src":"My lampwork 2166w_thumb.jpg","galleries_id":35559,"server_id":18,"link":"photo_3482500.html","width":130,"caption":"Tranquil set","height":95});
															thumbnails[3482505] = clik.newPhoto({"id":3482505,"src":"My lampwork 2178w_thumb.jpg","galleries_id":75812,"server_id":18,"link":"photo_3482505.html","width":130,"caption":"Kildonan boro set","height":98});
															thumbnails[3482507] = clik.newPhoto({"id":3482507,"src":"My lampwork 2170w_thumb.jpg","galleries_id":75812,"server_id":18,"link":"photo_3482507.html","width":130,"caption":"Blue Moon boro set 1","height":93});
															thumbnails[3482509] = clik.newPhoto({"id":3482509,"src":"My lampwork 2174w_thumb.jpg","galleries_id":75812,"server_id":18,"link":"photo_3482509.html","width":130,"caption":"Blue Moon set 2","height":114});
															thumbnails[3482528] = clik.newPhoto({"id":3482528,"src":"My lampwork 2141_thumb.jpg","galleries_id":75812,"server_id":18,"link":"photo_3482528.html","width":130,"caption":"Fairy Lemonade set","height":103});
															thumbnails[3482531] = clik.newPhoto({"id":3482531,"src":"My lampwork 2154w_thumb.jpg","galleries_id":35559,"server_id":18,"link":"photo_3482531.html","width":130,"caption":"Triton Jewels set","height":86});
															thumbnails[3482558] = clik.newPhoto({"id":3482558,"src":"My lampwork 2152w_thumb.jpg","galleries_id":75812,"server_id":18,"link":"photo_3482558.html","width":130,"caption":"Ballantrae boro set SOLD","height":92});
															thumbnails[3482563] = clik.newPhoto({"id":3482563,"src":"My lampwork 2180_thumb.jpg","galleries_id":35559,"server_id":18,"link":"photo_3482563.html","width":130,"caption":"Chameleon Raku set SOLD","height":109});
															thumbnails[3935874] = clik.newPhoto({"id":3935874,"src":"beads_056w_thumb.jpg","galleries_id":35559,"server_id":18,"link":"photo_3935874.html","width":130,"caption":"Lemon Drops set","height":109});
															thumbnails[3935883] = clik.newPhoto({"id":3935883,"src":"beads_045w_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_3935883.html","width":130,"caption":"Rainforest large focal","height":114});
															thumbnails[4513930] = clik.newPhoto({"id":4513930,"src":"mylampwork_033w_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_4513930.html","width":130,"caption":"Wonderland large focal SOLD","height":133});
															thumbnails[4514121] = clik.newPhoto({"id":4514121,"src":"mylampwork_028w_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_4514121.html","width":130,"caption":"Smoky focal SOLD","height":106});
															thumbnails[4514128] = clik.newPhoto({"id":4514128,"src":"mylampwork_040w_thumb.jpg","galleries_id":35559,"server_id":18,"link":"photo_4514128.html","width":130,"caption":"Twinkles set","height":114});
															thumbnails[4818797] = clik.newPhoto({"id":4818797,"src":"mylampwork_057_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_4818797.html","width":130,"caption":"Chalcedony Sunset focal SOLD","height":115});
															thumbnails[4818809] = clik.newPhoto({"id":4818809,"src":"mylampwork_063_thumb.jpg","galleries_id":35559,"server_id":18,"link":"photo_4818809.html","width":130,"caption":"Periwinkle Tapestry set","height":98});
															thumbnails[4818822] = clik.newPhoto({"id":4818822,"src":"mylampwork_061_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_4818822.html","width":130,"caption":"Periwinkle Tapestry large focal","height":118});
															thumbnails[4818875] = clik.newPhoto({"id":4818875,"src":"mylampwork_025_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_4818875.html","width":130,"caption":"Chalcedony Tapestry focal SOLD","height":107});
															thumbnails[4999259] = clik.newPhoto({"id":4999259,"src":"vessels_013_thumb.jpg","galleries_id":36902,"server_id":18,"link":"photo_4999259.html","width":130,"caption":"Caramel amphora SOLD","height":135});
															thumbnails[4999273] = clik.newPhoto({"id":4999273,"src":"vessels_018_thumb.jpg","galleries_id":36902,"server_id":18,"link":"photo_4999273.html","width":130,"caption":"Passion amphora SOLD","height":146});
															thumbnails[4999278] = clik.newPhoto({"id":4999278,"src":"vessels_026_thumb.jpg","galleries_id":36902,"server_id":18,"link":"photo_4999278.html","width":130,"caption":"Triton amphora SOLD","height":150});
															thumbnails[4999285] = clik.newPhoto({"id":4999285,"src":"vessels_022_thumb.jpg","galleries_id":36902,"server_id":18,"link":"photo_4999285.html","width":130,"caption":"Pebble amphora SOLD","height":140});
															thumbnails[4999344] = clik.newPhoto({"id":4999344,"src":"vessels_025_thumb.jpg","galleries_id":36902,"server_id":18,"link":"photo_4999344.html","width":130,"caption":"Turquoise amphora SOLD","height":146});
															thumbnails[1451740] = clik.newPhoto({"id":1451740,"src":"My lampwork 1210_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1451740.html","width":130,"caption":"Orchids SOLD","height":116});
															thumbnails[1463540] = clik.newPhoto({"id":1463540,"src":"My lampwork 1237_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1463540.html","width":130,"caption":"Bird of Paradise  SOLD","height":107});
															thumbnails[2041305] = clik.newPhoto({"id":2041305,"src":"My lampwork 1438_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_2041305.html","width":130,"caption":"Cherry Blossom SOLD","height":120});
															thumbnails[1451731] = clik.newPhoto({"id":1451731,"src":"My lampwork 1213_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1451731.html","width":130,"caption":"Tendrils SOLD","height":99});
															thumbnails[1451716] = clik.newPhoto({"id":1451716,"src":"My lampwork 1207_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1451716.html","width":130,"caption":"Mossy Pebbles SOLD","height":113});
															thumbnails[1441855] = clik.newPhoto({"id":1441855,"src":"My lampwork 1218_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_1441855.html","width":130,"caption":"Psyche Jewels SOLD","height":114});
															thumbnails[2041313] = clik.newPhoto({"id":2041313,"src":"My lampwork 1442_thumb.jpg","galleries_id":35601,"server_id":18,"link":"photo_2041313.html","width":130,"caption":"Tapestry Large focal","height":116});
															thumbnails[448452] = clik.newPhoto({"id":448452,"src":"tapestry3_thumb.jpg","galleries_id":23848,"server_id":18,"link":"photo_448452.html","width":130,"caption":"Tapestry SOLD","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[36902] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New Beads","link":"gallery_36902.html","maxRecords":0.0,"photoIDs":[4999259.0,4999273.0,4999278.0,4999285.0,4999344.0],"skipIndex":0,"section_code":"gallery","featured_images":"4999344,4999285,4999278,4999273,4999259","id":36902,"singleSection":false});				  						galleries[75812] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Boro Beads ","link":"gallery_75812.html","maxRecords":0.0,"photoIDs":[3482505.0,3482507.0,3482509.0,3482528.0,3482558.0],"skipIndex":0,"section_code":"gallery","featured_images":"3482558,3482528,3482509,3482507,3482505","id":75812,"singleSection":false});				  						galleries[47801] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Curved Beads","link":"section53237_47801.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section53237","featured_images":"","id":47801,"singleSection":false});				  						galleries[35559] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sets","link":"gallery_35559.html","maxRecords":0.0,"photoIDs":[3482500.0,3482531.0,3482563.0,3935874.0,4514128.0,4818809.0],"skipIndex":0,"section_code":"gallery","featured_images":"4818809,4514128,3935874,3482563,3482531,3482500","id":35559,"singleSection":false});				  						galleries[35601] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pendant Beads and Focals","link":"gallery_35601.html","maxRecords":0.0,"photoIDs":[2163159.0,2163197.0,2332278.0,2744639.0,3935883.0,4513930.0,4514121.0,4818797.0,4818822.0,2041313.0],"skipIndex":0,"section_code":"gallery","featured_images":"4818822,4818797,4514121,4513930,3935883,2744639,2332278,2163197,2163159,2041313","id":35601,"singleSection":false});				  						galleries[101042] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Bead Shapes","link":"gallery_101042.html","maxRecords":0.0,"photoIDs":[1464519.0,1464529.0,1464530.0,1464533.0,1464535.0,1464551.0,1492036.0,2214468.0],"skipIndex":0,"section_code":"gallery","featured_images":"2214468,1492036,1464551,1464535,1464533,1464530,1464529,1464519","id":101042,"singleSection":false});				  						galleries[35610] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Ready to Wear","link":"section53237_35610.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section53237","featured_images":"","id":35610,"singleSection":false});				  						galleries[23848] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery","link":"gallery_23848.html","maxRecords":0.0,"photoIDs":[449354.0,466600.0,494365.0,531807.0,546025.0,769334.0,828319.0,1012900.0,1017345.0,1058132.0,1067033.0,1415479.0,1463556.0,1492039.0,1492041.0,1628746.0,1629379.0,1629395.0,1703747.0,1858529.0,1858542.0,1858549.0,1858554.0,2059018.0,2163225.0,2213448.0,2213757.0,2332491.0,2482704.0,2482722.0,2482790.0,4818875.0,1451740.0,1463540.0,2041305.0,1451731.0,1451716.0,1441855.0,448452.0],"skipIndex":0,"section_code":"gallery","featured_images":"2482704,1451731,546025","id":23848,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '448182';
imageSets[2] = '2482704,546025,1451731';
imageSets[3] = '4818822,4818809,4818797';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/weemary/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/weemary/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/weemary/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/weemary/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/weemary/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/weemary/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/weemary/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/weemary/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 = 'Flamingo Beads: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	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" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			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 += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="mary@dmparker.wanadoo.co.uk">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="mary@dmparker.wanadoo.co.uk">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

