window.thumbnails = new Object();
												thumbnails[5326184] = new thumbnail(5326184,'','Stalks in snow.','Stalks-in-snow_thumb.jpg',100, 100,1,'#');
												thumbnails[3221988] = new thumbnail(3221988,'208753','3 posts, Arran','3-posts---Arran-12_thumb.jpg',70, 70,1,'photo_3221988.html');
												thumbnails[3404040] = new thumbnail(3404040,'208750','Black Nab 2','Black-Nab-22_thumb.jpg',70, 70,1,'photo_3404040.html');
												thumbnails[3404151] = new thumbnail(3404151,'208753','Passing storm, Glen Etive','Passing-storm2_thumb.jpg',70, 70,1,'photo_3404151.html');
												thumbnails[3432995] = new thumbnail(3432995,'208750','Approaching storm, Jersey','Approaching-storm,-Jersey-2_thumb.jpg',70, 70,1,'photo_3432995.html');
												thumbnails[5073885] = new thumbnail(5073885,'208749','11 posts, 9 birds','11-posts-9-birds_thumb.jpg',100, 100,1,'photo_5073885.html');
												thumbnails[5326175] = new thumbnail(5326175,'208749','Bat rock','Bat-rock2_thumb.jpg',100, 100,1,'photo_5326175.html');
												thumbnails[3221989] = new thumbnail(3221989,'208751','Black Nab','Black-Nab--42_thumb.jpg',70, 70,1,'photo_3221989.html');
												thumbnails[3227235] = new thumbnail(3227235,'208751','Rocks at Friog','Rocks-at-Friog_thumb.jpg',70, 70,1,'photo_3227235.html');
												thumbnails[3400019] = new thumbnail(3400019,'208762','Rock-and-stripe','Rock and stripe_thumb.jpg',70, 70,1,'photo_3400019.html');
												thumbnails[3404041] = new thumbnail(3404041,'208750','Black Nab','Black-Nab2_thumb.jpg',70, 70,1,'photo_3404041.html');
												thumbnails[3432996] = new thumbnail(3432996,'208751','Beach sunset','Beach-sunset-32_thumb.jpg',70, 70,1,'photo_3432996.html');
												thumbnails[5073886] = new thumbnail(5073886,'208749','9 legged lighthouse','9-legged-lighthouse_thumb.jpg',100, 100,1,'photo_5073886.html');
												thumbnails[5326176] = new thumbnail(5326176,'208749','Crummock stream.','Crummock-stream-2_thumb.jpg',100, 100,1,'photo_5326176.html');
												thumbnails[3227230] = new thumbnail(3227230,'208764','Corfe Castle','Corfe-Castle-137_thumb.jpg',70, 70,1,'photo_3227230.html');
												thumbnails[3399983] = new thumbnail(3399983,'208762','Rock pool','Rock pool_thumb.jpg',70, 70,1,'photo_3399983.html');
												thumbnails[3400020] = new thumbnail(3400020,'208762','Striped-rock','Striped rock_thumb.jpg',70, 70,1,'photo_3400020.html');
												thumbnails[3404043] = new thumbnail(3404043,'208750','Lower lighthouse - Dovercourt','Lower-lighthouse--Dovercourt2_thumb.jpg',70, 70,1,'photo_3404043.html');
												thumbnails[3432997] = new thumbnail(3432997,'208764','Frozen floodwater','Frozen-floodwater-21_thumb.jpg',70, 70,1,'photo_3432997.html');
												thumbnails[5073887] = new thumbnail(5073887,'208749','Boating pool 1','Boating-pool-1_thumb.jpg',100, 100,1,'photo_5073887.html');
												thumbnails[5326177] = new thumbnail(5326177,'208749','Crummock Water.','Crummock-tree_thumb.jpg',100, 100,1,'photo_5326177.html');
												thumbnails[3227231] = new thumbnail(3227231,'208753','Floating rocks, Loch Achilty','Floating-rocks-Loch-Achilty_thumb.jpg',70, 70,1,'photo_3227231.html');
												thumbnails[3400021] = new thumbnail(3400021,'208762','The-Mummy','The Mummy_thumb.jpg',70, 70,1,'photo_3400021.html');
												thumbnails[3432998] = new thumbnail(3432998,'208764','Jetty, Lac Azur','Jetty,-Lac-Azur-78_thumb.jpg',70, 70,1,'photo_3432998.html');
												thumbnails[5073888] = new thumbnail(5073888,'208749','Boating pool 2','Boating-pool-2_thumb.jpg',100, 100,1,'photo_5073888.html');
												thumbnails[3221992] = new thumbnail(3221992,'208751','Cloud and rocks, Sandymouth','Cloud-and-rocks,-Sandymouth_thumb.jpg',70, 70,1,'photo_3221992.html');
												thumbnails[3432999] = new thumbnail(3432999,'208764','Jetty in the mist','Jetty-in-the-mist-2-47_thumb.jpg',70, 70,1,'photo_3432999.html');
												thumbnails[5073901] = new thumbnail(5073901,'208749','Flotsam','Flotsam_thumb.jpg',100, 100,1,'photo_5073901.html');
												thumbnails[5326179] = new thumbnail(5326179,'208749','Crummock Water, Winter.','Crummock-with-thingy-reflectied_thumb.jpg',100, 100,1,'photo_5326179.html');
												thumbnails[3221993] = new thumbnail(3221993,'208753','Dawn, Loch Achilty','Dawn,-Loch-Achilty_thumb.jpg',70, 70,1,'photo_3221993.html');
												thumbnails[3433000] = new thumbnail(3433000,'208764','Misty lake','Misty-lake-2-51_thumb.jpg',70, 70,1,'photo_3433000.html');
												thumbnails[5073931] = new thumbnail(5073931,'208749','Tree-line','Tree-line_thumb.jpg',100, 100,1,'photo_5073931.html');
												thumbnails[5326180] = new thumbnail(5326180,'208749','Crummock Water.','Crummock3_thumb.jpg',100, 100,1,'photo_5326180.html');
												thumbnails[3221994] = new thumbnail(3221994,'208753','Fishing Jetty, Arran','Fishing-Jetty---Arran-18_thumb.jpg',70, 70,1,'photo_3221994.html');
												thumbnails[3433001] = new thumbnail(3433001,'208764','Misty lake 3','Misty-lake-3-73_thumb.jpg',70, 70,1,'photo_3433001.html');
												thumbnails[5073932] = new thumbnail(5073932,'208749','Trees, cloud and moon.','Trees-cloud-and-moon_thumb.jpg',100, 100,1,'photo_5073932.html');
												thumbnails[5326181] = new thumbnail(5326181,'208749','Crummock Water.','Crummock4_thumb.jpg',100, 100,1,'photo_5326181.html');
												thumbnails[3433002] = new thumbnail(3433002,'208750','The Pinnacles','The-Pinnacles_thumb.jpg',70, 70,1,'photo_3433002.html');
												thumbnails[5073900] = new thumbnail(5073900,'208749','Edge of Rannoch.','Edge-of-Rannocht_thumb.jpg',100, 100,1,'photo_5073900.html');
												thumbnails[5326182] = new thumbnail(5326182,'208749','Broken fence, Derwent water.','Derwent-fence2_thumb.jpg',100, 100,1,'photo_5326182.html');
												thumbnails[3433003] = new thumbnail(3433003,'208764','Tuscan Villa','Tuscan-Villa-31_thumb.jpg',70, 70,1,'photo_3433003.html');
												thumbnails[5326183] = new thumbnail(5326183,'208749','Snowy tree.','Snowey-tree_thumb.jpg',100, 100,1,'photo_5326183.html');
												thumbnails[3221997] = new thumbnail(3221997,'208751','Friog, black rock','Friog-black-rock-10x10-copy_thumb.jpg',70, 70,1,'photo_3221997.html');
												thumbnails[5073902] = new thumbnail(5073902,'208749','Grass, maize, trees.','Grass-maize-trees_thumb.jpg',100, 100,1,'photo_5073902.html');
												thumbnails[5073918] = new thumbnail(5073918,'208749','Redundant.','Redundant-2_thumb.jpg',100, 100,1,'photo_5073918.html');
												thumbnails[5073910] = new thumbnail(5073910,'208749','Penmon light with Puffin Island.','Penmon-light-with-Puffin-Island_thumb.jpg',100, 100,1,'photo_5073910.html');
												thumbnails[3221998] = new thumbnail(3221998,'208751','Groynes and post','Groynes-and-post-133_thumb.jpg',70, 70,1,'photo_3221998.html');
												thumbnails[5073911] = new thumbnail(5073911,'208749','Posts in the stream.','Posts-an-the-stream_thumb.jpg',100, 100,1,'photo_5073911.html');
												thumbnails[5326185] = new thumbnail(5326185,'208749','Stalks in snow 2.','Stalks-in-snow2_thumb.jpg',100, 100,1,'photo_5326185.html');
												thumbnails[3222000] = new thumbnail(3222000,'208750','Sea steps','Sea-Steps-23_thumb.jpg',70, 70,1,'photo_3222000.html');
												thumbnails[5073920] = new thumbnail(5073920,'208749','Ripples.','Ripples_thumb.jpg',100, 100,1,'photo_5073920.html');
												thumbnails[3222001] = new thumbnail(3222001,'208751','Staging','Staging-25_thumb.jpg',70, 70,1,'photo_3222001.html');
												thumbnails[5073930] = new thumbnail(5073930,'208749','Tide out.','Tide-out_thumb.jpg',100, 100,1,'photo_5073930.html');
												thumbnails[3222002] = new thumbnail(3222002,'208751','Wet beach, Sandymouth','Wet-beach-Sandy-Mouth-126_thumb.jpg',70, 70,1,'photo_3222002.html');
												thumbnails[5073889] = new thumbnail(5073889,'208749','Breakwater, posts and castle.','Breakwater-posts-castle_thumb.jpg',100, 100,1,'photo_5073889.html');
												thumbnails[5073912] = new thumbnail(5073912,'208749','Posts and castle.','Posts-and-castle_thumb.jpg',100, 100,1,'photo_5073912.html');
												thumbnails[5073922] = new thumbnail(5073922,'208749','Slipway and posts.','Slip-and-posts_thumb.jpg',100, 100,1,'photo_5073922.html');
												thumbnails[5073936] = new thumbnail(5073936,'208749','Wall and posts.','Wallandposts_thumb.jpg',100, 100,1,'photo_5073936.html');
												thumbnails[5073923] = new thumbnail(5073923,'208749','Slipway and castle.','Slipway-and-castle_thumb.jpg',100, 100,1,'photo_5073923.html');
												thumbnails[5073929] = new thumbnail(5073929,'208749','Swimming pool, St. Malo.','Swimming-pool-St-Malo_thumb.jpg',100, 100,1,'photo_5073929.html');
												thumbnails[5073898] = new thumbnail(5073898,'208749','Carrelet, pole and bird.','Carrelet-pole-and-bird_thumb.jpg',100, 100,1,'photo_5073898.html');
												thumbnails[5073928] = new thumbnail(5073928,'208749','Storm approaching Whitehaven.','Storm-approaching-Whitehaven_D9EC1F11-2219-B5B5-4C4D6EB5C9E46C66_thumb.jpg',100, 100,1,'photo_5073928.html');
												thumbnails[5073899] = new thumbnail(5073899,'208749','Carrelet.','Carrelet_thumb.jpg',100, 100,1,'photo_5073899.html');
												thumbnails[5073908] = new thumbnail(5073908,'208749','Jetty, carrelet and pole.','Jetty-carrelet-and-pole_thumb.jpg',100, 100,1,'photo_5073908.html');
												thumbnails[5073909] = new thumbnail(5073909,'208749','Lone carrelet.','Lone-carrelet_thumb.jpg',100, 100,1,'photo_5073909.html');
												thumbnails[5073921] = new thumbnail(5073921,'208749','Rock and carrelets.','Rock-and-carrelets_thumb.jpg',100, 100,1,'photo_5073921.html');
												thumbnails[5073934] = new thumbnail(5073934,'208749','Two carrelets.','Two-carrelets-2_thumb.jpg',100, 100,1,'photo_5073934.html');
												thumbnails[5073935] = new thumbnail(5073935,'208749','Two carrelets 2.','Two-carreletst_thumb.jpg',100, 100,1,'photo_5073935.html');
												thumbnails[3227287] = new thumbnail(3227287,'197102','Antique pots, Spain','Antique-pots---Spain_thumb.jpg',70, 70,1,'photo_3227287.html');
												thumbnails[3290040] = new thumbnail(3290040,'200548','Hawnby Hill','Hawnby-Hill_thumb.jpg',70, 48,1,'photo_3290040.html');
												thumbnails[3290044] = new thumbnail(3290044,'200548','Traigh Eais, Barra','Traigh-Eais-Barra_thumb.jpg',70, 84,1,'photo_3290044.html');
												thumbnails[3290047] = new thumbnail(3290047,'200548','Etive - Waterfall','Etive-Warefall_thumb.jpg',70, 60,1,'photo_3290047.html');
												thumbnails[3335880] = new thumbnail(3335880,'203418','','Leah 1_thumb.jpg',70, 43,1,'photo_3335880.html');
												thumbnails[3335890] = new thumbnail(3335890,'203418','','Leah 6_thumb.jpg',70, 91,1,'photo_3335890.html');
												thumbnails[3388877] = new thumbnail(3388877,'206940','Austrian hut','Austrian-hut_thumb.jpg',70, 42,1,'photo_3388877.html');
												thumbnails[3405064] = new thumbnail(3405064,'208023','Crawter Hill, Somerset','Crawter-Hillweb_thumb.jpg',70, 49,1,'photo_3405064.html');
												thumbnails[3441755] = new thumbnail(3441755,'210537','After the Storm','After-the-Storm-edit2_thumb.jpg',70, 53,1,'photo_3441755.html');
												thumbnails[3570834] = new thumbnail(3570834,'197105','fisherman\'s hut','fishermans_hut_thumb.jpg',100, 100,1,'photo_3570834.html');
												thumbnails[3576129] = new thumbnail(3576129,'197105','girl on a beach','girl-on-a-beach_thumb.jpg',100, 67,1,'photo_3576129.html');
												thumbnails[3576133] = new thumbnail(3576133,'218550','Battersea Power Station, 3am','Battersea_Power_Station_3am_thumb.jpg',100, 100,1,'photo_3576133.html');
												thumbnails[3609466] = new thumbnail(3609466,'220821','Still water and rocks','Still-water-and-rocks-fin_thumb.jpg',100, 75,1,'photo_3609466.html');
												thumbnails[3609723] = new thumbnail(3609723,'220825','China','China-2-005-web_thumb.jpg',100, 81,1,'photo_3609723.html');
												thumbnails[3609728] = new thumbnail(3609728,'220825','','China-10-011_thumb.jpg',100, 66,1,'photo_3609728.html');
												thumbnails[3609979] = new thumbnail(3609979,'220840','Sylvain Guenot accepts portrait commissions','Alison-and-Enid-2-2-Shx2-FIN_thumb.jpg',100, 122,1,'photo_3609979.html');
												thumbnails[3609987] = new thumbnail(3609987,'220840','Sylvain Guenot accepts portrait commissions','Sara-Davenport-3-3-Shx2-FIN_thumb.jpg',100, 83,1,'photo_3609987.html');
												thumbnails[3613860] = new thumbnail(3613860,'220840','Sylvain Guenot accepts portrait commissions','Kate-Dougherty-8-5-Shx2-FIN--_thumb.jpg',100, 121,1,'photo_3613860.html');
												thumbnails[3227288] = new thumbnail(3227288,'197102','Olive trees, Spain','Olive-trees-Spain_thumb.jpg',70, 70,1,'photo_3227288.html');
												thumbnails[3227293] = new thumbnail(3227293,'197105','Houghton mill','Houghton_mill_thumb.jpg',70, 92,1,'photo_3227293.html');
												thumbnails[3290041] = new thumbnail(3290041,'200548','Loch Clair','Loch-Clair_thumb.jpg',70, 80,1,'photo_3290041.html');
												thumbnails[3290045] = new thumbnail(3290045,'200548','Treefrost','Treefrost1_thumb.jpg',70, 55,1,'photo_3290045.html');
												thumbnails[3335881] = new thumbnail(3335881,'203418','','Leah 2_thumb.jpg',70, 51,1,'photo_3335881.html');
												thumbnails[3335891] = new thumbnail(3335891,'203418','','Leah 7_thumb.jpg',70, 53,1,'photo_3335891.html');
												thumbnails[3388878] = new thumbnail(3388878,'206940','Boat at Dungeness','Boat-at-Dungeness_thumb.jpg',70, 42,1,'photo_3388878.html');
												thumbnails[3441756] = new thumbnail(3441756,'210537','Between the Light','Between-the-Light-edit_thumb.jpg',70, 93,1,'photo_3441756.html');
												thumbnails[3576130] = new thumbnail(3576130,'197105','Iron and steel','Iron-and-steel_thumb.jpg',100, 77,1,'photo_3576130.html');
												thumbnails[3576134] = new thumbnail(3576134,'218550','Cologne Cathedral and Railway Bridge','Cologne_Cathedral_and_Railway_Bridge_thumb.jpg',100, 100,1,'photo_3576134.html');
												thumbnails[3609467] = new thumbnail(3609467,'220821','Twig and Rocks','Twig-and-Rocks-fin_thumb.jpg',100, 76,1,'photo_3609467.html');
												thumbnails[3609724] = new thumbnail(3609724,'220825','','China-3-003-web_thumb.jpg',100, 65,1,'photo_3609724.html');
												thumbnails[3609729] = new thumbnail(3609729,'220825','','China-4-010-web_thumb.jpg',100, 108,1,'photo_3609729.html');
												thumbnails[3609980] = new thumbnail(3609980,'220840','Sylvain Guenot accepts portrait commissions','Courage-Family-2-3-Shx1-FIN_thumb.jpg',100, 121,1,'photo_3609980.html');
												thumbnails[3609988] = new thumbnail(3609988,'220840','Sylvain Guenot accepts portrait commissions','Thomas-Family-3-4-Shx3-FIN-3_thumb.jpg',100, 122,1,'photo_3609988.html');
												thumbnails[3227294] = new thumbnail(3227294,'197105','orchid','orchid_thumb.jpg',70, 70,1,'photo_3227294.html');
												thumbnails[3290042] = new thumbnail(3290042,'200548','Mangurstadh Bay','Mangurstadh-Bay_thumb.jpg',70, 56,1,'photo_3290042.html');
												thumbnails[3290046] = new thumbnail(3290046,'200548','Winlatter Forest','Winlatter-Forest_thumb.jpg',70, 56,1,'photo_3290046.html');
												thumbnails[3335882] = new thumbnail(3335882,'203418','','Leah 3_thumb.jpg',70, 45,1,'photo_3335882.html');
												thumbnails[3335892] = new thumbnail(3335892,'203418','','Leah 8_thumb.jpg',70, 51,1,'photo_3335892.html');
												thumbnails[3388879] = new thumbnail(3388879,'206940','Cloud and fence, Cornwall','Cloud-and-fence,-Cornwall_thumb.jpg',70, 52,1,'photo_3388879.html');
												thumbnails[3441757] = new thumbnail(3441757,'210537','Remains','Bowes-1_thumb.jpg',70, 93,1,'photo_3441757.html');
												thumbnails[3576135] = new thumbnail(3576135,'218550','Flooded Vineyards,Tewkesbury','Flooded_VineyardsTewkesbury_thumb.jpg',100, 100,1,'photo_3576135.html');
												thumbnails[3609468] = new thumbnail(3609468,'220821','Two rocks and still water','Two-rocks-and-still-water-copy-fin_thumb.jpg',100, 76,1,'photo_3609468.html');
												thumbnails[3609725] = new thumbnail(3609725,'220825','','China-3-005-web_thumb.jpg',100, 71,1,'photo_3609725.html');
												thumbnails[3609730] = new thumbnail(3609730,'220825','','China-5-006-web_thumb.jpg',100, 87,1,'photo_3609730.html');
												thumbnails[3609981] = new thumbnail(3609981,'220840','Sylvain Guenot accepts portrait commissions','Erik-and-Alexander-7-2-Shx2-FIN_thumb.jpg',100, 121,1,'photo_3609981.html');
												thumbnails[3227295] = new thumbnail(3227295,'197105','Rydal Water','Rydal Water_thumb.jpg',70, 49,1,'photo_3227295.html');
												thumbnails[3290043] = new thumbnail(3290043,'200548','Oldshoremore','Oldshoremore_thumb.jpg',70, 80,1,'photo_3290043.html');
												thumbnails[3335883] = new thumbnail(3335883,'203418','','Leah 4_thumb.jpg',70, 85,1,'photo_3335883.html');
												thumbnails[3388880] = new thumbnail(3388880,'206940','Loch-Na-Keal, Mull','Loch-Na-Keal,-Mull_thumb.jpg',70, 51,1,'photo_3388880.html');
												thumbnails[3441758] = new thumbnail(3441758,'210537','Island-Rain','Island-Rain-edit_thumb.jpg',70, 93,1,'photo_3441758.html');
												thumbnails[3576136] = new thumbnail(3576136,'218550','Jetty, Bankeryd, Sweden','Jetty_Bankeryd_Sweden_thumb.jpg',100, 100,1,'photo_3576136.html');
												thumbnails[3609726] = new thumbnail(3609726,'220825','','China-3-007-web_thumb.jpg',100, 89,1,'photo_3609726.html');
												thumbnails[3609982] = new thumbnail(3609982,'220840','Sylvain Guenot accepts portrait commissions','Phil--Claire-9-7_thumb.jpg',100, 83,1,'photo_3609982.html');
												thumbnails[3335884] = new thumbnail(3335884,'203418','','Leah 5_thumb.jpg',70, 95,1,'photo_3335884.html');
												thumbnails[3388881] = new thumbnail(3388881,'206940','Pathway, Dungeness','Pathway,-Dungeness_thumb.jpg',70, 95,1,'photo_3388881.html');
												thumbnails[3609727] = new thumbnail(3609727,'220825','','China-3-014-web_thumb.jpg',100, 81,1,'photo_3609727.html');
												thumbnails[3609983] = new thumbnail(3609983,'220840','Sylvain Guenot accepts portrait commissions','Ravano-Family-4-6-Shx2-FIN_thumb.jpg',100, 121,1,'photo_3609983.html');
												thumbnails[3388882] = new thumbnail(3388882,'206940','Pollarded tree, Somerset','Pollarded-tree,-Somerset_thumb.jpg',70, 47,1,'photo_3388882.html');
												thumbnails[3388883] = new thumbnail(3388883,'206941','Barn interior','print-scan-barn-6x6_thumb.jpg',70, 70,1,'photo_3388883.html');
												thumbnails[3388884] = new thumbnail(3388884,'206940','Sennen Cove2, Cornwall','Sennen-Cove2,-Cornwall_thumb.jpg',70, 45,1,'photo_3388884.html');
												thumbnails[3388885] = new thumbnail(3388885,'206940','Upton-Towans, Cornwall','Upton-Towans,-Cornwall_thumb.jpg',70, 52,1,'photo_3388885.html');
												thumbnails[3401795] = new thumbnail(3401795,'203437','Alkaline Fixer.<br>\r\nClick image to purchase','_DSC1610_thumb.jpg',70, 106,1,'photo_3401795.html');
												thumbnails[3401835] = new thumbnail(3401835,'203441','5 ml syringe - for measuring small amount exactly.<br>\r\nClick on image to purchase','_DSC16181_thumb.jpg',70, 124,1,'photo_3401835.html');
												thumbnails[3402113] = new thumbnail(3402113,'203441','1 litre plastic bottle with cap. Click image to purchase','_DSC1614_thumb.jpg',70, 106,1,'photo_3402113.html');
												thumbnails[3604706] = new thumbnail(3604706,'188407','PrescysolWarmTone Paper Re-Developer.<br>\r\nCkick on image to purchase.','_DSC169112_thumb.jpg',100, 115,1,'photo_3604706.html');
												thumbnails[4252418] = new thumbnail(4252418,'203441','BZT. Paper developer additive. Click image to purchase','BZT2_thumb.jpg',100, 150,1,'photo_4252418.html');
												thumbnails[3294351] = new thumbnail(3294351,'203439','Fixer tester - lets you know if your fixer is exhausted or still useable.<br>\r\nClick image to purchase','_DSC1620_thumb.jpg',70, 118,1,'photo_3294351.html');
												thumbnails[3401796] = new thumbnail(3401796,'203436','Blu-Blak Re-developer.<br>\r\nClick image to purchase','_DSC1612_thumb.jpg',70, 46,1,'photo_3401796.html');
												thumbnails[3294352] = new thumbnail(3294352,'203439','Halide tester - lets you know when your print is fully fixed.<br>\r\nClick image to purchase','_DSC1621_thumb.jpg',70, 122,1,'photo_3294352.html');
												thumbnails[3401797] = new thumbnail(3401797,'203438','Alkali Stop.<br>\r\nClick image to purchase','_DSC1615_thumb.jpg',70, 106,1,'photo_3401797.html');
												thumbnails[4258456] = new thumbnail(4258456,'188407','Prescysin. A warm-tone paper developer based on that wonderful developing agent glycin. Click on image to purchase','Prescysin21_thumb.jpg',100, 150,1,'photo_4258456.html');
												thumbnails[3401833] = new thumbnail(3401833,'188407','NT Neutral Tone Paper Developer.<br>\r\nClick on image to purchase','_DSC16161_thumb.jpg',70, 106,1,'photo_3401833.html');
												thumbnails[3402051] = new thumbnail(3402051,'188407','Prescysol. Ultra tanning and staining film developer for Fine Photographers.<br>\r\nClick on image to purchase','_DSC16172_thumb.jpg',70, 106,1,'photo_3402051.html');
												thumbnails[3401801] = new thumbnail(3401801,'188407','Barry Thornton\'s DiXactol Ultra.<br>\r\nClick image to purchase','_DSC1622_thumb.jpg',70, 106,1,'photo_3401801.html');
												thumbnails[3401802] = new thumbnail(3401802,'203436','Selenium Sulphide Brown Toner.<br>\r\nClick image to purchase','_DSC1623_thumb.jpg',70, 52,1,'photo_3401802.html');
												thumbnails[3401803] = new thumbnail(3401803,'203436',' MP3 Sepia Toner.<br>\r\nClick image to purchase','_DSC1624_thumb.jpg',70, 48,1,'photo_3401803.html');
												thumbnails[3401804] = new thumbnail(3401804,'188407','TechXactol.<br>\r\nClick image to purchase','_DSC1626_thumb.jpg',70, 98,1,'photo_3401804.html');
												thumbnails[3401805] = new thumbnail(3401805,'188407',' Exactol Lux.<br>\r\nClick image to purchase','_DSC1628_thumb.jpg',70, 101,1,'photo_3401805.html');
												thumbnails[3401806] = new thumbnail(3401806,'188407','Prescysol \'EF\'<br>\r\nClick image to purchase','_DSC1629_thumb.jpg',70, 93,1,'photo_3401806.html');
												thumbnails[3402048] = new thumbnail(3402048,'207689','Alkaline Fixer.<br>\r\nClick image to purchase','_DSC16102_thumb.jpg',70, 106,1,'photo_3402048.html');
												thumbnails[3402064] = new thumbnail(3402064,'207610','NT Neutral Tone paper developer.<br>\r\nClick image to purchase','_DSC16162_thumb.jpg',70, 106,1,'photo_3402064.html');
												thumbnails[3604667] = new thumbnail(3604667,'207610','Prescysol WarmTone Paper Re-developer.<br>\r\nCklick image to purchase.','_DSC1691_thumb.jpg',100, 115,1,'photo_3604667.html');
												thumbnails[4258454] = new thumbnail(4258454,'207692','BZT. Paper developer additive. Click on image to purchase.','BZT21_thumb.jpg',100, 150,1,'photo_4258454.html');
												thumbnails[3401831] = new thumbnail(3401831,'207611','Blu-Blak Paper Redeveloper.<br>\r\nClick on image to purchase','_DSC16121_thumb.jpg',70, 46,1,'photo_3401831.html');
												thumbnails[3401836] = new thumbnail(3401836,'207691','Fixer Tester - lets you know if your fixer is safe to use. Click on image to purchase','_DSC16201_thumb.jpg',70, 118,1,'photo_3401836.html');
												thumbnails[3402114] = new thumbnail(3402114,'207692','1 litre plastic bottle with cap.<br>\r\nclick image to purchase','_DSC16141_thumb.jpg',70, 106,1,'photo_3402114.html');
												thumbnails[4252419] = new thumbnail(4252419,'207610','Prescysin. A warm-tone paper developer based on that wonderful developing agent Glycin. Click on image to purchase.','Prescysin2_thumb.jpg',100, 150,1,'photo_4252419.html');
												thumbnails[3401832] = new thumbnail(3401832,'207690','Alkali Stop. <br>\r\nClick image to purchase','_DSC16151_thumb.jpg',70, 106,1,'photo_3401832.html');
												thumbnails[3401837] = new thumbnail(3401837,'207691','Halide Tester. Is your paper properly fixed?<br>\r\nClick on image to purchase','_DSC16211_thumb.jpg',70, 122,1,'photo_3401837.html');
												thumbnails[3402115] = new thumbnail(3402115,'207692','5ml syringe for measuring small amounts exactly.<br>\r\nClick image to purchase','_DSC16183_thumb.jpg',70, 124,1,'photo_3402115.html');
												thumbnails[3401838] = new thumbnail(3401838,'207610','Barry Thornton\'s DiXactol Ultra.<br>\r\nClick on image to purchase','_DSC16221_thumb.jpg',70, 106,1,'photo_3401838.html');
												thumbnails[3401834] = new thumbnail(3401834,'207610','Prescysol, Fine film developer. <br>\r\nClick image to purchase','_DSC16171_thumb.jpg',70, 106,1,'photo_3401834.html');
												thumbnails[3401840] = new thumbnail(3401840,'207611','Selenium Sulphide Brown Toner.<br>\r\nClick on image to purchase','_DSC16231_thumb.jpg',70, 52,1,'photo_3401840.html');
												thumbnails[3401841] = new thumbnail(3401841,'207611','MP3 Thiocarbamide (sepia) toner.<br>\r\nClick image to purchase','_DSC16241_thumb.jpg',70, 48,1,'photo_3401841.html');
												thumbnails[3401842] = new thumbnail(3401842,'207610','TechXactol. <br>\r\nClick on image to purchase','_DSC16261_thumb.jpg',70, 98,1,'photo_3401842.html');
												thumbnails[3401843] = new thumbnail(3401843,'207610','Exactol Lux.<br>\r\nXlick on image to purchase','_DSC16281_thumb.jpg',70, 101,1,'photo_3401843.html');
												thumbnails[3401845] = new thumbnail(3401845,'207610','Prescysol \'EF\' - Extra fine grain film developer.<br>\r\nClick on image to purchase','_DSC16291_thumb.jpg',70, 93,1,'photo_3401845.html');
												thumbnails[3294350] = new thumbnail(3294350,'207697','Empty bottle - 1 litre plastic bottle with cap.<br>\r\nClick on image to purchase','Empty-bottle_thumb.jpg',70, 106,1,'photo_3294350.html');
												thumbnails[3401830] = new thumbnail(3401830,'207693','Alkaline Fixer. Click image to purchase','_DSC16101_thumb.jpg',70, 106,1,'photo_3401830.html');
												thumbnails[3604700] = new thumbnail(3604700,'207612','Prescysol WarmTone Paper Re-Developer.<br>\r\nClick image to purchase.','_DSC16911_thumb.jpg',100, 115,1,'photo_3604700.html');
												thumbnails[3402049] = new thumbnail(3402049,'207613','Blu-Blak Paper Re-developer.<br>\r\nClick on image to purchase','_DSC16122_thumb.jpg',70, 46,1,'photo_3402049.html');
												thumbnails[4258455] = new thumbnail(4258455,'207697','BZT. Paper developer additive. Click on image to purchase.','BZT211_thumb.jpg',100, 150,1,'photo_4258455.html');
												thumbnails[3402050] = new thumbnail(3402050,'207695','Alkali Stop.<br>\r\nClick image to purchase','_DSC16152_thumb.jpg',70, 106,1,'photo_3402050.html');
												thumbnails[3401798] = new thumbnail(3401798,'207612','NT Neutral Tone Paper Developer.<br>\r\nClick image to purchase','_DSC1616_thumb.jpg',70, 106,1,'photo_3401798.html');
												thumbnails[4258457] = new thumbnail(4258457,'207612','Prescysin. A warm-tone paper developer based on that wonderful developing agent glycin. Click on image to purchase.','Prescysin211_thumb.jpg',100, 150,1,'photo_4258457.html');
												thumbnails[3401799] = new thumbnail(3401799,'207612','Prescysol Film Developer.<br>\r\nClick image to purchase','_DSC1617_thumb.jpg',70, 106,1,'photo_3401799.html');
												thumbnails[3401839] = new thumbnail(3401839,'207612','Barry Thornton\'s DiXactol Ultra.<br>\r\nClick image to purchase','_DSC162211_thumb.jpg',70, 106,1,'photo_3401839.html');
												thumbnails[3401800] = new thumbnail(3401800,'207697','5 ml syringe - to measure small amounts.<br>\r\nClick image to purchase','_DSC1618_thumb.jpg',70, 124,1,'photo_3401800.html');
												thumbnails[3402054] = new thumbnail(3402054,'207696','Fixer Tester - lets you know if your fixer is safe to use.<br>\r\nClick on image to purchase','_DSC16202_thumb.jpg',70, 118,1,'photo_3402054.html');
												thumbnails[3402055] = new thumbnail(3402055,'207696','Halide Tester - Is your paper properly fixed?<br>\r\nClick on image to purchase','_DSC16212_thumb.jpg',70, 122,1,'photo_3402055.html');
												thumbnails[3401844] = new thumbnail(3401844,'207612','Exactol Lux film developer.<br>\r\nClick on image to purchase','_DSC162811_thumb.jpg',70, 101,1,'photo_3401844.html');
												thumbnails[3402057] = new thumbnail(3402057,'207613','Selenium Sulphide Brown Toner. Click on image to purchase','_DSC16232_thumb.jpg',70, 52,1,'photo_3402057.html');
												thumbnails[3402058] = new thumbnail(3402058,'207613','MP3 Thiocarbamide (sepia) toner.<br>\r\nClick on image to purchase','_DSC16242_thumb.jpg',70, 48,1,'photo_3402058.html');
												thumbnails[3402059] = new thumbnail(3402059,'207612','TechXactol film developer.<br>\r\nClick image to purchase','_DSC16262_thumb.jpg',70, 98,1,'photo_3402059.html');
												thumbnails[3402061] = new thumbnail(3402061,'207612','Prescysol \'EF\' - extra fine film developer.<br>\r\nClick image to purchase','_DSC16292_thumb.jpg',70, 93,1,'photo_3402061.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[206941] = new gallery(206941,'3388883','Aiden Dunbar','gallery',[3388883],0, 0, '', 'gallery_206941.html',0,0);
				  					galleries[203441] = new gallery(203441,'4252418,3402113,3401835','Bits and bobs','section233146',[3401835,3402113,4252418],0, 0, '', 'section233146_203441.html',0,0);
				  					galleries[207692] = new gallery(207692,'4258454,3402115,3402114','Bits and pieces','section255608',[4258454,3402114,3402115],0, 0, '', 'section255608_207692.html',0,0);
				  					galleries[207697] = new gallery(207697,'4258455,3401800,3294350','Bits and pieces','section255609',[3294350,4258455,3401800],0, 0, '', 'section255609_207697.html',0,0);
				  					galleries[220825] = new gallery(220825,'3609730,3609729,3609728,3609727,3609726,3609725,3609724,3609723','Chris Hinds','gallery',[3609723,3609728,3609724,3609729,3609725,3609730,3609726,3609727],0, 0, '', 'gallery_220825.html',0,0);
				  					galleries[207610] = new gallery(207610,'4252419,3604667,3402064,3401845,3401843,3401842,3401838,3401834','Developers','section255608',[3402064,3604667,4252419,3401838,3401834,3401842,3401843,3401845],0, 0, '', 'section255608_207610.html',0,0);
				  					galleries[207612] = new gallery(207612,'4258457,3604700,3402061,3402059,3401844,3401839,3401799,3401798','Developers','section255609',[3604700,3401798,4258457,3401799,3401839,3401844,3402059,3402061],0, 0, '', 'section255609_207612.html',0,0);
				  					galleries[188407] = new gallery(188407,'4258456,3604706,3402051,3401833,3401806,3401805,3401804,3401801','Developers','section233146',[3604706,4258456,3401833,3402051,3401801,3401804,3401805,3401806],0, 0, '', 'section233146_188407.html',0,0);
				  					galleries[207689] = new gallery(207689,'3402048','Fixer','section255608',[3402048],0, 0, '', 'section255608_207689.html',0,0);
				  					galleries[207693] = new gallery(207693,'3401830','Fixer','section255609',[3401830],0, 0, '', 'section255609_207693.html',0,0);
				  					galleries[203437] = new gallery(203437,'3401795','Fixers','section233146',[3401795],0, 0, '', 'section233146_203437.html',0,0);
				  					galleries[203418] = new gallery(203418,'3335892,3335891,3335890,3335884,3335883,3335882,3335881,3335880','Geoff Leah','gallery',[3335880,3335890,3335881,3335891,3335882,3335892,3335883,3335884],0, 0, '', 'gallery_203418.html',0,0);
				  					galleries[207691] = new gallery(207691,'3401837,3401836','Halide/fixer tester','section255608',[3401836,3401837],0, 0, '', 'section255608_207691.html',0,0);
				  					galleries[207696] = new gallery(207696,'3402055,3402054','Halide/fixer tester','section255609',[3402054,3402055],0, 0, '', 'section255609_207696.html',0,0);
				  					galleries[203439] = new gallery(203439,'3294352,3294351','Halide/fixer testers','section233146',[3294351,3294352],0, 0, '', 'section233146_203439.html',0,0);
				  					galleries[208023] = new gallery(208023,'3405064','Ian Chapman','gallery',[3405064],0, 0, '', 'gallery_208023.html',0,0);
				  					galleries[210537] = new gallery(210537,'3441758,3441757,3441756,3441755','Joe Bowes','gallery',[3441755,3441756,3441757,3441758],0, 0, '', 'gallery_210537.html',0,0);
				  					galleries[206940] = new gallery(206940,'3388885,3388884,3388882,3388881,3388880,3388879,3388878,3388877','John Mackay-Marks','gallery',[3388877,3388878,3388879,3388880,3388881,3388882,3388884,3388885],0, 0, '', 'gallery_206940.html',0,0);
				  					galleries[208749] = new gallery(208749,'5326182,5326179,5073889','Latest work','section257031',[5073885,5326175,5073886,5326176,5073887,5326177,5073888,5073901,5326179,5073931,5326180,5073932,5326181,5073900,5326182,5326183,5073902,5073918,5073910,5073911,5326185,5073920,5073930,5073889,5073912,5073922,5073936,5073923,5073929,5073898,5073928,5073899,5073908,5073909,5073921,5073934,5073935],0, 0, '', 'section257031_208749.html',0,0);
				  					galleries[220821] = new gallery(220821,'3609468,3609467,3609466','Les McLean','gallery',[3609466,3609467,3609468],0, 0, '', 'gallery_220821.html',0,0);
				  					galleries[218550] = new gallery(218550,'3576136,3576135,3576134,3576133','Mark Setchell','gallery',[3576133,3576134,3576135,3576136],0, 0, '', 'gallery_218550.html',0,0);
				  					galleries[208753] = new gallery(208753,'3404151,3227231,3221994,3221993,3221988','Scotland','section257031',[3221988,3404151,3227231,3221993,3221994],0, 0, '', 'section257031_208753.html',0,0);
				  					galleries[207695] = new gallery(207695,'3402050','Stop','section255609',[3402050],0, 0, '', 'section255609_207695.html',0,0);
				  					galleries[207690] = new gallery(207690,'3401832','Stop','section255608',[3401832],0, 0, '', 'section255608_207690.html',0,0);
				  					galleries[203438] = new gallery(203438,'3401797','Stopbath','section233146',[3401797],0, 0, '', 'section233146_203438.html',0,0);
				  					galleries[220840] = new gallery(220840,'3613860,3609988,3609987,3609983,3609982,3609981,3609980,3609979','Sylvain Guenot - Portrait Photographer','gallery',[3609979,3609987,3613860,3609980,3609988,3609981,3609982,3609983],0, 0, '', 'gallery_220840.html',0,0);
				  					galleries[203436] = new gallery(203436,'3401803,3401802,3401796','Toners ','section233146',[3401796,3401802,3401803],0, 0, '', 'section233146_203436.html',0,0);
				  					galleries[207613] = new gallery(207613,'3402058,3402057,3402049','Toners','section255609',[3402049,3402057,3402058],0, 0, '', 'section255609_207613.html',0,0);
				  					galleries[207611] = new gallery(207611,'3401841,3401840,3401831','Toners','section255608',[3401831,3401840,3401841],0, 0, '', 'section255608_207611.html',0,0);
				  					galleries[197102] = new gallery(197102,'3227288,3227287','Heather Sparks ','gallery',[3227287,3227288],0, 0, '', 'gallery_197102.html',0,0);
				  					galleries[200548] = new gallery(200548,'3290047,3290046,3290045,3290044,3290043,3290042,3290041,3290040','Paul Gallagher','gallery',[3290040,3290044,3290047,3290041,3290045,3290042,3290046,3290043],0, 0, '', 'gallery_200548.html',0,0);
				  					galleries[208750] = new gallery(208750,'3404041','Seascapes/seashore 1','section257031',[3404040,3432995,3404041,3404043,3433002,3222000],0, 0, '', 'section257031_208750.html',0,0);
				  					galleries[197105] = new gallery(197105,'3576130,3576129,3570834,3227295,3227294,3227293','Dave Miller','gallery',[3570834,3576129,3227293,3576130,3227294,3227295],0, 0, '', 'gallery_197105.html',0,0);
				  					galleries[208751] = new gallery(208751,'3432996,3227235,3222002,3222001,3221998,3221997,3221992,3221989','Seascapes/seashore 2','section257031',[3221989,3227235,3432996,3221992,3221997,3221998,3222001,3222002],0, 0, '', 'section257031_208751.html',0,0);
				  					galleries[208762] = new gallery(208762,'3400021,3400020,3400019,3399983','Rock details','section257031',[3400019,3399983,3400020,3400021],0, 0, '', 'section257031_208762.html',0,0);
				  					galleries[208764] = new gallery(208764,'3433003,3433001,3433000,3432999,3432998,3432997,3227230','General Images','section257031',[3227230,3432997,3432998,3432999,3433000,3433001,3433003],0, 0, '', 'section257031_208764.html',0,0);
				  					galleries[208754] = new gallery(208754,'','Archive 1','section257031',[],0, 0, '', 'section257031_208754.html',0,0);
				  					galleries[208755] = new gallery(208755,'','Archive 2','section257031',[],0, 0, '', 'section257031_208755.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '5326182,5326179,5326175,5073934,5073929,5073922,5073920,5073912,5073911,5073910,5073909,5073889';
imageSets[2] = '5326182,5326179,5073889,3404041';
imageSets[3] = '5326185,5326184,5326183,5326182,5326181,5326180,5326179,5326177,5326176,5326175,5073936,5073935,5073934,5073932,5073931,5073930,5073929,5073928,5073923,5073922,5073921,5073920,5073918,5073912,5073911,5073910,5073909,5073908,5073902,5073901,5073900,5073899,5073898,5073889,5073888,5073887,5073886,5073885,4258457,4258456,4258455,4258454,4252419,4252418,3613860,3609988,3609987,3609983,3609982,3609981';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/HoganP/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/HoganP/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/HoganP/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/HoganP/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/HoganP/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/HoganP/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 += 'section257031.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 && 'section257031' != '') {
					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 = 'MonochromePhotography: ' + 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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
				
		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">';
	temp = temp + '	<input type="hidden" name="item_option" value="' + item_option + '">';
	temp = temp + '	<input type="hidden" name="site" value="HOGANP">';
		temp = temp + '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp = temp + '	<input type="hidden" name="quantity" value="1">';
								temp = temp + '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
			temp = 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 = temp + '</form>';
		temp = temp + '<div class="clearing">&nbsp;</div>';
	temp = temp + '<div id="confirmContainer">';
	temp = temp + '<div id="paymentConfirm">Item added to cart</div>';
	temp = temp + '</div>';
			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;
	}
}

			

