window.thumbnails = {};
															thumbnails[1470906] = clik.newPhoto({"id":1470906,"src":"guestbook_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":103});
															thumbnails[794524] = clik.newPhoto({"id":794524,"src":"paint001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"\"Blend\"","height":183});
															thumbnails[878680] = clik.newPhoto({"id":878680,"src":"Bryan01_thumb.JPG","galleries_id":67361,"server_id":1,"link":"photo_878680.html","width":130,"caption":"Bryan","height":175});
															thumbnails[1517061] = clik.newPhoto({"id":1517061,"src":"statue1 043_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1517061.html","width":130,"caption":"Peaceful Slumber. ","height":114});
															thumbnails[1533678] = clik.newPhoto({"id":1533678,"src":"statue1 042_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1533678.html","width":130,"caption":"<strong>Pillow talk<strong\/>","height":88});
															thumbnails[1577344] = clik.newPhoto({"id":1577344,"src":"016 (2)_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1577344.html","width":130,"caption":"Repose","height":107});
															thumbnails[1584733] = clik.newPhoto({"id":1584733,"src":"038_thumb.JPG","galleries_id":46879,"server_id":1,"link":"photo_1584733.html","width":130,"caption":"<strong>Firelight Comfort<strong\/>","height":173});
															thumbnails[611406] = clik.newPhoto({"id":611406,"src":"tide_thumb.JPG","galleries_id":46879,"server_id":1,"link":"photo_611406.html","width":130,"caption":"<strong> Time n' Tide <strong\/>","height":173});
															thumbnails[611459] = clik.newPhoto({"id":611459,"src":"cashtal01_thumb.JPG","galleries_id":46898,"server_id":1,"link":"photo_611459.html","width":130,"caption":"Cashtal yn Ard","height":91});
															thumbnails[612075] = clik.newPhoto({"id":612075,"src":"Mojave sunsett_thumb.JPG","galleries_id":46916,"server_id":1,"link":"photo_612075.html","width":130,"caption":"Mojave Sunset","height":92});
															thumbnails[611428] = clik.newPhoto({"id":611428,"src":"cacti_en_thumb.JPG","galleries_id":46896,"server_id":1,"link":"photo_611428.html","width":130,"caption":"Prickly Pear","height":176});
															thumbnails[611528] = clik.newPhoto({"id":611528,"src":"cashtal02_thumb.JPG","galleries_id":46898,"server_id":1,"link":"photo_611528.html","width":130,"caption":"Cashtal yn Ard (blue)","height":86});
															thumbnails[612380] = clik.newPhoto({"id":612380,"src":"Son_thumb.JPG","galleries_id":46896,"server_id":1,"link":"photo_612380.html","width":130,"caption":"Matt.","height":184});
															thumbnails[613039] = clik.newPhoto({"id":613039,"src":"Desert sand_thumb.JPG","galleries_id":46916,"server_id":1,"link":"photo_613039.html","width":130,"caption":"PHOTOGRAPHY...Desert footprints","height":200});
															thumbnails[619937] = clik.newPhoto({"id":619937,"src":"Image-04_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_619937.html","width":130,"caption":"Childhood recalled.","height":138});
															thumbnails[622315] = clik.newPhoto({"id":622315,"src":"Peel01_thumb.jpg","galleries_id":46916,"server_id":1,"link":"photo_622315.html","width":130,"caption":"Waiting","height":173});
															thumbnails[612376] = clik.newPhoto({"id":612376,"src":"Teddy_thumb.JPG","galleries_id":46879,"server_id":1,"link":"photo_612376.html","width":130,"caption":"Love-worn.","height":173});
															thumbnails[614875] = clik.newPhoto({"id":614875,"src":"havenoefear en_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_614875.html","width":130,"caption":"Have No Fear.","height":163});
															thumbnails[624410] = clik.newPhoto({"id":624410,"src":"Image-08_thumb.JPG","galleries_id":46901,"server_id":1,"link":"photo_624410.html","width":130,"caption":"<strong>My Space<\/strong>","height":200});
															thumbnails[1952074] = clik.newPhoto({"id":1952074,"src":"17032008_thumb.jpg","galleries_id":46901,"server_id":1,"link":"photo_1952074.html","width":130,"caption":"<strong>Earth Angel<strong\/> Half Way there.","height":173});
															thumbnails[612398] = clik.newPhoto({"id":612398,"src":"Colour_Meditaion_thumb.JPG","galleries_id":46879,"server_id":1,"link":"photo_612398.html","width":130,"caption":"Colour Meditation.","height":182});
															thumbnails[613042] = clik.newPhoto({"id":613042,"src":"soul1_thumb.JPG","galleries_id":46879,"server_id":1,"link":"photo_613042.html","width":130,"caption":"Soul Awakening.","height":78});
															thumbnails[2143461] = clik.newPhoto({"id":2143461,"src":"face01_thumb.JPG","galleries_id":46898,"server_id":1,"link":"photo_2143461.html","width":130,"caption":"1st Stage of Painting","height":192});
															thumbnails[2143467] = clik.newPhoto({"id":2143467,"src":"face02_thumb.JPG","galleries_id":46898,"server_id":1,"link":"photo_2143467.html","width":130,"caption":"2nd Stage of painting","height":206});
															thumbnails[640858] = clik.newPhoto({"id":640858,"src":"face03_thumb.JPG","galleries_id":46898,"server_id":1,"link":"photo_640858.html","width":130,"caption":"...  <strong>I AM.<\/strong> last and Final stage of the painting.","height":203});
															thumbnails[5820009] = clik.newPhoto({"id":5820009,"src":"062_thumb.JPG","galleries_id":46901,"server_id":1,"link":"photo_5820009.html","width":130,"caption":"Stillness of Being<br>\r\n 1st stage.","height":179});
															thumbnails[1193045] = clik.newPhoto({"id":1193045,"src":"Portrait_finished_thumb.jpg","galleries_id":46899,"server_id":1,"link":"photo_1193045.html","width":130,"caption":"Watercolour.","height":173});
															thumbnails[5820024] = clik.newPhoto({"id":5820024,"src":"AB02_thumb.jpg","galleries_id":46901,"server_id":1,"link":"photo_5820024.html","width":130,"caption":"Stillness of Being<br>\r\n 2nd Stage.","height":179});
															thumbnails[612359] = clik.newPhoto({"id":612359,"src":"still_waters_thumb.JPG","galleries_id":46879,"server_id":1,"link":"photo_612359.html","width":130,"caption":"Reflective-serenity.","height":169});
															thumbnails[768480] = clik.newPhoto({"id":768480,"src":"Healercropped_thumb.JPG","galleries_id":46896,"server_id":1,"link":"photo_768480.html","width":130,"caption":"<strong>Healer<\/strong>","height":167});
															thumbnails[5820032] = clik.newPhoto({"id":5820032,"src":"AB04_thumb.JPG","galleries_id":46901,"server_id":1,"link":"photo_5820032.html","width":130,"caption":"Stillness of Being<br>\r\n 3rd Stage.","height":176});
															thumbnails[5833806] = clik.newPhoto({"id":5833806,"src":"AB081_thumb.JPG","galleries_id":46901,"server_id":1,"link":"photo_5833806.html","width":130,"caption":"Stillness of Being","height":173});
															thumbnails[624405] = clik.newPhoto({"id":624405,"src":"home j_thumb.jpg","galleries_id":46879,"server_id":1,"link":"photo_624405.html","width":130,"caption":"Homeward Bound.","height":97});
															thumbnails[769323] = clik.newPhoto({"id":769323,"src":"Mum13_thumb.jpg","galleries_id":46879,"server_id":1,"link":"photo_769323.html","width":130,"caption":"\"Celestial Beings\"","height":94});
															thumbnails[624407] = clik.newPhoto({"id":624407,"src":"010_thumb.jpg","galleries_id":46879,"server_id":1,"link":"photo_624407.html","width":130,"caption":"Breaking Free","height":98});
															thumbnails[3950308] = clik.newPhoto({"id":3950308,"src":"mthclik_thumb.jpg","galleries_id":46899,"server_id":1,"link":"photo_3950308.html","width":130,"caption":"Mouth<br>\r\n","height":106});
															thumbnails[3950318] = clik.newPhoto({"id":3950318,"src":"Eye_clik01_thumb.jpg","galleries_id":46899,"server_id":1,"link":"photo_3950318.html","width":130,"caption":"Eye","height":114});
															thumbnails[809883] = clik.newPhoto({"id":809883,"src":"Dollorig_thumb.jpgclik.jpg","galleries_id":46900,"server_id":1,"link":"photo_809883.html","width":130,"caption":"\"Doll's Head\"","height":184});
															thumbnails[873161] = clik.newPhoto({"id":873161,"src":"Sumo2_thumb.JPG","galleries_id":46879,"server_id":1,"link":"photo_873161.html","width":130,"caption":"\"Sumo\"","height":182});
															thumbnails[873894] = clik.newPhoto({"id":873894,"src":"LA01web_thumb.jpg","galleries_id":46916,"server_id":1,"link":"photo_873894.html","width":130,"caption":"\"Leaving LA.\"","height":93});
															thumbnails[873908] = clik.newPhoto({"id":873908,"src":"Oceanside01web_thumb.jpg","galleries_id":46916,"server_id":1,"link":"photo_873908.html","width":130,"caption":"\"Oceanside Surf\"","height":91});
															thumbnails[873916] = clik.newPhoto({"id":873916,"src":"Pelican02web_thumb.jpg","galleries_id":46916,"server_id":1,"link":"photo_873916.html","width":130,"caption":"Oceanside resident.","height":184});
															thumbnails[878691] = clik.newPhoto({"id":878691,"src":"BonJoviSambora_thumb.XX 002.jpg","galleries_id":67361,"server_id":1,"link":"photo_878691.html","width":130,"caption":"Lightening","height":175});
															thumbnails[878694] = clik.newPhoto({"id":878694,"src":"March 015_thumb.jpg","galleries_id":67361,"server_id":1,"link":"photo_878694.html","width":130,"caption":"Air guitar","height":173});
															thumbnails[880472] = clik.newPhoto({"id":880472,"src":"mar_thumb.jpg","galleries_id":46900,"server_id":1,"link":"photo_880472.html","width":130,"caption":"Marilyn","height":175});
															thumbnails[880478] = clik.newPhoto({"id":880478,"src":"mar3_thumb.jpg","galleries_id":46900,"server_id":1,"link":"photo_880478.html","width":130,"caption":"DETAIL :Marilyn.","height":97});
															thumbnails[958940] = clik.newPhoto({"id":958940,"src":"tigger_thumb.jpg","galleries_id":46899,"server_id":1,"link":"photo_958940.html","width":130,"caption":"\"Tigger's friend\"","height":181});
															thumbnails[958955] = clik.newPhoto({"id":958955,"src":"Davidsmate_thumb.jpg","galleries_id":46899,"server_id":1,"link":"photo_958955.html","width":130,"caption":"\"David's mate\"","height":177});
															thumbnails[958984] = clik.newPhoto({"id":958984,"src":"TT_clik_thumb.jpg","galleries_id":46899,"server_id":1,"link":"photo_958984.html","width":130,"caption":"\"TT\" rider.","height":173});
															thumbnails[986534] = clik.newPhoto({"id":986534,"src":"Manequin_014dn1_thumb.jpg","galleries_id":46879,"server_id":1,"link":"photo_986534.html","width":130,"caption":"\"Mannequin's Daydream\"","height":145});
															thumbnails[1516836] = clik.newPhoto({"id":1516836,"src":"statue1 032_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1516836.html","width":130,"caption":"Eye Practice","height":140});
															thumbnails[1193040] = clik.newPhoto({"id":1193040,"src":"pencil_finished_thumb.jpg","galleries_id":46899,"server_id":1,"link":"photo_1193040.html","width":130,"caption":"Pencil 11\"x14\"","height":188});
															thumbnails[1272154] = clik.newPhoto({"id":1272154,"src":"The Ards Weekend 063_thumb.JPG","galleries_id":67361,"server_id":1,"link":"photo_1272154.html","width":130,"caption":"Surrounding Magic.","height":173});
															thumbnails[1505164] = clik.newPhoto({"id":1505164,"src":"028crop (2)_thumb.jpg","galleries_id":46899,"server_id":1,"link":"photo_1505164.html","width":130,"caption":"PENCIL 20\" X 16\"","height":173});
															thumbnails[1444507] = clik.newPhoto({"id":1444507,"src":"Canyon_thumb.jpg","galleries_id":46916,"server_id":1,"link":"photo_1444507.html","width":130,"caption":"CANYON DE CHELLY.","height":98});
															thumbnails[1444510] = clik.newPhoto({"id":1444510,"src":"00023 (2)_thumb.jpg","galleries_id":46916,"server_id":1,"link":"photo_1444510.html","width":130,"caption":"WHITE HOUSE RUINS Canyon De Chelly","height":173});
															thumbnails[1516786] = clik.newPhoto({"id":1516786,"src":"statue1_058_thumb.JPG","galleries_id":46896,"server_id":1,"link":"photo_1516786.html","width":130,"caption":"Time-Out","height":106});
															thumbnails[1947494] = clik.newPhoto({"id":1947494,"src":"Sketch_thumb.jpg","galleries_id":46900,"server_id":1,"link":"photo_1947494.html","width":130,"caption":"A2 approx Sketch in pastel","height":95});
															thumbnails[1516878] = clik.newPhoto({"id":1516878,"src":"034 (2)_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1516878.html","width":130,"caption":"Stretch","height":173});
															thumbnails[2143432] = clik.newPhoto({"id":2143432,"src":"croplast 009 (2)_thumb.JPG","galleries_id":67361,"server_id":1,"link":"photo_2143432.html","width":130,"caption":"LIFESIZE Mural","height":239});
															thumbnails[6616183] = clik.newPhoto({"id":6616183,"src":"afasite_thumb.jpg","galleries_id":46900,"server_id":1,"link":"photo_6616183.html","width":130,"caption":"The Gift","height":178});
															thumbnails[1444570] = clik.newPhoto({"id":1444570,"src":"LosA_thumb.jpg","galleries_id":46916,"server_id":1,"link":"photo_1444570.html","width":130,"caption":"Over LA.","height":98});
															thumbnails[1444582] = clik.newPhoto({"id":1444582,"src":"LAX 02_thumb.jpg","galleries_id":46916,"server_id":1,"link":"photo_1444582.html","width":130,"caption":"<strong>LAX<strong\/>","height":98});
															thumbnails[1516862] = clik.newPhoto({"id":1516862,"src":"Sketch_C29BBA25-1D09-001F-99D99CFCEDE545D2_thumb.jpg","galleries_id":46896,"server_id":1,"link":"photo_1516862.html","width":130,"caption":"Pastel","height":95});
															thumbnails[1895312] = clik.newPhoto({"id":1895312,"src":"OC_thumb.jpg","galleries_id":46896,"server_id":1,"link":"photo_1895312.html","width":130,"caption":"\"CONCENTRATION\"","height":192});
															thumbnails[1193047] = clik.newPhoto({"id":1193047,"src":"Labrador cli_thumb.jpg","galleries_id":46899,"server_id":1,"link":"photo_1193047.html","width":130,"caption":"Labradors.","height":87});
															thumbnails[1516867] = clik.newPhoto({"id":1516867,"src":"statue1 033_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1516867.html","width":130,"caption":"Connected","height":131});
															thumbnails[1514853] = clik.newPhoto({"id":1514853,"src":"007_02_thumb.jpg","galleries_id":46879,"server_id":1,"link":"photo_1514853.html","width":130,"caption":"Misty blue.","height":93});
															thumbnails[1517037] = clik.newPhoto({"id":1517037,"src":"statue1 036_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1517037.html","width":130,"caption":"<strong>Housefly.<strong\/>","height":120});
															thumbnails[1517057] = clik.newPhoto({"id":1517057,"src":"statue1 035_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1517057.html","width":130,"caption":"DETAIL of Housefly.","height":137});
															thumbnails[1534847] = clik.newPhoto({"id":1534847,"src":"009 (4)_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1534847.html","width":130,"caption":"<strong>ONE MINUTE MODEL SKETCH<strong\/>","height":178});
															thumbnails[1534858] = clik.newPhoto({"id":1534858,"src":"0012 (3)_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1534858.html","width":130,"caption":"<strong>ONE MINUTE MODEL SKETCH<strong\/>","height":189});
															thumbnails[1576099] = clik.newPhoto({"id":1576099,"src":"017_-_Copy_thumb.JPG","galleries_id":46896,"server_id":1,"link":"photo_1576099.html","width":130,"caption":"REST","height":173});
															thumbnails[4790013] = clik.newPhoto({"id":4790013,"src":"DSCN2102_onclik_thumb.jpg","galleries_id":329424,"server_id":1,"link":"photo_4790013.html","width":130,"caption":"\"Earth Angel\"","height":166});
															thumbnails[1577397] = clik.newPhoto({"id":1577397,"src":"028_thumb.JPG","galleries_id":46879,"server_id":1,"link":"photo_1577397.html","width":130,"caption":"Innocence.","height":173});
															thumbnails[1577341] = clik.newPhoto({"id":1577341,"src":"statue1 050_thumb.JPG","galleries_id":46900,"server_id":1,"link":"photo_1577341.html","width":130,"caption":"Shiny.","height":173});
															thumbnails[1577387] = clik.newPhoto({"id":1577387,"src":"statue1 055_thumb.JPG","galleries_id":46879,"server_id":1,"link":"photo_1577387.html","width":130,"caption":"Cleavage","height":105});
															thumbnails[6627569] = clik.newPhoto({"id":6627569,"src":"DSCN2454_thumb.JPG","galleries_id":46901,"server_id":1,"link":"photo_6627569.html","width":130,"caption":"Stillness of Being<br>\r\nFINISHED PAINTING<br>\r\n","height":179});
															thumbnails[6627570] = clik.newPhoto({"id":6627570,"src":"DSCN24541_thumb.JPG","galleries_id":46901,"server_id":1,"link":"photo_6627570.html","width":130,"caption":"Stillness of Being<br>\r\nFINISHED PAINTING<br>\r\n","height":179});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[46879] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"<strong>Watercolours.<strong\/>","link":"gallery_46879.html","maxRecords":0.0,"photoIDs":[1584733.0,611406.0,612376.0,612398.0,613042.0,612359.0,624405.0,769323.0,624407.0,873161.0,986534.0,1514853.0,1577397.0,1577387.0],"skipIndex":0,"section_code":"gallery","featured_images":"1584733,1577397,1577387,1514853,986534,873161,769323,624407,624405,613042","id":46879,"singleSection":false});				  						galleries[46896] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"<strong>Pastels and Charcoal<strong\/>","link":"gallery_46896.html","maxRecords":0.0,"photoIDs":[611428.0,612380.0,768480.0,1516786.0,1516862.0,1895312.0,1576099.0],"skipIndex":0,"section_code":"gallery","featured_images":612380.0,"id":46896,"singleSection":false});				  						galleries[46898] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"<strong>Oils.<strong\/>","link":"gallery_46898.html","maxRecords":0.0,"photoIDs":[611459.0,611528.0,2143461.0,2143467.0,640858.0],"skipIndex":0,"section_code":"gallery","featured_images":"2143467,2143461,640858,611528,611459","id":46898,"singleSection":false});				  						galleries[329424] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"<strong>Airbrush and Acrylic<strong>","link":"gallery_329424.html","maxRecords":0.0,"photoIDs":[4790013.0],"skipIndex":0,"section_code":"gallery","featured_images":4790013.0,"id":329424,"singleSection":false});				  						galleries[46899] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"<strong>Commissions.<strong\/>","link":"gallery_46899.html","maxRecords":0.0,"photoIDs":[1193045.0,3950308.0,3950318.0,958940.0,958955.0,958984.0,1193040.0,1505164.0,1193047.0],"skipIndex":0,"section_code":"gallery","featured_images":"3950318,3950308,1505164,1193047,1193045,1193040,958984,958955,958940","id":46899,"singleSection":false});				  						galleries[46900] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"<strong>Sketches and studies.<strong\/>","link":"gallery_46900.html","maxRecords":0.0,"photoIDs":[1517061.0,1533678.0,1577344.0,619937.0,614875.0,809883.0,880472.0,880478.0,1516836.0,1947494.0,1516878.0,6616183.0,1516867.0,1517037.0,1517057.0,1534847.0,1534858.0,1577341.0],"skipIndex":0,"section_code":"gallery","featured_images":1517061.0,"id":46900,"singleSection":false});				  						galleries[46901] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"<strong>Wet Paint<\/strong> ","link":"gallery_46901.html","maxRecords":0.0,"photoIDs":[624410.0,1952074.0,5820009.0,5820024.0,5820032.0,5833806.0,6627569.0,6627570.0],"skipIndex":0,"section_code":"gallery","featured_images":"6627570,6627569,5833806,5820032,5820024,5820009,1952074,624410","id":46901,"singleSection":false});				  						galleries[46916] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"<strong>Photography.<strong\/>","link":"gallery_46916.html","maxRecords":0.0,"photoIDs":[612075.0,613039.0,622315.0,873894.0,873908.0,873916.0,1444507.0,1444510.0,1444570.0,1444582.0],"skipIndex":0,"section_code":"gallery","featured_images":"1444582,1444570,1444510,1444507,873916,873908,873894,622315,613039,612075","id":46916,"singleSection":false});				  						galleries[67361] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"<strong>MURALS<strong\/>","link":"gallery_67361.html","maxRecords":0.0,"photoIDs":[878680.0,878691.0,878694.0,1272154.0,2143432.0],"skipIndex":0,"section_code":"gallery","featured_images":878691.0,"id":67361,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '611406,612398,2143461,2143467,640858,612359,880478,958984,1193047';
imageSets[2] = '1517061,1470906,612380,878691';
imageSets[3] = '6627570,6627569,6616183,5833806,5820032,5820024,5820009,4790013,3950318,3950308,2143467,2143461,2143432,1952074,1947494,1895312,1584733,1577397,1577387,1577344,1577341,1576099,1534858,1534847,1533678,1517061,1517057,1517037,1516878,1516867,1516862,1516836,1516786,1514853,1505164,1470906,1444582,1444570,1444510,1444507,1272154,1193047,1193045,1193040,986534,958984,958955,958940,880478,880472';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jangell/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jangell/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jangell/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jangell/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jangell/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/jangell/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jangell/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jangell/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 = 'Janice Gell Paintings: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Artist </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="JANGELL">';
			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;
	}
}

			

