window.thumbnails = new Object();
												thumbnails[2203568] = new thumbnail(2203568,'143313','WHEAL COATES TIN MINE','Wheal Coats Cornwall small4_thumb.jpg',130, 96,32,'photo_2203568.html');
												thumbnails[2203791] = new thumbnail(2203791,'143311','BOAT IN ST. IVES','Boat in St_thumb. Ives Cornwall B&W small2.jpg',130, 74,32,'photo_2203791.html');
												thumbnails[2203816] = new thumbnail(2203816,'143308','WILD FLOWERS','Wild woodland flowers small1_thumb.jpg',130, 87,32,'photo_2203816.html');
												thumbnails[2203973] = new thumbnail(2203973,'148226','BOATS IN THE HARBOUR AS A PAINTING<br>\r\n','Boats in the harbour as a Painting small2_thumb.jpg',130, 101,32,'photo_2203973.html');
												thumbnails[2254180] = new thumbnail(2254180,'143310','PILLARS','Pillars small_thumb.jpg',130, 167,32,'photo_2254180.html');
												thumbnails[2273010] = new thumbnail(2273010,'143312','SISTERS','Sisters small4_thumb.jpg',130, 103,32,'photo_2273010.html');
												thumbnails[2574843] = new thumbnail(2574843,'164267','TOPSHAM','Topsham_thumb.jpg',130, 87,32,'photo_2574843.html');
												thumbnails[2823700] = new thumbnail(2823700,'143264','TIGER FACE','Tiger Face_thumb.jpg',130, 108,32,'photo_2823700.html');
												thumbnails[3870620] = new thumbnail(3870620,'234569','Driving me around the bend','Driving_me_around_the_bend_small_thumb.jpg',130, 115,32,'photo_3870620.html');
												thumbnails[2203710] = new thumbnail(2203710,'143264','Foxy Lady','Foxy_Lady_Small_thumb.jpg',130, 109,32,'photo_2203710.html');
												thumbnails[2203850] = new thumbnail(2203850,'143308','BLUEBELLS','Bluebells small_thumb.jpg',130, 132,32,'photo_2203850.html');
												thumbnails[2203930] = new thumbnail(2203930,'143310','BOAT IN ST. IVES B&W<br>\r\n','Boat in St_thumb. Ives Cornwall B&W small3.jpg',130, 74,32,'photo_2203930.html');
												thumbnails[2214773] = new thumbnail(2214773,'143313','WAVE','wave small_thumb.jpg',130, 90,32,'photo_2214773.html');
												thumbnails[2244447] = new thumbnail(2244447,'143311','THE SECRET DOOR SC','The secret door B&W small_thumb.jpg',130, 174,32,'photo_2244447.html');
												thumbnails[2254186] = new thumbnail(2254186,'148226','PILLARS AS A PAINTING','Pillars as a Painting small_thumb.jpg',130, 167,32,'photo_2254186.html');
												thumbnails[2270505] = new thumbnail(2270505,'143312','JAMES LISTER<br>\r\n','James Listersmall_thumb.jpg',130, 146,32,'photo_2270505.html');
												thumbnails[5253951] = new thumbnail(5253951,'234569','On your bike','On_your_bike_small_file_thumb.jpg',130, 89,32,'photo_5253951.html');
												thumbnails[2203717] = new thumbnail(2203717,'143264','Bald Eagle','Bald_Eagle_small_thumb.jpg',130, 95,32,'photo_2203717.html');
												thumbnails[2203932] = new thumbnail(2203932,'143310','BOAT IN ST. IVES SEPIA','Boat in St_thumb. Ives Cornwall sepia small1.jpg',130, 77,32,'photo_2203932.html');
												thumbnails[2214799] = new thumbnail(2214799,'143312','JESS','Jess small_thumb.jpg',130, 104,32,'photo_2214799.html');
												thumbnails[2222471] = new thumbnail(2222471,'143313','CHEDDAR GORGE','Cheddar Gorge small_thumb.jpg',130, 91,32,'photo_2222471.html');
												thumbnails[2254189] = new thumbnail(2254189,'148226','BENCHES AS A PAINTING','Benches small as a painting_thumb.jpg',130, 85,32,'photo_2254189.html');
												thumbnails[3339733] = new thumbnail(3339733,'143311','St. Michaels Mount','St_thumb. Michaels Mount Small file.jpg',130, 87,32,'photo_3339733.html');
												thumbnails[4149830] = new thumbnail(4149830,'143308','The Guiding light','The_Guiding_light_small1_thumb.jpg',130, 138,32,'photo_4149830.html');
												thumbnails[5253962] = new thumbnail(5253962,'234569','I think it\'s through here?','I_think_its_through_here_small_file_thumb.jpg',130, 99,32,'photo_5253962.html');
												thumbnails[2203939] = new thumbnail(2203939,'143310','BOAT IN ST.IVES COLOUR','Boat in St_thumb. Ives Cornwall small1.jpg',130, 73,32,'photo_2203939.html');
												thumbnails[2209046] = new thumbnail(2209046,'143308','FLOWER PATTERN','Flower pattern small_thumb.jpg',130, 127,32,'photo_2209046.html');
												thumbnails[2222477] = new thumbnail(2222477,'143313','FROGMORE PONDS','Frogmore Ponds small_thumb.jpg',130, 149,32,'photo_2222477.html');
												thumbnails[2243757] = new thumbnail(2243757,'143312','EXTRA','Extra small_thumb.jpg',130, 178,32,'photo_2243757.html');
												thumbnails[2254194] = new thumbnail(2254194,'148226','BOATS AS A PAINTING','Boats as a Painting_thumb.jpg',130, 101,32,'photo_2254194.html');
												thumbnails[4515236] = new thumbnail(4515236,'143264','Amur Tiger','Amur_Tiger_small_thumb.jpg',130, 154,32,'photo_4515236.html');
												thumbnails[5254101] = new thumbnail(5254101,'143311','Small','Small_as_a_small_file1_thumb.jpg',130, 66,32,'photo_5254101.html');
												thumbnails[2203964] = new thumbnail(2203964,'143310','BOATS IN THE HARBOUR','Boats in the harbour small1_thumb.jpg',130, 101,32,'photo_2203964.html');
												thumbnails[2214871] = new thumbnail(2214871,'143308','FOXGLOVES','Foxglove small_thumb.jpg',130, 97,32,'photo_2214871.html');
												thumbnails[2222485] = new thumbnail(2222485,'143313','WHEAL COATS 2 ','Wheal Coats 2 small_thumb.jpg',130, 88,32,'photo_2222485.html');
												thumbnails[2243761] = new thumbnail(2243761,'143312','MARI','Mari small_thumb.jpg',130, 196,32,'photo_2243761.html');
												thumbnails[2254198] = new thumbnail(2254198,'148226','HARBOUR AS A PAINTING','Harbour as a Painting small_thumb.jpg',130, 62,32,'photo_2254198.html');
												thumbnails[3342228] = new thumbnail(3342228,'143311','Godrevy Island SC','GODREVY ISLAND SC Small file_thumb.jpg',130, 91,32,'photo_3342228.html');
												thumbnails[4484219] = new thumbnail(4484219,'143264','Oystercatcher','Oystercatcher_small_thumb.jpg',130, 90,32,'photo_4484219.html');
												thumbnails[2214898] = new thumbnail(2214898,'143308','CISTUS','Cistus small_thumb.jpg',130, 107,32,'photo_2214898.html');
												thumbnails[2222433] = new thumbnail(2222433,'143264','DRAGONFLY','Dragonfly small_thumb.jpg',130, 99,32,'photo_2222433.html');
												thumbnails[2222490] = new thumbnail(2222490,'143313','GOLITHA FALLS','Golitha Falls small_thumb.jpg',130, 97,32,'photo_2222490.html');
												thumbnails[2243765] = new thumbnail(2243765,'143312','Hmmmm.','Hmmmm small_thumb.jpg',130, 153,32,'photo_2243765.html');
												thumbnails[2244435] = new thumbnail(2244435,'143310','THE SECRET DOOR','The secret door small1_thumb.jpg',130, 175,32,'photo_2244435.html');
												thumbnails[2812864] = new thumbnail(2812864,'148226','WOODLAND FLOWERS AS A PAINTING','WILD WOODLAND FLOWERS LARGE FILE as a painting_edited-1_thumb.jpg',130, 87,32,'photo_2812864.html');
												thumbnails[3342246] = new thumbnail(3342246,'143311','THE FISHERMAN\'S COTTAGE SC','THE FISHERMAN\'S COTTAGE SC small file_thumb.jpg',130, 95,32,'photo_3342246.html');
												thumbnails[2214825] = new thumbnail(2214825,'143310','STILL LIFE','Still Life small_thumb.jpg',130, 199,32,'photo_2214825.html');
												thumbnails[2222447] = new thumbnail(2222447,'143308','GOLDERS HILL PARK','Glolders Hill Park small_thumb.jpg',130, 90,32,'photo_2222447.html');
												thumbnails[2222494] = new thumbnail(2222494,'143313','GULL ROCK','Gull Rock small_thumb.jpg',130, 84,32,'photo_2222494.html');
												thumbnails[2243775] = new thumbnail(2243775,'143312','LEE','Lee small_thumb.jpg',130, 195,32,'photo_2243775.html');
												thumbnails[2823474] = new thumbnail(2823474,'148226','BLUEBELLS AS A PAINTING','BLUEBELLS as a painting_thumb.jpg',130, 132,32,'photo_2823474.html');
												thumbnails[3342255] = new thumbnail(3342255,'143311','Wheal Coats SC','WHEAL COATS  SC small file_thumb.jpg',130, 96,32,'photo_3342255.html');
												thumbnails[4484187] = new thumbnail(4484187,'143264','Snow Monkey','Snow_Monkey_small_thumb.jpg',130, 121,32,'photo_4484187.html');
												thumbnails[2214736] = new thumbnail(2214736,'143312','ME – That’s right, it’s me.','Me_again_thumb.jpg',130, 135,32,'photo_2214736.html');
												thumbnails[2222496] = new thumbnail(2222496,'143313','ST. NECTANS GLEN WATERFALL.','St_thumb. Nectans Glen Waterfall small.jpg',130, 98,32,'photo_2222496.html');
												thumbnails[2222501] = new thumbnail(2222501,'143310','PEBBLES','Pebbles small_thumb.jpg',130, 96,32,'photo_2222501.html');
												thumbnails[2239815] = new thumbnail(2239815,'143308','CROCUS','Crocus small_thumb.jpg',130, 98,32,'photo_2239815.html');
												thumbnails[3342336] = new thumbnail(3342336,'143264','Red Squirrel','Red_Squirrel_small_thumb.jpg',130, 135,32,'photo_3342336.html');
												thumbnails[3692635] = new thumbnail(3692635,'148226','Teasel as a Painting','Teasel_as_a_Painting_small_thumb.jpg',130, 73,32,'photo_3692635.html');
												thumbnails[4484054] = new thumbnail(4484054,'143311','Eilean Donan Castle','Eilean_Donan_Castle_small1_thumb.jpg',130, 81,32,'photo_4484054.html');
												thumbnails[2239819] = new thumbnail(2239819,'143308','CROCUS AGAIN','Crocus again small_thumb.jpg',130, 127,32,'photo_2239819.html');
												thumbnails[2243538] = new thumbnail(2243538,'143311','TWIGGY','twiggy small_thumb.jpg',130, 145,32,'photo_2243538.html');
												thumbnails[2243691] = new thumbnail(2243691,'143313','GODREVY ISLAND','Godrevy Island small_thumb.jpg',130, 91,32,'photo_2243691.html');
												thumbnails[2243725] = new thumbnail(2243725,'143310','THE FISHERMAN\'S COTTAGE','The Fisherman’s Cottage small_thumb.jpg',130, 95,32,'photo_2243725.html');
												thumbnails[2823678] = new thumbnail(2823678,'143264','MR. BUMBLE','Mr_thumb. Bumble.jpg',130, 104,32,'photo_2823678.html');
												thumbnails[2992517] = new thumbnail(2992517,'148226','HAWK AS A PAINTING','Hawk as a painting small file_thumb.jpg',130, 176,32,'photo_2992517.html');
												thumbnails[2243674] = new thumbnail(2243674,'143264','PEACOCK','peacock small_thumb.jpg',130, 162,32,'photo_2243674.html');
												thumbnails[2243742] = new thumbnail(2243742,'143310','BENCHES','Benches small_thumb.jpg',130, 85,32,'photo_2243742.html');
												thumbnails[2254153] = new thumbnail(2254153,'143311','DARWIN & OLLIE','Darwin & Ollie small_thumb.jpg',130, 117,32,'photo_2254153.html');
												thumbnails[2823486] = new thumbnail(2823486,'148226','MR. BUMBLE AS A PAINTING<br>\r\n','Mr_thumb. Bumble as a painting.jpg',130, 104,32,'photo_2823486.html');
												thumbnails[3871604] = new thumbnail(3871604,'143308','Wall of Wisteria','wall_of_wisteria_small_thumb.jpg',130, 81,32,'photo_3871604.html');
												thumbnails[4515233] = new thumbnail(4515233,'143313','On the shores of Loch Ness','On_the_shores_of_Loch_Ness_small_thumb.jpg',130, 79,32,'photo_4515233.html');
												thumbnails[2243684] = new thumbnail(2243684,'143264','PHEASANT','phesant small_thumb.jpg',130, 204,32,'photo_2243684.html');
												thumbnails[2243703] = new thumbnail(2243703,'143313','CARPET OF LEAVES','Carpet of leaves small_thumb.jpg',130, 98,32,'photo_2243703.html');
												thumbnails[2244419] = new thumbnail(2244419,'143310','GATE','Gate small_thumb.jpg',130, 125,32,'photo_2244419.html');
												thumbnails[2823489] = new thumbnail(2823489,'148226','TRANQUIL AS A PAINTING','Tranquil as a painting_thumb.jpg',130, 87,32,'photo_2823489.html');
												thumbnails[3693088] = new thumbnail(3693088,'143308','Catkins','Catkins_small_thumb.jpg',130, 87,32,'photo_3693088.html');
												thumbnails[4515241] = new thumbnail(4515241,'143311','The Young Piper','The_Young_Piper_small1_thumb.jpg',130, 101,32,'photo_4515241.html');
												thumbnails[2254123] = new thumbnail(2254123,'143264','FLUFFY ROBIN','Fluffy Robin small_thumb.jpg',130, 86,32,'photo_2254123.html');
												thumbnails[3339710] = new thumbnail(3339710,'143310','Hampstead Heath the Pond','Hampstead Heath the Pond Small file_thumb.jpg',130, 194,32,'photo_3339710.html');
												thumbnails[3339779] = new thumbnail(3339779,'143313','Through the Dunes<br>\r\n','Through the dunes small file1_thumb.jpg',130, 76,32,'photo_3339779.html');
												thumbnails[3693080] = new thumbnail(3693080,'143308','Single white crocus','Single_white_crocus_small_thumb.jpg',130, 195,32,'photo_3693080.html');
												thumbnails[4515240] = new thumbnail(4515240,'143311','Lines','Lines_small_thumb.jpg',130, 75,32,'photo_4515240.html');
												thumbnails[5253974] = new thumbnail(5253974,'148226','Pillars as a painting','Pillars_as_a_Painting__BW_small_file_thumb.jpg',130, 165,32,'photo_5253974.html');
												thumbnails[2244408] = new thumbnail(2244408,'143313','PATHWAY TO WHERE?','Pathway to where small_thumb.jpg',130, 98,32,'photo_2244408.html');
												thumbnails[2823688] = new thumbnail(2823688,'143264','ASIAN SMALL CLAWED OTTER','Otter_thumb.jpg',130, 116,32,'photo_2823688.html');
												thumbnails[3693033] = new thumbnail(3693033,'143308','Cluster of Pink','Cluster_of_Pink_small_thumb.jpg',130, 100,32,'photo_3693033.html');
												thumbnails[3870737] = new thumbnail(3870737,'143310','Stump','Stump_small_thumb.jpg',130, 87,32,'photo_3870737.html');
												thumbnails[4515239] = new thumbnail(4515239,'143311','The Old Cart','The_Old_Cart_small_thumb.jpg',130, 87,32,'photo_4515239.html');
												thumbnails[5253986] = new thumbnail(5253986,'148226','Boat as a painting','BOATS_AS_A_PAINTING_BW_small_file_thumb.jpg',130, 90,32,'photo_5253986.html');
												thumbnails[2254029] = new thumbnail(2254029,'143313','LYDFORD GORGE','Lydford Gorge small_thumb.jpg',130, 124,32,'photo_2254029.html');
												thumbnails[3693041] = new thumbnail(3693041,'143308','Vibrant Blue','Vibrant_Blue_edited_small_thumb.jpg',130, 115,32,'photo_3693041.html');
												thumbnails[3870765] = new thumbnail(3870765,'143310','Pathway over the bridge','Pathway_over_the_bridge_small_thumb.jpg',130, 87,32,'photo_3870765.html');
												thumbnails[4484070] = new thumbnail(4484070,'143311','On the shores of Loch Ness','On_the_shores_of_Loch_Ness_BW_small_thumb.jpg',130, 83,32,'photo_4484070.html');
												thumbnails[4484166] = new thumbnail(4484166,'143264','Hmmmmm, I wonder......?','Hmmmm_I_wonder_small_thumb.jpg',130, 107,32,'photo_4484166.html');
												thumbnails[5253994] = new thumbnail(5253994,'148226','Razzle Dazzle as a painting','Razzle_Dazzle_as_a_painting_small_file_thumb.jpg',130, 128,32,'photo_5253994.html');
												thumbnails[2254160] = new thumbnail(2254160,'143313','CAUSEWAY','Causeway small_thumb.jpg',130, 81,32,'photo_2254160.html');
												thumbnails[3693051] = new thumbnail(3693051,'143308','In your face red','In_your_face_red_small_thumb.jpg',130, 120,32,'photo_3693051.html');
												thumbnails[3870720] = new thumbnail(3870720,'143264','Ollie','Ollie_small_thumb.jpg',130, 144,32,'photo_3870720.html');
												thumbnails[4484066] = new thumbnail(4484066,'143311','Urquhart Castle','Urquhart_Castle_small_thumb.jpg',130, 87,32,'photo_4484066.html');
												thumbnails[4484137] = new thumbnail(4484137,'143310','Alone Again','Alone_Again_small_thumb.jpg',130, 87,32,'photo_4484137.html');
												thumbnails[2425244] = new thumbnail(2425244,'143313','CALM BEFORE THE STORM','Calm before the storm small_thumb.jpg',130, 87,32,'photo_2425244.html');
												thumbnails[2438330] = new thumbnail(2438330,'143264','DIPPER','Dipper in Devon small_thumb.jpg',130, 132,32,'photo_2438330.html');
												thumbnails[3689925] = new thumbnail(3689925,'143311','Follow this path to where?','Follow_this_path_to_where_SMALL_2_thumb.jpg',130, 87,32,'photo_3689925.html');
												thumbnails[3693059] = new thumbnail(3693059,'143308','Cluster of Blue,','Cluster_of_Blue_small_thumb.jpg',130, 98,32,'photo_3693059.html');
												thumbnails[4484147] = new thumbnail(4484147,'143310','The Young Piper','The_Young_Piper_small_thumb.jpg',130, 101,32,'photo_4484147.html');
												thumbnails[2425457] = new thumbnail(2425457,'143313','Still water','Still water small_thumb.jpg',130, 87,32,'photo_2425457.html');
												thumbnails[2438422] = new thumbnail(2438422,'143264','CHAFFINCH','Chaffinch small_thumb.jpg',130, 87,32,'photo_2438422.html');
												thumbnails[3693067] = new thumbnail(3693067,'143308','Backs against the wall chaps','Backs_against_the_wall_chaps_small_thumb.jpg',130, 125,32,'photo_3693067.html');
												thumbnails[4484044] = new thumbnail(4484044,'143311','Castle Stalker','Castle_Stalker_small_thumb.jpg',130, 101,32,'photo_4484044.html');
												thumbnails[4941808] = new thumbnail(4941808,'143310','Apples','Apples_Small_thumb.jpg',130, 98,32,'photo_4941808.html');
												thumbnails[2441720] = new thumbnail(2441720,'143264','THE BLUE TIT FAMILY','The Blue Tit Family small_thumb.jpg',130, 110,32,'photo_2441720.html');
												thumbnails[3692581] = new thumbnail(3692581,'143311','Calm before the storm SC','Calm_before_the_storm_small_SC_thumb.jpg',130, 87,32,'photo_3692581.html');
												thumbnails[3693072] = new thumbnail(3693072,'143308','Woodland Crocuses','Woodland_Crocuses_small_thumb.jpg',130, 129,32,'photo_3693072.html');
												thumbnails[4515229] = new thumbnail(4515229,'143313','The Room with a view','Room_with_a_view_small_thumb.jpg',130, 87,32,'photo_4515229.html');
												thumbnails[2441746] = new thumbnail(2441746,'143264','JAY','jay small_thumb.jpg',130, 83,32,'photo_2441746.html');
												thumbnails[2476879] = new thumbnail(2476879,'143313','TRANQUIL','Tranquil_thumb.jpg',130, 87,32,'photo_2476879.html');
												thumbnails[3692591] = new thumbnail(3692591,'143311','Bluebells SC','BLUEBELLS_SC_small_thumb.jpg',130, 132,32,'photo_3692591.html');
												thumbnails[5699186] = new thumbnail(5699186,'143308','Daffodils','Daffodils_small_thumb.jpg',130, 108,32,'photo_5699186.html');
												thumbnails[2203873] = new thumbnail(2203873,'143313','CARN BREA CASTLE','Carn Brea Castle small2_thumb.jpg',130, 88,32,'photo_2203873.html');
												thumbnails[2441803] = new thumbnail(2441803,'143264','PEEK A BOO','Peek a boo small_thumb.jpg',130, 125,32,'photo_2441803.html');
												thumbnails[3692616] = new thumbnail(3692616,'143311','Woodland Flowers SC','WOODLAND_FLOWERS_SC_small_thumb.jpg',130, 86,32,'photo_3692616.html');
												thumbnails[5699214] = new thumbnail(5699214,'143308','Painted Tulips','Painted_Tulips_small_thumb.jpg',130, 120,32,'photo_5699214.html');
												thumbnails[2441954] = new thumbnail(2441954,'143264','PORTRAIT OF A LADY','Portrait of a lady small_thumb.jpg',130, 132,32,'photo_2441954.html');
												thumbnails[2992510] = new thumbnail(2992510,'143313','THE LONE FISHERMAN','The lone fisherman small file_thumb.jpg',130, 101,32,'photo_2992510.html');
												thumbnails[3692625] = new thumbnail(3692625,'143311','Pebbles the odd one out SC','Pebbles_the_odd_one_out_SCsmall_thumb.jpg',130, 96,32,'photo_3692625.html');
												thumbnails[2476829] = new thumbnail(2476829,'143264','Bird of Prey 1','Bird of Prey 1_thumb.jpg',130, 87,32,'photo_2476829.html');
												thumbnails[3386794] = new thumbnail(3386794,'143313','Untitled, No Untidy','‘Untitled NO Untidy’ small file_thumb.jpg',130, 80,32,'photo_3386794.html');
												thumbnails[3870541] = new thumbnail(3870541,'143311','The two paths of life','The_two_paths_of_life_small_thumb.jpg',130, 87,32,'photo_3870541.html');
												thumbnails[2476835] = new thumbnail(2476835,'143264','Bird of Prey 2','Bird of Prey 2_thumb.jpg',130, 176,32,'photo_2476835.html');
												thumbnails[3386806] = new thumbnail(3386806,'143313','Sand Wrinkles','Sand wrinkles small_thumb.jpg',130, 87,32,'photo_3386806.html');
												thumbnails[5254025] = new thumbnail(5254025,'143311','The Forty Hall Pond','Forty_Hall_Pond_small_file_thumb.jpg',130, 77,32,'photo_5254025.html');
												thumbnails[2476846] = new thumbnail(2476846,'143264','Bird of Prey 3','Bird of Prey 3_thumb.jpg',130, 87,32,'photo_2476846.html');
												thumbnails[3386887] = new thumbnail(3386887,'143313','SS170','SS170 small file_thumb.jpg',130, 87,32,'photo_3386887.html');
												thumbnails[3870570] = new thumbnail(3870570,'143311','Field with a view','Field_with_a_view_small_thumb.jpg',130, 189,32,'photo_3870570.html');
												thumbnails[3386921] = new thumbnail(3386921,'143313','St Ives Harbour','St_thumb. Ives harbour small.jpg',130, 87,32,'photo_3386921.html');
												thumbnails[3693025] = new thumbnail(3693025,'143264','Snowy Owl','Snowy_Owl_small_thumb.jpg',130, 103,32,'photo_3693025.html');
												thumbnails[3870584] = new thumbnail(3870584,'143311','And the path runs through it','And_the_path_runs_through_it_small1_thumb.jpg',130, 87,32,'photo_3870584.html');
												thumbnails[2558003] = new thumbnail(2558003,'143264','SCRUFF','Scruff_thumb.jpg',130, 87,32,'photo_2558003.html');
												thumbnails[3692657] = new thumbnail(3692657,'143313','Follow this path to where?','Follow_this_path_to_where_small_thumb.jpg',130, 87,32,'photo_3692657.html');
												thumbnails[3870602] = new thumbnail(3870602,'143311','Ollie SC','Ollie_sc_small_thumb.jpg',130, 144,32,'photo_3870602.html');
												thumbnails[2558010] = new thumbnail(2558010,'143264','COLOURFUL','Colourful_thumb.jpg',130, 87,32,'photo_2558010.html');
												thumbnails[3692673] = new thumbnail(3692673,'143313','The Tranquil Lake','The_Tranquil_Lake_small_thumb.jpg',130, 68,32,'photo_3692673.html');
												thumbnails[5254081] = new thumbnail(5254081,'143311','Alone','Alone_small_file_thumb.jpg',130, 104,32,'photo_5254081.html');
												thumbnails[2992497] = new thumbnail(2992497,'143264','GOLDERS HILL PARK STAG','Stag small file_thumb.jpg',130, 81,32,'photo_2992497.html');
												thumbnails[4514848] = new thumbnail(4514848,'143313','Eilean Donan Castle ','Eilean_Donan_Castle_colour_small_thumb.jpg',130, 81,32,'photo_4514848.html');
												thumbnails[4848066] = new thumbnail(4848066,'143311','Reflections from a majestic Castle','Reflections_from_a_majestic_Castle_BW_small_thumb.jpg',130, 87,32,'photo_4848066.html');
												thumbnails[3692737] = new thumbnail(3692737,'143264','Forget I am gorgeous just give me the damn food','Forget_I_am_gorgeous_just_give_me_the_damn_food_small_thumb.jpg',130, 74,32,'photo_3692737.html');
												thumbnails[4514852] = new thumbnail(4514852,'143313','Urquhart Castle','Urquhart_Castle_colour_small_thumb.jpg',130, 78,32,'photo_4514852.html');
												thumbnails[4941796] = new thumbnail(4941796,'143311','Foxy Lady SC','Foxy_Lady_SC_Small_thumb.jpg',130, 109,32,'photo_4941796.html');
												thumbnails[3692726] = new thumbnail(3692726,'143264','Oh hello','Oh_hello_small_thumb.jpg',130, 117,32,'photo_3692726.html');
												thumbnails[4848173] = new thumbnail(4848173,'143313','Reflections from a majestic Castle','Reflections_from_a_majestic_Castle_small_thumb.jpg',130, 87,32,'photo_4848173.html');
												thumbnails[5253495] = new thumbnail(5253495,'143311','Razzle Dazzle','Razzle_Dazzle_Small_File_thumb.jpg',130, 128,32,'photo_5253495.html');
												thumbnails[3692710] = new thumbnail(3692710,'143264','Help me love; this fish is stuck in my throat','Help_me_love_this_fish_is_stuck_in_my_throat_small_thumb.jpg',130, 66,32,'photo_3692710.html');
												thumbnails[4848225] = new thumbnail(4848225,'143313','The Hills of Loch Duich','The_Hills_above_Loch_Duich_small_thumb.jpg',130, 68,32,'photo_4848225.html');
												thumbnails[5253520] = new thumbnail(5253520,'143311','St. Ives back street','St_Ives_back_street_small_file_thumb.jpg',130, 95,32,'photo_5253520.html');
												thumbnails[3386657] = new thumbnail(3386657,'143264','Squirrel or Meerkat?','Squirrel or a Meerkat small file_thumb.jpg',130, 96,32,'photo_3386657.html');
												thumbnails[5253524] = new thumbnail(5253524,'143311','St. Ives Harbour','St_Ives_Harbour_small_file_thumb.jpg',130, 96,32,'photo_5253524.html');
												thumbnails[5585386] = new thumbnail(5585386,'143313','The Audrey','The_Audrey_thumb.jpg',130, 84,32,'photo_5585386.html');
												thumbnails[3386750] = new thumbnail(3386750,'143264','Whoops Sorry','Whoops Sorry small file_thumb.jpg',130, 101,32,'photo_3386750.html');
												thumbnails[5253615] = new thumbnail(5253615,'143311','Carn Brea Castle','CARN_BREA_CASTLE_small_file_thumb.jpg',130, 88,32,'photo_5253615.html');
												thumbnails[3692701] = new thumbnail(3692701,'143264','Tawny Owl','Tawny_Owl_small_thumb.jpg',130, 113,32,'photo_3692701.html');
												thumbnails[5253783] = new thumbnail(5253783,'143311','Walk this way','Walk_this_way_small_file_thumb.jpg',130, 76,32,'photo_5253783.html');
												thumbnails[5253805] = new thumbnail(5253805,'143311','Cheddar Gorge','CHEDDAR_GORGE_small_file_thumb.jpg',130, 91,32,'photo_5253805.html');
												thumbnails[7082277] = new thumbnail(7082277,'143264','Tehya ','Tehya_3_small_thumb.jpg',130, 146,32,'photo_7082277.html');
												thumbnails[5253821] = new thumbnail(5253821,'143311','A Scottish Moment','A_Scottish_moment_small_file_thumb.jpg',130, 76,32,'photo_5253821.html');
												thumbnails[5253828] = new thumbnail(5253828,'143311','Gull Rock','GULL_ROCK_small_file_thumb.jpg',130, 84,32,'photo_5253828.html');
												thumbnails[5253841] = new thumbnail(5253841,'143311','Frogmore Ponds','FROGMORE_PONDS_small_file_thumb.jpg',130, 149,32,'photo_5253841.html');
												thumbnails[5253850] = new thumbnail(5253850,'143311','Tranquil Loch','Tranquil_Loch_small_file_thumb.jpg',130, 87,32,'photo_5253850.html');
												thumbnails[5253855] = new thumbnail(5253855,'143311','Still Water','STILL_WATER_small_file_thumb.jpg',130, 87,32,'photo_5253855.html');
												thumbnails[5253865] = new thumbnail(5253865,'143311','The Audrey','The_Audrey_small_file_thumb.jpg',130, 80,32,'photo_5253865.html');
												thumbnails[5253871] = new thumbnail(5253871,'143311','Helford Passage','Helford_Passage_small_file_thumb.jpg',130, 78,32,'photo_5253871.html');
												thumbnails[5253879] = new thumbnail(5253879,'143311','The Old Church','The_old_church_small_file_thumb.jpg',130, 67,32,'photo_5253879.html');
												thumbnails[5253885] = new thumbnail(5253885,'143311','Amur Tiger','Amur_Tiger_SMALL_FILE_thumb.jpg',130, 154,32,'photo_5253885.html');
												thumbnails[5253893] = new thumbnail(5253893,'143311','Bald Eagle','Bald_Eagle_small_file_thumb.jpg',130, 96,32,'photo_5253893.html');
												thumbnails[5253894] = new thumbnail(5253894,'143311','Radiance of the Raptor','Radiance_of_the_Raptor_small_file_thumb.jpg',130, 102,32,'photo_5253894.html');
												thumbnails[5253898] = new thumbnail(5253898,'143311','Tawny Owl','Tawny_Owl_small_file_thumb.jpg',130, 113,32,'photo_5253898.html');
												thumbnails[5253899] = new thumbnail(5253899,'143311','Hawk','Hawk_small_file_thumb.jpg',130, 87,32,'photo_5253899.html');
												thumbnails[5253905] = new thumbnail(5253905,'143311','The pond at Hampstead Heath','Hampstead_Heath_the_Pond_small_file1_thumb.jpg',130, 194,32,'photo_5253905.html');
												thumbnails[5253909] = new thumbnail(5253909,'143311','Phone Box Falmouth','Phone_Box_Falmouth_small_file_thumb.jpg',130, 99,32,'photo_5253909.html');
												thumbnails[5253912] = new thumbnail(5253912,'143311','Still life','STILL_LIFE_small_file_thumb.jpg',130, 199,32,'photo_5253912.html');
												thumbnails[5253920] = new thumbnail(5253920,'143311','Father Christmas Day off','Father_Christmas_day_off_small_file_thumb.jpg',130, 103,32,'photo_5253920.html');
												thumbnails[5253928] = new thumbnail(5253928,'143311','Wave','WAVE_small_file_thumb.jpg',130, 56,32,'photo_5253928.html');
												thumbnails[5253937] = new thumbnail(5253937,'143311','The power of one','The_power_of_one_small_file_thumb.jpg',130, 81,32,'photo_5253937.html');
												thumbnails[5584971] = new thumbnail(5584971,'143311','By the light of the sepia moon','By_the_light_of_the_sepia_moon_thumb.jpg',130, 137,32,'photo_5584971.html');
												thumbnails[5585009] = new thumbnail(5585009,'143311','By the light of the Silvery moon','By_the_light_of_the_silvery_moon_thumb.jpg',130, 137,32,'photo_5585009.html');
												thumbnails[5585023] = new thumbnail(5585023,'143311','The Moon is full tonight','The_Moon_is_full_tonight_once_more_thumb.jpg',130, 106,32,'photo_5585023.html');
												thumbnails[5585046] = new thumbnail(5585046,'143311','The Moon is full again','The_Moon_is_full_tonight_once_more_-_sepia_thumb.jpg',130, 106,32,'photo_5585046.html');
												thumbnails[5585125] = new thumbnail(5585125,'143311','The old church and moon','The_old_church_and_moon_Sepia_thumb.jpg',130, 130,32,'photo_5585125.html');
												thumbnails[5585134] = new thumbnail(5585134,'143311','The old church and moon','The_old_church_and_moon_thumb.jpg',130, 130,32,'photo_5585134.html');
												thumbnails[5585176] = new thumbnail(5585176,'143311','Moon Racer','Moon_Racer_thumb.jpg',130, 132,32,'photo_5585176.html');
												thumbnails[5585183] = new thumbnail(5585183,'143311','Race with the moon','Race_with_the_moon_thumb.jpg',130, 132,32,'photo_5585183.html');
												thumbnails[5585198] = new thumbnail(5585198,'143311','Carpet of Snow','carpet_of_snow_thumb.jpg',130, 87,32,'photo_5585198.html');
												thumbnails[5585219] = new thumbnail(5585219,'143311','Small','Small_in_Sepia_thumb.jpg',130, 66,32,'photo_5585219.html');
												thumbnails[5585240] = new thumbnail(5585240,'143311','The Thatched Cottage.','The_thatched_cottage_thumb.jpg',130, 94,32,'photo_5585240.html');
												thumbnails[5585254] = new thumbnail(5585254,'143311','The old cart','The_old_cart_-_Sepia_thumb.jpg',130, 87,32,'photo_5585254.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[143311] = new gallery(143311,'3339733,2203791','B & W','gallery',[2203791,2244447,3339733,5254101,3342228,3342246,3342255,4484054,2243538,2254153,4515241,4515240,4515239,4484070,4484066,3689925,4484044,3692581,3692591,3692616,3692625,3870541,5254025,3870570,3870584,3870602,5254081,4848066,4941796,5253495,5253520,5253524,5253615,5253783,5253805,5253821,5253828,5253841,5253850,5253855,5253865,5253871,5253879,5253885,5253893,5253894,5253898,5253899,5253905,5253909,5253912,5253920,5253928,5253937,5584971,5585009,5585023,5585046,5585125,5585134,5585176,5585183,5585198,5585219,5585240,5585254],0, 0, '', 'gallery_143311.html',0,0);
				  					galleries[143264] = new gallery(143264,'2823678','Wildlife','gallery',[2823700,2203710,2203717,4515236,4484219,2222433,4484187,3342336,2823678,2243674,2243684,2254123,2823688,4484166,3870720,2438330,2438422,2441720,2441746,2441803,2441954,2476829,2476835,2476846,3693025,2558003,2558010,2992497,3692737,3692726,3692710,3386657,3386750,3692701,7082277],0, 0, '', 'gallery_143264.html',0,0);
				  					galleries[143308] = new gallery(143308,'2214871,2203816','Flowers','gallery',[2203816,2203850,4149830,2209046,2214871,2214898,2222447,2239815,2239819,3871604,3693088,3693080,3693033,3693041,3693051,3693059,3693067,3693072,5699186,5699214],0, 0, '', 'gallery_143308.html',0,0);
				  					galleries[143313] = new gallery(143313,'3339779,2203568','Land/Seascapes','gallery',[2203568,2214773,2222471,2222477,2222485,2222490,2222494,2222496,2243691,4515233,2243703,3339779,2244408,2254029,2254160,2425244,2425457,4515229,2476879,2203873,2992510,3386794,3386806,3386887,3386921,3692657,3692673,4514848,4514852,4848173,4848225,5585386],0, 0, '', 'gallery_143313.html',0,0);
				  					galleries[143310] = new gallery(143310,'2214825,2203964','Varied','gallery',[2254180,2203930,2203932,2203939,2203964,2244435,2214825,2222501,2243725,2243742,2244419,3339710,3870737,3870765,4484137,4484147,4941808],0, 0, '', 'gallery_143310.html',0,0);
				  					galleries[143312] = new gallery(143312,'2273010,2270505','Portraits','gallery',[2273010,2270505,2214799,2243757,2243761,2243765,2243775,2214736],0, 0, '', 'gallery_143312.html',0,0);
				  					galleries[148226] = new gallery(148226,'2254186','Photo Art','gallery',[2203973,2254186,2254189,2254194,2254198,2812864,2823474,3692635,2992517,2823486,2823489,5253974,5253986,5253994],0, 0, '', 'gallery_148226.html',0,0);
				  					galleries[234569] = new gallery(234569,'3870620','Action','gallery',[3870620,5253951,5253962],0, 0, '', 'gallery_234569.html',0,0);
				  					galleries[164267] = new gallery(164267,'2574843','Other Photographers work','gallery',[2574843],0, 0, '', 'gallery_164267.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7082277,5699214,5699186,5585386,5585254,5585240,5585219,5585198,5585183,5585176,5585134,5585125,5585046,5585023,5585009,5584971,5254101,5254081,5254025,5253994,5253986,5253974,5253962,5253951,5253937,5253928,5253920,5253912,5253909,5253905,5253899,5253898,5253894,5253893,5253885,5253879,5253871,5253865,5253855,5253850,5253841,5253828,5253821,5253805,5253783,5253615,5253524,5253520,5253495,4941808';
imageSets[2] = '3870620,3339779,3339733,2823678,2574843,2273010,2270505,2254186,2214871,2214825,2203964,2203816,2203791,2203568';
imageSets[3] = '7082277,5699214,5699186,5585386,5585254,5585240,5585219,5585198,5585183,5585176,5585134,5585125,5585046,5585023,5585009,5584971,5254101,5254081,5254025,5253994,5253986,5253974,5253962,5253951,5253937,5253928,5253920,5253912,5253909,5253905,5253899,5253898,5253894,5253893,5253885,5253879,5253871,5253865,5253855,5253850,5253841,5253828,5253821,5253805,5253783,5253615,5253524,5253520,5253495,4941808';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/anthonyhedger/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/anthonyhedger/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:'',
                    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 (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    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));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Anthony Hedger Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			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').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
	temp = temp + this.fnGetPaymentInfo();
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp = temp + '<p>Buy now using PayPal:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = 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 = temp + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = 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 = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="anthony.hedger@hotmail.com">';
	temp = temp + '<input type="hidden" name="currency_code" value="GBP">';
	temp = temp + '<input type="hidden" name="add" value="1">';
					temp = temp + '<input type="hidden" name="amount" value="'+amount+'">';
	temp = temp + '<input type="hidden" name="item_number" value="'+ref+'">';
					temp = temp + '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
									temp = temp + '</form>';
								temp = temp + '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="anthony.hedger@hotmail.com">';
	temp = temp + '<input type="hidden" name="display" value="1">';
	temp = temp + '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
	temp = temp + '</form>';
							temp = 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({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* 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 + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

