window.thumbnails = {};
															thumbnails[607300] = clik.newPhoto({"id":607300,"src":"PHOTOGRAPHY-TIPS-COVER-COMP_thumb.gif","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Ref:- Bk1<br>\r\nPhotography Tips.<br>\r\nFree Book...Click photograph for more information<br>\r\n","height":98});
															thumbnails[4777191] = clik.newPhoto({"id":4777191,"src":"Self_Portrait_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Self Portrait,pencil","height":144});
															thumbnails[8907021] = clik.newPhoto({"id":8907021,"src":"P1010697_A6ACEE37-1EC9-D45B-1CF81AE8B65FE989_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1010697","height":121});
															thumbnails[8907022] = clik.newPhoto({"id":8907022,"src":"P1020423_A6AD50B3-1EC9-D45B-1C43A9BF38F749D9_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020423","height":127});
															thumbnails[8907023] = clik.newPhoto({"id":8907023,"src":"P1020426_A6ADB293-1EC9-D45B-1C00455B2170055F_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020426","height":73});
															thumbnails[8907026] = clik.newPhoto({"id":8907026,"src":"P1020437_A6AE2E08-1EC9-D45B-1C47B610BBB9ED25_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020437","height":79});
															thumbnails[8907027] = clik.newPhoto({"id":8907027,"src":"P1020439_A6AE8946-1EC9-D45B-1C8CA8E4ACC13C1A_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020439","height":76});
															thumbnails[8907031] = clik.newPhoto({"id":8907031,"src":"P1020443_A6BA733D-1EC9-D45B-1C4A595F50E2C06E_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020443","height":127});
															thumbnails[8907032] = clik.newPhoto({"id":8907032,"src":"P1020425_A6BB0014-1EC9-D45B-1C1C99FD6B8E9A6F_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020425","height":132});
															thumbnails[8907033] = clik.newPhoto({"id":8907033,"src":"P1020448_A6BB6AE7-1EC9-D45B-1C3CDCF316F08DB2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020448","height":180});
															thumbnails[8907034] = clik.newPhoto({"id":8907034,"src":"P1020461_A6BC1120-1EC9-D45B-1C3FB9B2CBD5C2A5_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020461","height":192});
															thumbnails[8907035] = clik.newPhoto({"id":8907035,"src":"P1020459_A6BC6731-1EC9-D45B-1CA72891BB7E9A9A_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020459","height":73});
															thumbnails[8907040] = clik.newPhoto({"id":8907040,"src":"P1020423_A6DDC20C-1EC9-D45B-1C1DF4154126887A_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020423","height":127});
															thumbnails[8907041] = clik.newPhoto({"id":8907041,"src":"P1020425_A6DE5764-1EC9-D45B-1C2277781D582E55_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020425","height":132});
															thumbnails[8907042] = clik.newPhoto({"id":8907042,"src":"P1020426_A6DEB10B-1EC9-D45B-1CC36E5035E67093_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020426","height":73});
															thumbnails[8907043] = clik.newPhoto({"id":8907043,"src":"P1020437_A6DF0B4D-1EC9-D45B-1CDD25C460C65B39_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020437","height":79});
															thumbnails[8907044] = clik.newPhoto({"id":8907044,"src":"P1020439_A6DF6006-1EC9-D45B-1C1F823427497B2C_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020439","height":76});
															thumbnails[8907045] = clik.newPhoto({"id":8907045,"src":"P1020443_A6DFB637-1EC9-D45B-1C8E0E6046C4D75C_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020443","height":127});
															thumbnails[8907046] = clik.newPhoto({"id":8907046,"src":"P1020448_A6E01FA2-1EC9-D45B-1C2EBF49FB8E65A9_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"P1020448","height":180});
															thumbnails[65860] = clik.newPhoto({"id":65860,"src":"Friars  Crag BWJPG_thumb.jpg","galleries_id":6404,"server_id":18,"link":"photo_65860.html","width":130,"caption":"Ref:10FRIARS CRAG","height":87});
															thumbnails[65874] = clik.newPhoto({"id":65874,"src":"Friars  CragJPG_thumb.jpg","galleries_id":6404,"server_id":18,"link":"photo_65874.html","width":130,"caption":"Ref:11 FRIARS CRAG","height":87});
															thumbnails[65786] = clik.newPhoto({"id":65786,"src":"CRWStonethwaite_0011JPG_thumb.jpg","galleries_id":6404,"server_id":18,"link":"photo_65786.html","width":130,"caption":"Ref:12 WATERFALLS, STONETHWAITE","height":87});
															thumbnails[65823] = clik.newPhoto({"id":65823,"src":"CRWStonethwaite_0034JPG_thumb.jpg","galleries_id":6404,"server_id":18,"link":"photo_65823.html","width":130,"caption":"Ref:13 LANGSTRATH","height":65});
															thumbnails[65835] = clik.newPhoto({"id":65835,"src":"Eastern Fells_0013JPG_thumb.jpg","galleries_id":6404,"server_id":18,"link":"photo_65835.html","width":130,"caption":"Ref:14 CATSTYCAM.","height":195});
															thumbnails[65845] = clik.newPhoto({"id":65845,"src":"Eastern Lakes 2JPG_thumb.jpg","galleries_id":6404,"server_id":18,"link":"photo_65845.html","width":130,"caption":"Ref:15 RED TARN.","height":87});
															thumbnails[65853] = clik.newPhoto({"id":65853,"src":"eastern lakesJPG_thumb.jpg","galleries_id":6404,"server_id":18,"link":"photo_65853.html","width":130,"caption":"Ref:16 EASTERN FELLS","height":87});
															thumbnails[87728] = clik.newPhoto({"id":87728,"src":"IMG_0018JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_87728.html","width":130,"caption":"Ref:M22.Lindisfarne","height":195});
															thumbnails[87732] = clik.newPhoto({"id":87732,"src":"IMG_0066JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_87732.html","width":130,"caption":"Ref:M23. Lindisfarne.","height":83});
															thumbnails[65457] = clik.newPhoto({"id":65457,"src":"CRW_Northumberland Coast 0015JPG_thumb.jpg","galleries_id":6399,"server_id":18,"link":"photo_65457.html","width":130,"caption":"Ref:27 ON PARADE.","height":59});
															thumbnails[65561] = clik.newPhoto({"id":65561,"src":"Aqualung 2JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_65561.html","width":130,"caption":"Ref:M5 AQUALUNG","height":92});
															thumbnails[65563] = clik.newPhoto({"id":65563,"src":"Aqualung 3JPG1_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_65563.html","width":130,"caption":"Ref:M6 AQUALUNG","height":87});
															thumbnails[65567] = clik.newPhoto({"id":65567,"src":"Aqualung 4JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_65567.html","width":130,"caption":"Ref:M7 AQUALUNG","height":87});
															thumbnails[65568] = clik.newPhoto({"id":65568,"src":"AqualungJPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_65568.html","width":130,"caption":"Ref:M8 AQUALUNG","height":87});
															thumbnails[65572] = clik.newPhoto({"id":65572,"src":"Art Garfunkel 2JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_65572.html","width":130,"caption":"Ref:M9 ART GARFUNKEL","height":181});
															thumbnails[65573] = clik.newPhoto({"id":65573,"src":"Art Garfunkel 3JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_65573.html","width":130,"caption":"Ref:M10 ART GARFUNKEL","height":98});
															thumbnails[65688] = clik.newPhoto({"id":65688,"src":",The Bay, Laide 2 BWJPG_thumb.jpg","galleries_id":6382,"server_id":18,"link":"photo_65688.html","width":130,"caption":"Ref01: THE BAY, LAIDE, WESTER ROSS.<br>\r\n<br>\r\n","height":86});
															thumbnails[65691] = clik.newPhoto({"id":65691,"src":"Cold day on Haystacks BWJPG_thumb.jpg","galleries_id":6382,"server_id":18,"link":"photo_65691.html","width":130,"caption":"Ref:02 COLD DAY ON HAYSTACKS.<br>\r\n","height":87});
															thumbnails[65695] = clik.newPhoto({"id":65695,"src":"Dunstanburgh BWJPG_thumb.jpg","galleries_id":6382,"server_id":18,"link":"photo_65695.html","width":130,"caption":"Ref:03 DUNSTANBURGH CASTLE","height":195});
															thumbnails[65697] = clik.newPhoto({"id":65697,"src":"Great Gable A3 BWJPG_thumb.jpg","galleries_id":6382,"server_id":18,"link":"photo_65697.html","width":130,"caption":"Ref:04 GREAT GABLE","height":195});
															thumbnails[65699] = clik.newPhoto({"id":65699,"src":"Heron BW A3 JPG_thumb.jpg","galleries_id":6382,"server_id":18,"link":"photo_65699.html","width":130,"caption":"Ref:05 HERON.","height":80});
															thumbnails[65700] = clik.newPhoto({"id":65700,"src":"Killhope A3JPG_thumb.jpg","galleries_id":6382,"server_id":18,"link":"photo_65700.html","width":130,"caption":"Ref:06 KILLHOPE FROM ROBERTS FIELD.","height":97});
															thumbnails[65707] = clik.newPhoto({"id":65707,"src":"Laide 4 BWJPG_thumb.jpg","galleries_id":6382,"server_id":18,"link":"photo_65707.html","width":130,"caption":"Ref:08 SUNSET,LAIDE.","height":60});
															thumbnails[65711] = clik.newPhoto({"id":65711,"src":"Skawdale Pass BWJPG_thumb.jpg","galleries_id":6382,"server_id":18,"link":"photo_65711.html","width":130,"caption":"Ref:07 SKAWDALE PASS,","height":87});
															thumbnails[65713] = clik.newPhoto({"id":65713,"src":"Skawdall Pass2 BWJPG_thumb.jpg","galleries_id":6382,"server_id":18,"link":"photo_65713.html","width":130,"caption":"Ref:09 SKAWDALE PASS.","height":87});
															thumbnails[65716] = clik.newPhoto({"id":65716,"src":"CRW Byerhope_0028JPG_thumb.jpg","galleries_id":6399,"server_id":18,"link":"photo_65716.html","width":130,"caption":"Ref:25 HEATHER ON THE BYERHOPE MOORS.","height":195});
															thumbnails[65729] = clik.newPhoto({"id":65729,"src":"CRW_Byerhope 0024JPG_thumb.jpg","galleries_id":6399,"server_id":18,"link":"photo_65729.html","width":130,"caption":"Ref:26 SPION KOP, ALLENHEADS.","height":87});
															thumbnails[65734] = clik.newPhoto({"id":65734,"src":"CRW_Northumbrian Coast 00004 BWJPG_thumb.jpg","galleries_id":6399,"server_id":18,"link":"photo_65734.html","width":130,"caption":"Ref:28 NOTHUMBRIAN COAST","height":81});
															thumbnails[65754] = clik.newPhoto({"id":65754,"src":"CRW_Northumbrian Coast 00004JPG_thumb.jpg","galleries_id":6399,"server_id":18,"link":"photo_65754.html","width":130,"caption":"Ref:29 NORTHUMBRIAN COAST","height":81});
															thumbnails[65756] = clik.newPhoto({"id":65756,"src":"CRW_Northumbrian Coast 0014JPG_thumb.jpg","galleries_id":6399,"server_id":18,"link":"photo_65756.html","width":130,"caption":"Ref:30 OYSTER CATCHERS","height":40});
															thumbnails[65759] = clik.newPhoto({"id":65759,"src":"CRW_Northumbrian Coast 0036JPG_thumb.jpg","galleries_id":6399,"server_id":18,"link":"photo_65759.html","width":130,"caption":"Ref:31 NORTHUMBRIAN COAST","height":92});
															thumbnails[65830] = clik.newPhoto({"id":65830,"src":"Dock Tarn 2JPG1_thumb.jpg","galleries_id":6404,"server_id":18,"link":"photo_65830.html","width":130,"caption":"Ref:18 DOCK TARN","height":87});
															thumbnails[65914] = clik.newPhoto({"id":65914,"src":"Cotton Grass beside Loch  Dubh Geodhachan Tharailt, Wester RossJPG_thumb.jpg","galleries_id":6408,"server_id":18,"link":"photo_65914.html","width":130,"caption":"Ref:45 COTTON GRASS BESIDE LOCH DUBH GEODHACHAN THARAILT","height":67});
															thumbnails[65925] = clik.newPhoto({"id":65925,"src":"Laide 6JPG_thumb.jpg","galleries_id":6408,"server_id":18,"link":"photo_65925.html","width":130,"caption":"Ref:32 LAIDE","height":85});
															thumbnails[65949] = clik.newPhoto({"id":65949,"src":"Laide SunriseJPG_thumb.jpg","galleries_id":6408,"server_id":18,"link":"photo_65949.html","width":130,"caption":"Ref:33 LAIDE SUNRISE","height":87});
															thumbnails[65951] = clik.newPhoto({"id":65951,"src":"Loch Dubh Geodhachan Tharailt, Wester RossJPG_thumb.jpg","galleries_id":6408,"server_id":18,"link":"photo_65951.html","width":130,"caption":"Ref:34 LOCH DUBH GEODHACHAN THARAILT.","height":87});
															thumbnails[66196] = clik.newPhoto({"id":66196,"src":"Rainbow, Laide 2-1JPG1_thumb.jpg","galleries_id":6408,"server_id":18,"link":"photo_66196.html","width":130,"caption":"Ref:36 RAINBOW, LAIDE.","height":210});
															thumbnails[66201] = clik.newPhoto({"id":66201,"src":"Mellon Beag, Wester RossJPG_thumb.jpg","galleries_id":6408,"server_id":18,"link":"photo_66201.html","width":130,"caption":"Ref:35 MELLON BEAG, WESTER ROSS.","height":72});
															thumbnails[67156] = clik.newPhoto({"id":67156,"src":"Art Garfunkel 4JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_67156.html","width":130,"caption":"Ref:M11 ART GARFUNKEL","height":98});
															thumbnails[67158] = clik.newPhoto({"id":67158,"src":"Art GarfunkelJPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_67158.html","width":130,"caption":"Ref:M12 ART GARFUNKEL","height":173});
															thumbnails[67159] = clik.newPhoto({"id":67159,"src":"Arthur Brown 2JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_67159.html","width":130,"caption":"Ref:M13 ARTHUR BROWN","height":128});
															thumbnails[67162] = clik.newPhoto({"id":67162,"src":"Arthur BrownJPG1_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_67162.html","width":130,"caption":"Ref:M14 ARTHUR BROWN","height":87});
															thumbnails[67163] = clik.newPhoto({"id":67163,"src":"buddy1JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_67163.html","width":130,"caption":"Ref:M2 BUDDY GUY","height":194});
															thumbnails[67164] = clik.newPhoto({"id":67164,"src":"Buddy and JimmyJPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_67164.html","width":130,"caption":"Ref:M1 BUDDY GUY AND JIMMY VAUGHN","height":100});
															thumbnails[67180] = clik.newPhoto({"id":67180,"src":"Chris FarlowJPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_67180.html","width":130,"caption":"Ref:M3 CHRIS FARLOW","height":173});
															thumbnails[67181] = clik.newPhoto({"id":67181,"src":"Chrissie Hynde 2JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_67181.html","width":130,"caption":"Ref:M4 CHRISSIE HYNDE","height":87});
															thumbnails[84758] = clik.newPhoto({"id":84758,"src":"Anemone in JugJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_84758.html","width":130,"caption":"Ref: Go1. Anemone in jug","height":138});
															thumbnails[85256] = clik.newPhoto({"id":85256,"src":"att821JPG_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85256.html","width":130,"caption":"Ref:M01 Corsican hellebores","height":176});
															thumbnails[85261] = clik.newPhoto({"id":85261,"src":"att823JPG_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85261.html","width":130,"caption":"Ref M02: Sunset over Derwentwater","height":95});
															thumbnails[85268] = clik.newPhoto({"id":85268,"src":"att825JPG_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85268.html","width":130,"caption":"Ref M03: Old barn, Hartsop.","height":183});
															thumbnails[85281] = clik.newPhoto({"id":85281,"src":"att827JPG_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85281.html","width":130,"caption":"Ref M04: Snowdrops","height":90});
															thumbnails[85286] = clik.newPhoto({"id":85286,"src":"att829JPG_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85286.html","width":130,"caption":"Ref M05: Fuschias","height":184});
															thumbnails[85292] = clik.newPhoto({"id":85292,"src":"att831JPG_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85292.html","width":130,"caption":"Ref.M06: The Five Sisters, Alston.","height":93});
															thumbnails[85294] = clik.newPhoto({"id":85294,"src":"att839JPG_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85294.html","width":130,"caption":"Ref.M09: Begonias","height":167});
															thumbnails[85295] = clik.newPhoto({"id":85295,"src":"att833JPG1_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85295.html","width":130,"caption":"Ref.M07: Daffs.","height":97});
															thumbnails[85305] = clik.newPhoto({"id":85305,"src":"att835JPG_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85305.html","width":130,"caption":"Ref.M08: Harvest, Allendale.","height":87});
															thumbnails[85309] = clik.newPhoto({"id":85309,"src":"att841JPG1_thumb.jpg","galleries_id":8077,"server_id":18,"link":"photo_85309.html","width":130,"caption":"Ref.M10: Elterwater","height":107});
															thumbnails[85313] = clik.newPhoto({"id":85313,"src":"Basket of FlowersJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_85313.html","width":130,"caption":"Ref.G02: Basket of flowers.","height":90});
															thumbnails[85323] = clik.newPhoto({"id":85323,"src":"Botanical Tulips after the rainJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_85323.html","width":130,"caption":"Ref.G03 Botanical Tulips after the Rain.","height":114});
															thumbnails[85325] = clik.newPhoto({"id":85325,"src":"Corsican HelleboreJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_85325.html","width":130,"caption":"Ref.04: Corsican Hellebore","height":259});
															thumbnails[85330] = clik.newPhoto({"id":85330,"src":"Daisies001_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_85330.html","width":130,"caption":"Ref.G05: Daisies.","height":193});
															thumbnails[85332] = clik.newPhoto({"id":85332,"src":"Daphne RetusaJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_85332.html","width":130,"caption":"Ref.G06: Daphne Retusa","height":194});
															thumbnails[85336] = clik.newPhoto({"id":85336,"src":"Full Blown TulipJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_85336.html","width":130,"caption":"Ref.G07: Full Blown Tulip.","height":203});
															thumbnails[85339] = clik.newPhoto({"id":85339,"src":"Fuschia with pansiesJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_85339.html","width":130,"caption":"Ref.G08: fuschias with Daisies.","height":197});
															thumbnails[87685] = clik.newPhoto({"id":87685,"src":"Jackson Browne 2JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_87685.html","width":130,"caption":"Ref:M15. Jackson Browne","height":100});
															thumbnails[87718] = clik.newPhoto({"id":87718,"src":"Sheryl Crowe 3JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_87718.html","width":130,"caption":"Ref:M16. Sheryl Crowe","height":175});
															thumbnails[87720] = clik.newPhoto({"id":87720,"src":"Sheryl Crowe 4JPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_87720.html","width":130,"caption":"Ref:M17. Sheryl Crowe","height":95});
															thumbnails[87721] = clik.newPhoto({"id":87721,"src":"sherylJPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_87721.html","width":130,"caption":"Ref:M18 Sheryl Crowe","height":195});
															thumbnails[87723] = clik.newPhoto({"id":87723,"src":"SuedeJPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_87723.html","width":130,"caption":"Ref:19. Suede.","height":146});
															thumbnails[87724] = clik.newPhoto({"id":87724,"src":"Dr FeelgoodJPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_87724.html","width":130,"caption":"Ref:M20. Dr. Feelgood.","height":211});
															thumbnails[87726] = clik.newPhoto({"id":87726,"src":"Peter GreenJPG_thumb.jpg","galleries_id":6381,"server_id":18,"link":"photo_87726.html","width":130,"caption":"Ref:M21. Peter Green.","height":176});
															thumbnails[91840] = clik.newPhoto({"id":91840,"src":"Garden Still LifeJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91840.html","width":130,"caption":"Ref.G09: Garden still life","height":90});
															thumbnails[91852] = clik.newPhoto({"id":91852,"src":"HelleboresJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91852.html","width":130,"caption":"Ref.G10:Hellebores.","height":100});
															thumbnails[91857] = clik.newPhoto({"id":91857,"src":"Himalayan BluesJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91857.html","width":130,"caption":"Ref.G11:Himalayan Blues.","height":181});
															thumbnails[91858] = clik.newPhoto({"id":91858,"src":"Iris after the rainJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91858.html","width":130,"caption":"Ref.G12:Iris after the rain.","height":241});
															thumbnails[91861] = clik.newPhoto({"id":91861,"src":"NarcissusJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91861.html","width":130,"caption":"Ref.G13:Narcissus.","height":58});
															thumbnails[91880] = clik.newPhoto({"id":91880,"src":"Pinks by the windowJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91880.html","width":130,"caption":"Ref.G14: Pinks by the window.","height":90});
															thumbnails[91884] = clik.newPhoto({"id":91884,"src":"Skunk LiliesJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91884.html","width":130,"caption":"Ref.G15: Skunk lilies","height":177});
															thumbnails[91893] = clik.newPhoto({"id":91893,"src":"SnowdropsJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91893.html","width":130,"caption":"Ref.G16: Snowdrops.","height":100});
															thumbnails[91896] = clik.newPhoto({"id":91896,"src":"Spring GardenJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91896.html","width":130,"caption":"Ref.G17: Spring garden.","height":194});
															thumbnails[91905] = clik.newPhoto({"id":91905,"src":"Still Life with LampJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91905.html","width":130,"caption":"Ref.G18: Still life with lamp.","height":94});
															thumbnails[91917] = clik.newPhoto({"id":91917,"src":"Still Life with TrugJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91917.html","width":130,"caption":"Ref.G19.Still life with trug.","height":106});
															thumbnails[91925] = clik.newPhoto({"id":91925,"src":"Sunflower with EchinopsJPG_thumb.jpg","galleries_id":8038,"server_id":18,"link":"photo_91925.html","width":130,"caption":"Ref.G20: Sunflowers with echinops.","height":89});
															thumbnails[3365803] = clik.newPhoto({"id":3365803,"src":"Starbucks 1A4_thumb.jpg","galleries_id":205462,"server_id":18,"link":"photo_3365803.html","width":130,"caption":"STARBUCKS REFLECTIONS<br>\r\nColoured pencil drawing","height":95});
															thumbnails[3365867] = clik.newPhoto({"id":3365867,"src":"Starbucks 2_thumb.jpg","galleries_id":205462,"server_id":18,"link":"photo_3365867.html","width":130,"caption":"STARBUCKS INTERIOR<br>\r\nColoured pencil drawing","height":88});
															thumbnails[3365877] = clik.newPhoto({"id":3365877,"src":"Starbucks 3_thumb.jpg","galleries_id":205462,"server_id":18,"link":"photo_3365877.html","width":130,"caption":"STARBUCKS REFLECTIONS 2<br>\r\nColoured pencil drawing","height":111});
															thumbnails[3365944] = clik.newPhoto({"id":3365944,"src":"Final Drawing, coloured pencil on mylar_thumb.jpg","galleries_id":205462,"server_id":18,"link":"photo_3365944.html","width":130,"caption":"  ROSES AND APPLES<br>\r\nColoured Pencil drawing","height":89});
															thumbnails[3537406] = clik.newPhoto({"id":3537406,"src":"old_barn_Allenheads_thumb.jpg","galleries_id":6399,"server_id":18,"link":"photo_3537406.html","width":130,"caption":"OLD BARN, ALLENHEADS","height":55});
															thumbnails[8907006] = clik.newPhoto({"id":8907006,"src":"P1010678_A682CB39-1EC9-D45B-1CC6F2F74B38828E_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907006.html","width":130,"caption":"P1010678","height":117});
															thumbnails[8910777] = clik.newPhoto({"id":8910777,"src":"P1020451_D9242FC2-1E4F-37DC-710B9D6A7A3674A2_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8910777.html","width":260,"caption":"P1020451","height":109});
															thumbnails[8907007] = clik.newPhoto({"id":8907007,"src":"P1010695_A6832DF8-1EC9-D45B-1C6B406B9792F3D9_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907007.html","width":130,"caption":"P1010695","height":173});
															thumbnails[8910778] = clik.newPhoto({"id":8910778,"src":"P1010687_D9250F1B-1E4F-37DC-717BC964B7CCA56C_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8910778.html","width":260,"caption":"P1010687","height":350});
															thumbnails[8907008] = clik.newPhoto({"id":8907008,"src":"P1010685_A6837B6C-1EC9-D45B-1CE24EDD35C3CD06_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907008.html","width":130,"caption":"P1010685","height":115});
															thumbnails[8907010] = clik.newPhoto({"id":8907010,"src":"P1010692_A683D8B0-1EC9-D45B-1C54BFD363145588_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907010.html","width":130,"caption":"P1010692","height":98});
															thumbnails[8907050] = clik.newPhoto({"id":8907050,"src":"P1020423_A6FFCFE0-1EC9-D45B-1CE6F5EE29A08ED0_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907050.html","width":130,"caption":"P1020423","height":127});
															thumbnails[8907051] = clik.newPhoto({"id":8907051,"src":"P1020427_A70020CA-1EC9-D45B-1CC192DBACEDCF5C_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907051.html","width":130,"caption":"P1020427","height":73});
															thumbnails[8907053] = clik.newPhoto({"id":8907053,"src":"P1020425_A700AE61-1EC9-D45B-1C932AE90E9657B6_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907053.html","width":130,"caption":"P1020425","height":132});
															thumbnails[8907054] = clik.newPhoto({"id":8907054,"src":"P1020437_A7010A82-1EC9-D45B-1C461BC2A6957160_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907054.html","width":130,"caption":"P1020437","height":79});
															thumbnails[8907055] = clik.newPhoto({"id":8907055,"src":"P1020439_A7016006-1EC9-D45B-1CBA06D7F7A4C0B5_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907055.html","width":130,"caption":"P1020439","height":76});
															thumbnails[8907056] = clik.newPhoto({"id":8907056,"src":"P1020461_A7020B0B-1EC9-D45B-1C460B8C3610F3E8_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907056.html","width":130,"caption":"P1020461","height":192});
															thumbnails[8907057] = clik.newPhoto({"id":8907057,"src":"P1020459_A7025D15-1EC9-D45B-1CF08D210FC416C9_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907057.html","width":130,"caption":"P1020459","height":73});
															thumbnails[8907059] = clik.newPhoto({"id":8907059,"src":"P1020448_A702CD3C-1EC9-D45B-1C706672BE3BCB38_thumb.jpg","galleries_id":468436,"server_id":18,"link":"photo_8907059.html","width":130,"caption":"P1020448","height":180});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[6382] = clik.newGallery({"parentGallery":"","usePopups":false,"title":" BLACK & WHITE  GALLERY","link":"gallery_6382.html","maxRecords":0.0,"photoIDs":[65688.0,65691.0,65695.0,65697.0,65699.0,65700.0,65707.0,65711.0,65713.0],"skipIndex":0,"section_code":"gallery","featured_images":"65713,65711,65707,65700,65699,65697,65695,65691,65688","id":6382,"singleSection":false});				  						galleries[8038] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"GICLEE FINE ART PRINTS","link":"gallery_8038.html","maxRecords":0.0,"photoIDs":[84758.0,85313.0,85323.0,85325.0,85330.0,85332.0,85336.0,85339.0,91840.0,91852.0,91857.0,91858.0,91861.0,91880.0,91884.0,91893.0,91896.0,91905.0,91917.0,91925.0],"skipIndex":0,"section_code":"gallery","featured_images":"91925,91917,91905,91896,91893,91884,91880,91861,91858,91857","id":8038,"singleSection":false});				  						galleries[468436] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"GOLD AND SILVERPOINT DRAWING","link":"gallery_468436.html","maxRecords":0.0,"photoIDs":[8907006.0,8910777.0,8907007.0,8910778.0,8907008.0,8907010.0,8907050.0,8907051.0,8907053.0,8907054.0,8907055.0,8907056.0,8907057.0,8907059.0],"skipIndex":0,"section_code":"gallery","featured_images":"8910778,8910777,8907059,8907057,8907056,8907055,8907054,8907053,8907051,8907050","id":468436,"singleSection":false});				  						galleries[6404] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LAKE DISTRICT GALLERY","link":"gallery_6404.html","maxRecords":0.0,"photoIDs":[65860.0,65874.0,65786.0,65823.0,65835.0,65845.0,65853.0,65830.0],"skipIndex":0,"section_code":"gallery","featured_images":"65874,65860,65853,65845,65835,65830,65823,65786","id":6404,"singleSection":false});				  						galleries[8077] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"MINIATURE PRINTS","link":"gallery_8077.html","maxRecords":0.0,"photoIDs":[85256.0,85261.0,85268.0,85281.0,85286.0,85292.0,85294.0,85295.0,85305.0,85309.0],"skipIndex":0,"section_code":"gallery","featured_images":"85309,85305,85295,85294,85292,85286,85281,85268,85261,85256","id":8077,"singleSection":false});				  						galleries[6381] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"MUSIC PERSONALITIES  GALLERY ","link":"gallery_6381.html","maxRecords":0.0,"photoIDs":[87728.0,87732.0,65561.0,65563.0,65567.0,65568.0,65572.0,65573.0,67156.0,67158.0,67159.0,67162.0,67163.0,67164.0,67180.0,67181.0,87685.0,87718.0,87720.0,87721.0,87723.0,87724.0,87726.0],"skipIndex":0,"section_code":"gallery","featured_images":"87732,87728,87726,87724,87723,87721,87720,87718,87685,67181","id":6381,"singleSection":false});				  						galleries[6399] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"NORTHUMBERLAND GALLERY","link":"gallery_6399.html","maxRecords":0.0,"photoIDs":[65457.0,65716.0,65729.0,65734.0,65754.0,65756.0,65759.0,3537406.0],"skipIndex":0,"section_code":"gallery","featured_images":3537406.0,"id":6399,"singleSection":false});				  						galleries[205462] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"ORIGINAL PAINTINGS","link":"gallery_205462.html","maxRecords":0.0,"photoIDs":[3365803.0,3365867.0,3365877.0,3365944.0],"skipIndex":0,"section_code":"gallery","featured_images":"3365944,3365877,3365867,3365803","id":205462,"singleSection":false});				  						galleries[6408] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"SCOTLAND  GALLERY","link":"gallery_6408.html","maxRecords":0.0,"photoIDs":[65914.0,65925.0,65949.0,65951.0,66196.0,66201.0],"skipIndex":0,"section_code":"gallery","featured_images":"66201,66196,65951,65949,65925,65914","id":6408,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3537406,3365867,3365803,91905,91896,87721,85323,84758,65695,65688,65457';
imageSets[2] = '3537406';
imageSets[3] = '8910778,8910777,8907059,8907057,8907056,8907055,8907054,8907053,8907051,8907050,8907046,8907045,8907044,8907043,8907042,8907041,8907040,8907035,8907034,8907033,8907032,8907031,8907027,8907026,8907023,8907022,8907021,8907010,8907008,8907007,8907006,4777191,3537406,3365944,3365877,3365867,3365803,607300,91925,91917,91905,91896,91893,91884,91880,91861,91858,91857,91852,91840';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/rmaddison/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/rmaddison/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 = 'ROBERT MADDISON, ARTIST & FINE ART PHOTOGRAPHER: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> $' + (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="maddisonstudios@btinternet.com">';
					temp += '<input type="hidden" name="currency_code" value="USD">';
					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="maddisonstudios@btinternet.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;
	}
}

			

