window.thumbnails = {};
															thumbnails[607955] = clik.newPhoto({"id":607955,"src":"Paul Open Studio 1_thumb.jpg","galleries_id":46670,"server_id":15,"link":"photo_607955.html","width":130,"caption":"In the studio with \"Timescape\" images.","height":92});
															thumbnails[601509] = clik.newPhoto({"id":601509,"src":"Black Horizon_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601509.html","width":130,"caption":"Black Horizon","height":84});
															thumbnails[601503] = clik.newPhoto({"id":601503,"src":"Brokeback Yello No1_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601503.html","width":130,"caption":"Brokeback Yellow No 1","height":101});
															thumbnails[601477] = clik.newPhoto({"id":601477,"src":"Yellow to Go _thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601477.html","width":130,"caption":"Yellow to Go","height":98});
															thumbnails[601489] = clik.newPhoto({"id":601489,"src":"Tulipa Flame_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601489.html","width":130,"caption":"Tulipa Flame","height":106});
															thumbnails[598460] = clik.newPhoto({"id":598460,"src":"Harlech-Foel-Senigl---05_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_598460.html","width":130,"caption":"Standing Stone-Foel Senigl","height":87});
															thumbnails[598488] = clik.newPhoto({"id":598488,"src":"Harlech2_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_598488.html","width":130,"caption":"Standing Stone-Foel Senigl.","height":87});
															thumbnails[598562] = clik.newPhoto({"id":598562,"src":"2_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_598562.html","width":130,"caption":"Standing Stone, Foel Senigl.","height":87});
															thumbnails[598570] = clik.newPhoto({"id":598570,"src":"31_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_598570.html","width":130,"caption":"Sheep Pen - Foel Senigl","height":87});
															thumbnails[598577] = clik.newPhoto({"id":598577,"src":"Trig Seat chair_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_598577.html","width":130,"caption":"Trig Point and Seat,Dawn on Foel Senigl","height":89});
															thumbnails[598579] = clik.newPhoto({"id":598579,"src":"51_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_598579.html","width":130,"caption":"Dawn on Foel Senigl.","height":87});
															thumbnails[598588] = clik.newPhoto({"id":598588,"src":"WELSH BLACK2_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_598588.html","width":130,"caption":"Welsh Black","height":87});
															thumbnails[598594] = clik.newPhoto({"id":598594,"src":"41_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_598594.html","width":130,"caption":"Dry Stone Wall.","height":86});
															thumbnails[615262] = clik.newPhoto({"id":615262,"src":"Shadow Stand_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_615262.html","width":130,"caption":"\"Shadow Stand\"","height":104});
															thumbnails[615275] = clik.newPhoto({"id":615275,"src":"Welsh Black_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_615275.html","width":130,"caption":"\"Welsh Black\"","height":95});
															thumbnails[615283] = clik.newPhoto({"id":615283,"src":"Shadow on Foel Senigl_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_615283.html","width":130,"caption":"\"Shadow on Foel Senigl\"","height":103});
															thumbnails[615289] = clik.newPhoto({"id":615289,"src":"trig chair_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_615289.html","width":130,"caption":"\"Trig and Chair\"","height":87});
															thumbnails[615307] = clik.newPhoto({"id":615307,"src":"Inquisition Cow 2_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_615307.html","width":130,"caption":"\"Inquisition\"","height":87});
															thumbnails[615317] = clik.newPhoto({"id":615317,"src":"Standing Stone 2_thumb.jpg","galleries_id":46018,"server_id":15,"link":"photo_615317.html","width":130,"caption":"\"Standing Stone\"","height":103});
															thumbnails[604305] = clik.newPhoto({"id":604305,"src":"Large Glass - 41_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604305.html","width":130,"caption":"\"The Large Glass\"","height":90});
															thumbnails[604319] = clik.newPhoto({"id":604319,"src":"Large Glass - 25_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604319.html","width":130,"caption":"\"The Large Glass\"","height":87});
															thumbnails[604332] = clik.newPhoto({"id":604332,"src":"Large Glass - 45_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604332.html","width":130,"caption":"\"The Large Glass\"","height":88});
															thumbnails[604339] = clik.newPhoto({"id":604339,"src":"Large Glass - 49_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604339.html","width":130,"caption":"\"The Large Glass\"","height":87});
															thumbnails[604346] = clik.newPhoto({"id":604346,"src":"Large Glass - 52_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604346.html","width":130,"caption":"Crownhill,Petrol Station,Plymouth.","height":87});
															thumbnails[604349] = clik.newPhoto({"id":604349,"src":"Large Glass - 64_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604349.html","width":130,"caption":"\"The Large Glass\"","height":91});
															thumbnails[604351] = clik.newPhoto({"id":604351,"src":"Large Glass- 97_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604351.html","width":130,"caption":"\"Fallen Angel-Station\"","height":87});
															thumbnails[604352] = clik.newPhoto({"id":604352,"src":"Large Glass - 92_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604352.html","width":130,"caption":"\"Fallen Angel Polo\"","height":87});
															thumbnails[604354] = clik.newPhoto({"id":604354,"src":"Large Glass - 79_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604354.html","width":130,"caption":"\"End of the Line\"","height":91});
															thumbnails[604356] = clik.newPhoto({"id":604356,"src":"Large Glass - 82_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604356.html","width":130,"caption":"\"The Flags are Out\"","height":83});
															thumbnails[604363] = clik.newPhoto({"id":604363,"src":"Large glass 1_thumb.jpg","galleries_id":46408,"server_id":15,"link":"photo_604363.html","width":130,"caption":"\"The Large Glass and Buddleia\"","height":87});
															thumbnails[113169] = clik.newPhoto({"id":113169,"src":"GWQ-Green-Water_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_113169.html","width":130,"caption":"\"Green Water Ripple\"","height":34});
															thumbnails[602976] = clik.newPhoto({"id":602976,"src":"Cafe wandelbar_thumb.jpg","galleries_id":46310,"server_id":15,"link":"photo_602976.html","width":130,"caption":"Triptytch. Cafe Wandelbar.","height":87});
															thumbnails[602978] = clik.newPhoto({"id":602978,"src":"Centre Room_thumb.jpg","galleries_id":46310,"server_id":15,"link":"photo_602978.html","width":130,"caption":"Galerie Wandelbar.\"Timescape\/Bunker\"","height":88});
															thumbnails[603000] = clik.newPhoto({"id":603000,"src":"Gallery Centre Room_thumb.jpg","galleries_id":46310,"server_id":15,"link":"photo_603000.html","width":130,"caption":"\"Timescape in White Clay\" left \"Spit and Feathers\" right.","height":87});
															thumbnails[603003] = clik.newPhoto({"id":603003,"src":"Klaus & Paul_thumb.jpg","galleries_id":46310,"server_id":15,"link":"photo_603003.html","width":130,"caption":"Galerie Wandelbar front space. ","height":87});
															thumbnails[602971] = clik.newPhoto({"id":602971,"src":"Cafe Wandelbar 3_thumb.jpg","galleries_id":46310,"server_id":15,"link":"photo_602971.html","width":130,"caption":"Cafe Wandelbar,Gstaad,Switzerland.","height":87});
															thumbnails[113604] = clik.newPhoto({"id":113604,"src":"Wind 24_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_113604.html","width":130,"caption":"\"Windfarm\"","height":104});
															thumbnails[598766] = clik.newPhoto({"id":598766,"src":"Quarteria Flats 3_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598766.html","width":130,"caption":"Quarteria Flats","height":154});
															thumbnails[598777] = clik.newPhoto({"id":598777,"src":"Quarteria Flats_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598777.html","width":130,"caption":"Quarteria Flats, Under Construction.","height":125});
															thumbnails[598800] = clik.newPhoto({"id":598800,"src":"Pool at Quinta Das Cabr jpg_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598800.html","width":130,"caption":"Pool at Quinta Das Cabritas","height":104});
															thumbnails[598819] = clik.newPhoto({"id":598819,"src":"Torn poster @ hydrant_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598819.html","width":130,"caption":"Poster and Hydrant","height":103});
															thumbnails[598821] = clik.newPhoto({"id":598821,"src":"Empty Bilboard_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598821.html","width":130,"caption":"Waiting for News","height":103});
															thumbnails[598826] = clik.newPhoto({"id":598826,"src":"Crossing stop 2_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598826.html","width":130,"caption":"Stop","height":105});
															thumbnails[598828] = clik.newPhoto({"id":598828,"src":"Pare Crossing_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598828.html","width":130,"caption":"Pare.Crossing","height":103});
															thumbnails[598830] = clik.newPhoto({"id":598830,"src":"The Road to Bordeira_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598830.html","width":130,"caption":"The Road to Bordeira","height":102});
															thumbnails[598832] = clik.newPhoto({"id":598832,"src":"Yellow Blue Agostos2_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598832.html","width":130,"caption":"Road to Agostos","height":103});
															thumbnails[598833] = clik.newPhoto({"id":598833,"src":"Torn Poster @ Van-1_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598833.html","width":130,"caption":"Van","height":106});
															thumbnails[598839] = clik.newPhoto({"id":598839,"src":"Faro Red Clay_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_598839.html","width":130,"caption":"Red Clay Faro","height":34});
															thumbnails[603548] = clik.newPhoto({"id":603548,"src":"A6-Front-Invite--tif_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_603548.html","width":130,"caption":"Catalogue \"Tulipa Botanica-Lowbrids and Hybrids\"","height":92});
															thumbnails[605863] = clik.newPhoto({"id":605863,"src":"Warehouse back_thumb.jpg","galleries_id":46513,"server_id":15,"link":"photo_605863.html","width":130,"caption":"Warehouse,Plymouth Industrial estate.","height":101});
															thumbnails[605865] = clik.newPhoto({"id":605865,"src":"Cube_thumb.jpg","galleries_id":46513,"server_id":15,"link":"photo_605865.html","width":130,"caption":"\"White Cube Warehouse\"","height":104});
															thumbnails[605866] = clik.newPhoto({"id":605866,"src":"Plm Ind Cinema trees_thumb.jpg","galleries_id":46513,"server_id":15,"link":"photo_605866.html","width":130,"caption":"\"\"Cinema\"","height":107});
															thumbnails[605867] = clik.newPhoto({"id":605867,"src":"Plm indust_thumb. estate Coalvate.jpg","galleries_id":46513,"server_id":15,"link":"photo_605867.html","width":130,"caption":"\"Skip\"","height":105});
															thumbnails[605869] = clik.newPhoto({"id":605869,"src":"Plym indus symetry 1_thumb.jpg","galleries_id":46513,"server_id":15,"link":"photo_605869.html","width":130,"caption":"'Industrial Symmetry\"","height":103});
															thumbnails[605870] = clik.newPhoto({"id":605870,"src":"warehouse gap-1_thumb.jpg","galleries_id":46513,"server_id":15,"link":"photo_605870.html","width":130,"caption":"\"Gap\"","height":99});
															thumbnails[605871] = clik.newPhoto({"id":605871,"src":"Plym Industrial 1_thumb.jpg","galleries_id":46513,"server_id":15,"link":"photo_605871.html","width":130,"caption":"\"Barrier\"","height":100});
															thumbnails[605872] = clik.newPhoto({"id":605872,"src":"Plym Indus Est Disabled_thumb.jpg","galleries_id":46513,"server_id":15,"link":"photo_605872.html","width":130,"caption":"\"Disabled Parking\"","height":101});
															thumbnails[605873] = clik.newPhoto({"id":605873,"src":"Five tree Stand1_thumb.jpg","galleries_id":46513,"server_id":15,"link":"photo_605873.html","width":130,"caption":"\"Last Stand\"","height":104});
															thumbnails[607820] = clik.newPhoto({"id":607820,"src":"Trefil-Quarry-Snowed-Under-_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_607820.html","width":130,"caption":"\"Snowed Under\"","height":34});
															thumbnails[607823] = clik.newPhoto({"id":607823,"src":"Faro Red Clay1_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_607823.html","width":130,"caption":"\"Red Clay,Faro\"","height":34});
															thumbnails[607829] = clik.newPhoto({"id":607829,"src":"Quarryjpg_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_607829.html","width":130,"caption":"\"Lee Mill, China Clay Pit\"","height":35});
															thumbnails[607962] = clik.newPhoto({"id":607962,"src":"Paul open Studio 2_thumb.jpg","galleries_id":46670,"server_id":15,"link":"photo_607962.html","width":130,"caption":"My Studio with \"Timescapes\"","height":82});
															thumbnails[607975] = clik.newPhoto({"id":607975,"src":"Studio Visit Walt 22oct 05_thumb.jpg","galleries_id":46670,"server_id":15,"link":"photo_607975.html","width":130,"caption":"Studio Visit.","height":94});
															thumbnails[608838] = clik.newPhoto({"id":608838,"src":"Green Water 1_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_608838.html","width":130,"caption":"'Green Water\"","height":106});
															thumbnails[608888] = clik.newPhoto({"id":608888,"src":"Big Central_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_608888.html","width":130,"caption":"\"Big Central\"","height":104});
															thumbnails[608893] = clik.newPhoto({"id":608893,"src":"Being There @ Here_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_608893.html","width":130,"caption":"\"Being There\"","height":102});
															thumbnails[608897] = clik.newPhoto({"id":608897,"src":"After the rain _thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_608897.html","width":130,"caption":"\"After the Rain\"","height":103});
															thumbnails[608901] = clik.newPhoto({"id":608901,"src":"Garth Wood Quarry View 1_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_608901.html","width":130,"caption":"\"Garth Wood Quarry\"","height":106});
															thumbnails[608904] = clik.newPhoto({"id":608904,"src":"GWQ View Deck 4_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_608904.html","width":130,"caption":"\"Viewing Deck\"","height":107});
															thumbnails[608909] = clik.newPhoto({"id":608909,"src":"Parys Tyres1 copy_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_608909.html","width":130,"caption":"\"Contaminated Tyres\"","height":103});
															thumbnails[608911] = clik.newPhoto({"id":608911,"src":"Snow 3_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_608911.html","width":130,"caption":"\"Drift\"","height":105});
															thumbnails[610340] = clik.newPhoto({"id":610340,"src":" Pans _thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_610340.html","width":130,"caption":"\"Precipitation Pans\"","height":106});
															thumbnails[610374] = clik.newPhoto({"id":610374,"src":"Parys Red Ore _thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_610374.html","width":130,"caption":"\"In Ore\"","height":105});
															thumbnails[610386] = clik.newPhoto({"id":610386,"src":"Wind_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_610386.html","width":130,"caption":"\"Windfarm Nr. Bull Bay\"","height":106});
															thumbnails[610392] = clik.newPhoto({"id":610392,"src":"GWQ Close_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_610392.html","width":130,"caption":"\"Forest\"","height":107});
															thumbnails[610394] = clik.newPhoto({"id":610394,"src":"Trefil Contact 3 No8_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_610394.html","width":130,"caption":"\"Judder\"","height":106});
															thumbnails[610416] = clik.newPhoto({"id":610416,"src":"GWQ Rock L@s green Water_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_610416.html","width":130,"caption":"\"Green\"","height":105});
															thumbnails[611066] = clik.newPhoto({"id":611066,"src":"Breedon_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_611066.html","width":130,"caption":"\"Breedon Hill\"","height":105});
															thumbnails[611069] = clik.newPhoto({"id":611069,"src":"Bethesdatif_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_611069.html","width":130,"caption":"\"Bethesda\"","height":107});
															thumbnails[616453] = clik.newPhoto({"id":616453,"src":"Conning Draw Line 1_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_616453.html","width":130,"caption":"\"Inside out\"","height":93});
															thumbnails[616484] = clik.newPhoto({"id":616484,"src":"Conning Draw line 2_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_616484.html","width":130,"caption":"\"In Line\"","height":94});
															thumbnails[616502] = clik.newPhoto({"id":616502,"src":"Conning draw Line 3_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_616502.html","width":130,"caption":"\"Core\"","height":98});
															thumbnails[627633] = clik.newPhoto({"id":627633,"src":"Twin Orbit_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_627633.html","width":130,"caption":"'Twin Orbit'","height":95});
															thumbnails[627635] = clik.newPhoto({"id":627635,"src":"Twin Trax_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_627635.html","width":130,"caption":"'Twin Trax'","height":97});
															thumbnails[627642] = clik.newPhoto({"id":627642,"src":"Duel_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_627642.html","width":130,"caption":"'Duel'","height":95});
															thumbnails[627645] = clik.newPhoto({"id":627645,"src":"Grave_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_627645.html","width":130,"caption":"'Grave'","height":93});
															thumbnails[1282378] = clik.newPhoto({"id":1282378,"src":"Drawing 5_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_1282378.html","width":130,"caption":"'Dreamer 2'","height":166});
															thumbnails[1282379] = clik.newPhoto({"id":1282379,"src":"Drawing 6_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_1282379.html","width":130,"caption":"'Dreamer 3'","height":144});
															thumbnails[1282385] = clik.newPhoto({"id":1282385,"src":"Drawing3_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_1282385.html","width":130,"caption":"'Dreamer 4'","height":165});
															thumbnails[1282389] = clik.newPhoto({"id":1282389,"src":"DRAWING4_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_1282389.html","width":130,"caption":"'Dreamer 5'","height":177});
															thumbnails[1282977] = clik.newPhoto({"id":1282977,"src":"COVER-TULIPA-1_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_1282977.html","width":130,"caption":"Cover for Catlogue","height":92});
															thumbnails[1283336] = clik.newPhoto({"id":1283336,"src":"Borba-1_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283336.html","width":130,"caption":"Borba Marble Quarry","height":87});
															thumbnails[1283338] = clik.newPhoto({"id":1283338,"src":"Borba-2_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283338.html","width":130,"caption":"Borba Marble Quarry ","height":87});
															thumbnails[1283340] = clik.newPhoto({"id":1283340,"src":"Borba-3_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283340.html","width":130,"caption":"Borba Marble Quarry","height":86});
															thumbnails[1283370] = clik.newPhoto({"id":1283370,"src":"Aqua-Park-5_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283370.html","width":130,"caption":"Aqua Park Near Quarteira","height":87});
															thumbnails[1283391] = clik.newPhoto({"id":1283391,"src":"Early-Morning-Aqua-Park-1_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283391.html","width":130,"caption":"Early Morn Aqua Park Quarteira","height":87});
															thumbnails[1283394] = clik.newPhoto({"id":1283394,"src":"Early-Morning-Aqua-Park-4_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283394.html","width":130,"caption":"Aqua Park Nr. Quarteira","height":87});
															thumbnails[1283396] = clik.newPhoto({"id":1283396,"src":"Estremoz-1_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283396.html","width":130,"caption":"Marble Quarry Nr. Estramoz","height":87});
															thumbnails[1283403] = clik.newPhoto({"id":1283403,"src":"Estremoz-3_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283403.html","width":130,"caption":"Marble Quarry Estramoz","height":87});
															thumbnails[1283406] = clik.newPhoto({"id":1283406,"src":"Estremoz-4_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283406.html","width":130,"caption":"Marble Quarry Nr.Esstramoz","height":88});
															thumbnails[1283409] = clik.newPhoto({"id":1283409,"src":"Estremoz-5_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283409.html","width":130,"caption":"Marble Quarry Nr, Estramoz","height":87});
															thumbnails[1283414] = clik.newPhoto({"id":1283414,"src":"Library---1647_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283414.html","width":130,"caption":"Silo Esrtamoz","height":85});
															thumbnails[1283415] = clik.newPhoto({"id":1283415,"src":"Library---1704_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283415.html","width":130,"caption":"Silo Estramoz","height":87});
															thumbnails[1283416] = clik.newPhoto({"id":1283416,"src":"Library---17141_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283416.html","width":130,"caption":"Silo Alentejo","height":87});
															thumbnails[1283424] = clik.newPhoto({"id":1283424,"src":"Library---17161_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283424.html","width":130,"caption":"Silo Alentejo","height":87});
															thumbnails[1283426] = clik.newPhoto({"id":1283426,"src":"Stadium-Algarve---01_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283426.html","width":130,"caption":"Stadium Algarve","height":87});
															thumbnails[1283427] = clik.newPhoto({"id":1283427,"src":"Stadium-Algarve---12_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283427.html","width":130,"caption":"Stadiun Algarve","height":85});
															thumbnails[1283430] = clik.newPhoto({"id":1283430,"src":"Stadium-Algarve---16_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283430.html","width":130,"caption":"Stadium Algarve","height":87});
															thumbnails[1283432] = clik.newPhoto({"id":1283432,"src":"Stadium-Algarve---19_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283432.html","width":130,"caption":"Stadium Algarve","height":87});
															thumbnails[1283437] = clik.newPhoto({"id":1283437,"src":"_DSF1743_thumb.jpg","galleries_id":46051,"server_id":15,"link":"photo_1283437.html","width":130,"caption":"Silo Alentejo","height":87});
															thumbnails[1293129] = clik.newPhoto({"id":1293129,"src":"Camera-1_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1293129.html","width":130,"caption":"The Pinhole Camera Paul's Studio","height":92});
															thumbnails[1293130] = clik.newPhoto({"id":1293130,"src":"Camera-2_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1293130.html","width":130,"caption":"Pinhole Camera with Image.","height":89});
															thumbnails[1293134] = clik.newPhoto({"id":1293134,"src":"Mixed-1015_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1293134.html","width":130,"caption":"'Ziggurat' in Cardiff.","height":96});
															thumbnails[1293143] = clik.newPhoto({"id":1293143,"src":"Office-in-Orbita-NMGW_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1293143.html","width":130,"caption":"'Office in Orbita' National Museum and Galleries of Wales.","height":93});
															thumbnails[1293750] = clik.newPhoto({"id":1293750,"src":"Wall-Drawing-3-metresx-2,5metres_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_1293750.html","width":130,"caption":"'Wall Sculpture'","height":101});
															thumbnails[1293760] = clik.newPhoto({"id":1293760,"src":"Zephyr'_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_1293760.html","width":130,"caption":"'Zephyr'","height":97});
															thumbnails[113789] = clik.newPhoto({"id":113789,"src":"Don't-Fade-Away2_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_113789.html","width":130,"caption":"\"Don't Fade Away\"","height":106});
															thumbnails[113144] = clik.newPhoto({"id":113144,"src":"Tracks 2_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_113144.html","width":130,"caption":"\"Tracks\"","height":34});
															thumbnails[113794] = clik.newPhoto({"id":113794,"src":"Early-One-Morning2_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_113794.html","width":130,"caption":"Early One Morning","height":109});
															thumbnails[601468] = clik.newPhoto({"id":601468,"src":"Yellow-Cross1_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601468.html","width":130,"caption":"Yellow Cross","height":100});
															thumbnails[113626] = clik.newPhoto({"id":113626,"src":"Tulipa-Mauve_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_113626.html","width":130,"caption":"\"Tulipa Mauve\"","height":105});
															thumbnails[113211] = clik.newPhoto({"id":113211,"src":"Trefil Quarry Envelope_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_113211.html","width":130,"caption":"\"Envelope\"","height":34});
															thumbnails[601457] = clik.newPhoto({"id":601457,"src":"Purple-Haze-2_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601457.html","width":130,"caption":"Purple Haze","height":104});
															thumbnails[113214] = clik.newPhoto({"id":113214,"src":"Parys-Mountain-Shadow-copy_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_113214.html","width":130,"caption":"\"Shadow on Parys Mountain\"","height":34});
															thumbnails[601467] = clik.newPhoto({"id":601467,"src":"Deep-purple-1_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601467.html","width":130,"caption":"Deep Purple","height":104});
															thumbnails[113216] = clik.newPhoto({"id":113216,"src":"11a_thumb.m.-Dial-Quarry.jpg","galleries_id":10543,"server_id":15,"link":"photo_113216.html","width":130,"caption":"\"Dial\"","height":34});
															thumbnails[1282924] = clik.newPhoto({"id":1282924,"src":"Cross-Hatch-tif_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_1282924.html","width":130,"caption":"Cross Hatch","height":103});
															thumbnails[113220] = clik.newPhoto({"id":113220,"src":"Spit-and-Feathers_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_113220.html","width":130,"caption":"\"Spit and Feathers\"","height":34});
															thumbnails[1282377] = clik.newPhoto({"id":1282377,"src":"Drawing 2_thumb.jpg","galleries_id":47275,"server_id":15,"link":"photo_1282377.html","width":130,"caption":"'Dreamer 1'","height":151});
															thumbnails[1282932] = clik.newPhoto({"id":1282932,"src":"Yellow-to-go1_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_1282932.html","width":130,"caption":"Yellow to Go","height":98});
															thumbnails[113603] = clik.newPhoto({"id":113603,"src":"acid_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_113603.html","width":130,"caption":"\"Acid Water\"","height":106});
															thumbnails[113798] = clik.newPhoto({"id":113798,"src":"Equinox-tif_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_113798.html","width":130,"caption":"Equinox","height":102});
															thumbnails[113799] = clik.newPhoto({"id":113799,"src":"Golden-Parrots-2_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_113799.html","width":130,"caption":"'Golden Parrot'","height":104});
															thumbnails[1290997] = clik.newPhoto({"id":1290997,"src":"Photo0007_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1290997.html","width":130,"caption":"'In Orbita'","height":104});
															thumbnails[113605] = clik.newPhoto({"id":113605,"src":"Trefil-Stone-Quarry_thumb.jpg","galleries_id":10543,"server_id":15,"link":"photo_113605.html","width":130,"caption":"Trefil Stone Quarry, South Wales.","height":106});
															thumbnails[113802] = clik.newPhoto({"id":113802,"src":"_Parrots-In-Flight_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_113802.html","width":130,"caption":"' Parrots in Flight'","height":104});
															thumbnails[1291009] = clik.newPhoto({"id":1291009,"src":"Photo0010_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1291009.html","width":130,"caption":"'Office in Orbita'","height":105});
															thumbnails[113804] = clik.newPhoto({"id":113804,"src":"Tapricot-Fall-tif1_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_113804.html","width":130,"caption":"'Tapricot Fall'","height":103});
															thumbnails[1291051] = clik.newPhoto({"id":1291051,"src":"Pin-Hole-Split_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1291051.html","width":130,"caption":"'Ziggurat'","height":95});
															thumbnails[1282943] = clik.newPhoto({"id":1282943,"src":"Tulipa-Apricot-tif_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_1282943.html","width":130,"caption":"Tulip Apricot","height":106});
															thumbnails[1291058] = clik.newPhoto({"id":1291058,"src":"Mixed-1007_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1291058.html","width":130,"caption":"'Ziggurat'","height":82});
															thumbnails[601469] = clik.newPhoto({"id":601469,"src":"Flame-3-_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601469.html","width":130,"caption":"Flame No 3","height":99});
															thumbnails[1291114] = clik.newPhoto({"id":1291114,"src":"Mixed-1005_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1291114.html","width":130,"caption":"'Flight from Icarus'","height":80});
															thumbnails[601472] = clik.newPhoto({"id":601472,"src":"Red Devils_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601472.html","width":130,"caption":"Red Devils","height":103});
															thumbnails[1291122] = clik.newPhoto({"id":1291122,"src":"Close-Up-_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1291122.html","width":130,"caption":"Close up of 'Office in Orbita'","height":85});
															thumbnails[1282946] = clik.newPhoto({"id":1282946,"src":"Black-Horizon_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_1282946.html","width":130,"caption":"Black Horizon","height":90});
															thumbnails[1291126] = clik.newPhoto({"id":1291126,"src":"Mixed-1008_thumb.jpg","galleries_id":91573,"server_id":15,"link":"photo_1291126.html","width":130,"caption":"'Burn Out'","height":87});
															thumbnails[1282949] = clik.newPhoto({"id":1282949,"src":"Grey-Horizon_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_1282949.html","width":130,"caption":"Grey Horizon","height":91});
															thumbnails[601498] = clik.newPhoto({"id":601498,"src":"Brokeback Yellow No2_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601498.html","width":130,"caption":"Brokeback Yellow No2","height":100});
															thumbnails[113832] = clik.newPhoto({"id":113832,"src":"18_thumb.jpg","galleries_id":10597,"server_id":15,"link":"photo_113832.html","width":130,"caption":"Pink House, Barrage, Cardiff Bay.","height":87});
															thumbnails[1282951] = clik.newPhoto({"id":1282951,"src":"Orange-Star-_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_1282951.html","width":130,"caption":"Orange Star","height":107});
															thumbnails[601516] = clik.newPhoto({"id":601516,"src":"Full-On-Red1_thumb.jpg","galleries_id":10541,"server_id":15,"link":"photo_601516.html","width":130,"caption":"Full on Red","height":102});
															thumbnails[113835] = clik.newPhoto({"id":113835,"src":"19_thumb.jpg","galleries_id":10597,"server_id":15,"link":"photo_113835.html","width":130,"caption":"Pink House\/Flatholm","height":87});
															thumbnails[113838] = clik.newPhoto({"id":113838,"src":"13_thumb.jpg","galleries_id":10597,"server_id":15,"link":"photo_113838.html","width":130,"caption":"Barrage to Flat Holm","height":87});
															thumbnails[113842] = clik.newPhoto({"id":113842,"src":"8_thumb.jpg","galleries_id":10597,"server_id":15,"link":"photo_113842.html","width":130,"caption":"Barrage Bridge 2","height":87});
															thumbnails[113844] = clik.newPhoto({"id":113844,"src":"7_thumb.jpg","galleries_id":10597,"server_id":15,"link":"photo_113844.html","width":130,"caption":"Pink House Through Bridge","height":87});
															thumbnails[113845] = clik.newPhoto({"id":113845,"src":"6_thumb.jpg","galleries_id":10597,"server_id":15,"link":"photo_113845.html","width":130,"caption":"Pink House Bridge Stride","height":87});
															thumbnails[113846] = clik.newPhoto({"id":113846,"src":"5_thumb.jpg","galleries_id":10597,"server_id":15,"link":"photo_113846.html","width":130,"caption":"Barrage Control","height":87});
															thumbnails[113847] = clik.newPhoto({"id":113847,"src":"4_thumb.jpg","galleries_id":10597,"server_id":15,"link":"photo_113847.html","width":130,"caption":"Barrage","height":87});
															thumbnails[113850] = clik.newPhoto({"id":113850,"src":"1_thumb.jpg","galleries_id":10597,"server_id":15,"link":"photo_113850.html","width":130,"caption":"Barrage and Weeds","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[46670] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"THE STUDIO","link":"gallery_46670.html","maxRecords":0.0,"photoIDs":[607955.0,607962.0,607975.0],"skipIndex":0,"section_code":"gallery","featured_images":"607975,607962,607955","id":46670,"singleSection":false});				  						galleries[47275] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"THE DRAWINGS","link":"gallery_47275.html","maxRecords":0.0,"photoIDs":[616453.0,616484.0,616502.0,627633.0,627635.0,627642.0,627645.0,1282378.0,1282379.0,1282385.0,1282389.0,1293750.0,1293760.0,1282377.0],"skipIndex":0,"section_code":"gallery","featured_images":627635.0,"id":47275,"singleSection":false});				  						galleries[46513] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"WAREHOUSES","link":"gallery_46513.html","maxRecords":0.0,"photoIDs":[605863.0,605865.0,605866.0,605867.0,605869.0,605870.0,605871.0,605872.0,605873.0],"skipIndex":0,"section_code":"gallery","featured_images":605863.0,"id":46513,"singleSection":false});				  						galleries[10543] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"TIMESCAPES","link":"gallery_10543.html","maxRecords":0.0,"photoIDs":[113169.0,113604.0,607820.0,607823.0,607829.0,608838.0,608888.0,608893.0,608897.0,608901.0,608904.0,608909.0,608911.0,610340.0,610374.0,610386.0,610392.0,610394.0,610416.0,611066.0,611069.0,113144.0,113211.0,113214.0,113216.0,113220.0,113603.0,113605.0],"skipIndex":0,"section_code":"gallery","featured_images":113604.0,"id":10543,"singleSection":false});				  						galleries[10541] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"TULIPA BOTANICA LOWBRIDS AND HYBRIDS","link":"gallery_10541.html","maxRecords":0.0,"photoIDs":[601509.0,601503.0,601477.0,601489.0,603548.0,1282977.0,113789.0,113794.0,601468.0,113626.0,601457.0,601467.0,1282924.0,1282932.0,113798.0,113799.0,113802.0,113804.0,1282943.0,601469.0,601472.0,1282946.0,1282949.0,601498.0,1282951.0,601516.0],"skipIndex":0,"section_code":"gallery","featured_images":601468.0,"id":10541,"singleSection":false});				  						galleries[46051] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"PORTUGAL\/QUARRIES AND SILOS","link":"gallery_46051.html","maxRecords":0.0,"photoIDs":[598766.0,598777.0,598800.0,598819.0,598821.0,598826.0,598828.0,598830.0,598832.0,598833.0,598839.0,1283336.0,1283338.0,1283340.0,1283370.0,1283391.0,1283394.0,1283396.0,1283403.0,1283406.0,1283409.0,1283414.0,1283415.0,1283416.0,1283424.0,1283426.0,1283427.0,1283430.0,1283432.0,1283437.0],"skipIndex":0,"section_code":"gallery","featured_images":1283338.0,"id":46051,"singleSection":false});				  						galleries[46018] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"FOEL SENIGL NORTH WALES ","link":"gallery_46018.html","maxRecords":0.0,"photoIDs":[598460.0,598488.0,598562.0,598570.0,598577.0,598579.0,598588.0,598594.0,615262.0,615275.0,615283.0,615289.0,615307.0,615317.0],"skipIndex":0,"section_code":"gallery","featured_images":598460.0,"id":46018,"singleSection":false});				  						galleries[46408] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"'THE LARGE GLASS'","link":"gallery_46408.html","maxRecords":0.0,"photoIDs":[604305.0,604319.0,604332.0,604339.0,604346.0,604349.0,604351.0,604352.0,604354.0,604356.0,604363.0],"skipIndex":0,"section_code":"gallery","featured_images":604332.0,"id":46408,"singleSection":false});				  						galleries[10597] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"CARDIFF BARRAGE","link":"gallery_10597.html","maxRecords":0.0,"photoIDs":[113832.0,113835.0,113838.0,113842.0,113844.0,113845.0,113846.0,113847.0,113850.0],"skipIndex":0,"section_code":"gallery","featured_images":113832.0,"id":10597,"singleSection":false});				  						galleries[46310] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"EXHIBITIONS","link":"gallery_46310.html","maxRecords":0.0,"photoIDs":[602976.0,602978.0,603000.0,603003.0,602971.0],"skipIndex":0,"section_code":"gallery","featured_images":602971.0,"id":46310,"singleSection":false});				  						galleries[91573] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"PINHOLES FOR CROATIA","link":"gallery_91573.html","maxRecords":0.0,"photoIDs":[1293129.0,1293130.0,1293134.0,1293143.0,1290997.0,1291009.0,1291051.0,1291058.0,1291114.0,1291122.0,1291126.0],"skipIndex":0,"section_code":"gallery","featured_images":1290997.0,"id":91573,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '601503,113802';
imageSets[2] = '1283338,627635,605863,604332,602971,598460,113604,601468,1290997,113832';
imageSets[3] = '1293760,1293750,1293143,1293134,1293130,1293129,1291126,1291122,1291114,1291058,1291051,1291009,1290997,1283437,1283432,1283430,1283427,1283426,1283424,1283416,1283415,1283414,1283409,1283406,1283403,1283396,1283394,1283391,1283370,1283340,1283338,1283336,1282977,1282951,1282949,1282946,1282943,1282932,1282924,1282389,1282385,1282379,1282378,1282377,627645,627642,627635,627633,616502,616484';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/pbeauchamp/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/pbeauchamp/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Paul Beauchamp Photography: ' + 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.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 += '<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;
	}
}

			

