window.thumbnails = {};
															thumbnails[1819710] = clik.newPhoto({"id":1819710,"src":"Lower-Fishguard-no-50-_thumb.gif","galleries_id":32448,"server_id":18,"link":"photo_1819710.html","width":130,"caption":"Lower Fishguard no 50","height":46});
															thumbnails[1819720] = clik.newPhoto({"id":1819720,"src":"Lower-Fishguard-no-51-_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1819720.html","width":130,"caption":"Lower Fishguard no 51","height":46});
															thumbnails[1819745] = clik.newPhoto({"id":1819745,"src":"Lower-Fishguard-no-52-_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1819745.html","width":130,"caption":"Lower fishguard no 52","height":46});
															thumbnails[1819752] = clik.newPhoto({"id":1819752,"src":"Dinas-Head-no-56_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1819752.html","width":130,"caption":"Dinas head no 56","height":46});
															thumbnails[1819761] = clik.newPhoto({"id":1819761,"src":"newport-no-55_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1819761.html","width":130,"caption":"Newport no 55","height":46});
															thumbnails[1819763] = clik.newPhoto({"id":1819763,"src":"llangranog-no-48_thumb..jpg","galleries_id":32448,"server_id":18,"link":"photo_1819763.html","width":130,"caption":"Llangrannog 48","height":46});
															thumbnails[4278410] = clik.newPhoto({"id":4278410,"src":"CENARTH_no_751_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_4278410.html","width":130,"caption":"Cenarth no.75","height":46});
															thumbnails[4278483] = clik.newPhoto({"id":4278483,"src":"cwm_yr_eglws_no71_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_4278483.html","width":130,"caption":"Cwm yr Eglwys no.71","height":46});
															thumbnails[4278490] = clik.newPhoto({"id":4278490,"src":"cwm_yr_egwlis__no_81_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_4278490.html","width":130,"caption":"Cwm yr Eglwys no.81","height":46});
															thumbnails[4278492] = clik.newPhoto({"id":4278492,"src":"dinas_no_69_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_4278492.html","width":130,"caption":"Dinas no.69","height":46});
															thumbnails[4278499] = clik.newPhoto({"id":4278499,"src":"fishquard_no_82_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_4278499.html","width":130,"caption":"Fishguard no.82","height":46});
															thumbnails[5357757] = clik.newPhoto({"id":5357757,"src":"Broad-haven-south-no42_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357757.html","width":130,"caption":"Broad Haven South no.42","height":46});
															thumbnails[5357769] = clik.newPhoto({"id":5357769,"src":"c-estuary-no-30_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357769.html","width":130,"caption":"Cardigan Estuary no.30","height":46});
															thumbnails[5357789] = clik.newPhoto({"id":5357789,"src":"cenarth-no-58_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357789.html","width":130,"caption":"Cenarth no.58","height":46});
															thumbnails[5357819] = clik.newPhoto({"id":5357819,"src":"CENARTH-NO-66_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357819.html","width":130,"caption":"Cenarth no.66","height":46});
															thumbnails[5357844] = clik.newPhoto({"id":5357844,"src":"CENARTH-NO-67_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357844.html","width":130,"caption":"Cenarth no.67","height":46});
															thumbnails[5357867] = clik.newPhoto({"id":5357867,"src":"Green-Bridge-no-54_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357867.html","width":130,"caption":"Green bridge no.54","height":46});
															thumbnails[5357893] = clik.newPhoto({"id":5357893,"src":"stremble_head_no87_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357893.html","width":130,"caption":"Strumble Head no.87","height":46});
															thumbnails[5357901] = clik.newPhoto({"id":5357901,"src":"StDavids_Cathedral_76_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357901.html","width":130,"caption":"St Davids catherdral no.76","height":46});
															thumbnails[5357906] = clik.newPhoto({"id":5357906,"src":"pwll_gwelod_no_73_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357906.html","width":130,"caption":"Pwll Gwaelod no.73","height":46});
															thumbnails[5357911] = clik.newPhoto({"id":5357911,"src":"puffin_no86_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357911.html","width":130,"caption":"Puffin no.86","height":46});
															thumbnails[5357932] = clik.newPhoto({"id":5357932,"src":"NEWPORT_NO_64_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357932.html","width":130,"caption":"Newport no.64","height":46});
															thumbnails[5357936] = clik.newPhoto({"id":5357936,"src":"new_quay_no60_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357936.html","width":130,"caption":"New Quay no.60","height":46});
															thumbnails[5357939] = clik.newPhoto({"id":5357939,"src":"Marloes_NO14_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357939.html","width":130,"caption":"Marloes no.14","height":46});
															thumbnails[5357942] = clik.newPhoto({"id":5357942,"src":"MARLOES_25_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357942.html","width":130,"caption":"Marloes no.25","height":46});
															thumbnails[5357947] = clik.newPhoto({"id":5357947,"src":"snowdonia_no_27__thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357947.html","width":130,"caption":"Snowdonia no.27","height":46});
															thumbnails[5357955] = clik.newPhoto({"id":5357955,"src":"Tal_y_llyn_north_w_no11_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357955.html","width":130,"caption":"Tal y llyn no.11","height":46});
															thumbnails[5358249] = clik.newPhoto({"id":5358249,"src":"strumble_head_no89_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358249.html","width":130,"caption":"Strumble head no.89","height":46});
															thumbnails[5358252] = clik.newPhoto({"id":5358252,"src":"strumble_head_no88_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358252.html","width":130,"caption":"Strumble head no.88","height":46});
															thumbnails[5358254] = clik.newPhoto({"id":5358254,"src":"pwll_gwailod_no84_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358254.html","width":130,"caption":"Pwll Gwaelod no.84","height":46});
															thumbnails[5358258] = clik.newPhoto({"id":5358258,"src":"newport_no_65_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358258.html","width":130,"caption":"Newport no.65","height":46});
															thumbnails[5358261] = clik.newPhoto({"id":5358261,"src":"NEWPORT_NO_641_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358261.html","width":130,"caption":"Newport no.64","height":46});
															thumbnails[5358264] = clik.newPhoto({"id":5358264,"src":"newport_no_651_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358264.html","width":130,"caption":"Newport no.65","height":46});
															thumbnails[5358268] = clik.newPhoto({"id":5358268,"src":"newport_no45_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358268.html","width":130,"caption":"Newport no.45","height":46});
															thumbnails[5358269] = clik.newPhoto({"id":5358269,"src":"newport_no44jpg_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358269.html","width":130,"caption":"Newport no.44","height":46});
															thumbnails[5358270] = clik.newPhoto({"id":5358270,"src":"mwnt_no_80_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358270.html","width":130,"caption":"Mwnt no.80","height":46});
															thumbnails[5358273] = clik.newPhoto({"id":5358273,"src":"Mwnt_no_53_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358273.html","width":130,"caption":"Mwnt no.53","height":46});
															thumbnails[5358279] = clik.newPhoto({"id":5358279,"src":"mwnt_no79_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358279.html","width":130,"caption":"Mwnt no.79","height":46});
															thumbnails[5358283] = clik.newPhoto({"id":5358283,"src":"mwnt_no78_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358283.html","width":130,"caption":"Mwnt no.78","height":46});
															thumbnails[5358287] = clik.newPhoto({"id":5358287,"src":"lower_fishquard_no_83_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358287.html","width":130,"caption":"Lower fishguard no.83","height":46});
															thumbnails[5358292] = clik.newPhoto({"id":5358292,"src":"Llangranog__no47_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5358292.html","width":130,"caption":"Llangrannog no.47","height":46});
															thumbnails[7268114] = clik.newPhoto({"id":7268114,"src":"aberporth-no95web_thumb.gif","galleries_id":32448,"server_id":18,"link":"photo_7268114.html","width":130,"caption":"Aberporth 95","height":46});
															thumbnails[7268123] = clik.newPhoto({"id":7268123,"src":"aberporth-no90web_thumb.gif","galleries_id":32448,"server_id":18,"link":"photo_7268123.html","width":130,"caption":"Aberporth 90","height":46});
															thumbnails[7268126] = clik.newPhoto({"id":7268126,"src":"aberporth-no97web_thumb.gif","galleries_id":32448,"server_id":18,"link":"photo_7268126.html","width":130,"caption":"Aberporth 97","height":46});
															thumbnails[7268130] = clik.newPhoto({"id":7268130,"src":"Aberporth-no-94web_thumb.gif","galleries_id":32448,"server_id":18,"link":"photo_7268130.html","width":130,"caption":"Aberporth 94","height":46});
															thumbnails[7692496] = clik.newPhoto({"id":7692496,"src":"Abercastle-No.102WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692496.html","width":130,"caption":"Abercastle","height":46});
															thumbnails[7692515] = clik.newPhoto({"id":7692515,"src":"blue-bell--woods-no98WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692515.html","width":130,"caption":"Bluebell wood no. 98","height":46});
															thumbnails[7692520] = clik.newPhoto({"id":7692520,"src":"CARDIGAN-BRIDGE-NO101WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692520.html","width":130,"caption":"Cardigan bridge no. 101","height":46});
															thumbnails[7692521] = clik.newPhoto({"id":7692521,"src":"cenarth-no91WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692521.html","width":130,"caption":"Cenarth no. 91","height":46});
															thumbnails[7692524] = clik.newPhoto({"id":7692524,"src":"dwiyrhyd-eastuary-portmaero_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692524.html","width":130,"caption":"Portmeirion estuary no.106","height":46});
															thumbnails[7692525] = clik.newPhoto({"id":7692525,"src":"goodick-no100WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692525.html","width":130,"caption":"Goodwick no.100","height":46});
															thumbnails[7692527] = clik.newPhoto({"id":7692527,"src":"henllan-railway-no93WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692527.html","width":130,"caption":"Henllan railway no.93","height":46});
															thumbnails[7692532] = clik.newPhoto({"id":7692532,"src":"marlas-mo99WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692532.html","width":130,"caption":"Marloes no.99","height":46});
															thumbnails[7692533] = clik.newPhoto({"id":7692533,"src":"swan-lake-no-105WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692533.html","width":130,"caption":"Swan lake no.105","height":46});
															thumbnails[7692534] = clik.newPhoto({"id":7692534,"src":"teifi-river-no92WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692534.html","width":130,"caption":"Teifi river no.92","height":46});
															thumbnails[7692542] = clik.newPhoto({"id":7692542,"src":"tresaith-no96WEB_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_7692542.html","width":130,"caption":"Tresaith no.96","height":46});
															thumbnails[8699306] = clik.newPhoto({"id":8699306,"src":"llangranog--no106_thumb.gif","galleries_id":32448,"server_id":18,"link":"photo_8699306.html","width":130,"caption":"Llangrannog 106","height":46});
															thumbnails[416091] = clik.newPhoto({"id":416091,"src":"ABERAIRON NO9_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416091.html","width":130,"caption":"ABERAERON NO9","height":45});
															thumbnails[442251] = clik.newPhoto({"id":442251,"src":"card-island--no1_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_442251.html","width":130,"caption":"Cardigan island no.1","height":45});
															thumbnails[1116346] = clik.newPhoto({"id":1116346,"src":"Aber-porth-no-35_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116346.html","width":130,"caption":"Aberporth-no-35","height":46});
															thumbnails[1116365] = clik.newPhoto({"id":1116365,"src":"mwnt-no-40_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116365.html","width":130,"caption":"mwnt-no-40","height":45});
															thumbnails[1116347] = clik.newPhoto({"id":1116347,"src":"aberporth--no-37_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116347.html","width":130,"caption":"Aberporth-no-37","height":45});
															thumbnails[1333999] = clik.newPhoto({"id":1333999,"src":"Aberporth no28_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1333999.html","width":130,"caption":"Aberporth 28","height":46});
															thumbnails[416093] = clik.newPhoto({"id":416093,"src":"ABEREIRON NO9A_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416093.html","width":130,"caption":"ABERAERON NO9 A","height":55});
															thumbnails[784044] = clik.newPhoto({"id":784044,"src":"Pembryn beach no23_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_784044.html","width":130,"caption":"Penbryn beach no23","height":46});
															thumbnails[1116175] = clik.newPhoto({"id":1116175,"src":"aberporth no 38_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116175.html","width":130,"caption":"aberporth no 38","height":45});
															thumbnails[416094] = clik.newPhoto({"id":416094,"src":"ABERPORTH NO 21_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416094.html","width":130,"caption":"ABERPORTH NO 21","height":45});
															thumbnails[784045] = clik.newPhoto({"id":784045,"src":"snowdonia no 26_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_784045.html","width":130,"caption":"snowdonia no 26","height":45});
															thumbnails[784072] = clik.newPhoto({"id":784072,"src":"tresaith-no4_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_784072.html","width":130,"caption":"Tresaith no.4","height":46});
															thumbnails[1116176] = clik.newPhoto({"id":1116176,"src":"aberporth no 39_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116176.html","width":130,"caption":"aberporth no 39","height":56});
															thumbnails[1116348] = clik.newPhoto({"id":1116348,"src":"mwnt-no-29_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116348.html","width":130,"caption":"Mwnt no-29","height":46});
															thumbnails[5357719] = clik.newPhoto({"id":5357719,"src":"abereiron-no46_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357719.html","width":130,"caption":"Aberaeron no.46","height":46});
															thumbnails[1819698] = clik.newPhoto({"id":1819698,"src":"llangranog-no-49_thumb..gif","galleries_id":32448,"server_id":18,"link":"photo_1819698.html","width":130,"caption":"Llangrannog no 49","height":46});
															thumbnails[416095] = clik.newPhoto({"id":416095,"src":"ABERPORTH NO3_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416095.html","width":130,"caption":"ABERPORTH NO3","height":45});
															thumbnails[1116177] = clik.newPhoto({"id":1116177,"src":"c island no36_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116177.html","width":130,"caption":"c island no36","height":46});
															thumbnails[416096] = clik.newPhoto({"id":416096,"src":"ABERYSTWYTH NO10_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416096.html","width":130,"caption":"ABERYSTWYTH NO 10","height":45});
															thumbnails[1116178] = clik.newPhoto({"id":1116178,"src":"gwbert 2_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116178.html","width":130,"caption":"GWBERT NO 41","height":43});
															thumbnails[1116350] = clik.newPhoto({"id":1116350,"src":"preseli-no32_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116350.html","width":130,"caption":"Preseli no32","height":46});
															thumbnails[1116179] = clik.newPhoto({"id":1116179,"src":"pembrin no 33_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116179.html","width":130,"caption":"pembrin no 33","height":46});
															thumbnails[4277895] = clik.newPhoto({"id":4277895,"src":"CENARTH_NO_74_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_4277895.html","width":130,"caption":"Cenarth no.74","height":46});
															thumbnails[5357727] = clik.newPhoto({"id":5357727,"src":"Broad-Haven-no-77_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_5357727.html","width":130,"caption":"Broad Haven no.77","height":46});
															thumbnails[442257] = clik.newPhoto({"id":442257,"src":"llangranog--no5_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_442257.html","width":130,"caption":"Llangranog no5","height":45});
															thumbnails[416097] = clik.newPhoto({"id":416097,"src":"CARDIGAN ESTUARY NO18JPG_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416097.html","width":130,"caption":"CARDIGAN ESTUARY NO 18 ","height":45});
															thumbnails[1116180] = clik.newPhoto({"id":1116180,"src":"preseli no34_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116180.html","width":130,"caption":"preseli no34","height":46});
															thumbnails[416092] = clik.newPhoto({"id":416092,"src":"ABERAIRONNO9B_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416092.html","width":130,"caption":"ABERAERON NO 9 B","height":45});
															thumbnails[416098] = clik.newPhoto({"id":416098,"src":"CARDIGAN ESTUARYNO19_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416098.html","width":130,"caption":"CARDIGAN ESTUARY NO 19","height":45});
															thumbnails[442259] = clik.newPhoto({"id":442259,"src":"mwnt--no2_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_442259.html","width":130,"caption":"Mwnt no 2","height":45});
															thumbnails[1116181] = clik.newPhoto({"id":1116181,"src":"tresaith no 31_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_1116181.html","width":130,"caption":"tresaith no 31","height":46});
															thumbnails[416099] = clik.newPhoto({"id":416099,"src":"CENARTH NO16_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416099.html","width":130,"caption":"CENARTH NO 16","height":45});
															thumbnails[416101] = clik.newPhoto({"id":416101,"src":"CWMTUDU NO6_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416101.html","width":130,"caption":"CWMTUDU NO6","height":45});
															thumbnails[416102] = clik.newPhoto({"id":416102,"src":"GWBERT NO20_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416102.html","width":130,"caption":"GWBERT NO20","height":45});
															thumbnails[416104] = clik.newPhoto({"id":416104,"src":"NEW QUAY NO7_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416104.html","width":130,"caption":"NEW QUAY NO7","height":45});
															thumbnails[416105] = clik.newPhoto({"id":416105,"src":"NEW QUAY NO7A_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416105.html","width":130,"caption":"NEW QUAY NO7A","height":45});
															thumbnails[416106] = clik.newPhoto({"id":416106,"src":"NORTH WALES NO13_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416106.html","width":130,"caption":"NORTH WALES NO13","height":45});
															thumbnails[416107] = clik.newPhoto({"id":416107,"src":"POPPIT NO15_thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416107.html","width":130,"caption":"POPPIT NO15","height":45});
															thumbnails[416108] = clik.newPhoto({"id":416108,"src":"PORTMADOG NORTH W NO12 _thumb.jpg","galleries_id":32448,"server_id":18,"link":"photo_416108.html","width":130,"caption":"PORTMADOG NORTH W NO12 ","height":45});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[32448] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Panoramas","link":"gallery.html","maxRecords":0.0,"photoIDs":[1819710.0,1819720.0,1819745.0,1819752.0,1819761.0,1819763.0,4278410.0,4278483.0,4278490.0,4278492.0,4278499.0,5357757.0,5357769.0,5357789.0,5357819.0,5357844.0,5357867.0,5357893.0,5357901.0,5357906.0,5357911.0,5357932.0,5357936.0,5357939.0,5357942.0,5357947.0,5357955.0,5358249.0,5358252.0,5358254.0,5358258.0,5358261.0,5358264.0,5358268.0,5358269.0,5358270.0,5358273.0,5358279.0,5358283.0,5358287.0,5358292.0,7268114.0,7268123.0,7268126.0,7268130.0,7692496.0,7692515.0,7692520.0,7692521.0,7692524.0,7692525.0,7692527.0,7692532.0,7692533.0,7692534.0,7692542.0,8699306.0,416091.0,442251.0,1116346.0,1116365.0,1116347.0,1333999.0,416093.0,784044.0,1116175.0,416094.0,784045.0,784072.0,1116176.0,1116348.0,5357719.0,1819698.0,416095.0,1116177.0,416096.0,1116178.0,1116350.0,1116179.0,4277895.0,5357727.0,442257.0,416097.0,1116180.0,416092.0,416098.0,442259.0,1116181.0,416099.0,416101.0,416102.0,416104.0,416105.0,416106.0,416107.0,416108.0],"skipIndex":0,"section_code":"gallery","featured_images":"8699306,7692542,7692534,7692533,7692532,7692527,7692525,7692524,7692521,7692520","id":32448,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '784044';
imageSets[3] = '4278499,4278492,4278490,4278483,4277895';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/GwynJ/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/GwynJ/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 = 'Ceredigion Coastal Images: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="rosie.jay@virgin.net">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="rosie.jay@virgin.net">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

