window.thumbnails = {};
															thumbnails[3275208] = clik.newPhoto({"id":3275208,"src":"CoolReef_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_3275208.html","width":130,"caption":"Cool Reef","height":98});
															thumbnails[3277899] = clik.newPhoto({"id":3277899,"src":"ChillyS1_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_3277899.html","width":130,"caption":"Chilly Spice","height":98});
															thumbnails[3709411] = clik.newPhoto({"id":3709411,"src":"opal4_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_3709411.html","width":130,"caption":"Pebble Beach","height":98});
															thumbnails[3731739] = clik.newPhoto({"id":3731739,"src":"lapis1_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_3731739.html","width":130,"caption":"Cleo","height":145});
															thumbnails[3757219] = clik.newPhoto({"id":3757219,"src":"ametrine_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_3757219.html","width":130,"caption":"Flora","height":98});
															thumbnails[3773659] = clik.newPhoto({"id":3773659,"src":"heart1_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_3773659.html","width":130,"caption":"Sweetheart","height":132});
															thumbnails[3868458] = clik.newPhoto({"id":3868458,"src":"peach1_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_3868458.html","width":130,"caption":"Peach Parfait","height":134});
															thumbnails[4382839] = clik.newPhoto({"id":4382839,"src":"grey_white_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_4382839.html","width":130,"caption":"Moods","height":98});
															thumbnails[4470096] = clik.newPhoto({"id":4470096,"src":"agate_pendant_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_4470096.html","width":130,"caption":"Will O' the Wisp","height":126});
															thumbnails[4499355] = clik.newPhoto({"id":4499355,"src":"ash_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_4499355.html","width":130,"caption":"Chameleon","height":114});
															thumbnails[4845363] = clik.newPhoto({"id":4845363,"src":"grey17_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_4845363.html","width":130,"caption":"Chocolate Box","height":119});
															thumbnails[5128228] = clik.newPhoto({"id":5128228,"src":"six1_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_5128228.html","width":130,"caption":"Black Heart","height":152});
															thumbnails[5128244] = clik.newPhoto({"id":5128244,"src":"six5_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_5128244.html","width":130,"caption":"Blaise","height":149});
															thumbnails[5899742] = clik.newPhoto({"id":5899742,"src":"amethn_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_5899742.html","width":130,"caption":"Shady Lady","height":109});
															thumbnails[6187221] = clik.newPhoto({"id":6187221,"src":"fossil_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_6187221.html","width":130,"caption":"Terra","height":131});
															thumbnails[6187462] = clik.newPhoto({"id":6187462,"src":"pearl_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_6187462.html","width":130,"caption":"Cleo","height":110});
															thumbnails[6187480] = clik.newPhoto({"id":6187480,"src":"rose_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_6187480.html","width":130,"caption":"Evening Rose","height":125});
															thumbnails[6468664] = clik.newPhoto({"id":6468664,"src":"te4st_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_6468664.html","width":130,"caption":"Very Green","height":182});
															thumbnails[6674546] = clik.newPhoto({"id":6674546,"src":"berry_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_6674546.html","width":130,"caption":"Berries","height":124});
															thumbnails[6802516] = clik.newPhoto({"id":6802516,"src":"lapis_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_6802516.html","width":130,"caption":"Lapis Lazuli and Chrysocolla","height":184});
															thumbnails[7008115] = clik.newPhoto({"id":7008115,"src":"necklac_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_7008115.html","width":130,"caption":"Snow Queen","height":133});
															thumbnails[7124232] = clik.newPhoto({"id":7124232,"src":"two_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_7124232.html","width":130,"caption":"Ice Cube","height":119});
															thumbnails[7372499] = clik.newPhoto({"id":7372499,"src":"blue_thumb.JPG","galleries_id":333133,"server_id":15,"link":"photo_7372499.html","width":130,"caption":"Shattukite Turquoise","height":203});
															thumbnails[7372517] = clik.newPhoto({"id":7372517,"src":"sand_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_7372517.html","width":130,"caption":"Amazon Valley Jasper","height":224});
															thumbnails[7867875] = clik.newPhoto({"id":7867875,"src":"DSCF3767_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_7867875.html","width":130,"caption":"Flourish","height":117});
															thumbnails[7905898] = clik.newPhoto({"id":7905898,"src":"disaster_thumb.JPG","galleries_id":333133,"server_id":15,"link":"photo_7905898.html","width":130,"caption":"Disaster Peak Jasper","height":180});
															thumbnails[7905929] = clik.newPhoto({"id":7905929,"src":"tree_thumb.jpg","galleries_id":333133,"server_id":15,"link":"photo_7905929.html","width":130,"caption":"Petrified Wood","height":159});
															thumbnails[8173898] = clik.newPhoto({"id":8173898,"src":"rjasp_thumb.jpg","galleries_id":333133,"server_id":15,"link":"photo_8173898.html","width":130,"caption":"Red Snakeskin Jasper","height":183});
															thumbnails[8173919] = clik.newPhoto({"id":8173919,"src":"ag_thumb.JPG","galleries_id":333133,"server_id":15,"link":"photo_8173919.html","width":130,"caption":"Crystal Agate","height":197});
															thumbnails[8180006] = clik.newPhoto({"id":8180006,"src":"DSCF3633_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_8180006.html","width":130,"caption":"Domino","height":146});
															thumbnails[8224906] = clik.newPhoto({"id":8224906,"src":"DSCF3896_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_8224906.html","width":130,"caption":"Black Lace Agate","height":161});
															thumbnails[8224908] = clik.newPhoto({"id":8224908,"src":"DSCF3897_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_8224908.html","width":130,"caption":"Tiger Iron","height":160});
															thumbnails[8297293] = clik.newPhoto({"id":8297293,"src":"DSCF38911_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_8297293.html","width":130,"caption":"Amour","height":122});
															thumbnails[8297299] = clik.newPhoto({"id":8297299,"src":"lemon_3_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_8297299.html","width":130,"caption":"Citron","height":139});
															thumbnails[9041815] = clik.newPhoto({"id":9041815,"src":"DSCF4178_thumb.JPG","galleries_id":333133,"server_id":15,"link":"photo_9041815.html","width":130,"caption":"Charming","height":205});
															thumbnails[9042062] = clik.newPhoto({"id":9042062,"src":"DSCF4184_thumb.JPG","galleries_id":333133,"server_id":15,"link":"photo_9042062.html","width":130,"caption":"Flame Jasper","height":142});
															thumbnails[9042098] = clik.newPhoto({"id":9042098,"src":"DSCF41821_thumb.JPG","galleries_id":333133,"server_id":15,"link":"photo_9042098.html","width":130,"caption":"Imperial Jasper","height":155});
															thumbnails[9042104] = clik.newPhoto({"id":9042104,"src":"DSCF41831_thumb.JPG","galleries_id":333133,"server_id":15,"link":"photo_9042104.html","width":130,"caption":"Succor Creek Jasper","height":145});
															thumbnails[5673022] = clik.newPhoto({"id":5673022,"src":"pop10_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_5673022.html","width":130,"caption":"Primavera","height":149});
															thumbnails[5502841] = clik.newPhoto({"id":5502841,"src":"cube1_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_5502841.html","width":130,"caption":"Decadence","height":120});
															thumbnails[9042126] = clik.newPhoto({"id":9042126,"src":"DSCF3762_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9042126.html","width":130,"caption":"Purple Rose","height":127});
															thumbnails[9042129] = clik.newPhoto({"id":9042129,"src":"DSCF4181_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9042129.html","width":130,"caption":"Purple Velvet","height":185});
															thumbnails[9042118] = clik.newPhoto({"id":9042118,"src":"DSCF4177_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9042118.html","width":130,"caption":"Rondo","height":150});
															thumbnails[6674528] = clik.newPhoto({"id":6674528,"src":"orangey_thumb.JPG","galleries_id":199683,"server_id":15,"link":"photo_6674528.html","width":130,"caption":"Vermilion","height":92});
															thumbnails[9042030] = clik.newPhoto({"id":9042030,"src":"DSCF4155_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9042030.html","width":130,"caption":"Aura","height":96});
															thumbnails[9042023] = clik.newPhoto({"id":9042023,"src":"DSCF4156_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9042023.html","width":130,"caption":"Aura Bracelet","height":92});
															thumbnails[9042022] = clik.newPhoto({"id":9042022,"src":"DSCF4158_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9042022.html","width":130,"caption":"Aura Earrings","height":172});
															thumbnails[9041978] = clik.newPhoto({"id":9041978,"src":"DSCF4159_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041978.html","width":130,"caption":"Peachy Keen","height":121});
															thumbnails[9041966] = clik.newPhoto({"id":9041966,"src":"DSCF4160_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041966.html","width":130,"caption":"Leaf","height":125});
															thumbnails[9041953] = clik.newPhoto({"id":9041953,"src":"DSCF4161_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041953.html","width":130,"caption":"Royale","height":131});
															thumbnails[9041932] = clik.newPhoto({"id":9041932,"src":"DSCF4164_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041932.html","width":130,"caption":"Black Fire","height":116});
															thumbnails[9041930] = clik.newPhoto({"id":9041930,"src":"DSCF4165_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041930.html","width":130,"caption":"Black Fire Bracelet","height":115});
															thumbnails[9041924] = clik.newPhoto({"id":9041924,"src":"DSCF4180_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041924.html","width":130,"caption":"Belle","height":158});
															thumbnails[9041906] = clik.newPhoto({"id":9041906,"src":"DSCF4170_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041906.html","width":130,"caption":"Golden Heart","height":113});
															thumbnails[9041904] = clik.newPhoto({"id":9041904,"src":"DSCF4171_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041904.html","width":130,"caption":"Golden Heart Bracelet","height":124});
															thumbnails[9041899] = clik.newPhoto({"id":9041899,"src":"DSCF4172_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041899.html","width":130,"caption":"Golden Heart Earrings","height":131});
															thumbnails[9041892] = clik.newPhoto({"id":9041892,"src":"DSCF4173_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041892.html","width":130,"caption":"Lagoon","height":156});
															thumbnails[9041879] = clik.newPhoto({"id":9041879,"src":"DSCF4179_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041879.html","width":130,"caption":"Crackle","height":218});
															thumbnails[9041849] = clik.newPhoto({"id":9041849,"src":"DSCF4175_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041849.html","width":130,"caption":"Pure","height":118});
															thumbnails[9041873] = clik.newPhoto({"id":9041873,"src":"DSCF4176_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_9041873.html","width":130,"caption":"Pure Earrings","height":203});
															thumbnails[5406181] = clik.newPhoto({"id":5406181,"src":"web1_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_5406181.html","width":130,"caption":"Sugar","height":123});
															thumbnails[6187290] = clik.newPhoto({"id":6187290,"src":"moong_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_6187290.html","width":130,"caption":"Moonglow","height":121});
															thumbnails[7905906] = clik.newPhoto({"id":7905906,"src":"how_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_7905906.html","width":130,"caption":"Beauty","height":138});
															thumbnails[7905911] = clik.newPhoto({"id":7905911,"src":"pinkn_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_7905911.html","width":130,"caption":"Perle","height":111});
															thumbnails[7905926] = clik.newPhoto({"id":7905926,"src":"pearle_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_7905926.html","width":130,"caption":"Perle Earrings","height":141});
															thumbnails[8285775] = clik.newPhoto({"id":8285775,"src":"DSCF3753_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8285775.html","width":130,"caption":"Blue Moon","height":100});
															thumbnails[7870874] = clik.newPhoto({"id":7870874,"src":"DSCF3777_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_7870874.html","width":130,"caption":"Blue Skies","height":98});
															thumbnails[3275329] = clik.newPhoto({"id":3275329,"src":"rope_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_3275329.html","width":130,"caption":"Plant Life","height":159});
															thumbnails[8180285] = clik.newPhoto({"id":8180285,"src":"kamba_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8180285.html","width":130,"caption":"Galaxy Earrings","height":160});
															thumbnails[8179745] = clik.newPhoto({"id":8179745,"src":"DSCF36692_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8179745.html","width":130,"caption":"Pineapple","height":99});
															thumbnails[8180035] = clik.newPhoto({"id":8180035,"src":"discear_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_8180035.html","width":130,"caption":"Disco Earrings","height":135});
															thumbnails[8180189] = clik.newPhoto({"id":8180189,"src":"worlds_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8180189.html","width":130,"caption":"Worlds","height":128});
															thumbnails[8180200] = clik.newPhoto({"id":8180200,"src":"worldear_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8180200.html","width":130,"caption":"Worlds Earrings","height":170});
															thumbnails[5673242] = clik.newPhoto({"id":5673242,"src":"pop17_thumb.jpg","galleries_id":199683,"server_id":15,"link":"photo_5673242.html","width":130,"caption":"Gilda","height":113});
															thumbnails[8180206] = clik.newPhoto({"id":8180206,"src":"jet_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_8180206.html","width":130,"caption":"Jet Earrings","height":98});
															thumbnails[8224833] = clik.newPhoto({"id":8224833,"src":"DSCF3902_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8224833.html","width":130,"caption":"Crocus Earrings","height":178});
															thumbnails[8224832] = clik.newPhoto({"id":8224832,"src":"DSCF3894_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8224832.html","width":130,"caption":"Nile","height":106});
															thumbnails[8224829] = clik.newPhoto({"id":8224829,"src":"DSCF3905_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8224829.html","width":130,"caption":"Dark Gold Earrings","height":188});
															thumbnails[8224827] = clik.newPhoto({"id":8224827,"src":"DSCF3895_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8224827.html","width":130,"caption":"Globe","height":119});
															thumbnails[8224823] = clik.newPhoto({"id":8224823,"src":"DSCF3906_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_8224823.html","width":130,"caption":"Clay Earrings","height":230});
															thumbnails[6674629] = clik.newPhoto({"id":6674629,"src":"purple_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_6674629.html","width":130,"caption":"Precious","height":113});
															thumbnails[7903693] = clik.newPhoto({"id":7903693,"src":"DSCF36461_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_7903693.html","width":130,"caption":"Bubbles","height":153});
															thumbnails[7903705] = clik.newPhoto({"id":7903705,"src":"DSCF36491_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_7903705.html","width":130,"caption":"Bubbles Earrings","height":191});
															thumbnails[7700334] = clik.newPhoto({"id":7700334,"src":"greenn_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_7700334.html","width":130,"caption":"Deco","height":116});
															thumbnails[7700667] = clik.newPhoto({"id":7700667,"src":"opalb_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_7700667.html","width":130,"caption":"Deco Bracelet","height":127});
															thumbnails[7700682] = clik.newPhoto({"id":7700682,"src":"opale_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_7700682.html","width":130,"caption":"Deco Earrings","height":142});
															thumbnails[7905901] = clik.newPhoto({"id":7905901,"src":"grape_thumb.JPG","galleries_id":279507,"server_id":15,"link":"photo_7905901.html","width":130,"caption":"Merlot","height":151});
															thumbnails[6187505] = clik.newPhoto({"id":6187505,"src":"trio_thumb.jpg","galleries_id":279507,"server_id":15,"link":"photo_6187505.html","width":130,"caption":"Garland","height":127});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[279507] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Jewel Box","link":"gallery_279507.html","maxRecords":0.0,"photoIDs":[9042126.0,9042129.0,9042118.0,9042030.0,9042023.0,9042022.0,9041978.0,9041966.0,9041953.0,9041932.0,9041930.0,9041924.0,9041906.0,9041904.0,9041899.0,9041892.0,9041879.0,9041849.0,9041873.0,7905906.0,7905911.0,7905926.0,8285775.0,7870874.0,3275329.0,8180285.0,8179745.0,8180035.0,8180189.0,8180200.0,8180206.0,8224833.0,8224832.0,8224829.0,8224827.0,8224823.0,6674629.0,7903693.0,7903705.0,7700334.0,7700667.0,7700682.0,7905901.0,6187505.0],"skipIndex":0,"section_code":"gallery","featured_images":9042118.0,"id":279507,"singleSection":false});				  						galleries[333133] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Beautiful Pendants","link":"gallery_333133.html","maxRecords":0.0,"photoIDs":[7372499.0,7905898.0,7905929.0,8173898.0,8173919.0,9041815.0,9042062.0,9042098.0,9042104.0],"skipIndex":0,"section_code":"gallery","featured_images":"9042104,9042098,9042062,9041815,8173919,8173898,7905929,7905898,7372499","id":333133,"singleSection":false});				  						galleries[199683] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery ","link":"gallery_199683.html","maxRecords":0.0,"photoIDs":[3275208.0,3277899.0,3709411.0,3731739.0,3757219.0,3773659.0,3868458.0,4382839.0,4470096.0,4499355.0,4845363.0,5128228.0,5128244.0,5899742.0,6187221.0,6187462.0,6187480.0,6468664.0,6674546.0,6802516.0,7008115.0,7124232.0,7372517.0,7867875.0,8180006.0,8224906.0,8224908.0,8297293.0,8297299.0,5673022.0,5502841.0,6674528.0,5406181.0,6187290.0,5673242.0],"skipIndex":0,"section_code":"gallery","featured_images":"8297299,8297293,8224908,8224906,8180006,7867875,7372517,7124232,7008115,6802516","id":199683,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9042104,9042098,9042062,9041815,8297299,8297293,8224908,8224906,8180006,8173919,8173898,7905929,7905898,7867875,7372517,7372499,7124232,7008115,6802516,6674546,6468664,5899742,9042126,9042129,9042118,9042030,6674528,9042023,9042022,9041978,9041966,9041953,9041932,9041930,9041924,9041906,9041904,9041899,9041892,9041879,9041849,9041873,7905906,6187290,7905911,7905926,8285775,7870874,3275329,8180285,8179745,8180035,8180189,8180200,8180206,8224833,8224832,8224829,8224827,8224823,6674629,7903693,7903705,7700334,7700667,7700682,7905901,6187505';
imageSets[2] = '9042118';
imageSets[3] = '9042129,9042126,9042118,9042104,9042098,9042062,9042030,9042023,9042022,9041978,9041966,9041953,9041932,9041930,9041924,9041906,9041904,9041899,9041892,9041879,9041873,9041849,9041815,8297299,8297293,8285775,8224908,8224906,8224833,8224832,8224829,8224827,8224823,8180285,8180206,8180200,8180189,8180035,8180006,8179745,8173919,8173898,7905929,7905926,7905911,7905906,7905901,7905898,7903705,7903693';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/lainie/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/lainie/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/lainie/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/lainie/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/lainie/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/lainie/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/lainie/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/lainie/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 = 'Stone Garland: ' + 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.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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		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 += '<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="LAINIE">';
			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;
	}
}

			

