window.thumbnails = {};
															thumbnails[1765725] = clik.newPhoto({"id":1765725,"src":"IMG_1441_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_1765725.html","width":130,"caption":"","height":173});
															thumbnails[1765803] = clik.newPhoto({"id":1765803,"src":"DSCN0616_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_1765803.html","width":130,"caption":"Himalayan Ranges","height":173});
															thumbnails[1765810] = clik.newPhoto({"id":1765810,"src":"DSCN0684_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_1765810.html","width":130,"caption":"Himalayan Ranges","height":173});
															thumbnails[1765817] = clik.newPhoto({"id":1765817,"src":"DSCN0712_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_1765817.html","width":130,"caption":"Indus River, Ladakh, India","height":173});
															thumbnails[1765822] = clik.newPhoto({"id":1765822,"src":"Moon light in Ley_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_1765822.html","width":130,"caption":"View from my room, Ley, Ladakh","height":173});
															thumbnails[1776374] = clik.newPhoto({"id":1776374,"src":"Monks_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_1776374.html","width":130,"caption":"Angkor Wat, Cambodia","height":173});
															thumbnails[1797033] = clik.newPhoto({"id":1797033,"src":"test1_1_thumb.jpg","galleries_id":118650,"server_id":1,"link":"photo_1797033.html","width":130,"caption":"Uluru, Australia","height":173});
															thumbnails[1797035] = clik.newPhoto({"id":1797035,"src":"Resize Wizard-1_thumb.jpg","galleries_id":118650,"server_id":1,"link":"photo_1797035.html","width":130,"caption":"Uluru, Australia","height":173});
															thumbnails[1797038] = clik.newPhoto({"id":1797038,"src":"Bondi Beauty2_thumb.jpg","galleries_id":118650,"server_id":1,"link":"photo_1797038.html","width":130,"caption":"Bondi Beach, Australia","height":173});
															thumbnails[2074174] = clik.newPhoto({"id":2074174,"src":"DSCN1568_thumb.JPG","galleries_id":154668,"server_id":1,"link":"photo_2074174.html","width":130,"caption":"Ocean's Serenade","height":171});
															thumbnails[2277969] = clik.newPhoto({"id":2277969,"src":"Web21_thumb.JPG","galleries_id":154668,"server_id":1,"link":"photo_2277969.html","width":130,"caption":"Chaing Mai Sunset (2)","height":100});
															thumbnails[2974349] = clik.newPhoto({"id":2974349,"src":"1_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_2974349.html","width":130,"caption":"God's Creation (Sold)","height":130});
															thumbnails[5417437] = clik.newPhoto({"id":5417437,"src":"Dr_Rapleys_Peice1_thumb.jpg","galleries_id":323726,"server_id":1,"link":"photo_5417437.html","width":130,"caption":"","height":155});
															thumbnails[5417712] = clik.newPhoto({"id":5417712,"src":"Captured_2009-12-17_00015_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_5417712.html","width":130,"caption":"Machu Picchu Peru","height":173});
															thumbnails[5715498] = clik.newPhoto({"id":5715498,"src":"Commission_thumb.jpg","galleries_id":323726,"server_id":1,"link":"photo_5715498.html","width":130,"caption":"","height":98});
															thumbnails[5926560] = clik.newPhoto({"id":5926560,"src":"Situ2_thumb.JPG","galleries_id":323726,"server_id":1,"link":"photo_5926560.html","width":130,"caption":"","height":173});
															thumbnails[6781459] = clik.newPhoto({"id":6781459,"src":"New2_thumb.jpg","galleries_id":20891,"server_id":1,"link":"photo_6781459.html","width":130,"caption":"Sandy Shore","height":128});
															thumbnails[6781476] = clik.newPhoto({"id":6781476,"src":"New3_thumb.jpg","galleries_id":20891,"server_id":1,"link":"photo_6781476.html","width":130,"caption":"Through the Rushes","height":127});
															thumbnails[6781702] = clik.newPhoto({"id":6781702,"src":"New4_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_6781702.html","width":130,"caption":"Breaking Through","height":130});
															thumbnails[6946407] = clik.newPhoto({"id":6946407,"src":"Captured_2010-10-23_00000_thumb.JPG","galleries_id":41820,"server_id":1,"link":"photo_6946407.html","width":130,"caption":"Ocean Chill","height":130});
															thumbnails[6946521] = clik.newPhoto({"id":6946521,"src":"Captured_2010-10-23_00012_thumb.JPG","galleries_id":41820,"server_id":1,"link":"photo_6946521.html","width":130,"caption":"Clearing Skies","height":121});
															thumbnails[7288024] = clik.newPhoto({"id":7288024,"src":"Cadiz_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_7288024.html","width":130,"caption":"Cadiz Spain","height":173});
															thumbnails[8894783] = clik.newPhoto({"id":8894783,"src":"Iconic_London_2_thumb.JPG","galleries_id":154668,"server_id":1,"link":"photo_8894783.html","width":130,"caption":"Iconic London No.2","height":47});
															thumbnails[8894791] = clik.newPhoto({"id":8894791,"src":"Iconic_London_thumb.JPG","galleries_id":154668,"server_id":1,"link":"photo_8894791.html","width":130,"caption":"Iconic London No.1","height":65});
															thumbnails[236898] = clik.newPhoto({"id":236898,"src":"Painting_2barb1_thumb.jpg","galleries_id":154668,"server_id":1,"link":"photo_236898.html","width":130,"caption":"","height":210});
															thumbnails[537668] = clik.newPhoto({"id":537668,"src":"artwork trans1 010_thumb.jpg","galleries_id":41820,"server_id":1,"link":"photo_537668.html","width":130,"caption":"Out of the Shadows","height":172});
															thumbnails[702312] = clik.newPhoto({"id":702312,"src":"New Horizon_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_702312.html","width":130,"caption":"New Horizons Sold)","height":173});
															thumbnails[6522920] = clik.newPhoto({"id":6522920,"src":"Dads_Birthday_033_thumb.jpg","galleries_id":20891,"server_id":1,"link":"photo_6522920.html","width":130,"caption":"Restful Shore","height":132});
															thumbnails[236899] = clik.newPhoto({"id":236899,"src":"Painting1Barb_thumb.jpg","galleries_id":154668,"server_id":1,"link":"photo_236899.html","width":130,"caption":"Evening Lake","height":211});
															thumbnails[242130] = clik.newPhoto({"id":242130,"src":"IMG_0860_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_242130.html","width":130,"caption":"The Crossing","height":171});
															thumbnails[346850] = clik.newPhoto({"id":346850,"src":"Surrender_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_346850.html","width":130,"caption":"Surrender","height":130});
															thumbnails[537760] = clik.newPhoto({"id":537760,"src":"IMG_1251_thumb.JPG","galleries_id":41820,"server_id":1,"link":"photo_537760.html","width":130,"caption":"Amethyst Crown ","height":82});
															thumbnails[1320204] = clik.newPhoto({"id":1320204,"src":"Test 2_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_1320204.html","width":130,"caption":"What the eyes can see","height":174});
															thumbnails[6522931] = clik.newPhoto({"id":6522931,"src":"New1_thumb.jpg","galleries_id":20891,"server_id":1,"link":"photo_6522931.html","width":130,"caption":"Ocean Breeze","height":130});
															thumbnails[232279] = clik.newPhoto({"id":232279,"src":"Vortex dream 40x50in Oil on Canvas_thumb.JPG","galleries_id":154668,"server_id":1,"link":"photo_232279.html","width":130,"caption":"Vortex Dream","height":98});
															thumbnails[1961008] = clik.newPhoto({"id":1961008,"src":"DSCN1432_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_1961008.html","width":130,"caption":"Organic Earth (Sold)","height":133});
															thumbnails[6385825] = clik.newPhoto({"id":6385825,"src":"Captured_2010-06-24_00010_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_6385825.html","width":130,"caption":"Sun Beam","height":132});
															thumbnails[236789] = clik.newPhoto({"id":236789,"src":"Shadow Dance 20x28ins_thumb.jpg","galleries_id":20888,"server_id":1,"link":"photo_236789.html","width":130,"caption":"Shadow Dance","height":183});
															thumbnails[237622] = clik.newPhoto({"id":237622,"src":"IMG_0760_thumb.JPG","galleries_id":154668,"server_id":1,"link":"photo_237622.html","width":130,"caption":"Essence of light","height":98});
															thumbnails[531800] = clik.newPhoto({"id":531800,"src":"Owens_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_531800.html","width":130,"caption":"Autumn Meadow  (SOLD)","height":130});
															thumbnails[1320203] = clik.newPhoto({"id":1320203,"src":"Shattered Earth_thumb.JPG","galleries_id":41820,"server_id":1,"link":"photo_1320203.html","width":130,"caption":"Shattered Earth","height":130});
															thumbnails[6358125] = clik.newPhoto({"id":6358125,"src":"Fields_of_Green_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_6358125.html","width":130,"caption":"Fields of Green","height":133});
															thumbnails[512565] = clik.newPhoto({"id":512565,"src":"IMG_1240_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_512565.html","width":130,"caption":"Autumns Path (SOLD)","height":130});
															thumbnails[562294] = clik.newPhoto({"id":562294,"src":"IMG_1321_thumb.JPG","galleries_id":41820,"server_id":1,"link":"photo_562294.html","width":130,"caption":"Forever Sunset (SOLD)","height":97});
															thumbnails[6385816] = clik.newPhoto({"id":6385816,"src":"Captured_2010-07-19_00003_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_6385816.html","width":130,"caption":"Coral Shore","height":131});
															thumbnails[231909] = clik.newPhoto({"id":231909,"src":"From Earth to Heaven 40x50ins 1_thumb.JPG","galleries_id":41820,"server_id":1,"link":"photo_231909.html","width":130,"caption":"From Heaven to Earth (SOLD)","height":98});
															thumbnails[1961006] = clik.newPhoto({"id":1961006,"src":"Desert Swirl_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_1961006.html","width":130,"caption":"Desert Swirl","height":129});
															thumbnails[6385782] = clik.newPhoto({"id":6385782,"src":"Captured_2010-06-24_00002_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_6385782.html","width":130,"caption":"Ocean Mist","height":129});
															thumbnails[693750] = clik.newPhoto({"id":693750,"src":"Healing Angel_thumb.JPG","galleries_id":20890,"server_id":1,"link":"photo_693750.html","width":130,"caption":"Healing Angel (Not available, auction at Christies for Cancer Research)","height":118});
															thumbnails[2633202] = clik.newPhoto({"id":2633202,"src":"Enchanted Forest_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_2633202.html","width":130,"caption":"Enchanted Forest (Sold)","height":129});
															thumbnails[512585] = clik.newPhoto({"id":512585,"src":"IMG_1196_thumb.JPG","galleries_id":20890,"server_id":1,"link":"photo_512585.html","width":130,"caption":"Through the Haze (Sold)","height":102});
															thumbnails[1318623] = clik.newPhoto({"id":1318623,"src":"Middle Earth 21_thumb.jpg","galleries_id":41820,"server_id":1,"link":"photo_1318623.html","width":130,"caption":"Middle Earth","height":83});
															thumbnails[346842] = clik.newPhoto({"id":346842,"src":"The bigger picture_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_346842.html","width":130,"caption":"The Bigger Picture","height":130});
															thumbnails[702307] = clik.newPhoto({"id":702307,"src":"Chiang Mai Sunset_thumb.JPG","galleries_id":41820,"server_id":1,"link":"photo_702307.html","width":130,"caption":"Chiang Mai Sunset 3","height":111});
															thumbnails[2133553] = clik.newPhoto({"id":2133553,"src":"DSCN1588_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_2133553.html","width":130,"caption":"Evening Glow","height":130});
															thumbnails[231940] = clik.newPhoto({"id":231940,"src":"Oblivion_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_231940.html","width":130,"caption":"Oblivion ","height":131});
															thumbnails[278098] = clik.newPhoto({"id":278098,"src":"5thelement_thumb.JPG","galleries_id":20890,"server_id":1,"link":"photo_278098.html","width":130,"caption":"Silent Presence ","height":97});
															thumbnails[346843] = clik.newPhoto({"id":346843,"src":"Find the Calm_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_346843.html","width":130,"caption":"Through the Calm","height":124});
															thumbnails[6385824] = clik.newPhoto({"id":6385824,"src":"Golden_Glow_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_6385824.html","width":130,"caption":"Golden Glow","height":119});
															thumbnails[512579] = clik.newPhoto({"id":512579,"src":"IMG_1194_thumb.JPG","galleries_id":20890,"server_id":1,"link":"photo_512579.html","width":130,"caption":"The Wanderer (SOLD)","height":103});
															thumbnails[346854] = clik.newPhoto({"id":346854,"src":"New dawn_thumb.JPG","galleries_id":20890,"server_id":1,"link":"photo_346854.html","width":130,"caption":"New Dawn","height":98});
															thumbnails[1961024] = clik.newPhoto({"id":1961024,"src":"Web1_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_1961024.html","width":130,"caption":"Rocky Shore","height":128});
															thumbnails[2220474] = clik.newPhoto({"id":2220474,"src":"Ocean Blue_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_2220474.html","width":130,"caption":"Sokha Beach, Cambodia","height":173});
															thumbnails[1961011] = clik.newPhoto({"id":1961011,"src":"Midnight_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_1961011.html","width":130,"caption":"Midnights Veil SOLD","height":133});
															thumbnails[6385822] = clik.newPhoto({"id":6385822,"src":"Captured_2010-06-24_00020_thumb.JPG","galleries_id":41820,"server_id":1,"link":"photo_6385822.html","width":130,"caption":"Golden Shore (Sold)","height":42});
															thumbnails[2030140] = clik.newPhoto({"id":2030140,"src":"DSCN1534_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_2030140.html","width":130,"caption":"On the edge (sold)","height":131});
															thumbnails[2045475] = clik.newPhoto({"id":2045475,"src":"Sleeping buddha_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_2045475.html","width":130,"caption":"Sleeping Buddha,Wat Poh, Bangkok","height":98});
															thumbnails[6385809] = clik.newPhoto({"id":6385809,"src":"Captured_2010-07-19_00004_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_6385809.html","width":130,"caption":"Cool Ocean 2 (Triptych)","height":43});
															thumbnails[1797052] = clik.newPhoto({"id":1797052,"src":"Panggong21_thumb.JPG","galleries_id":118650,"server_id":1,"link":"photo_1797052.html","width":130,"caption":"Pang-gong Lake, Ladakh","height":98});
															thumbnails[6385820] = clik.newPhoto({"id":6385820,"src":"Captured_2010-07-19_00009_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_6385820.html","width":130,"caption":"Heaven & Earth","height":102});
															thumbnails[6946448] = clik.newPhoto({"id":6946448,"src":"Captured_2010-10-23_00002_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_6946448.html","width":130,"caption":"Mountain Shadows","height":92});
															thumbnails[1961016] = clik.newPhoto({"id":1961016,"src":"DSCN1441_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_1961016.html","width":130,"caption":"Cool Ocean  (Triptych) (Sold)","height":130});
															thumbnails[2070258] = clik.newPhoto({"id":2070258,"src":"DSCN1559_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_2070258.html","width":130,"caption":"Sunset Waves","height":130});
															thumbnails[4960451] = clik.newPhoto({"id":4960451,"src":"Mountain_Magic_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_4960451.html","width":130,"caption":"Mountain Magic","height":111});
															thumbnails[2070287] = clik.newPhoto({"id":2070287,"src":"DSCN1565_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_2070287.html","width":130,"caption":"Last Light","height":130});
															thumbnails[6385812] = clik.newPhoto({"id":6385812,"src":"Captured_2010-07-19_00011_thumb.JPG","galleries_id":41820,"server_id":1,"link":"photo_6385812.html","width":130,"caption":"Shattered Dreams","height":129});
															thumbnails[2633199] = clik.newPhoto({"id":2633199,"src":"Still_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_2633199.html","width":130,"caption":"Still","height":129});
															thumbnails[2974351] = clik.newPhoto({"id":2974351,"src":"3_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_2974351.html","width":130,"caption":"  Purple Haze (Sold)","height":128});
															thumbnails[6358120] = clik.newPhoto({"id":6358120,"src":"Dandilion_Dream_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_6358120.html","width":130,"caption":"Dandilion Dream","height":173});
															thumbnails[4771155] = clik.newPhoto({"id":4771155,"src":"DSCN2125_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_4771155.html","width":130,"caption":"Another Layer","height":128});
															thumbnails[242132] = clik.newPhoto({"id":242132,"src":"IMG_0863_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_242132.html","width":130,"caption":"Moonlight calm","height":99});
															thumbnails[4771209] = clik.newPhoto({"id":4771209,"src":"DSCN2123_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_4771209.html","width":130,"caption":"Mountain Breeze","height":107});
															thumbnails[2282055] = clik.newPhoto({"id":2282055,"src":"DSCN1641_thumb.JPG","galleries_id":20882,"server_id":1,"link":"photo_2282055.html","width":130,"caption":"Lavender Fields","height":49});
															thumbnails[3401095] = clik.newPhoto({"id":3401095,"src":"DSCN1880_thumb.JPG","galleries_id":20891,"server_id":1,"link":"photo_3401095.html","width":130,"caption":"Storm Shadows","height":73});
															thumbnails[2070330] = clik.newPhoto({"id":2070330,"src":"DSCN1563_thumb.JPG","galleries_id":20888,"server_id":1,"link":"photo_2070330.html","width":130,"caption":"Entwined ","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[118650] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"My Inspiration","link":"gallery_118650.html","maxRecords":0.0,"photoIDs":[1765725.0,1765803.0,1765810.0,1765817.0,1765822.0,1776374.0,1797033.0,1797035.0,1797038.0,5417712.0,7288024.0,2220474.0,2045475.0,1797052.0],"skipIndex":0,"section_code":"gallery","featured_images":"7288024,5417712,2220474,2045475,1797052,1797038,1797035,1797033,1776374,1765822","id":118650,"singleSection":false});				  						galleries[20882] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes ","link":"gallery_20882.html","maxRecords":0.0,"photoIDs":[1961008.0,531800.0,512565.0,1961006.0,2633202.0,6385820.0,6946448.0,4960451.0,2070287.0,4771209.0,2282055.0],"skipIndex":0,"section_code":"gallery","featured_images":"6946448,6385820,4960451,4771209,2633202,2282055,2070287,1961008,1961006,531800","id":20882,"singleSection":false});				  						galleries[20891] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Seascapes","link":"gallery_20891.html","maxRecords":0.0,"photoIDs":[2974349.0,6781459.0,6781476.0,6781702.0,6522920.0,346850.0,6522931.0,6385825.0,6358125.0,6385816.0,6385782.0,2133553.0,346843.0,1961024.0,2030140.0,6385809.0,1961016.0,2070258.0,2633199.0,2974351.0,242132.0,3401095.0],"skipIndex":0,"section_code":"gallery","featured_images":"6781702,6781476,6781459,6522931,6522920,6385825,6385816,6385809,6385782,6358125","id":20891,"singleSection":false});				  						galleries[41820] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Larger Canvases","link":"gallery_41820.html","maxRecords":0.0,"photoIDs":[6946407.0,6946521.0,537668.0,537760.0,1320203.0,562294.0,231909.0,1318623.0,702307.0,6385822.0,6385812.0],"skipIndex":0,"section_code":"gallery","featured_images":"6946521,6946407,6385822,6385812,1320203,1318623,702307,562294,537760,537668","id":41820,"singleSection":false});				  						galleries[20888] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Abstract ","link":"gallery_20888.html","maxRecords":0.0,"photoIDs":[702312.0,242130.0,1320204.0,236789.0,346842.0,231940.0,6385824.0,1961011.0,6358120.0,4771155.0,2070330.0],"skipIndex":0,"section_code":"gallery","featured_images":"6385824,6358120,4771155,2070330,1961011,1320204,702312,346842,242130,236789","id":20888,"singleSection":false});				  						galleries[154668] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commissions","link":"gallery_154668.html","maxRecords":0.0,"photoIDs":[2074174.0,2277969.0,8894783.0,8894791.0,236898.0,236899.0,232279.0,237622.0],"skipIndex":0,"section_code":"gallery","featured_images":"8894791,8894783,2277969,2074174,237622,236899,236898,232279","id":154668,"singleSection":false});				  						galleries[20890] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Figurative ","link":"gallery_20890.html","maxRecords":0.0,"photoIDs":[693750.0,512585.0,278098.0,512579.0,346854.0],"skipIndex":0,"section_code":"gallery","featured_images":"693750,512585,512579,346854,278098","id":20890,"singleSection":false});				  						galleries[323726] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Art In Situ","link":"gallery_323726.html","maxRecords":0.0,"photoIDs":[5417437.0,5715498.0,5926560.0],"skipIndex":0,"section_code":"gallery","featured_images":"5926560,5715498,5417437","id":323726,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '231909,512579';
imageSets[3] = '3401095';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/ellavell/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/ellavell/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/ellavell/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/ellavell/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/ellavell/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/ellavell/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/ellavell/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/ellavell/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 = 'Heather McDonald: ' + 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.item_price !== '') {
			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;
	}
}

			

