window.thumbnails = {};
															thumbnails[4264137] = clik.newPhoto({"id":4264137,"src":"1Machen1_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4264137.html","width":130,"caption":"Machen","height":167});
															thumbnails[4264151] = clik.newPhoto({"id":4264151,"src":"5A40932_thumb.jpg","galleries_id":252115,"server_id":18,"link":"photo_4264151.html","width":130,"caption":"A4093","height":42});
															thumbnails[4264193] = clik.newPhoto({"id":4264193,"src":"1A4061_thumb.jpg","galleries_id":252115,"server_id":18,"link":"photo_4264193.html","width":130,"caption":"A4061","height":42});
															thumbnails[4264202] = clik.newPhoto({"id":4264202,"src":"2A4061_thumb.jpg","galleries_id":252115,"server_id":18,"link":"photo_4264202.html","width":130,"caption":"A4061","height":42});
															thumbnails[4264204] = clik.newPhoto({"id":4264204,"src":"4A4107_thumb.jpg","galleries_id":252115,"server_id":18,"link":"photo_4264204.html","width":130,"caption":"A4107","height":42});
															thumbnails[4264205] = clik.newPhoto({"id":4264205,"src":"6A4061_thumb.jpg","galleries_id":252115,"server_id":18,"link":"photo_4264205.html","width":130,"caption":"A4061","height":42});
															thumbnails[4264796] = clik.newPhoto({"id":4264796,"src":"Central_St_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264796.html","width":130,"caption":"Central Street","height":165});
															thumbnails[4264877] = clik.newPhoto({"id":4264877,"src":"Alexandra_Tce_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264877.html","width":130,"caption":"Alexandra Terrace","height":163});
															thumbnails[4264878] = clik.newPhoto({"id":4264878,"src":"Bryn_Rd_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264878.html","width":130,"caption":"Bryn Road","height":166});
															thumbnails[4264881] = clik.newPhoto({"id":4264881,"src":"Edward_St_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264881.html","width":130,"caption":"Edward Street","height":167});
															thumbnails[4264912] = clik.newPhoto({"id":4264912,"src":"Herbert_St_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264912.html","width":130,"caption":"Herbert Street","height":163});
															thumbnails[4264985] = clik.newPhoto({"id":4264985,"src":"Leslie_Tce_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264985.html","width":130,"caption":"Leslie Terrace","height":166});
															thumbnails[4264987] = clik.newPhoto({"id":4264987,"src":"Leslie_Tce2_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264987.html","width":130,"caption":"Leslie Terrace","height":165});
															thumbnails[4264989] = clik.newPhoto({"id":4264989,"src":"Meadow_St_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264989.html","width":130,"caption":"Meadow Street","height":166});
															thumbnails[4264993] = clik.newPhoto({"id":4264993,"src":"Nant_Ddu_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264993.html","width":130,"caption":"Nant Ddu","height":168});
															thumbnails[4264994] = clik.newPhoto({"id":4264994,"src":"Nantcarn_Rd_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264994.html","width":130,"caption":"Nantcarn Road","height":163});
															thumbnails[4264995] = clik.newPhoto({"id":4264995,"src":"Park_St_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264995.html","width":130,"caption":"Park Street","height":162});
															thumbnails[4264998] = clik.newPhoto({"id":4264998,"src":"Park_View_St_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4264998.html","width":130,"caption":"Park View","height":165});
															thumbnails[4265102] = clik.newPhoto({"id":4265102,"src":"Pengam_Rd_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4265102.html","width":130,"caption":"Pengam Road","height":165});
															thumbnails[4265104] = clik.newPhoto({"id":4265104,"src":"Penrhiwceiber_Rd_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4265104.html","width":130,"caption":"Penrhiwceiber Road","height":165});
															thumbnails[4265118] = clik.newPhoto({"id":4265118,"src":"Pleasant_Tce_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4265118.html","width":130,"caption":"Pleasant Terrace","height":160});
															thumbnails[4265121] = clik.newPhoto({"id":4265121,"src":"Primrose_Tce_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4265121.html","width":130,"caption":"Primrose Terrace","height":159});
															thumbnails[4265122] = clik.newPhoto({"id":4265122,"src":"School_St_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4265122.html","width":130,"caption":"School Street","height":166});
															thumbnails[4265126] = clik.newPhoto({"id":4265126,"src":"Upper_Gertrude_St_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4265126.html","width":130,"caption":"Upper Gertrude Street","height":164});
															thumbnails[4265127] = clik.newPhoto({"id":4265127,"src":"Upper_Gynor_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4265127.html","width":130,"caption":"Upper Gynor","height":166});
															thumbnails[4265129] = clik.newPhoto({"id":4265129,"src":"Williams_St_thumb.jpg","galleries_id":252146,"server_id":18,"link":"photo_4265129.html","width":130,"caption":"Williams Street","height":162});
															thumbnails[4265342] = clik.newPhoto({"id":4265342,"src":"Hope1_thumb.jpg","galleries_id":252149,"server_id":18,"link":"photo_4265342.html","width":130,"caption":"Hope","height":105});
															thumbnails[4265368] = clik.newPhoto({"id":4265368,"src":"BigPit_thumb.jpg","galleries_id":252149,"server_id":18,"link":"photo_4265368.html","width":130,"caption":"Big Pit","height":107});
															thumbnails[4265384] = clik.newPhoto({"id":4265384,"src":"DareWindow_thumb.jpg","galleries_id":252149,"server_id":18,"link":"photo_4265384.html","width":130,"caption":"Dare","height":107});
															thumbnails[4265388] = clik.newPhoto({"id":4265388,"src":"TShirt_thumb.jpg","galleries_id":252149,"server_id":18,"link":"photo_4265388.html","width":130,"caption":"Big Pit","height":108});
															thumbnails[4265418] = clik.newPhoto({"id":4265418,"src":"Tonyrefail_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265418.html","width":130,"caption":"Tonyrefail","height":166});
															thumbnails[4265464] = clik.newPhoto({"id":4265464,"src":"Abertillery_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265464.html","width":130,"caption":"Abertillery","height":166});
															thumbnails[4265465] = clik.newPhoto({"id":4265465,"src":"Bargoed_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265465.html","width":130,"caption":"Bargoed","height":166});
															thumbnails[4265482] = clik.newPhoto({"id":4265482,"src":"Blackmill_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265482.html","width":130,"caption":"Blackmill","height":166});
															thumbnails[4265484] = clik.newPhoto({"id":4265484,"src":"Blaina_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265484.html","width":130,"caption":"Blaina","height":166});
															thumbnails[4265485] = clik.newPhoto({"id":4265485,"src":"Clydach_Vale_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265485.html","width":130,"caption":"Clydach Vale","height":168});
															thumbnails[4265514] = clik.newPhoto({"id":4265514,"src":"Ebbw_Vale_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265514.html","width":130,"caption":"Ebbw Vale","height":165});
															thumbnails[4265515] = clik.newPhoto({"id":4265515,"src":"Ferndale_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265515.html","width":130,"caption":"Ferndale","height":167});
															thumbnails[4265519] = clik.newPhoto({"id":4265519,"src":"Llanbradach_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265519.html","width":130,"caption":"Llanbradach","height":171});
															thumbnails[4265520] = clik.newPhoto({"id":4265520,"src":"Maesteg_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265520.html","width":130,"caption":"Maesteg","height":166});
															thumbnails[4265522] = clik.newPhoto({"id":4265522,"src":"Nelson_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265522.html","width":130,"caption":"Nelson","height":169});
															thumbnails[4265524] = clik.newPhoto({"id":4265524,"src":"Pontypridd_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265524.html","width":130,"caption":"Pontypridd","height":166});
															thumbnails[4265525] = clik.newPhoto({"id":4265525,"src":"RhonddaLupins_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265525.html","width":130,"caption":"Rhondda","height":165});
															thumbnails[4265528] = clik.newPhoto({"id":4265528,"src":"Rhymney_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4265528.html","width":130,"caption":"Rhymney","height":166});
															thumbnails[4267836] = clik.newPhoto({"id":4267836,"src":"cg11_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267836.html","width":130,"caption":"Cefn Gelligaer","height":164});
															thumbnails[4267839] = clik.newPhoto({"id":4267839,"src":"cg2_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267839.html","width":130,"caption":"Cefn Gelligaer","height":166});
															thumbnails[4267840] = clik.newPhoto({"id":4267840,"src":"cg3_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267840.html","width":130,"caption":"Cefn Gelligaer","height":164});
															thumbnails[4267841] = clik.newPhoto({"id":4267841,"src":"cg4_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267841.html","width":130,"caption":"Cefn Gelligaer","height":166});
															thumbnails[4267842] = clik.newPhoto({"id":4267842,"src":"cg5_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267842.html","width":130,"caption":"Cefn Gelligaer","height":164});
															thumbnails[4267843] = clik.newPhoto({"id":4267843,"src":"cg6_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267843.html","width":130,"caption":"Cefn Gelligaer","height":166});
															thumbnails[4267844] = clik.newPhoto({"id":4267844,"src":"cg7_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267844.html","width":130,"caption":"Cefn Gelligaer","height":166});
															thumbnails[4267845] = clik.newPhoto({"id":4267845,"src":"cg8_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267845.html","width":130,"caption":"Cefn Gelligaer","height":166});
															thumbnails[4267846] = clik.newPhoto({"id":4267846,"src":"rhos1_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267846.html","width":130,"caption":"Rhos-gwawr","height":165});
															thumbnails[4267847] = clik.newPhoto({"id":4267847,"src":"rhos2_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267847.html","width":130,"caption":"Rhos-gwawr","height":164});
															thumbnails[4267849] = clik.newPhoto({"id":4267849,"src":"rhos3_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267849.html","width":130,"caption":"Rhos-gwawr","height":165});
															thumbnails[4267851] = clik.newPhoto({"id":4267851,"src":"rhos4_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267851.html","width":130,"caption":"Rhos-gwawr","height":166});
															thumbnails[4267856] = clik.newPhoto({"id":4267856,"src":"rhos5_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267856.html","width":130,"caption":"Rhos-gwawr","height":165});
															thumbnails[4267859] = clik.newPhoto({"id":4267859,"src":"rhos6_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267859.html","width":130,"caption":"Rhos-gwawr","height":165});
															thumbnails[4267861] = clik.newPhoto({"id":4267861,"src":"rhos7_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267861.html","width":130,"caption":"Rhos-gwawr","height":165});
															thumbnails[4267864] = clik.newPhoto({"id":4267864,"src":"rhos8_thumb.jpg","galleries_id":252144,"server_id":18,"link":"photo_4267864.html","width":130,"caption":"Rhos-gwawr","height":166});
															thumbnails[4269134] = clik.newPhoto({"id":4269134,"src":"Bwlfa21_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269134.html","width":130,"caption":"Bwlfa","height":164});
															thumbnails[4269139] = clik.newPhoto({"id":4269139,"src":"Bwylfa1_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269139.html","width":130,"caption":"Bwlfa","height":164});
															thumbnails[4269141] = clik.newPhoto({"id":4269141,"src":"Cambrian_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269141.html","width":130,"caption":"Cambrian","height":165});
															thumbnails[4269144] = clik.newPhoto({"id":4269144,"src":"Cwmcarn_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269144.html","width":130,"caption":"Cwmcarn","height":172});
															thumbnails[4269156] = clik.newPhoto({"id":4269156,"src":"DeepDuffryn1_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269156.html","width":130,"caption":"Deep Duffryn","height":165});
															thumbnails[4269224] = clik.newPhoto({"id":4269224,"src":"Llanhilleth_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269224.html","width":130,"caption":"Llanhilleth","height":165});
															thumbnails[4269234] = clik.newPhoto({"id":4269234,"src":"Marine11_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269234.html","width":130,"caption":"Marine","height":165});
															thumbnails[4269250] = clik.newPhoto({"id":4269250,"src":"Marine2_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269250.html","width":130,"caption":"Marine","height":164});
															thumbnails[4269256] = clik.newPhoto({"id":4269256,"src":"BigPit1_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269256.html","width":130,"caption":"Big Pit","height":164});
															thumbnails[4269258] = clik.newPhoto({"id":4269258,"src":"Nantgarw_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269258.html","width":130,"caption":"Nantgarw","height":166});
															thumbnails[4269263] = clik.newPhoto({"id":4269263,"src":"SevenSisters_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269263.html","width":130,"caption":"Seven Sisters","height":163});
															thumbnails[4269267] = clik.newPhoto({"id":4269267,"src":"Universal_thumb.jpg","galleries_id":252147,"server_id":18,"link":"photo_4269267.html","width":130,"caption":"Universal","height":165});
															thumbnails[4269382] = clik.newPhoto({"id":4269382,"src":"T1_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269382.html","width":130,"caption":"Tylorstown Tip","height":165});
															thumbnails[4269609] = clik.newPhoto({"id":4269609,"src":"T2_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269609.html","width":130,"caption":"Tylorstown Tip","height":164});
															thumbnails[4269737] = clik.newPhoto({"id":4269737,"src":"T3_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269737.html","width":130,"caption":"Tylorstown Tip","height":164});
															thumbnails[4269739] = clik.newPhoto({"id":4269739,"src":"T4_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269739.html","width":130,"caption":"Tylorstown Tip","height":166});
															thumbnails[4269746] = clik.newPhoto({"id":4269746,"src":"T6_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269746.html","width":130,"caption":"Tylorstown Tip","height":164});
															thumbnails[4269750] = clik.newPhoto({"id":4269750,"src":"T7_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269750.html","width":130,"caption":"Tylorstown Tip","height":165});
															thumbnails[4269752] = clik.newPhoto({"id":4269752,"src":"T8_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269752.html","width":130,"caption":"Tylorstown Tip","height":165});
															thumbnails[4269755] = clik.newPhoto({"id":4269755,"src":"T9_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269755.html","width":130,"caption":"Tylorstown Tip","height":165});
															thumbnails[4269757] = clik.newPhoto({"id":4269757,"src":"T10_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269757.html","width":130,"caption":"Tylorstown Tip","height":164});
															thumbnails[4269760] = clik.newPhoto({"id":4269760,"src":"T11_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4269760.html","width":130,"caption":"Tylorstown Tip","height":164});
															thumbnails[4270211] = clik.newPhoto({"id":4270211,"src":"R1_thumb.jpg","galleries_id":252145,"server_id":18,"link":"photo_4270211.html","width":130,"caption":"Return","height":170});
															thumbnails[4270283] = clik.newPhoto({"id":4270283,"src":"R2_thumb.jpg","galleries_id":252145,"server_id":18,"link":"photo_4270283.html","width":130,"caption":"Return","height":165});
															thumbnails[4270285] = clik.newPhoto({"id":4270285,"src":"R3_thumb.jpg","galleries_id":252145,"server_id":18,"link":"photo_4270285.html","width":130,"caption":"Return","height":172});
															thumbnails[4275561] = clik.newPhoto({"id":4275561,"src":"T51_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4275561.html","width":130,"caption":"Tylorstown Tip","height":166});
															thumbnails[4275566] = clik.newPhoto({"id":4275566,"src":"R41_thumb.jpg","galleries_id":252145,"server_id":18,"link":"photo_4275566.html","width":130,"caption":"Return","height":167});
															thumbnails[4276519] = clik.newPhoto({"id":4276519,"src":"Wyllie1_thumb.jpg","galleries_id":252116,"server_id":18,"link":"photo_4276519.html","width":130,"caption":"Wyllie","height":166});
															thumbnails[4568193] = clik.newPhoto({"id":4568193,"src":"1_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568193.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568201] = clik.newPhoto({"id":4568201,"src":"2_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568201.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568204] = clik.newPhoto({"id":4568204,"src":"3_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568204.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568207] = clik.newPhoto({"id":4568207,"src":"4_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568207.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568215] = clik.newPhoto({"id":4568215,"src":"5_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568215.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568218] = clik.newPhoto({"id":4568218,"src":"6_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568218.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568223] = clik.newPhoto({"id":4568223,"src":"7_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568223.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568225] = clik.newPhoto({"id":4568225,"src":"8_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568225.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568229] = clik.newPhoto({"id":4568229,"src":"9_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568229.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568230] = clik.newPhoto({"id":4568230,"src":"10_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568230.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568233] = clik.newPhoto({"id":4568233,"src":"11_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568233.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568234] = clik.newPhoto({"id":4568234,"src":"12_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568234.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568237] = clik.newPhoto({"id":4568237,"src":"13_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568237.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568239] = clik.newPhoto({"id":4568239,"src":"14_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568239.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568240] = clik.newPhoto({"id":4568240,"src":"15_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568240.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4568242] = clik.newPhoto({"id":4568242,"src":"16_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_4568242.html","width":130,"caption":"Tylorstown","height":163});
															thumbnails[4991225] = clik.newPhoto({"id":4991225,"src":"Blaenafon_thumb.jpg","galleries_id":252149,"server_id":18,"link":"photo_4991225.html","width":130,"caption":"Blaenavon","height":162});
															thumbnails[4991260] = clik.newPhoto({"id":4991260,"src":"Dare_Valley_2_thumb.jpg","galleries_id":252149,"server_id":18,"link":"photo_4991260.html","width":130,"caption":"Dare","height":162});
															thumbnails[4991274] = clik.newPhoto({"id":4991274,"src":"Dare_Valley_thumb.jpg","galleries_id":252149,"server_id":18,"link":"photo_4991274.html","width":130,"caption":"Dare","height":163});
															thumbnails[4991288] = clik.newPhoto({"id":4991288,"src":"Rhondda_thumb.jpg","galleries_id":252149,"server_id":18,"link":"photo_4991288.html","width":130,"caption":"Rhondda","height":164});
															thumbnails[4998057] = clik.newPhoto({"id":4998057,"src":"Tylorstown_School_Project1_thumb.jpg","galleries_id":252148,"server_id":18,"link":"photo_4998057.html","width":130,"caption":"Tylorstown Tip","height":164});
															thumbnails[5743508] = clik.newPhoto({"id":5743508,"src":"Pen_Foel_Aman_Un_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_5743508.html","width":130,"caption":"Pen Foel Aman","height":43});
															thumbnails[5743513] = clik.newPhoto({"id":5743513,"src":"Pen_Foel_Aman_Dau_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_5743513.html","width":130,"caption":"Pen Foel Aman","height":43});
															thumbnails[5743533] = clik.newPhoto({"id":5743533,"src":"Pen_Foel_Aman_Pump_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_5743533.html","width":130,"caption":"Pen Foel Aman","height":43});
															thumbnails[5743536] = clik.newPhoto({"id":5743536,"src":"Coed_Cae_Aberaman_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_5743536.html","width":130,"caption":"Coed Cae Aberaman","height":44});
															thumbnails[5743540] = clik.newPhoto({"id":5743540,"src":"Craig_Ogwr_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_5743540.html","width":130,"caption":"Craig Ogwr","height":42});
															thumbnails[5743541] = clik.newPhoto({"id":5743541,"src":"Pen_Foel_Aman_Tri_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_5743541.html","width":130,"caption":"Pen Foel Aman","height":43});
															thumbnails[5743543] = clik.newPhoto({"id":5743543,"src":"Pen_Foel_Aman_Pedwar_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_5743543.html","width":130,"caption":"Pen Foel Aman","height":43});
															thumbnails[5743544] = clik.newPhoto({"id":5743544,"src":"Bryn_Du_thumb.jpg","galleries_id":264908,"server_id":18,"link":"photo_5743544.html","width":130,"caption":"Bryn Du","height":43});
															thumbnails[7014928] = clik.newPhoto({"id":7014928,"src":"1-A4061_Detail_thumb.jpg","galleries_id":252115,"server_id":18,"link":"photo_7014928.html","width":130,"caption":"A4061 (Detail)","height":163});
															thumbnails[8196250] = clik.newPhoto({"id":8196250,"src":"Troy_Road_19821_thumb.jpg","galleries_id":379983,"server_id":18,"link":"photo_8196250.html","width":130,"caption":"Troy Road 1982","height":163});
															thumbnails[8220655] = clik.newPhoto({"id":8220655,"src":"Graig_yr_Helfa_thumb.jpg","galleries_id":379983,"server_id":18,"link":"photo_8220655.html","width":130,"caption":"Graig yr Helfa","height":163});
															thumbnails[8220656] = clik.newPhoto({"id":8220656,"src":"Hospital_Road_thumb.jpg","galleries_id":379983,"server_id":18,"link":"photo_8220656.html","width":130,"caption":"Hospital Road","height":163});
															thumbnails[8220657] = clik.newPhoto({"id":8220657,"src":"River_Street_thumb.jpg","galleries_id":379983,"server_id":18,"link":"photo_8220657.html","width":130,"caption":"River street","height":166});
															thumbnails[8446086] = clik.newPhoto({"id":8446086,"src":"Primrose_Terrace1_thumb.jpg","galleries_id":379983,"server_id":18,"link":"photo_8446086.html","width":130,"caption":"Primrose Terrace","height":163});
															thumbnails[8446092] = clik.newPhoto({"id":8446092,"src":"Woodfield_Terrace1_thumb.jpg","galleries_id":379983,"server_id":18,"link":"photo_8446092.html","width":130,"caption":"Woodfield Terrace","height":163});
															thumbnails[8446093] = clik.newPhoto({"id":8446093,"src":"Pleasant_View1_thumb.jpg","galleries_id":379983,"server_id":18,"link":"photo_8446093.html","width":130,"caption":"Pleasant View","height":163});
															thumbnails[8446096] = clik.newPhoto({"id":8446096,"src":"Llwyncelyn_Court1_thumb.jpg","galleries_id":379983,"server_id":18,"link":"photo_8446096.html","width":130,"caption":"Llwyncelyn Court","height":163});
															thumbnails[4263979] = clik.newPhoto({"id":4263979,"src":"3A4093_thumb.jpg","galleries_id":252115,"server_id":18,"link":"photo_4263979.html","width":130,"caption":"A4093","height":42});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[379983] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Poles","link":"gallery_379983.html","maxRecords":0.0,"photoIDs":[8196250.0,8220655.0,8220656.0,8220657.0,8446086.0,8446092.0,8446093.0,8446096.0],"skipIndex":0,"section_code":"gallery","featured_images":"8446096,8446093,8446092,8446086,8220657,8220656,8220655,8196250","id":379983,"singleSection":false});				  						galleries[264908] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Forest","link":"gallery_264908.html","maxRecords":0.0,"photoIDs":[4568193.0,4568201.0,4568204.0,4568207.0,4568215.0,4568218.0,4568223.0,4568225.0,4568229.0,4568230.0,4568233.0,4568234.0,4568237.0,4568239.0,4568240.0,4568242.0,5743508.0,5743513.0,5743533.0,5743536.0,5743540.0,5743541.0,5743543.0,5743544.0],"skipIndex":0,"section_code":"gallery","featured_images":"4568242,4568237,4568234,4568230,4568229,4568215,4568193","id":264908,"singleSection":false});				  						galleries[252144] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Powerlines","link":"gallery_252144.html","maxRecords":0.0,"photoIDs":[4267836.0,4267839.0,4267840.0,4267841.0,4267842.0,4267843.0,4267844.0,4267845.0,4267846.0,4267847.0,4267849.0,4267851.0,4267856.0,4267859.0,4267861.0,4267864.0],"skipIndex":0,"section_code":"gallery","featured_images":"4267864,4267861,4267859,4267856,4267851,4267849,4267847,4267846,4267845,4267844,4267843,4267842,4267841,4267840,4267839,4267836","id":252144,"singleSection":false});				  						galleries[252116] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Transmissions","link":"gallery_252116.html","maxRecords":0.0,"photoIDs":[4264137.0,4265418.0,4265464.0,4265465.0,4265482.0,4265484.0,4265485.0,4265514.0,4265515.0,4265519.0,4265520.0,4265522.0,4265524.0,4265525.0,4265528.0,4276519.0],"skipIndex":0,"section_code":"gallery","featured_images":"4276519,4265528,4265525,4265524,4265522,4265520,4265519,4265515,4265514,4265485,4265484,4265482,4265465,4265464,4265418","id":252116,"singleSection":false});				  						galleries[252146] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"End of The Row","link":"gallery_252146.html","maxRecords":0.0,"photoIDs":[4264796.0,4264877.0,4264878.0,4264881.0,4264912.0,4264985.0,4264987.0,4264989.0,4264993.0,4264994.0,4264995.0,4264998.0,4265102.0,4265104.0,4265118.0,4265121.0,4265122.0,4265126.0,4265127.0,4265129.0],"skipIndex":0,"section_code":"gallery","featured_images":"4265129,4265127,4265126,4265122,4265121,4265118,4265104,4265102,4264998,4264995,4264994,4264993,4264989,4264987,4264985,4264912,4264881,4264878,4264877,4264796","id":252146,"singleSection":false});				  						galleries[252147] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Monuments to Coal","link":"gallery_252147.html","maxRecords":0.0,"photoIDs":[4269134.0,4269139.0,4269141.0,4269144.0,4269156.0,4269224.0,4269234.0,4269250.0,4269256.0,4269258.0,4269263.0,4269267.0],"skipIndex":0,"section_code":"gallery","featured_images":"4269267,4269263,4269258,4269256,4269250,4269234,4269224,4269156,4269144,4269139,4269134","id":252147,"singleSection":false});				  						galleries[252148] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portrait of a Tip","link":"gallery_252148.html","maxRecords":0.0,"photoIDs":[4269382.0,4269609.0,4269737.0,4269739.0,4269746.0,4269750.0,4269752.0,4269755.0,4269757.0,4269760.0,4275561.0,4998057.0],"skipIndex":0,"section_code":"gallery","featured_images":"4275561,4269760,4269757,4269755,4269752,4269750,4269746,4269739,4269737,4269609,4269382","id":252148,"singleSection":false});				  						galleries[252145] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Return","link":"gallery_252145.html","maxRecords":0.0,"photoIDs":[4270211.0,4270283.0,4270285.0,4275566.0],"skipIndex":0,"section_code":"gallery","featured_images":4275566.0,"id":252145,"singleSection":false});				  						galleries[252149] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Heritage of Coal","link":"gallery_252149.html","maxRecords":0.0,"photoIDs":[4265342.0,4265368.0,4265384.0,4265388.0,4991225.0,4991260.0,4991274.0,4991288.0],"skipIndex":0,"section_code":"gallery","featured_images":4991225.0,"id":252149,"singleSection":false});				  						galleries[252115] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Outlook","link":"gallery_252115.html","maxRecords":0.0,"photoIDs":[4264151.0,4264193.0,4264202.0,4264204.0,4264205.0,7014928.0,4263979.0],"skipIndex":0,"section_code":"gallery","featured_images":7014928.0,"id":252115,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8446096,8446093,8446092,4568242,4568237,4568234,4568230,4568229,4568215,4568193,4269757,4269382,4269267,4269263,4269258,4269256,4269250,4269234,4269224,4269156,4269144,4269139,4269134,4267864,4267861,4267859,4267856,4267851,4267849,4267847,4267846,4267845,4267844,4267843,4267842,4267841,4267840,4267839,4267836,4265528,4265525,4265524,4265522,4265520,4265519,4265515,4265514,4265485,4265484,4265482,4265465,4265464,4265418,4265129,4265127,4265126,4265122,4265121,4265118,4265104,4265102,4264998,4264995,4264994,4264993,4264989,4264987,4264985,4264912,4264881,4264878,4264877,4264796,4264137';
imageSets[2] = '8446096,8446093,8446092,8446086,8220657,8220656,8220655,8196250,7014928,4991225,4568242,4568237,4568234,4568230,4568229,4568215,4568193,4276519,4275566,4275561,4269760,4269757,4269755,4269752,4269750,4269746,4269739,4269737,4269609,4269382,4269267,4269263,4269258,4269256,4269250,4269234,4269224,4269156,4269144,4269139,4269134,4267864,4267861,4267859,4267856,4267851,4267849,4267847,4267846,4267845,4267844,4267843,4267842,4267841,4267840,4267839,4267836,4265528,4265525,4265524,4265522,4265520,4265519,4265515,4265514,4265485,4265484,4265482,4265465,4265464,4265418,4265129,4265127,4265126,4265122,4265121,4265118,4265104,4265102,4264998,4264995,4264994,4264993,4264989,4264987,4264985,4264912,4264881,4264878,4264877,4264796';
imageSets[3] = '8446096,8446093,8446092,8446086,8220657,8220656,8220655,8196250,7014928,5743544,5743543,5743541,5743540,5743536,5743533,5743513,5743508,4998057,4991288,4991274,4991260,4991225,4568242,4568240,4568239,4568237,4568234,4568233,4568230,4568229,4568225,4568223,4568218,4568215,4568207,4568204,4568201,4568193,4276519,4275566,4275561,4270285,4270283,4270211,4269760,4269757,4269755,4269752,4269750,4269746';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/pcabuts/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/pcabuts/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 = 'Paul Cabuts: ' + 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;
	}
}

			

