window.thumbnails = {};
															thumbnails[465069] = clik.newPhoto({"id":465069,"src":"wav50604_182_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Riding the Wave","height":87});
															thumbnails[465085] = clik.newPhoto({"id":465085,"src":"06CA027Hibiscus0012_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"HIBISCUS 1","height":87});
															thumbnails[465855] = clik.newPhoto({"id":465855,"src":"05H13_Crooklets-lagoon_cp_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Crooklets Lagoon","height":189});
															thumbnails[465929] = clik.newPhoto({"id":465929,"src":"05AG16TheCrescentdb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Crescent Snowstorm","height":87});
															thumbnails[466028] = clik.newPhoto({"id":466028,"src":"05AG18_CrescentPOmono_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Crescent PO in the Snow","height":93});
															thumbnails[3469987] = clik.newPhoto({"id":3469987,"src":"08FD32enh4_thumb.jpg","galleries_id":392213,"server_id":15,"link":"photo_3469987.html","width":130,"caption":"Rose Petals","height":87});
															thumbnails[3476422] = clik.newPhoto({"id":3476422,"src":"08HA46_thumb.jpg","galleries_id":392206,"server_id":15,"link":"photo_3476422.html","width":130,"caption":"Walkers on the Beach","height":92});
															thumbnails[3476489] = clik.newPhoto({"id":3476489,"src":"08MD30_thumb.jpg","galleries_id":392209,"server_id":15,"link":"photo_3476489.html","width":130,"caption":"Gathering Clouds & Rainbow ","height":93});
															thumbnails[3540614] = clik.newPhoto({"id":3540614,"src":"08GD29cp_thumb.jpg","galleries_id":392212,"server_id":15,"link":"photo_3540614.html","width":130,"caption":"The Garden Room, Chateau de Canon, Normandy","height":98});
															thumbnails[5592645] = clik.newPhoto({"id":5592645,"src":"09CA46__Arches_Cotehele_thumb.jpg","galleries_id":392204,"server_id":15,"link":"photo_5592645.html","width":130,"caption":"Arches at Cotehele House, Cornwall","height":87});
															thumbnails[7259492] = clik.newPhoto({"id":7259492,"src":"09EC22_thumb.jpg","galleries_id":392210,"server_id":15,"link":"photo_7259492.html","width":160,"caption":"Travelling Man","height":71});
															thumbnails[7259976] = clik.newPhoto({"id":7259976,"src":"IMG_1328m_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_7259976.html","width":160,"caption":"Magnolia","height":107});
															thumbnails[7364909] = clik.newPhoto({"id":7364909,"src":"IMG_4076SP_thumb.jpg","galleries_id":392210,"server_id":15,"link":"photo_7364909.html","width":97,"caption":"Lady in Turquoise","height":120});
															thumbnails[7411030] = clik.newPhoto({"id":7411030,"src":"IMG_3894SP_thumb.jpg","galleries_id":392210,"server_id":15,"link":"photo_7411030.html","width":160,"caption":"Talking to the Plants","height":115});
															thumbnails[8509125] = clik.newPhoto({"id":8509125,"src":"07HD_15_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_8509125.html","width":120,"caption":"Bude Lifeboat Day Fireworks ","height":120});
															thumbnails[7411066] = clik.newPhoto({"id":7411066,"src":"IMG_3996SP_thumb.jpg","galleries_id":392210,"server_id":15,"link":"photo_7411066.html","width":160,"caption":"My Camera and Me","height":120});
															thumbnails[8509202] = clik.newPhoto({"id":8509202,"src":"IMG_4581_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_8509202.html","width":160,"caption":"Stary Night over Widemouth Bay","height":105});
															thumbnails[5168243] = clik.newPhoto({"id":5168243,"src":"09CE_47_thumb.jpg","galleries_id":392213,"server_id":15,"link":"photo_5168243.html","width":87,"caption":"Prelude to Spring","height":130});
															thumbnails[8509208] = clik.newPhoto({"id":8509208,"src":"IMG_4594_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_8509208.html","width":80,"caption":"Night Watch","height":120});
															thumbnails[5036831] = clik.newPhoto({"id":5036831,"src":"09FC_37_Rose_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_5036831.html","width":130,"caption":"Rose Petal Detail","height":90});
															thumbnails[3469992] = clik.newPhoto({"id":3469992,"src":"08HB16_thumb.card.jpg","galleries_id":391882,"server_id":15,"link":"photo_3469992.html","width":130,"caption":"Dahalia","height":87});
															thumbnails[1772838] = clik.newPhoto({"id":1772838,"src":"07KD19enh1_thumb.jpg","galleries_id":392213,"server_id":15,"link":"photo_1772838.html","width":130,"caption":"Canoes Reflection","height":80});
															thumbnails[1856844] = clik.newPhoto({"id":1856844,"src":"07CD46_thumb.jpg","galleries_id":392210,"server_id":15,"link":"photo_1856844.html","width":130,"caption":"Lady in carriage","height":92});
															thumbnails[1856846] = clik.newPhoto({"id":1856846,"src":"07CD13_thumb..jpg","galleries_id":392210,"server_id":15,"link":"photo_1856846.html","width":130,"caption":"Waiting to go","height":183});
															thumbnails[1857443] = clik.newPhoto({"id":1857443,"src":"07FC09_thumb.jpg","galleries_id":392206,"server_id":15,"link":"photo_1857443.html","width":130,"caption":"Surf Washed Rocks 3, Breakwater","height":93});
															thumbnails[1857637] = clik.newPhoto({"id":1857637,"src":"07FC10_SW_thumb.jpg","galleries_id":392206,"server_id":15,"link":"photo_1857637.html","width":130,"caption":"Surf Washed Rocks 1","height":93});
															thumbnails[1857641] = clik.newPhoto({"id":1857641,"src":"07FC11SWR2_thumb.jpg","galleries_id":392206,"server_id":15,"link":"photo_1857641.html","width":130,"caption":"Surf Washed Rocks 2","height":93});
															thumbnails[1886981] = clik.newPhoto({"id":1886981,"src":"07HE06_thumb.jpg","galleries_id":392209,"server_id":15,"link":"photo_1886981.html","width":130,"caption":"Rough Tor, Bodmin Moor","height":92});
															thumbnails[1890463] = clik.newPhoto({"id":1890463,"src":"07AB44_thumb.jpg","galleries_id":392210,"server_id":15,"link":"photo_1890463.html","width":130,"caption":"Apres Surf, Widemouth Bay","height":92});
															thumbnails[1890956] = clik.newPhoto({"id":1890956,"src":"07KA41_thumb.jpg","galleries_id":392209,"server_id":15,"link":"photo_1890956.html","width":130,"caption":"Ladybower Reservoir, Peak District  ","height":92});
															thumbnails[7288280] = clik.newPhoto({"id":7288280,"src":"09BC_42_thumb.jpg","galleries_id":392212,"server_id":15,"link":"photo_7288280.html","width":160,"caption":"Tables in the Rain","height":94});
															thumbnails[1898832] = clik.newPhoto({"id":1898832,"src":"07LA49_thumb.jpg","galleries_id":392209,"server_id":15,"link":"photo_1898832.html","width":130,"caption":"Autumn at Cotehele","height":92});
															thumbnails[7411279] = clik.newPhoto({"id":7411279,"src":"DSCF3302_thumb.jpg","galleries_id":392212,"server_id":15,"link":"photo_7411279.html","width":87,"caption":"Winter Wisteria","height":120});
															thumbnails[1898834] = clik.newPhoto({"id":1898834,"src":"07DA38_thumb.jpg","galleries_id":392209,"server_id":15,"link":"photo_1898834.html","width":130,"caption":"Sheep Grazing, ","height":92});
															thumbnails[1925865] = clik.newPhoto({"id":1925865,"src":"07KB08_thumb.jpg","galleries_id":392209,"server_id":15,"link":"photo_1925865.html","width":130,"caption":"Autumn, Ladybower Reservoir.","height":87});
															thumbnails[1925882] = clik.newPhoto({"id":1925882,"src":"07KB20_thumb.jpg","galleries_id":392213,"server_id":15,"link":"photo_1925882.html","width":130,"caption":"Silver Birches","height":92});
															thumbnails[1925938] = clik.newPhoto({"id":1925938,"src":"07DB21_thumb.jpg","galleries_id":392209,"server_id":15,"link":"photo_1925938.html","width":130,"caption":"Peak District Landscape","height":92});
															thumbnails[5049273] = clik.newPhoto({"id":5049273,"src":"09CF_44_thumb.jpg","galleries_id":392213,"server_id":15,"link":"photo_5049273.html","width":130,"caption":"Pink Flame","height":114});
															thumbnails[7252366] = clik.newPhoto({"id":7252366,"src":"IMG_1882_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_7252366.html","width":129,"caption":"Golitha Falls.","height":120});
															thumbnails[7252406] = clik.newPhoto({"id":7252406,"src":"09FC37_thumb.jpg","galleries_id":392213,"server_id":15,"link":"photo_7252406.html","width":84,"caption":"Rose","height":120});
															thumbnails[7259966] = clik.newPhoto({"id":7259966,"src":"DSCF2919_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_7259966.html","width":160,"caption":"Morning Reflections, Bude Canal","height":107});
															thumbnails[7411107] = clik.newPhoto({"id":7411107,"src":"IMG_1480_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_7411107.html","width":160,"caption":"Tranquil Sunset","height":80});
															thumbnails[7288255] = clik.newPhoto({"id":7288255,"src":"09BA16_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_7288255.html","width":160,"caption":"A Walk in the Snow","height":110});
															thumbnails[8509133] = clik.newPhoto({"id":8509133,"src":"11FE29_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_8509133.html","width":120,"caption":"Sleeping Cat","height":120});
															thumbnails[465071] = clik.newPhoto({"id":465071,"src":"06EA34_roddsbridgelock2_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_465071.html","width":130,"caption":"Rodd's Bridge Lock, Bude Canal","height":87});
															thumbnails[3470032] = clik.newPhoto({"id":3470032,"src":"07MA17_thumb.jpg","galleries_id":392213,"server_id":15,"link":"photo_3470032.html","width":130,"caption":"Flight.","height":130});
															thumbnails[3470426] = clik.newPhoto({"id":3470426,"src":"08KA03_thumb.jpg","galleries_id":392209,"server_id":15,"link":"photo_3470426.html","width":130,"caption":"Lookout","height":90});
															thumbnails[7252235] = clik.newPhoto({"id":7252235,"src":"IMG_3090_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_7252235.html","width":139,"caption":"Humming Bird Hawk Moth","height":120});
															thumbnails[7252318] = clik.newPhoto({"id":7252318,"src":"IMG3440_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_7252318.html","width":160,"caption":"Flies on apple wood sap","height":95});
															thumbnails[7288243] = clik.newPhoto({"id":7288243,"src":"IMG3450_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_7288243.html","width":156,"caption":"Hornets feeding on Apple","height":120});
															thumbnails[7410997] = clik.newPhoto({"id":7410997,"src":"DSCF2392_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_7410997.html","width":133,"caption":"Hornet Feeding on Applesap","height":120});
															thumbnails[5168294] = clik.newPhoto({"id":5168294,"src":"09GD01_Goldfinch_feeding_yo_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_5168294.html","width":130,"caption":"Goldfinch feeding Young","height":90});
															thumbnails[5168311] = clik.newPhoto({"id":5168311,"src":"09GE08_Linnet_feeding_young_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_5168311.html","width":130,"caption":"Linnet feeding Young","height":97});
															thumbnails[3470399] = clik.newPhoto({"id":3470399,"src":"08JC38_thumb.jpg","galleries_id":392210,"server_id":15,"link":"photo_3470399.html","width":130,"caption":"Casting","height":107});
															thumbnails[3470486] = clik.newPhoto({"id":3470486,"src":"08KA26_thumb.jpg","galleries_id":392204,"server_id":15,"link":"photo_3470486.html","width":130,"caption":"Miners' Catherdral","height":195});
															thumbnails[5022257] = clik.newPhoto({"id":5022257,"src":"0HB34_Small_Copper_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_5022257.html","width":130,"caption":"Small Copper Butterfly","height":108});
															thumbnails[7252167] = clik.newPhoto({"id":7252167,"src":"IMG_9822_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_7252167.html","width":140,"caption":"Goldfinch on Sunflower","height":120});
															thumbnails[6561314] = clik.newPhoto({"id":6561314,"src":"DSCF1484sml_Sooty_Copper_thumb.JPG","galleries_id":391865,"server_id":15,"link":"photo_6561314.html","width":130,"caption":"Sooty Copper Butterfly, underside","height":130});
															thumbnails[8509151] = clik.newPhoto({"id":8509151,"src":"11FL27_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_8509151.html","width":160,"caption":"Stanage Edge, Derbyshire","height":104});
															thumbnails[6563418] = clik.newPhoto({"id":6563418,"src":"IMG_2909smll_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_6563418.html","width":130,"caption":"Dark Green Fritillary argynnis aglaja","height":130});
															thumbnails[8509161] = clik.newPhoto({"id":8509161,"src":"11FL41_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_8509161.html","width":160,"caption":"Chester Street Scene","height":118});
															thumbnails[3476318] = clik.newPhoto({"id":3476318,"src":"07CF331_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_3476318.html","width":87,"caption":"Pheasant  Eye Narcissus","height":130});
															thumbnails[5036866] = clik.newPhoto({"id":5036866,"src":"09FC_37_Rose_col_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_5036866.html","width":130,"caption":"Pink Rose","height":90});
															thumbnails[2400661] = clik.newPhoto({"id":2400661,"src":"08FE_10_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_2400661.html","width":80,"caption":"Cobra Lily","height":120});
															thumbnails[5036946] = clik.newPhoto({"id":5036946,"src":"09GG29_Glowworms_mating_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_5036946.html","width":120,"caption":"Glow Worms Mating","height":120});
															thumbnails[7252288] = clik.newPhoto({"id":7252288,"src":"img_2539_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_7252288.html","width":160,"caption":"Female House Sparrow Feeding Young","height":120});
															thumbnails[2400669] = clik.newPhoto({"id":2400669,"src":"08FE_23_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_2400669.html","width":130,"caption":"Flower, Cobra Lily","height":87});
															thumbnails[2469593] = clik.newPhoto({"id":2469593,"src":"08FF_25_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_2469593.html","width":80,"caption":"Monkey Cups: nepenthes hamata","height":120});
															thumbnails[2469602] = clik.newPhoto({"id":2469602,"src":"08FF_22_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_2469602.html","width":80,"caption":"Monkey Cups: nepenthes ephippiata","height":120});
															thumbnails[2469615] = clik.newPhoto({"id":2469615,"src":"08FG_04_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_2469615.html","width":80,"caption":"Monkey Cups: nepenthes ventricosa red form","height":120});
															thumbnails[1808631] = clik.newPhoto({"id":1808631,"src":"07HE35enh1_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_1808631.html","width":130,"caption":"Common Frog","height":87});
															thumbnails[2469628] = clik.newPhoto({"id":2469628,"src":"08FE_11_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_2469628.html","width":80,"caption":"Cobra Lily,   darlingtonia californica","height":120});
															thumbnails[3470493] = clik.newPhoto({"id":3470493,"src":"08KB35_thumb.jpg","galleries_id":392213,"server_id":15,"link":"photo_3470493.html","width":130,"caption":"Passing Trees","height":92});
															thumbnails[3540618] = clik.newPhoto({"id":3540618,"src":"08JC30cp_thumb.jpg","galleries_id":392212,"server_id":15,"link":"photo_3540618.html","width":130,"caption":"Blue Doors","height":107});
															thumbnails[1809190] = clik.newPhoto({"id":1809190,"src":"07DF49enh2_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_1809190.html","width":130,"caption":"Tulip detail","height":87});
															thumbnails[1808641] = clik.newPhoto({"id":1808641,"src":"07DG05Tulips_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_1808641.html","width":80,"caption":"Tulips","height":120});
															thumbnails[1772818] = clik.newPhoto({"id":1772818,"src":"06FC073enh1_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_1772818.html","width":130,"caption":"Rain Jewelled Rose","height":92});
															thumbnails[1772826] = clik.newPhoto({"id":1772826,"src":"07HB15enh1_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_1772826.html","width":85,"caption":"Canna ","height":120});
															thumbnails[1791205] = clik.newPhoto({"id":1791205,"src":"07FJ09enh1_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_1791205.html","width":130,"caption":"Salsify Seed Head","height":87});
															thumbnails[463763] = clik.newPhoto({"id":463763,"src":"cote060415014cc1_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_463763.html","width":130,"caption":"Daffadil Jazz","height":87});
															thumbnails[577761] = clik.newPhoto({"id":577761,"src":"06DD036_thumb.jpg","galleries_id":391882,"server_id":15,"link":"photo_577761.html","width":80,"caption":"On the Bank of Primroses.....","height":120});
															thumbnails[1809224] = clik.newPhoto({"id":1809224,"src":"07HD11enh2_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_1809224.html","width":130,"caption":"Lifeboat Day Dusk","height":92});
															thumbnails[1791195] = clik.newPhoto({"id":1791195,"src":"07FA47_thumb.jpg","galleries_id":392206,"server_id":15,"link":"photo_1791195.html","width":130,"caption":"Evening Swell, Barrel Rock, Bude ","height":93});
															thumbnails[1791203] = clik.newPhoto({"id":1791203,"src":"07BA16_thumb.jpg","galleries_id":392206,"server_id":15,"link":"photo_1791203.html","width":130,"caption":"Black Rock Sunset, Widemouth Bay,","height":93});
															thumbnails[1890954] = clik.newPhoto({"id":1890954,"src":"07MC13_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_1890954.html","width":130,"caption":"Frosty Morning, Bude Canal","height":92});
															thumbnails[3540622] = clik.newPhoto({"id":3540622,"src":"08JD33cp_thumb.jpg","galleries_id":392210,"server_id":15,"link":"photo_3540622.html","width":130,"caption":"Tide's Out","height":123});
															thumbnails[5168334] = clik.newPhoto({"id":5168334,"src":"09CA_10_Teasel_thumb.jpg","galleries_id":392212,"server_id":15,"link":"photo_5168334.html","width":90,"caption":"Teasel","height":130});
															thumbnails[726822] = clik.newPhoto({"id":726822,"src":"01J12_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_726822.html","width":130,"caption":"Boats at Moorings, ","height":87});
															thumbnails[726828] = clik.newPhoto({"id":726828,"src":"03E13_thumb.jpg","galleries_id":392206,"server_id":15,"link":"photo_726828.html","width":130,"caption":"Waves Breaking over Barrel Rock.","height":87});
															thumbnails[738309] = clik.newPhoto({"id":738309,"src":"06GC065_thumb.jpg","galleries_id":392206,"server_id":15,"link":"photo_738309.html","width":130,"caption":"Iron Bridge Sunset","height":87});
															thumbnails[738310] = clik.newPhoto({"id":738310,"src":"06GD002_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_738310.html","width":130,"caption":"Mooring Post","height":87});
															thumbnails[738313] = clik.newPhoto({"id":738313,"src":"022808_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_738313.html","width":130,"caption":"Lower Wharf,Bude Canal","height":87});
															thumbnails[7247883] = clik.newPhoto({"id":7247883,"src":"07DE04_thumb.jpg","galleries_id":392206,"server_id":15,"link":"photo_7247883.html","width":80,"caption":"New Moon & Venus over Breakwater","height":120});
															thumbnails[1809168] = clik.newPhoto({"id":1809168,"src":"07CMoon_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_1809168.html","width":130,"caption":"Lunar Eclipse Tryptich","height":86});
															thumbnails[3476433] = clik.newPhoto({"id":3476433,"src":"08MD43_thumb.jpg","galleries_id":392209,"server_id":15,"link":"photo_3476433.html","width":130,"caption":"Evening Storm & Rainbow over Dartmoor","height":87});
															thumbnails[5022278] = clik.newPhoto({"id":5022278,"src":"08EA_44_Summerleaze_Bude_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_5022278.html","width":130,"caption":"Evening Light, Summerleaze Beach, Bude","height":90});
															thumbnails[7252382] = clik.newPhoto({"id":7252382,"src":"IMG0303_thumb.jpg","galleries_id":392212,"server_id":15,"link":"photo_7252382.html","width":146,"caption":"Pots","height":120});
															thumbnails[5022288] = clik.newPhoto({"id":5022288,"src":"09BA_26_Winter_Afternoon_Bude_Canal_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_5022288.html","width":130,"caption":"Winter Afternoon, Bude Canal","height":87});
															thumbnails[7252389] = clik.newPhoto({"id":7252389,"src":"IMG2142_thumb.jpg","galleries_id":392212,"server_id":15,"link":"photo_7252389.html","width":160,"caption":"Pots & Baths","height":104});
															thumbnails[8509287] = clik.newPhoto({"id":8509287,"src":"DSCF6357_thumb.jpg","galleries_id":392214,"server_id":15,"link":"photo_8509287.html","width":120,"caption":"Silver Studded Blues Pairing","height":120});
															thumbnails[5022330] = clik.newPhoto({"id":5022330,"src":"09BA_45_Bude_Canal_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_5022330.html","width":130,"caption":"Snow Bude Canal","height":87});
															thumbnails[5022359] = clik.newPhoto({"id":5022359,"src":"09BB_14_Bude_Canal-_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_5022359.html","width":130,"caption":"Winter Walk, Bude Canal","height":87});
															thumbnails[5022365] = clik.newPhoto({"id":5022365,"src":"09BC_06_Lock_gates_bude_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_5022365.html","width":130,"caption":"Snow at the Old Hobble House, Bude Locks","height":87});
															thumbnails[5022386] = clik.newPhoto({"id":5022386,"src":"09BC_16_Lock_Gates_Bude_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_5022386.html","width":130,"caption":"Tractor, Bude Locks","height":87});
															thumbnails[5022819] = clik.newPhoto({"id":5022819,"src":"09BC_18_Lobster_Pots_-Bude_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_5022819.html","width":130,"caption":"Snow Lace Lobster Pots, Bude ","height":87});
															thumbnails[5022955] = clik.newPhoto({"id":5022955,"src":"09BC_23_Lower_Wharf_Bude_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_5022955.html","width":130,"caption":"Lower Wharf, Bude Canal","height":87});
															thumbnails[3476387] = clik.newPhoto({"id":3476387,"src":"07DE23_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_3476387.html","width":130,"caption":"Down To Lock Gates","height":87});
															thumbnails[3470447] = clik.newPhoto({"id":3470447,"src":"09BA48cl_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_3470447.html","width":91,"caption":"Snow Touched Trees","height":130});
															thumbnails[3470471] = clik.newPhoto({"id":3470471,"src":"09BC_12_Lock_Gates-Bude_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_3470471.html","width":130,"caption":"Snow at Lock Gates, Bude","height":87});
															thumbnails[3470015] = clik.newPhoto({"id":3470015,"src":"08EA12-_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_3470015.html","width":130,"caption":"Bude Light","height":87});
															thumbnails[3470028] = clik.newPhoto({"id":3470028,"src":"07EA07_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_3470028.html","width":130,"caption":"Bude Bay, North Cornwall","height":87});
															thumbnails[5592728] = clik.newPhoto({"id":5592728,"src":"09FD_33_Tables_at_Crooklets_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_5592728.html","width":130,"caption":"Tables at Crooklets","height":86});
															thumbnails[8572878] = clik.newPhoto({"id":8572878,"src":"11FE50_17_thumb.jpg","galleries_id":392214,"server_id":19,"link":"photo_8572878.html","width":159,"caption":"Rose Pearl Pink","height":120});
															thumbnails[8572921] = clik.newPhoto({"id":8572921,"src":"11FE50_17_mono_thumb.jpg","galleries_id":392214,"server_id":19,"link":"photo_8572921.html","width":149,"caption":"Grey Pearl Rose","height":120});
															thumbnails[8572987] = clik.newPhoto({"id":8572987,"src":"11FD02_3_thumb.jpg","galleries_id":392214,"server_id":19,"link":"photo_8572987.html","width":159,"caption":"Yellow Pearl Rose","height":120});
															thumbnails[579714] = clik.newPhoto({"id":579714,"src":"06KC46_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_579714.html","width":84,"caption":"Fly Agaric, amanita muscaria ","height":120});
															thumbnails[579725] = clik.newPhoto({"id":579725,"src":"06HA082_thumb.jpg","galleries_id":391865,"server_id":15,"link":"photo_579725.html","width":80,"caption":"GREAT SUNDEW. drosera anglica ","height":120});
															thumbnails[717462] = clik.newPhoto({"id":717462,"src":"05AG27_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_717462.html","width":130,"caption":"Bude Light.","height":87});
															thumbnails[724233] = clik.newPhoto({"id":724233,"src":"033003_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_724233.html","width":130,"caption":"Evening Tide at the Breakwater,","height":87});
															thumbnails[724246] = clik.newPhoto({"id":724246,"src":"Morning-Surf,-Widemouth,-03_thumb.jpg","galleries_id":391930,"server_id":15,"link":"photo_724246.html","width":130,"caption":"Morning Surf, Widemouth Bay.","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[392214] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Hot Off the Press","link":"gallery_392214.html","maxRecords":0.0,"photoIDs":[8509125.0,8509202.0,8509208.0,7252366.0,7259966.0,7411107.0,8509133.0,8509151.0,8509161.0,8509287.0,8572878.0,8572921.0,8572987.0],"skipIndex":0,"section_code":"gallery","featured_images":"8572987,8572921,8572878,8509287,8509208,8509202,8509133,8509125,7411107,7259966,7252366","id":392214,"singleSection":false});				  						galleries[391865] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Natural History","link":"gallery_391865.html","maxRecords":0.0,"photoIDs":[7252235.0,7252318.0,7288243.0,7410997.0,5168294.0,5168311.0,5022257.0,7252167.0,6561314.0,6563418.0,5036946.0,7252288.0,1808631.0,1809168.0,579714.0,579725.0],"skipIndex":0,"section_code":"gallery","featured_images":"7410997,7288243,7252318,7252288,7252235,7252167,6563418,6561314,5168311,5168294,5036946,5022257,1809168,1808631,579725,579714","id":391865,"singleSection":false});				  						galleries[391882] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Gardens & Flowers","link":"gallery_391882.html","maxRecords":0.0,"photoIDs":[7259976.0,5036831.0,3469992.0,3476318.0,5036866.0,2400661.0,2400669.0,2469593.0,2469602.0,2469615.0,2469628.0,1809190.0,1808641.0,1772818.0,1772826.0,1791205.0,463763.0,577761.0],"skipIndex":0,"section_code":"gallery","featured_images":"7259976,5036866,5036831,3476318,3469992,2469628,2469615,2469602,2469593,2400669,2400661,1809190,1808641,1791205,1772826,1772818,577761,463763","id":391882,"singleSection":false});				  						galleries[391930] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Around North Cornwall","link":"gallery_391930.html","maxRecords":0.0,"photoIDs":[7288255.0,465071.0,1809224.0,1890954.0,726822.0,738310.0,738313.0,5022278.0,5022288.0,5022330.0,5022359.0,5022365.0,5022386.0,5022819.0,5022955.0,3476387.0,3470447.0,3470471.0,3470015.0,3470028.0,5592728.0,717462.0,724233.0,724246.0],"skipIndex":0,"section_code":"gallery","featured_images":"7288255,5592728,5022955,5022819,5022386,5022365,5022359,5022330,5022288,5022278,3476387,3470471,3470447,3470028,3470015,1890954,738313,738310,724246,724233,465071","id":391930,"singleSection":false});				  						galleries[392206] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Sea to Sky","link":"gallery_392206.html","maxRecords":0.0,"photoIDs":[3476422.0,1857443.0,1857637.0,1857641.0,1791195.0,1791203.0,726828.0,738309.0,7247883.0],"skipIndex":0,"section_code":"gallery","featured_images":"7247883,3476422,1857641,1857637,1857443,1791203,1791195,738309,726828","id":392206,"singleSection":false});				  						galleries[392204] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Bricks & Morter","link":"gallery_392204.html","maxRecords":0.0,"photoIDs":[5592645.0,3470486.0],"skipIndex":0,"section_code":"gallery","featured_images":"5592645,3470486","id":392204,"singleSection":false});				  						galleries[392209] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Here & There","link":"gallery_392209.html","maxRecords":0.0,"photoIDs":[3476489.0,1886981.0,1890956.0,1898832.0,1898834.0,1925865.0,1925938.0,3470426.0,3476433.0],"skipIndex":0,"section_code":"gallery","featured_images":"3476489,3476433,3470426,1925938,1925865,1898834,1898832,1890956,1886981","id":392209,"singleSection":false});				  						galleries[392210] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Cameos & Characters","link":"gallery_392210.html","maxRecords":0.0,"photoIDs":[7259492.0,7364909.0,7411030.0,7411066.0,1856844.0,1856846.0,1890463.0,3470399.0,3540622.0],"skipIndex":0,"section_code":"gallery","featured_images":"7411066,7411030,7364909,7259492,3540622,3470399,1856844","id":392210,"singleSection":false});				  						galleries[392212] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Features & Facets","link":"gallery_392212.html","maxRecords":0.0,"photoIDs":[3540614.0,7288280.0,7411279.0,3540618.0,5168334.0,7252382.0,7252389.0],"skipIndex":0,"section_code":"gallery","featured_images":"7411279,7288280,7252389,7252382,5168334,3540618,3540614","id":392212,"singleSection":false});				  						galleries[392213] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Impressions","link":"gallery_392213.html","maxRecords":0.0,"photoIDs":[3469987.0,5168243.0,1772838.0,1925882.0,5049273.0,7252406.0,3470032.0,3470493.0],"skipIndex":0,"section_code":"gallery","featured_images":"7252406,5168243,5049273,3470493,3470032,3469987,1925882,1772838","id":392213,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[233282] = '3476422,1857443,1890463,1791195,1791203,1890954,726822,726828,738309,738310,738313,7247883,5022278,5022288,5022330,5022359,5022365,5022386,5022819,5022955,3476387,3470471,3470015,3470028,717462,724233,724246';
imageSets[238553] = '5049273';
imageSets[1] = '7259976,7259492,7364909,8509125,7411066,8509202,8509208,5036831,7288280,7411279,7252366,5049273,7259966,7411107,7288255,8509133,7252235,7252318,7410997,7288243,5168294,5168311,7252167,6561314,6563418,5036866,7252288,5036946,7247883,7252382,5022278,8509287,7252389,5022288,5022330,5022359,5022365,5022386,5022819,5022955,3470447,3470471,5592728,8572878,8572921,8572987';
imageSets[2] = '7259976,7259492,5592645,3540614,3476489,3476422,3469987,7364909,8509125,7411030,7411066,8509202,8509208,5168243,5036831,3469992,1772838,1856844,1857443,1857637,1857641,1886981,7288280,1890956,7411279,1898832,1898834,1925865,1925882,1925938,7252406,7252366,5049273,7259966,7411107,7288255,8509133,7252235,3470426,3470032,465071,7252318,7410997,7288243,5168294,5168311,7252167,5022257,3470486,3470399,6561314,6563418,3476318,5036866,7252288,5036946,2400661,2400669,2469593,2469602,2469615,3540618,3470493,2469628,1808631,1809190,1808641,1772818,1772826,1791205,463763,577761,1791195,1791203,5168334,3540622,1890954,726828,738309,738310,738313,7247883,7252382,5022278,3476433,1809168,8509287,7252389,5022288,5022330,5022359,5022365,5022386,5022819,5022955,3476387,3470447,3470471,3470015,3470028,5592728,8572878,8572921,8572987,465069,465085,465855,465929,579714,579725,724233,724246';
imageSets[3] = '3469987,3469992,3470032,3476318,3476387,3470015,3470028';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/lightfantastic/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/lightfantastic/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 = 'LIGHTFANTASTIC : Photography by Hilary Phillips : ' + 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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		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">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="LIGHTFANTASTIC">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

