window.thumbnails = {};
															thumbnails[3338035] = clik.newPhoto({"id":3338035,"src":"1J6Q8846aweb_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Winters' Tale","height":87});
															thumbnails[503700] = clik.newPhoto({"id":503700,"src":"orkneyingar_thumb.JPG","galleries_id":"","server_id":18,"link":"#","width":127,"caption":"Guardian Of Time","height":130});
															thumbnails[7599365] = clik.newPhoto({"id":7599365,"src":"20110318_3505web_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":114,"caption":"","height":160});
															thumbnails[7734976] = clik.newPhoto({"id":7734976,"src":"pic1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":160,"caption":"","height":160});
															thumbnails[7864015] = clik.newPhoto({"id":7864015,"src":"Barbed_Wire_4_TIF_edited-2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":160,"caption":"Space to Think","height":122});
															thumbnails[1651931] = clik.newPhoto({"id":1651931,"src":"Copy of windyhills tripas_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Nature photography at Windyhills.","height":73});
															thumbnails[1651939] = clik.newPhoto({"id":1651939,"src":"Paul Ritchie visit_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Vistit to the studio of artist Paul Ritchie","height":76});
															thumbnails[7601400] = clik.newPhoto({"id":7601400,"src":"20110330_3582web1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":160,"caption":"Pink","height":110});
															thumbnails[1859134] = clik.newPhoto({"id":1859134,"src":"Lightening tree_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":98,"caption":"The Lightening Tree","height":130});
															thumbnails[504676] = clik.newPhoto({"id":504676,"src":"0609210022_thumb.JPG","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Day Dream Blue","height":98});
															thumbnails[7599366] = clik.newPhoto({"id":7599366,"src":"20110330_3519web_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7599366.html","width":130,"caption":"Holding On","height":60});
															thumbnails[486534] = clik.newPhoto({"id":486534,"src":"comfrey1_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_486534.html","width":130,"caption":"Comfrey in Sunlight","height":111});
															thumbnails[1947666] = clik.newPhoto({"id":1947666,"src":"1J6Q1478a_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_1947666.html","width":130,"caption":"Willow on Black","height":122});
															thumbnails[2144073] = clik.newPhoto({"id":2144073,"src":"Study in Orange_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_2144073.html","width":130,"caption":"Study in Orange","height":112});
															thumbnails[2803610] = clik.newPhoto({"id":2803610,"src":"0606110047a_1_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_2803610.html","width":130,"caption":"Evening Stroll","height":108});
															thumbnails[3338067] = clik.newPhoto({"id":3338067,"src":"1J6Q4894_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_3338067.html","width":130,"caption":"Acer","height":87});
															thumbnails[4711259] = clik.newPhoto({"id":4711259,"src":"sycamore1_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_4711259.html","width":130,"caption":"Sycamore Seeds","height":124});
															thumbnails[4711293] = clik.newPhoto({"id":4711293,"src":"1J6Q1506a_A4a_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_4711293.html","width":130,"caption":"Orange Rose","height":93});
															thumbnails[6476490] = clik.newPhoto({"id":6476490,"src":"owl1_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_6476490.html","width":130,"caption":"Eagle Eye","height":117});
															thumbnails[6476708] = clik.newPhoto({"id":6476708,"src":"tinternjpg_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_6476708.html","width":130,"caption":"Tintern Abbey","height":91});
															thumbnails[7733052] = clik.newPhoto({"id":7733052,"src":"20110501_3912_edited-1_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7733052.html","width":160,"caption":"Acer and Bamboo","height":119});
															thumbnails[7734806] = clik.newPhoto({"id":7734806,"src":"20110316_3258cop_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734806.html","width":160,"caption":"","height":95});
															thumbnails[7734811] = clik.newPhoto({"id":7734811,"src":"20110316_3255COP_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734811.html","width":160,"caption":"","height":107});
															thumbnails[7734815] = clik.newPhoto({"id":7734815,"src":"20100718_1598l_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_7734815.html","width":160,"caption":"","height":290});
															thumbnails[7734819] = clik.newPhoto({"id":7734819,"src":"20101023_2284c_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734819.html","width":160,"caption":"Hemp Nettle","height":162});
															thumbnails[7734827] = clik.newPhoto({"id":7734827,"src":"20101222_2990-1_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_7734827.html","width":160,"caption":"","height":69});
															thumbnails[7734830] = clik.newPhoto({"id":7734830,"src":"20110316_3244_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734830.html","width":160,"caption":"","height":159});
															thumbnails[7734832] = clik.newPhoto({"id":7734832,"src":"20110316_3333c_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734832.html","width":160,"caption":"","height":240});
															thumbnails[7734835] = clik.newPhoto({"id":7734835,"src":"20110316_3426_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734835.html","width":160,"caption":"","height":242});
															thumbnails[7734842] = clik.newPhoto({"id":7734842,"src":"20110501_3938_edited-21_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734842.html","width":160,"caption":"","height":155});
															thumbnails[7734846] = clik.newPhoto({"id":7734846,"src":"20110228_3052_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_7734846.html","width":160,"caption":"Layers","height":148});
															thumbnails[7734850] = clik.newPhoto({"id":7734850,"src":"20110316_3422_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734850.html","width":160,"caption":"","height":109});
															thumbnails[7734853] = clik.newPhoto({"id":7734853,"src":"20110316_3342_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734853.html","width":160,"caption":"","height":170});
															thumbnails[7734856] = clik.newPhoto({"id":7734856,"src":"20110330_3628-2_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734856.html","width":160,"caption":"Emerging","height":236});
															thumbnails[7734859] = clik.newPhoto({"id":7734859,"src":"20100402_0119ab_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734859.html","width":160,"caption":"Turning","height":112});
															thumbnails[7734860] = clik.newPhoto({"id":7734860,"src":"20110330_3618v_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734860.html","width":160,"caption":"Tendrils in the Mist","height":247});
															thumbnails[7734873] = clik.newPhoto({"id":7734873,"src":"20110316_3273abstra_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734873.html","width":160,"caption":"Graffiti 2","height":113});
															thumbnails[7734942] = clik.newPhoto({"id":7734942,"src":"20110330_3518_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734942.html","width":160,"caption":"Honestly Yours!","height":149});
															thumbnails[7734965] = clik.newPhoto({"id":7734965,"src":"20110330_3612_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7734965.html","width":160,"caption":"","height":230});
															thumbnails[7735011] = clik.newPhoto({"id":7735011,"src":"20100509_0520a_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7735011.html","width":160,"caption":"","height":225});
															thumbnails[7735014] = clik.newPhoto({"id":7735014,"src":"20101022_2141cop_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_7735014.html","width":160,"caption":"Rainy Days and Mondays..","height":108});
															thumbnails[7854619] = clik.newPhoto({"id":7854619,"src":"20110316_3342a_edited-1_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7854619.html","width":160,"caption":"","height":168});
															thumbnails[7854626] = clik.newPhoto({"id":7854626,"src":"0705220018threshx_edited-1_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7854626.html","width":160,"caption":"","height":149});
															thumbnails[7864001] = clik.newPhoto({"id":7864001,"src":"20100630_1242c_edited-1_thumb.jpg","galleries_id":424391,"server_id":18,"link":"photo_7864001.html","width":160,"caption":"Perambulator","height":191});
															thumbnails[7864003] = clik.newPhoto({"id":7864003,"src":"20100630_1254b_edited-1_thumb.jpg","galleries_id":424391,"server_id":18,"link":"photo_7864003.html","width":160,"caption":"Hanging Door","height":235});
															thumbnails[7864005] = clik.newPhoto({"id":7864005,"src":"nature_081_edited-2_thumb.jpg","galleries_id":424391,"server_id":18,"link":"photo_7864005.html","width":160,"caption":"Faeries' Pool","height":123});
															thumbnails[7864011] = clik.newPhoto({"id":7864011,"src":"20100626_1133a_edited-1_thumb.jpg","galleries_id":424391,"server_id":18,"link":"photo_7864011.html","width":160,"caption":"","height":108});
															thumbnails[7877679] = clik.newPhoto({"id":7877679,"src":"1J6Q0753_edited-2_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7877679.html","width":160,"caption":"Patio Rose","height":238});
															thumbnails[3396796] = clik.newPhoto({"id":3396796,"src":"1J6Q9859aweb_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_3396796.html","width":130,"caption":"Harbour's Edge","height":130});
															thumbnails[1004386] = clik.newPhoto({"id":1004386,"src":"DSCF4271dd_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_1004386.html","width":130,"caption":"End Posts","height":91});
															thumbnails[2803620] = clik.newPhoto({"id":2803620,"src":"0609200010a1_thumb.jpg","galleries_id":36331,"server_id":18,"link":"photo_2803620.html","width":57,"caption":"The Window Screen","height":130});
															thumbnails[7846909] = clik.newPhoto({"id":7846909,"src":"20110228_3111a_edited-2_thumb.jpg","galleries_id":425714,"server_id":18,"link":"photo_7846909.html","width":160,"caption":"Dappled Light","height":163});
															thumbnails[7890599] = clik.newPhoto({"id":7890599,"src":"walking_away_thumb.jpg","galleries_id":425714,"server_id":18,"link":"photo_7890599.html","width":160,"caption":"Walking Away","height":282});
															thumbnails[501200] = clik.newPhoto({"id":501200,"src":"0607260026a_thumb.jpg","galleries_id":36331,"server_id":18,"link":"photo_501200.html","width":130,"caption":"Beachscape","height":93});
															thumbnails[2658695] = clik.newPhoto({"id":2658695,"src":"1J6Q8842a_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_2658695.html","width":130,"caption":"Hull","height":116});
															thumbnails[2658754] = clik.newPhoto({"id":2658754,"src":"1J6Q8618a_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_2658754.html","width":130,"caption":"Blue Boat","height":66});
															thumbnails[7847085] = clik.newPhoto({"id":7847085,"src":"1J6Q0438_edited-5_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7847085.html","width":160,"caption":"Lichen and Bluebells","height":160});
															thumbnails[7854589] = clik.newPhoto({"id":7854589,"src":"0607240218f_thumb.jpg","galleries_id":36331,"server_id":18,"link":"photo_7854589.html","width":160,"caption":"Glass Wave","height":140});
															thumbnails[7890623] = clik.newPhoto({"id":7890623,"src":"1J6Q0706_edited-3_thumb.jpg","galleries_id":425714,"server_id":18,"link":"photo_7890623.html","width":160,"caption":"Back to the Future","height":262});
															thumbnails[2467673] = clik.newPhoto({"id":2467673,"src":"1J6Q5643aweb_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_2467673.html","width":130,"caption":"Venice","height":81});
															thumbnails[7601283] = clik.newPhoto({"id":7601283,"src":"scarsweb_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7601283.html","width":160,"caption":"Making your Mark.","height":230});
															thumbnails[7847052] = clik.newPhoto({"id":7847052,"src":"20100719_1718A_edited-3_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7847052.html","width":160,"caption":"Traffic Lights","height":169});
															thumbnails[7890640] = clik.newPhoto({"id":7890640,"src":"mixed_feelings_edited-1_thumb.jpg","galleries_id":425714,"server_id":18,"link":"photo_7890640.html","width":160,"caption":"Mixed Feelings","height":480});
															thumbnails[7601367] = clik.newPhoto({"id":7601367,"src":"web_bark_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_7601367.html","width":160,"caption":"Nature's Clothing","height":249});
															thumbnails[7847159] = clik.newPhoto({"id":7847159,"src":"20100607_0780a_edited-31_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7847159.html","width":160,"caption":"Paint on Rust","height":145});
															thumbnails[7890641] = clik.newPhoto({"id":7890641,"src":"Untitled-1_edited-6_thumb.jpg","galleries_id":425714,"server_id":18,"link":"photo_7890641.html","width":160,"caption":"Untitled as yet!","height":160});
															thumbnails[775220] = clik.newPhoto({"id":775220,"src":"0603040108a_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_775220.html","width":130,"caption":"Drift","height":41});
															thumbnails[1004285] = clik.newPhoto({"id":1004285,"src":"0609300017b1_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_1004285.html","width":98,"caption":"Tranquility","height":130});
															thumbnails[4901457] = clik.newPhoto({"id":4901457,"src":"whiterose2_web_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_4901457.html","width":90,"caption":"November Rose","height":130});
															thumbnails[7853726] = clik.newPhoto({"id":7853726,"src":"1_edited-2_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7853726.html","width":160,"caption":"Restriction","height":153});
															thumbnails[7854378] = clik.newPhoto({"id":7854378,"src":"20100626_1112_edited-2_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7854378.html","width":160,"caption":"Reflections at Portsoy","height":98});
															thumbnails[504679] = clik.newPhoto({"id":504679,"src":"0609300024c_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_504679.html","width":98,"caption":"Floral Dance","height":130});
															thumbnails[2468210] = clik.newPhoto({"id":2468210,"src":"1J6Q5516a_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_2468210.html","width":130,"caption":"Lake Garda","height":86});
															thumbnails[7846988] = clik.newPhoto({"id":7846988,"src":"20101031_2540a_edited-1_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7846988.html","width":160,"caption":"Rusty Blue","height":108});
															thumbnails[403688] = clik.newPhoto({"id":403688,"src":"Dec05 116a_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_403688.html","width":130,"caption":"Sunbathing","height":62});
															thumbnails[2468275] = clik.newPhoto({"id":2468275,"src":"1J6Q5987aa_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_2468275.html","width":130,"caption":"Dolomites","height":87});
															thumbnails[7847016] = clik.newPhoto({"id":7847016,"src":"20101029_2470a_edited-2_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7847016.html","width":160,"caption":"Rusty Blue 2","height":99});
															thumbnails[1898214] = clik.newPhoto({"id":1898214,"src":"K_thumb.hall 135b.JPG","galleries_id":31279,"server_id":18,"link":"photo_1898214.html","width":98,"caption":"Sycamore Seeds","height":130});
															thumbnails[7863883] = clik.newPhoto({"id":7863883,"src":"1J6Q0610_edited-2_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7863883.html","width":160,"caption":"A time for Peace..","height":84});
															thumbnails[7847209] = clik.newPhoto({"id":7847209,"src":"20110412_3722_edited-9_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7847209.html","width":160,"caption":"Beyond Truth","height":289});
															thumbnails[394690] = clik.newPhoto({"id":394690,"src":"porcelaincups1_thumb.JPG","galleries_id":31279,"server_id":18,"link":"photo_394690.html","width":130,"caption":"Porcelain Cups","height":98});
															thumbnails[7846704] = clik.newPhoto({"id":7846704,"src":"1J6Q0429_edited-3_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7846704.html","width":160,"caption":"","height":274});
															thumbnails[7854613] = clik.newPhoto({"id":7854613,"src":"1J6Q0605_edited-3_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7854613.html","width":160,"caption":"Blink..","height":245});
															thumbnails[503871] = clik.newPhoto({"id":503871,"src":"0607240207b_thumb.jpg","galleries_id":36331,"server_id":18,"link":"photo_503871.html","width":130,"caption":"Edgescape 1","height":89});
															thumbnails[503260] = clik.newPhoto({"id":503260,"src":"spacetothink1_thumb.JPG","galleries_id":408885,"server_id":18,"link":"photo_503260.html","width":130,"caption":"Space To Think","height":98});
															thumbnails[7863886] = clik.newPhoto({"id":7863886,"src":"Untitled-1_edited-5_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7863886.html","width":160,"caption":"Dark Angel","height":126});
															thumbnails[7854451] = clik.newPhoto({"id":7854451,"src":"20110407_3663_edited-2a_thumb.jpg","galleries_id":423410,"server_id":18,"link":"photo_7854451.html","width":160,"caption":"Missing","height":112});
															thumbnails[2468041] = clik.newPhoto({"id":2468041,"src":"1J6Q5490a_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_2468041.html","width":130,"caption":"Bicycle","height":113});
															thumbnails[394774] = clik.newPhoto({"id":394774,"src":"glassngrass1_thumb.jpg","galleries_id":36331,"server_id":18,"link":"photo_394774.html","width":130,"caption":"Still Life in yellow","height":173});
															thumbnails[403984] = clik.newPhoto({"id":403984,"src":"greenhouseglass1_thumb.jpg","galleries_id":36331,"server_id":18,"link":"photo_403984.html","width":130,"caption":"Escape","height":173});
															thumbnails[776079] = clik.newPhoto({"id":776079,"src":"0606110047a_thumb.jpg","galleries_id":31279,"server_id":18,"link":"photo_776079.html","width":130,"caption":"Evening Walk","height":108});
															thumbnails[955296] = clik.newPhoto({"id":955296,"src":"0608060091b_thumb.jpg","galleries_id":36331,"server_id":18,"link":"photo_955296.html","width":95,"caption":"Still Life In Blue","height":130});
															thumbnails[504666] = clik.newPhoto({"id":504666,"src":"0606300004a_thumb.jpg","galleries_id":408885,"server_id":18,"link":"photo_504666.html","width":130,"caption":"Blue Dream","height":74});
															thumbnails[403838] = clik.newPhoto({"id":403838,"src":"0607260025a_thumb.jpg","galleries_id":36331,"server_id":18,"link":"photo_403838.html","width":98,"caption":"'Nepal'","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[423410] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Recent Work","link":"gallery_423410.html","maxRecords":0.0,"photoIDs":[7854626.0,7847085.0,7847052.0,7847159.0,7853726.0,7854378.0,7846988.0,7847016.0,7863883.0,7847209.0,7846704.0,7854613.0,7863886.0,7854451.0],"skipIndex":0,"section_code":"gallery","featured_images":"7847085,7847052","id":423410,"singleSection":false});				  						galleries[425714] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dappled Light","link":"gallery_425714.html","maxRecords":0.0,"photoIDs":[7846909.0,7890599.0,7890623.0,7890640.0,7890641.0],"skipIndex":0,"section_code":"gallery","featured_images":7890599.0,"id":425714,"singleSection":false});				  						galleries[408885] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery One","link":"gallery_408885.html","maxRecords":0.0,"photoIDs":[6476708.0,7734815.0,7734827.0,7734846.0,7735014.0,3396796.0,1004386.0,2658695.0,2658754.0,2467673.0,775220.0,2468210.0,2468275.0,503260.0,2468041.0,504666.0],"skipIndex":0,"section_code":"gallery","featured_images":7734815.0,"id":408885,"singleSection":false});				  						galleries[424391] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"White Elephant Stall","link":"gallery_424391.html","maxRecords":0.0,"photoIDs":[7864001.0,7864003.0,7864005.0,7864011.0],"skipIndex":0,"section_code":"gallery","featured_images":"7864003,7864001","id":424391,"singleSection":false});				  						galleries[31279] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nature","link":"gallery_31279.html","maxRecords":0.0,"photoIDs":[7599366.0,486534.0,1947666.0,2144073.0,2803610.0,3338067.0,4711259.0,4711293.0,6476490.0,7733052.0,7734806.0,7734811.0,7734819.0,7734830.0,7734832.0,7734835.0,7734842.0,7734850.0,7734853.0,7734856.0,7734859.0,7734860.0,7734873.0,7734942.0,7734965.0,7735011.0,7854619.0,7877679.0,7601283.0,7601367.0,1004285.0,4901457.0,504679.0,403688.0,1898214.0,394690.0,776079.0],"skipIndex":0,"section_code":"gallery","featured_images":"7877679,7734965,7734835,7734830,776079","id":31279,"singleSection":false});				  						galleries[36331] = clik.newGallery({"parentGallery":"","usePopups":false,"title":" Glass Project","link":"gallery_36331.html","maxRecords":0.0,"photoIDs":[2803620.0,501200.0,7854589.0,503871.0,394774.0,403984.0,955296.0,403838.0],"skipIndex":0,"section_code":"gallery","featured_images":7854589.0,"id":36331,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7877679,7854626,7854613,7854589,7853726,7847209,7847016,7846988,7846909,7734976,7734942,7734830,7734806,7601400,7601367,1898214,403984';
imageSets[2] = '7890599,7877679,7864003,7864001,7854589,7847085,7847052,7734965,7734835,7734830,7734815,776079';
imageSets[3] = '7890641,7890640,7890623,7890599,7877679,7864015,7864011,7864005,7864003,7864001,7863886,7863883,7854626,7854619,7854613,7854589,7854451,7854378,7853726,7847209,7847159,7847085,7847052,7847016,7846988,7846909,7846704,7735014,7735011,7734976,7734965,7734942,7734873,7734860,7734859,7734856,7734853,7734850,7734846,7734842,7734835,7734832,7734830,7734827,7734819,7734815,7734811,7734806,7733052,7601400';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/LApa/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/LApa/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/LApa/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/LApa/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/LApa/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/LApa/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/LApa/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Liz Alderdice Photo Art: ' + 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>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="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="Llizrose47@aol.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart \" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="Llizrose47@aol.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart \" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

