window.thumbnails = {};
															thumbnails[8611942] = clik.newPhoto({"id":8611942,"src":"S21072_thumb.jpg","galleries_id":360674,"server_id":38,"link":"photo_8611942.html","width":130,"caption":"Black & White Gown","height":184});
															thumbnails[8611945] = clik.newPhoto({"id":8611945,"src":"S21042_thumb.jpg","galleries_id":360674,"server_id":38,"link":"photo_8611945.html","width":130,"caption":"Holly","height":184});
															thumbnails[8611948] = clik.newPhoto({"id":8611948,"src":"S21062_thumb.jpg","galleries_id":360674,"server_id":38,"link":"photo_8611948.html","width":130,"caption":"Amber","height":184});
															thumbnails[8611950] = clik.newPhoto({"id":8611950,"src":"S22221_thumb.jpg","galleries_id":360674,"server_id":38,"link":"photo_8611950.html","width":130,"caption":"Skye","height":184});
															thumbnails[8611953] = clik.newPhoto({"id":8611953,"src":"S22352_thumb.jpg","galleries_id":360674,"server_id":38,"link":"photo_8611953.html","width":130,"caption":"Aphrodite","height":184});
															thumbnails[8611956] = clik.newPhoto({"id":8611956,"src":"S22462_thumb.jpg","galleries_id":360674,"server_id":38,"link":"photo_8611956.html","width":130,"caption":"Rosie","height":184});
															thumbnails[8611963] = clik.newPhoto({"id":8611963,"src":"S91412_thumb.jpg","galleries_id":360674,"server_id":38,"link":"photo_8611963.html","width":130,"caption":"Misty","height":184});
															thumbnails[8175869] = clik.newPhoto({"id":8175869,"src":"S0120a1_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_8175869.html","width":130,"caption":"Stunning Red Gown SO120","height":183});
															thumbnails[7427060] = clik.newPhoto({"id":7427060,"src":"S1107A2_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_7427060.html","width":130,"caption":"S1107","height":184});
															thumbnails[6972520] = clik.newPhoto({"id":6972520,"src":"J91051_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_6972520.html","width":130,"caption":"J9105 In Yellow, White, Turquoise and Magenta","height":163});
															thumbnails[6903091] = clik.newPhoto({"id":6903091,"src":"S02021_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_6903091.html","width":130,"caption":"Stunning Blue Sexy gown","height":183});
															thumbnails[6669086] = clik.newPhoto({"id":6669086,"src":"S0144a1_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_6669086.html","width":130,"caption":"Korina Ball Gown","height":183});
															thumbnails[6669355] = clik.newPhoto({"id":6669355,"src":"J91261_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_6669355.html","width":130,"caption":"Stunning Turquoise gown","height":195});
															thumbnails[6669406] = clik.newPhoto({"id":6669406,"src":"J91431_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_6669406.html","width":130,"caption":"Lovely gown in Orange","height":195});
															thumbnails[6669538] = clik.newPhoto({"id":6669538,"src":"J91521_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_6669538.html","width":130,"caption":"This simple stunning gown available in orange","height":195});
															thumbnails[3528596] = clik.newPhoto({"id":3528596,"src":"18711_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_3528596.html","width":130,"caption":18711.0,"height":168});
															thumbnails[6574482] = clik.newPhoto({"id":6574482,"src":"scan0007_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6574482.html","width":130,"caption":"Lovely Chiffon Party Dress","height":378});
															thumbnails[6574486] = clik.newPhoto({"id":6574486,"src":"scan0008_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6574486.html","width":130,"caption":"Beautiful Party Dress in black tulle with satin yellow dots","height":330});
															thumbnails[6574495] = clik.newPhoto({"id":6574495,"src":"scan0009_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6574495.html","width":130,"caption":"Dress for the curvy girls","height":180});
															thumbnails[6574504] = clik.newPhoto({"id":6574504,"src":"scan0010_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6574504.html","width":130,"caption":"Styish Chiffon gown - lime","height":307});
															thumbnails[6574545] = clik.newPhoto({"id":6574545,"src":"scan0015_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6574545.html","width":130,"caption":"Sophisticated red gown","height":331});
															thumbnails[6574561] = clik.newPhoto({"id":6574561,"src":"scan0014_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6574561.html","width":130,"caption":"Very chic Black Number","height":168});
															thumbnails[6574581] = clik.newPhoto({"id":6574581,"src":"S0112c2_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_6574581.html","width":130,"caption":"Beautiful Red gown in taffeta, figure hugging and very feminine","height":183});
															thumbnails[6567607] = clik.newPhoto({"id":6567607,"src":"scan0001_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_6567607.html","width":130,"caption":"Beautifully stylish gown - Brand New £145 - only 1 left","height":188});
															thumbnails[6567637] = clik.newPhoto({"id":6567637,"src":"scan0003_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6567637.html","width":130,"caption":"Figure hugging bombshell!","height":346});
															thumbnails[6567664] = clik.newPhoto({"id":6567664,"src":"scan0004_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6567664.html","width":130,"caption":"absolutely amazing gown just wait until the zip is up - you will love it!","height":186});
															thumbnails[6567672] = clik.newPhoto({"id":6567672,"src":"scan0005_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6567672.html","width":130,"caption":"Stylish Black chiffon gown","height":192});
															thumbnails[6567707] = clik.newPhoto({"id":6567707,"src":"scan0006_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6567707.html","width":130,"caption":"Stunning colours and fit to this sophisticated gown","height":176});
															thumbnails[6563042] = clik.newPhoto({"id":6563042,"src":"scan0002_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_6563042.html","width":130,"caption":"Beautiful & Sophisticaed","height":214});
															thumbnails[1945212] = clik.newPhoto({"id":1945212,"src":"32031_thumb.jpg","galleries_id":125293,"server_id":1,"link":"photo_1945212.html","width":130,"caption":3203.0,"height":181});
															thumbnails[1945221] = clik.newPhoto({"id":1945221,"src":"41021_thumb.jpg","galleries_id":125293,"server_id":1,"link":"photo_1945221.html","width":130,"caption":4102.0,"height":195});
															thumbnails[1945222] = clik.newPhoto({"id":1945222,"src":"4107_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_1945222.html","width":130,"caption":4107.0,"height":195});
															thumbnails[1945227] = clik.newPhoto({"id":1945227,"src":"4176_thumb.jpg","galleries_id":125293,"server_id":1,"link":"photo_1945227.html","width":130,"caption":4176.0,"height":195});
															thumbnails[1945232] = clik.newPhoto({"id":1945232,"src":"5307_thumb.jpg","galleries_id":125293,"server_id":1,"link":"photo_1945232.html","width":130,"caption":5307.0,"height":195});
															thumbnails[1945240] = clik.newPhoto({"id":1945240,"src":"18526_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_1945240.html","width":130,"caption":18526.0,"height":171});
															thumbnails[1945247] = clik.newPhoto({"id":1945247,"src":"18546-img_4820-crop_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_1945247.html","width":130,"caption":18546.0,"height":84});
															thumbnails[1945250] = clik.newPhoto({"id":1945250,"src":"18547_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_1945250.html","width":130,"caption":18547.0,"height":310});
															thumbnails[1945252] = clik.newPhoto({"id":1945252,"src":"18557-img_4070-crop_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_1945252.html","width":130,"caption":"18557<br>\r\n","height":168});
															thumbnails[1945256] = clik.newPhoto({"id":1945256,"src":"18560-18562-img_4309-crop1_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_1945256.html","width":130,"caption":18562.0,"height":168});
															thumbnails[1945269] = clik.newPhoto({"id":1945269,"src":"18774_Sitting_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_1945269.html","width":130,"caption":18774.0,"height":165});
															thumbnails[1945271] = clik.newPhoto({"id":1945271,"src":"18779_Sitting1_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_1945271.html","width":130,"caption":18779.0,"height":165});
															thumbnails[1945273] = clik.newPhoto({"id":1945273,"src":"18782_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_1945273.html","width":130,"caption":18782.0,"height":165});
															thumbnails[1945275] = clik.newPhoto({"id":1945275,"src":"187831_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_1945275.html","width":130,"caption":18783.0,"height":165});
															thumbnails[1945277] = clik.newPhoto({"id":1945277,"src":"ML5407_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_1945277.html","width":130,"caption":"5407- previously worn sale price £60","height":168});
															thumbnails[1945278] = clik.newPhoto({"id":1945278,"src":"ML5701_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_1945278.html","width":130,"caption":5701.0,"height":167});
															thumbnails[1945288] = clik.newPhoto({"id":1945288,"src":"ML5703_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945288.html","width":130,"caption":5703.0,"height":163});
															thumbnails[1945289] = clik.newPhoto({"id":1945289,"src":"ML5705_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945289.html","width":130,"caption":5705.0,"height":163});
															thumbnails[1945292] = clik.newPhoto({"id":1945292,"src":"ML5712_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945292.html","width":130,"caption":5712.0,"height":173});
															thumbnails[1945297] = clik.newPhoto({"id":1945297,"src":"ML5726_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945297.html","width":130,"caption":5726.0,"height":167});
															thumbnails[1945300] = clik.newPhoto({"id":1945300,"src":"ML5729_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945300.html","width":130,"caption":5729.0,"height":163});
															thumbnails[1945302] = clik.newPhoto({"id":1945302,"src":"ML5732_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945302.html","width":130,"caption":5732.0,"height":167});
															thumbnails[1945307] = clik.newPhoto({"id":1945307,"src":"ML5738_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945307.html","width":130,"caption":5738.0,"height":164});
															thumbnails[1945320] = clik.newPhoto({"id":1945320,"src":"ML5747_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945320.html","width":130,"caption":5747.0,"height":172});
															thumbnails[1945323] = clik.newPhoto({"id":1945323,"src":"ML5750_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945323.html","width":130,"caption":5750.0,"height":166});
															thumbnails[1945327] = clik.newPhoto({"id":1945327,"src":"ML5753_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945327.html","width":130,"caption":5753.0,"height":205});
															thumbnails[1945329] = clik.newPhoto({"id":1945329,"src":"ML5754_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945329.html","width":130,"caption":5754.0,"height":164});
															thumbnails[1945335] = clik.newPhoto({"id":1945335,"src":"ML5759_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945335.html","width":130,"caption":5759.0,"height":215});
															thumbnails[1945339] = clik.newPhoto({"id":1945339,"src":"ML5761_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945339.html","width":130,"caption":5761.0,"height":179});
															thumbnails[1945342] = clik.newPhoto({"id":1945342,"src":"ML5764_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945342.html","width":130,"caption":5764.0,"height":167});
															thumbnails[1945344] = clik.newPhoto({"id":1945344,"src":"ML5778_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945344.html","width":130,"caption":5778.0,"height":164});
															thumbnails[1945349] = clik.newPhoto({"id":1945349,"src":"ML5781_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945349.html","width":130,"caption":5781.0,"height":178});
															thumbnails[1945353] = clik.newPhoto({"id":1945353,"src":"ML5793_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945353.html","width":130,"caption":5793.0,"height":176});
															thumbnails[1945357] = clik.newPhoto({"id":1945357,"src":"ML5796_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_1945357.html","width":130,"caption":5796.0,"height":205});
															thumbnails[1945358] = clik.newPhoto({"id":1945358,"src":"TBE1856_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_1945358.html","width":130,"caption":"TBE1856","height":165});
															thumbnails[1945360] = clik.newPhoto({"id":1945360,"src":"TBE1857_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_1945360.html","width":130,"caption":"TBE1857","height":165});
															thumbnails[1945393] = clik.newPhoto({"id":1945393,"src":"18755_187011_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_1945393.html","width":130,"caption":18755.0,"height":84});
															thumbnails[1977970] = clik.newPhoto({"id":1977970,"src":"18515-img_2694-crop1_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_1977970.html","width":130,"caption":18515.0,"height":168});
															thumbnails[1977973] = clik.newPhoto({"id":1977973,"src":"2171_thumb.jpg","galleries_id":125293,"server_id":1,"link":"photo_1977973.html","width":130,"caption":217.0,"height":181});
															thumbnails[1977976] = clik.newPhoto({"id":1977976,"src":"40131_thumb.jpg","galleries_id":125293,"server_id":1,"link":"photo_1977976.html","width":130,"caption":4013.0,"height":181});
															thumbnails[1977980] = clik.newPhoto({"id":1977980,"src":"5310F_thumb.jpg","galleries_id":125293,"server_id":1,"link":"photo_1977980.html","width":130,"caption":5310.0,"height":163});
															thumbnails[2947366] = clik.newPhoto({"id":2947366,"src":"70081_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_2947366.html","width":130,"caption":"","height":228});
															thumbnails[2947367] = clik.newPhoto({"id":2947367,"src":"7058_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_2947367.html","width":130,"caption":"","height":208});
															thumbnails[3129998] = clik.newPhoto({"id":3129998,"src":"2172_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_3129998.html","width":130,"caption":"Fushia size 8 - £80.00 - New - 1 only ","height":181});
															thumbnails[3130086] = clik.newPhoto({"id":3130086,"src":"41022_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_3130086.html","width":130,"caption":"Cherry\/sun dye dress - size 8 - new 1 only £75","height":195});
															thumbnails[3130087] = clik.newPhoto({"id":3130087,"src":"40132_thumb.jpg","galleries_id":191955,"server_id":1,"link":"photo_3130087.html","width":130,"caption":"Lilac - size 8 - worn once £55.","height":181});
															thumbnails[3528601] = clik.newPhoto({"id":3528601,"src":"19509_thumb.jpg","galleries_id":125331,"server_id":1,"link":"photo_3528601.html","width":130,"caption":19509.0,"height":174});
															thumbnails[4709768] = clik.newPhoto({"id":4709768,"src":"8156_thumb.jpg","galleries_id":126310,"server_id":1,"link":"photo_4709768.html","width":130,"caption":"","height":163});
															thumbnails[5417709] = clik.newPhoto({"id":5417709,"src":"20413_thumb.jpg","galleries_id":306127,"server_id":1,"link":"photo_5417709.html","width":130,"caption":"Beautiful Pearl Necklace & Earrings","height":106});
															thumbnails[5430337] = clik.newPhoto({"id":5430337,"src":"20413_2_thumb.jpg","galleries_id":306127,"server_id":1,"link":"photo_5430337.html","width":130,"caption":"Pink Pearl & Diamonte necklace & earrings","height":106});
															thumbnails[5430342] = clik.newPhoto({"id":5430342,"src":"20385_thumb.jpg","galleries_id":306127,"server_id":1,"link":"photo_5430342.html","width":130,"caption":20385.0,"height":106});
															thumbnails[5430351] = clik.newPhoto({"id":5430351,"src":"20414_thumb.jpg","galleries_id":306127,"server_id":1,"link":"photo_5430351.html","width":130,"caption":20414.0,"height":106});
															thumbnails[5430355] = clik.newPhoto({"id":5430355,"src":"20437_thumb.jpg","galleries_id":306127,"server_id":1,"link":"photo_5430355.html","width":130,"caption":20437.0,"height":106});
															thumbnails[5430356] = clik.newPhoto({"id":5430356,"src":"30228_2_thumb.jpg","galleries_id":306127,"server_id":1,"link":"photo_5430356.html","width":130,"caption":30228.0,"height":106});
															thumbnails[5430359] = clik.newPhoto({"id":5430359,"src":"30228_thumb.jpg","galleries_id":306127,"server_id":1,"link":"photo_5430359.html","width":130,"caption":30228.0,"height":106});
															thumbnails[5430370] = clik.newPhoto({"id":5430370,"src":"90225-21_thumb.jpg","galleries_id":306127,"server_id":1,"link":"photo_5430370.html","width":130,"caption":90225.0,"height":106});
															thumbnails[5430379] = clik.newPhoto({"id":5430379,"src":"90230_thumb.jpg","galleries_id":306127,"server_id":1,"link":"photo_5430379.html","width":130,"caption":90230.0,"height":106});
															thumbnails[7427064] = clik.newPhoto({"id":7427064,"src":"S1132A1_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_7427064.html","width":130,"caption":"Stunning Taffeta Gown in Midnight Blue","height":184});
															thumbnails[7427069] = clik.newPhoto({"id":7427069,"src":"S1439a1_thumb.jpg","galleries_id":360674,"server_id":1,"link":"photo_7427069.html","width":130,"caption":"S1149 Wow Ball Gown!","height":184});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[306127] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Jewellry","link":"gallery_306127.html","maxRecords":0.0,"photoIDs":[5417709.0,5430337.0,5430342.0,5430351.0,5430355.0,5430356.0,5430359.0,5430370.0,5430379.0],"skipIndex":0,"section_code":"gallery","featured_images":5430379.0,"id":306127,"singleSection":false});				  						galleries[125331] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mon-Cheri","link":"gallery_125331.html","maxRecords":0.0,"photoIDs":[3528596.0,6574482.0,6574486.0,6574495.0,6574504.0,6574545.0,6574561.0,6567637.0,6567664.0,6567672.0,6567707.0,6563042.0,1945247.0,1945250.0,1945252.0,1945256.0,1945269.0,1945271.0,1945273.0,1945358.0,1945393.0,3528601.0],"skipIndex":0,"section_code":"gallery","featured_images":"6574495,1945271","id":125331,"singleSection":false});				  						galleries[191955] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sale \/ Clearance","link":"gallery_191955.html","maxRecords":0.0,"photoIDs":[6567607.0,1945222.0,1945240.0,1945275.0,1945277.0,1945278.0,1945360.0,1977970.0,3129998.0,3130086.0,3130087.0],"skipIndex":0,"section_code":"gallery","featured_images":1945240.0,"id":191955,"singleSection":false});				  						galleries[360674] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scarlett","link":"gallery_360674.html","maxRecords":0.0,"photoIDs":[8611942.0,8611945.0,8611948.0,8611950.0,8611953.0,8611956.0,8611963.0,8175869.0,7427060.0,6972520.0,6903091.0,6669086.0,6669355.0,6669406.0,6669538.0,6574581.0,7427064.0,7427069.0],"skipIndex":0,"section_code":"gallery","featured_images":7427060.0,"id":360674,"singleSection":false});				  						galleries[126310] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mori-Lee","link":"gallery_126310.html","maxRecords":0.0,"photoIDs":[1945288.0,1945289.0,1945292.0,1945297.0,1945300.0,1945302.0,1945307.0,1945320.0,1945323.0,1945327.0,1945329.0,1945335.0,1945339.0,1945342.0,1945344.0,1945349.0,1945353.0,1945357.0,2947366.0,2947367.0,4709768.0],"skipIndex":0,"section_code":"gallery","featured_images":1945289.0,"id":126310,"singleSection":false});				  						galleries[125293] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Xcite & Impression","link":"gallery_125293.html","maxRecords":0.0,"photoIDs":[1945212.0,1945221.0,1945227.0,1945232.0,1977973.0,1977976.0,1977980.0],"skipIndex":0,"section_code":"gallery","featured_images":1945232.0,"id":125293,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7427069';
imageSets[2] = '7427060,6574495,5430379,1945289,1945271,1945240,1945232';
imageSets[3] = '8611963,8611956,8611953,8611950,8611948,8611945,8611942,8175869,7427069,7427064,7427060,6972520,6903091,6669538,6669406,6669355,6669086,6574581,6574561,6574545,6574504,6574495,6574486,6574482,6567707,6567672,6567664,6567637,6567607,6563042,5430379,5430370,5430359,5430356,5430355,5430351,5430342,5430337,5417709,4709768,3528601,3528596,3130087,3130086,3129998,2947367,2947366,1977980,1977976,1977973';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Gwyneth/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Gwyneth/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$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 = 'Belle of the Ball: ' + 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>';
	}
				
				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>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		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 += '<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;
	}
}

			

