window.thumbnails = {};
thumbnails[8596288] = clik.newPhoto({"link":"#","caption":"","height":112,"id":8596288,"server_id":31,"src":"SallyPhotoPhotographerinRome_thumb.jpg","galleries_id":"","width":160});
thumbnails[8595999] = clik.newPhoto({"link":"photo_8595999.html","caption":"ATHENS COLLAGE","height":213,"id":8595999,"server_id":31,"src":"2011AthensCollage18x24WebOpt6001_thumb.jpg","galleries_id":456942,"width":160});
thumbnails[8652089] = clik.newPhoto({"link":"photo_8652089.html","caption":"B&B Gate, Isle of Skye","height":200,"id":8652089,"server_id":31,"src":"BBGate8x10_6578_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8658515] = clik.newPhoto({"link":"photo_8658515.html","caption":"Wheat Field Blues","height":60,"id":8658515,"server_id":31,"src":"WheatFieldBlues16x6_DSC_0015_thumb.jpg","galleries_id":456936,"width":160});
thumbnails[8658526] = clik.newPhoto({"link":"photo_8658526.html","caption":"Fortress Window, Isle of Crete, Greece","height":200,"id":8658526,"server_id":31,"src":"FortressWindow8x10_thumb.jpg","galleries_id":456934,"width":160});
thumbnails[8658535] = clik.newPhoto({"link":"photo_8658535.html","caption":"Hand of God, the Northern Highlands","height":204,"id":8658535,"server_id":31,"src":"HandofGod11x14_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8658552] = clik.newPhoto({"link":"photo_8658552.html","caption":"Kildonan Strath, Northern Highlands, Scotland","height":107,"id":8658552,"server_id":31,"src":"KildonanStrathFromLothbeg_14x9.4dpi300FINAL_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8658580] = clik.newPhoto({"link":"photo_8658580.html","caption":"Kolub Canyons, Winter","height":239,"id":8658580,"server_id":31,"src":"KolobCanyons94x14dpi300_thumb.jpg","galleries_id":456935,"width":160});
thumbnails[8658614] = clik.newPhoto({"link":"photo_8658614.html","caption":"Rethymnon Dining, Crete","height":200,"id":8658614,"server_id":31,"src":"RethymnonDining8x10_thumb.jpg","galleries_id":456934,"width":160});
thumbnails[8658683] = clik.newPhoto({"link":"photo_8658683.html","caption":"Santorini, Greece","height":128,"id":8658683,"server_id":31,"src":"Santorini8x10dpi300_thumb.jpg","galleries_id":456934,"width":160});
thumbnails[8658754] = clik.newPhoto({"link":"photo_8658754.html","caption":"St. Andrews, After the Storm","height":204,"id":8658754,"server_id":31,"src":"StAndrewsAftertheStorm11x14_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8658777] = clik.newPhoto({"link":"photo_8658777.html","caption":"St. Andrews: Home of Golf","height":107,"id":8658777,"server_id":31,"src":"StAndrewsHomeofGolf14x9.4_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8658830] = clik.newPhoto({"link":"photo_8658830.html","caption":"Sunset Rainbow","height":240,"id":8658830,"server_id":31,"src":"SunsetRainbowUllswater10x15_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8658890] = clik.newPhoto({"link":"photo_8658890.html","caption":"The View, Northern Highlands, Scotland","height":107,"id":8658890,"server_id":31,"src":"TheView15x10dpi300_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8658946] = clik.newPhoto({"link":"photo_8658946.html","caption":"Thistle","height":320,"id":8658946,"server_id":31,"src":"Thistle8x16_0084_thumb.jpg","galleries_id":456936,"width":160});
thumbnails[8659046] = clik.newPhoto({"link":"photo_8659046.html","caption":"Blue Ridge Morning, North Carolina","height":71,"id":8659046,"server_id":31,"src":"BlueRidge18x8dpi300_thumb.jpg","galleries_id":456936,"width":160});
thumbnails[8661920] = clik.newPhoto({"link":"photo_8661920.html","caption":"St. Andrews: #2 from #17 Tee","height":53,"id":8661920,"server_id":31,"src":"2from17tee_18x6_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8661939] = clik.newPhoto({"link":"photo_8661939.html","caption":"Flash of Blue","height":240,"id":8661939,"server_id":31,"src":"AFlashofBlue12x18_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8661981] = clik.newPhoto({"link":"photo_8661981.html","caption":"Almost, St. Andrews (black and white)","height":239,"id":8661981,"server_id":31,"src":"AlmostStAndrewsFlag9.4x14BW_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8661995] = clik.newPhoto({"link":"photo_8661995.html","caption":"Almost, St. Andrews, Old Course, Scotland (color)","height":239,"id":8661995,"server_id":31,"src":"AlmostStAndrewsFlag9.4x14dpi300_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8662080] = clik.newPhoto({"link":"photo_8662080.html","caption":"August Palette, Northern Highlands, Scotland","height":160,"id":8662080,"server_id":31,"src":"AugustPaletteBorgieRiver14x14_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8662085] = clik.newPhoto({"link":"photo_8662085.html","caption":"Bunker, Old Course, St. Andrews (sepia)","height":80,"id":8662085,"server_id":31,"src":"Bunker_16x8SepiaDSC_0125_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8662095] = clik.newPhoto({"link":"photo_8662095.html","caption":"Camore Wood, Dornoch, Scotland","height":103,"id":8662095,"server_id":31,"src":"CamoreWoods14x9_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8662119] = clik.newPhoto({"link":"photo_8662119.html","caption":"Carbisdale Path, Scotland","height":240,"id":8662119,"server_id":31,"src":"CarbisdalePath12x18_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8662129] = clik.newPhoto({"link":"photo_8662129.html","caption":"Cocktail Corner, Old Course Hotel, St. Andrews","height":200,"id":8662129,"server_id":31,"src":"cocktail-corner8x10glossy_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8662151] = clik.newPhoto({"link":"photo_8662151.html","caption":"Archway, Crete, Greece","height":200,"id":8662151,"server_id":31,"src":"CreteArchway_thumb.jpg","galleries_id":456934,"width":160});
thumbnails[8662158] = clik.newPhoto({"link":"photo_8662158.html","caption":"Cuillin Hills from Elgol, Isle of Skye, Scotland","height":106,"id":8662158,"server_id":31,"src":"CuillinHillsFromElgol14x9.4_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8662231] = clik.newPhoto({"link":"photo_8662231.html","caption":"Dornoch Doorway, #2, Scotland","height":128,"id":8662231,"server_id":31,"src":"DornochDoorway2_10x8dpi300_DSC_0192_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8662233] = clik.newPhoto({"link":"photo_8662233.html","caption":"Gold Door, Dornoch, Scotland","height":239,"id":8662233,"server_id":31,"src":"DornochGoldDoor10x15_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8662234] = clik.newPhoto({"link":"photo_8662234.html","caption":"Dornoch Sidewalk Garden","height":200,"id":8662234,"server_id":31,"src":"DornochSidewalkGarden8x10dpi300DSC_0191_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8662236] = clik.newPhoto({"link":"photo_8662236.html","caption":"Drama: Dornoch Firth, Scotland","height":128,"id":8662236,"server_id":31,"src":"DramaDornochFirthSunset8x10_09062009DSC_0117_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8668450] = clik.newPhoto({"link":"photo_8668450.html","caption":"Dunrobin Castle, Sutherland, Scotland","height":110,"id":8668450,"server_id":31,"src":"DunrobinCastle16x11_thumb.jpg","galleries_id":456946,"width":160});
thumbnails[8668459] = clik.newPhoto({"link":"photo_8668459.html","caption":"St. Andrews: End of the Rainbow","height":134,"id":8668459,"server_id":31,"src":"EndoftheRainbow12x10_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8668471] = clik.newPhoto({"link":"photo_8668471.html","caption":"Evening: St. Andrews, Scotland","height":107,"id":8668471,"server_id":31,"src":"EveningStAndrews12x10_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8668603] = clik.newPhoto({"link":"photo_8668603.html","caption":"Fresh, a Scottish Landscape","height":204,"id":8668603,"server_id":31,"src":"Fresh11x14_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8668619] = clik.newPhoto({"link":"photo_8668619.html","caption":"St. Andrews Old Course, Ginger Beer #4","height":107,"id":8668619,"server_id":31,"src":"GingerBeer4_18x12SV_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8668636] = clik.newPhoto({"link":"photo_8668636.html","caption":"Hallowed, Carbisdale Forest, Scotland","height":240,"id":8668636,"server_id":31,"src":"Hallowed12x18_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8668915] = clik.newPhoto({"link":"photo_8668915.html","caption":"Highhland Dancers","height":120,"id":8668915,"server_id":31,"src":"HighlandDancersFINAL-copy10x7.5-1_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8668924] = clik.newPhoto({"link":"photo_8668924.html","caption":"Highland Home, Northern Highlands, Scotland","height":128,"id":8668924,"server_id":31,"src":"HighlandHome8x10__20090822_0994_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8668929] = clik.newPhoto({"link":"photo_8668929.html","caption":"Highland Loch II: Blustery Day","height":107,"id":8668929,"server_id":31,"src":"HIghlandLochBlusteryFINAL-Clive-to-REX_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678398] = clik.newPhoto({"link":"photo_8678398.html","caption":"Wheat Field, Sutherland, Scotland","height":238,"id":8678398,"server_id":31,"src":"WheatField9.4x14_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678399] = clik.newPhoto({"link":"photo_8678399.html","caption":"Towerburn Torrent, the Borders, Scotland","height":107,"id":8678399,"server_id":31,"src":"TowerburnTorrent14x9.4lighter_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678400] = clik.newPhoto({"link":"photo_8678400.html","caption":"Home by the Sea, west coast, Scotland","height":128,"id":8678400,"server_id":31,"src":"HomeBytheSea10x8_Sunset_EastCoast_08232009DSC_0001_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678402] = clik.newPhoto({"link":"photo_8678402.html","caption":"Iona Abbey, Scotland","height":242,"id":8678402,"server_id":31,"src":"IonaAbbey9.4x14_thumb.jpg","galleries_id":456946,"width":160});
thumbnails[8678404] = clik.newPhoto({"link":"photo_8678404.html","caption":"Isolation, the Northern Highlands, Scotland","height":107,"id":8678404,"server_id":31,"src":"Isolation18x12_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678408] = clik.newPhoto({"link":"photo_8678408.html","caption":"Last Round: Golfers in Silhouette, Brora, Scotland","height":80,"id":8678408,"server_id":31,"src":"LastRoundoftheDay22x11SV_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8678409] = clik.newPhoto({"link":"photo_8678409.html","caption":"Le Celle, near Cortona, Italy","height":210,"id":8678409,"server_id":31,"src":"LeCelle16x21_thumb.jpg","galleries_id":456933,"width":160});
thumbnails[8678410] = clik.newPhoto({"link":"photo_8678410.html","caption":"St. Andrews: Links Clubhouse, Scotland","height":89,"id":8678410,"server_id":31,"src":"LinksNewCourseClubHouse18x10dpi300_0080720_DSC_0219-copySV_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8678411] = clik.newPhoto({"link":"photo_8678411.html","caption":"Loch Fleet, Sutherland, Scotland","height":107,"id":8678411,"server_id":31,"src":"LochFleet14x9.4_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678412] = clik.newPhoto({"link":"photo_8678412.html","caption":"Meditation (piper), Scotland","height":220,"id":8678412,"server_id":31,"src":"Meditation8x11glossy_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8678414] = clik.newPhoto({"link":"photo_8678414.html","caption":"Morning Grasses, St. Andrews, Scotland","height":240,"id":8678414,"server_id":31,"src":"MorningGrassesStAndrews8x12_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8678415] = clik.newPhoto({"link":"photo_8678415.html","caption":"Perfect Rose for ??? <P>(Email me to NAME for your beloved)","height":200,"id":8678415,"server_id":31,"src":"PerfectRoseforWanda8x10_DSC_0035_thumb.jpg","galleries_id":456936,"width":160});
thumbnails[8678417] = clik.newPhoto({"link":"photo_8678417.html","caption":"That Special Light, the Northern Highlands, Scotland","height":242,"id":8678417,"server_id":31,"src":"ThatSpecialLight9.4x14_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678418] = clik.newPhoto({"link":"photo_8678418.html","caption":"Swilken Bridge, Old Course, St. Andrews, Scotland","height":239,"id":8678418,"server_id":31,"src":"SwilkenBridgeVignetteLIGHT9.4x14_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8678419] = clik.newPhoto({"link":"photo_8678419.html","caption":"Sunrise, Dornoch Firth, Scotland","height":107,"id":8678419,"server_id":31,"src":"SunriseDornochFirth14x9.4_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678420] = clik.newPhoto({"link":"photo_8678420.html","caption":"Storm on the Moor, Scotland","height":107,"id":8678420,"server_id":31,"src":"StormOntheMoor14x9.4_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678421] = clik.newPhoto({"link":"photo_8678421.html","caption":"St. Andrews View, Old Course Hotel, Scotland","height":200,"id":8678421,"server_id":31,"src":"StAndrewsView8x10STRAIGHTglossy_thumb.jpg","galleries_id":456946,"width":160});
thumbnails[8678422] = clik.newPhoto({"link":"photo_8678422.html","caption":"St. Andrews Flags, Scotland","height":89,"id":8678422,"server_id":31,"src":"StAndrewsFlags18x10dpi300_20080720_DSC_0241glossy_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8678423] = clik.newPhoto({"link":"photo_8678423.html","caption":"St. Andrews Standards, Scotland","height":80,"id":8678423,"server_id":31,"src":"St.AndrewsStandard16x8glossy_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8678424] = clik.newPhoto({"link":"photo_8678424.html","caption":"Skibo Golf Course View, Dornoch Firth Bridge, Scotland","height":107,"id":8678424,"server_id":31,"src":"SkiboGCDornochFirthBridge2_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8678425] = clik.newPhoto({"link":"photo_8678425.html","caption":"Pisa at Night, the Arno River, Italy","height":114,"id":8678425,"server_id":31,"src":"PisaatNight14x10_thumb.jpg","galleries_id":456933,"width":160});
thumbnails[8678426] = clik.newPhoto({"link":"photo_8678426.html","caption":"Ship at Rest, Meikle Ferry, Dornoch Firth, Scotland","height":200,"id":8678426,"server_id":31,"src":"ShipatRest8x10_MeikleFerryStorm08272009DSC_0061-1_thumb.jpg","galleries_id":456944,"width":160});
thumbnails[8678427] = clik.newPhoto({"link":"photo_8678427.html","caption":"Flocks O Sheep Down in the Glen, Northern Highlands, Scotland","height":126,"id":8678427,"server_id":31,"src":"FlocksOSheep14x11_3333_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678428] = clik.newPhoto({"link":"photo_8678428.html","caption":"Rosal Falls, Northern Highlands, Scotland","height":238,"id":8678428,"server_id":31,"src":"RosalFalls9.4x14_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8678429] = clik.newPhoto({"link":"photo_8678429.html","caption":"Road Trip, Ben Hope, Northern Highlands, Scotland","height":107,"id":8678429,"server_id":31,"src":"RoadTrip18x12lighter-LEVELS_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8682338] = clik.newPhoto({"link":"photo_8682338.html","caption":"Zion Moon in Black and White, Utah","height":107,"id":8682338,"server_id":31,"src":"ZionSnowyMoonBW14x9.4dpi300_thumb.jpg","galleries_id":456935,"width":160});
thumbnails[8682346] = clik.newPhoto({"link":"photo_8682346.html","caption":"Who Art in Heaven, Black and White, Tasmania","height":213,"id":8682346,"server_id":31,"src":"WhoArtinHeaven7.5x10REV10_25_11_thumb.jpg","galleries_id":456937,"width":160});
thumbnails[8682347] = clik.newPhoto({"link":"photo_8682347.html","caption":"Blue House, Portevenere, Italy","height":120,"id":8682347,"server_id":31,"src":"blue-house-24x18dpi300DSC07128_thumb.jpg","galleries_id":456933,"width":160});
thumbnails[8682348] = clik.newPhoto({"link":"photo_8682348.html","caption":"Country Morning Vision, Oconee County, Georgia","height":120,"id":8682348,"server_id":31,"src":"CountryMorningVision12x9_dpi300_thumb.jpg","galleries_id":456936,"width":160});
thumbnails[8682354] = clik.newPhoto({"link":"photo_8682354.html","caption":"Dream Escape","height":240,"id":8682354,"server_id":31,"src":"Dreamescape10x15_thumb.jpg","galleries_id":456940,"width":160});
thumbnails[8683201] = clik.newPhoto({"link":"photo_8683201.html","caption":"St. Andrews Light, Scotland","height":107,"id":8683201,"server_id":31,"src":"StAndrewsLight14x9.4dpi300_0008_thumb.jpg","galleries_id":456945,"width":160});
thumbnails[8696677] = clik.newPhoto({"link":"photo_8696677.html","caption":"Dornoch and the Northern Highlands","height":134,"id":8696677,"server_id":31,"src":"2483654-0d3e6bb83f17b709284d81d063f7dc20_thumb.jpg","galleries_id":458824,"width":160});
thumbnails[8996960] = clik.newPhoto({"link":"photo_8996960.html","caption":"Madison Angel","height":200,"id":8996960,"server_id":31,"src":"MadisonAngelWEBOPTDSCF2437_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8996965] = clik.newPhoto({"link":"photo_8996965.html","caption":"Madison Berries","height":200,"id":8996965,"server_id":31,"src":"MadisonBerriesWEBOPTDSC02257_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8996972] = clik.newPhoto({"link":"photo_8996972.html","caption":"Madison Blooms","height":200,"id":8996972,"server_id":31,"src":"MadisonBloomsWEBOPTDSC02231_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8996975] = clik.newPhoto({"link":"photo_8996975.html","caption":"Madison Fence","height":128,"id":8996975,"server_id":31,"src":"MadisonFenceWEBOPTDSC02229_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8996980] = clik.newPhoto({"link":"photo_8996980.html","caption":"Madison Graves","height":128,"id":8996980,"server_id":31,"src":"MadisonGraves20x16WEBOPT_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8996981] = clik.newPhoto({"link":"photo_8996981.html","caption":"Madison House and Flag","height":128,"id":8996981,"server_id":31,"src":"MadisonHouseFlagWEBOPTDSC02241_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8996984] = clik.newPhoto({"link":"photo_8996984.html","caption":"House in Madison, GA","height":128,"id":8996984,"server_id":31,"src":"MadisonHouseWEBOPT02222_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8996995] = clik.newPhoto({"link":"photo_8996995.html","caption":"Madison Keyhole","height":213,"id":8996995,"server_id":31,"src":"MadisonKeyHoleWEBOPTDSC02259_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997004] = clik.newPhoto({"link":"photo_8997004.html","caption":"Madison Pink House","height":128,"id":8997004,"server_id":31,"src":"MadisonPinkHouseWebOptDSCF2379_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997009] = clik.newPhoto({"link":"photo_8997009.html","caption":"Madison Pink Porch","height":200,"id":8997009,"server_id":31,"src":"MadisonPinkPorchDSCF2380_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997018] = clik.newPhoto({"link":"photo_8997018.html","caption":"Madison Porch Rockers","height":240,"id":8997018,"server_id":31,"src":"MadisonPorchWEBOPT02266_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997032] = clik.newPhoto({"link":"photo_8997032.html","caption":"Madison Round Gate","height":200,"id":8997032,"server_id":31,"src":"MadisonRoundGateWEBOPTDSC02240_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997034] = clik.newPhoto({"link":"photo_8997034.html","caption":"Madison Spring Columns","height":200,"id":8997034,"server_id":31,"src":"MadisonSpringColumnsWEBOPT_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997050] = clik.newPhoto({"link":"photo_8997050.html","caption":"Madison Tombstone","height":200,"id":8997050,"server_id":31,"src":"MadisonTombstoneWEBOPTDSC02271_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997063] = clik.newPhoto({"link":"photo_8997063.html","caption":"Madison Tracks","height":200,"id":8997063,"server_id":31,"src":"MadisonTracksWEBOPTDSC02285_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997072] = clik.newPhoto({"link":"photo_8997072.html","caption":"Madison Tree","height":128,"id":8997072,"server_id":31,"src":"MadisonTree20x16WEBOPT_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997079] = clik.newPhoto({"link":"photo_8997079.html","caption":"Madison White House","height":128,"id":8997079,"server_id":31,"src":"MadisonWhiteHouseWebOptDSCF2367_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997091] = clik.newPhoto({"link":"photo_8997091.html","caption":"Madison Yellow House","height":128,"id":8997091,"server_id":31,"src":"MadisonYellowHouseWEBOPTDSCF2309_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[8997116] = clik.newPhoto({"link":"photo_8997116.html","caption":"Madison Gingerbread House","height":128,"id":8997116,"server_id":31,"src":"MadisonGingerbreadHouseWEBOPTDSCF2310_thumb.jpg","galleries_id":473830,"width":160});
thumbnails[9064691] = clik.newPhoto({"link":"photo_9064691.html","caption":"Highland Bridge, Croik","height":107,"id":9064691,"server_id":31,"src":"HighlandBridge14x9.4WEBOPTlighter_thumb.jpg","galleries_id":456943,"width":160});
thumbnails[8935448] = clik.newPhoto({"link":"photo_8935448.html","caption":"West Lake Reflection, Hangzhou, China","height":204,"id":8935448,"server_id":31,"src":"DSC_7819WestLakeReflectionWebOpt_B486CB5D-1EC9-DFB6-09702DC723721E84_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935449] = clik.newPhoto({"link":"photo_8935449.html","caption":"West Lake Afternoon, B&W, Hangzhou, China","height":204,"id":8935449,"server_id":31,"src":"DSC_7846WestLakeRideBWWebOpt_B486F8FA-1EC9-DFB6-091FD1B16559C29F_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935450] = clik.newPhoto({"link":"photo_8935450.html","caption":"West Lake Afternoon, color, Hangzhou, China","height":204,"id":8935450,"server_id":31,"src":"DSC_7846WestLakeRideColorWebOpt_B4872C57-1EC9-DFB6-09B461F36D7610E5_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935462] = clik.newPhoto({"link":"photo_8935462.html","caption":"Zhangjiejia Mountains in Sepia, China","height":242,"id":8935462,"server_id":31,"src":"DSC_9071JiangjiejiaBWSepiaWEBOPT_B489C9E2-1EC9-DFB6-09C9B4B905DCA1F5_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935463] = clik.newPhoto({"link":"photo_8935463.html","caption":"Zhangjiejia Tower, China","height":242,"id":8935463,"server_id":31,"src":"DSC_9160JiangjiejiaTowerWebOpt_B48A084F-1EC9-DFB6-09125FCDC63273E7_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935468] = clik.newPhoto({"link":"photo_8935468.html","caption":"Guilin, Li River, Ink Outlines, China","height":120,"id":8935468,"server_id":31,"src":"DSC_9509GuilinINK_OUTLINESWebOpt_B48B3A80-1EC9-DFB6-0901B9215143745A_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935470] = clik.newPhoto({"link":"photo_8935470.html","caption":"Autumn Walk, Xi'an, China","height":242,"id":8935470,"server_id":31,"src":"DSC_9885TerraCottaAutumnWalkWEBOPT_B48C1A4C-1EC9-DFB6-096964D639B478E9_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[9016892] = clik.newPhoto({"link":"photo_9016892.html","caption":"Bonsai, Suzhou, China","height":128,"id":9016892,"server_id":31,"src":"Bonsai10x8WEBOPTDSC_8353_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935452] = clik.newPhoto({"link":"photo_8935452.html","caption":"Pagoda at Night, Nanjing, China","height":128,"id":8935452,"server_id":31,"src":"DSC_8137PagodaWebOpt_B487881F-1EC9-DFB6-09FAEDD3F93BFD51_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935454] = clik.newPhoto({"link":"photo_8935454.html","caption":"Red Lantern Path #1, Suzhou, China","height":242,"id":8935454,"server_id":31,"src":"DSC_8252RedLanternPathWebOpt_B487F1CF-1EC9-DFB6-09DAD145CB967B7E_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935455] = clik.newPhoto({"link":"photo_8935455.html","caption":"Pagoda Pond in B&W, Suzhou, China","height":233,"id":8935455,"server_id":31,"src":"DSC_8267PagodaPondBWWebOpt_B488269B-1EC9-DFB6-09289D22B20A7CDA_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935456] = clik.newPhoto({"link":"photo_8935456.html","caption":"Red Lantern Path #2, Suzhou, China","height":242,"id":8935456,"server_id":31,"src":"DSC_8279RedLanternPath2WebOpt_B48857B7-1EC9-DFB6-09C3B7F32E1A758A_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935461] = clik.newPhoto({"link":"photo_8935461.html","caption":"The Edge, Jiangjiejia, China","height":242,"id":8935461,"server_id":31,"src":"DSC_8773TheEdgeBW_B489945C-1EC9-DFB6-0902BF9B86C3ABA8_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935473] = clik.newPhoto({"link":"photo_8935473.html","caption":"Bonsai Gate, Suzhou, China","height":242,"id":8935473,"server_id":31,"src":"DSC_8339BonsaiWebOpt_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935397] = clik.newPhoto({"link":"photo_8935397.html","caption":"Merry Christmas from Beijing, 2011","height":158,"id":8935397,"server_id":31,"src":"MerryChristmasChinaWebOpt_thumb_468F6FEE-1EC9-DFB6-09D1C36C401C85A3.jpg","galleries_id":456938,"width":160});
thumbnails[8935446] = clik.newPhoto({"link":"photo_8935446.html","caption":"Red Door, Mogao Caves, Dunhuang","height":228,"id":8935446,"server_id":31,"src":"DoorRedCROP_WEBOPT_B48662CE-1EC9-DFB6-09BC1E3CDCF178BF_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935447] = clik.newPhoto({"link":"photo_8935447.html","caption":"Red Door in B&W, Mogao Caves, Dunhuang","height":228,"id":8935447,"server_id":31,"src":"DoorRedCROPBW_WebOpt_B48694F7-1EC9-DFB6-09CAA589A7EACC4C_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935451] = clik.newPhoto({"link":"photo_8935451.html","caption":"Cuppa Tea, Hangzhou, China","height":242,"id":8935451,"server_id":31,"src":"DSC_7904CuppaTeaWebOpt_B487572B-1EC9-DFB6-09515A9184AD1A88_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935453] = clik.newPhoto({"link":"photo_8935453.html","caption":"Lillies, Wuxi, China","height":160,"id":8935453,"server_id":31,"src":"DSC_8216LillyWebOpt_B487B2F1-1EC9-DFB6-092A61B07A7149B8_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935457] = clik.newPhoto({"link":"photo_8935457.html","caption":"Lilly Slippers, Suzhou, China","height":120,"id":8935457,"server_id":31,"src":"DSC_8317LotusSlippersWEBOPT_B48893E5-1EC9-DFB6-09C32BB0C415D634_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935459] = clik.newPhoto({"link":"photo_8935459.html","caption":"Buddha, B&W with Poster Edges","height":106,"id":8935459,"server_id":31,"src":"DSC_8660BuddhaPosterEdgesBWWebOpt_B48910AD-1EC9-DFB6-09E3C44B200EBDCC_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935460] = clik.newPhoto({"link":"photo_8935460.html","caption":"Buddha in Sepia, Water Paper","height":106,"id":8935460,"server_id":31,"src":"DSC_8660BuddhaWaterpaperSepia_B48961BD-1EC9-DFB6-09181E05F5569119_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935466] = clik.newPhoto({"link":"photo_8935466.html","caption":"Into the Void, Zhangjiejia, China","height":233,"id":8935466,"server_id":31,"src":"DSC_9324IntoTheVoidWebOpt_B48AAD4B-1EC9-DFB6-09CCC3115F86E66D_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935467] = clik.newPhoto({"link":"photo_8935467.html","caption":"Dynamic, Zhangjiejia, China","height":106,"id":8935467,"server_id":31,"src":"DSC_9326CaveDynamicWebOpt_B48AF36D-1EC9-DFB6-097F2418760F0E7D_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935458] = clik.newPhoto({"link":"photo_8935458.html","caption":"Father and Child, Shanghai, China","height":242,"id":8935458,"server_id":31,"src":"DSC_8617FatherChildWebOpt_B488BE95-1EC9-DFB6-097A27B8A63FC264_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935469] = clik.newPhoto({"link":"photo_8935469.html","caption":"Crew, Li River, Guilin, China","height":106,"id":8935469,"server_id":31,"src":"DSC_9629CrewWebOpt_B48BE0D8-1EC9-DFB6-0956869AC4C2A2EB_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935471] = clik.newPhoto({"link":"photo_8935471.html","caption":"Shopkeepers, Hangzhou, China","height":106,"id":8935471,"server_id":31,"src":"ShopkeepersWEBOPT_B48C6484-1EC9-DFB6-09B2FDA55AB68A5B_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8935475] = clik.newPhoto({"link":"photo_8935475.html","caption":"Show Girls, Hangzhou, China","height":200,"id":8935475,"server_id":31,"src":"DSC_7973ShowgirlsHangzhouWebOpt_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[9074276] = clik.newPhoto({"link":"photo_9074276.html","caption":"Country Boy, Zhangjiejia, China","height":238,"id":9074276,"server_id":31,"src":"CountryBoy9.4x14WEBOPT_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[9074281] = clik.newPhoto({"link":"photo_9074281.html","caption":"Tea Maiden, Hangzhou, China","height":320,"id":9074281,"server_id":31,"src":"DSC_8046TeaMaidenCROPWEBOPT_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8682417] = clik.newPhoto({"link":"photo_8682417.html","caption":"Shy, China, 1987","height":201,"id":8682417,"server_id":31,"src":"Shy-1987001_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8694800] = clik.newPhoto({"link":"photo_8694800.html","caption":"Jong Na, 1987, Xi'an","height":114,"id":8694800,"server_id":31,"src":"Jong_Na_1987_Xian003_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8694801] = clik.newPhoto({"link":"photo_8694801.html","caption":"Old and Young, China, 1987","height":114,"id":8694801,"server_id":31,"src":"Old_and_Young_1987005_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8694803] = clik.newPhoto({"link":"photo_8694803.html","caption":"English Students, Shaanxi Teacher College, 1987","height":114,"id":8694803,"server_id":31,"src":"Shaanxi_English_Students004_thumb.jpg","galleries_id":456938,"width":160});
thumbnails[8694804] = clik.newPhoto({"link":"photo_8694804.html","caption":"Second Grade Class, Shaanxi Teachers University, 1987","height":114,"id":8694804,"server_id":31,"src":"Xian_Elementary_1987002_thumb.jpg","galleries_id":456938,"width":160});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
galleries[458824] = clik.newGallery({"photoIDs":[8696677],"link":"gallery_458824.html","skipIndex":0,"section_code":"gallery","id":458824,"parentGallery":"","featured_images":8696677,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"BOOK: Dornoch and the Northern Highlands"});galleries[473830] = clik.newGallery({"photoIDs":[8996960,8996965,8996972,8996975,8996980,8996981,8996984,8996995,8997004,8997009,8997018,8997032,8997034,8997050,8997063,8997072,8997079,8997091,8997116],"link":"gallery_473830.html","skipIndex":0,"section_code":"gallery","id":473830,"parentGallery":473828,"featured_images":"8997116,8997091,8997079,8997072,8997063,8997050,8997034,8997032,8997018,8997009","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Madison, GA"});galleries[454620] = clik.newGallery({"photoIDs":[],"link":"gallery_454620.html","skipIndex":0,"section_code":"gallery","id":454620,"parentGallery":"","featured_images":"9064691,8683201,8678429,8678428,8678427,8678426,8678424,8678423,8678422,8678421,8678420,8678419,8678414,8678412,8678411,8678410,8678408,8678404,8678402,8678400,8678399,8678398,8668929,8668924,8668915,8668471,8668450,8662236,8662234,8662233,8662231,8662158,8662129,8662080,8658777,8658754,8658552,8652089","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Scotland"});galleries[456943] = clik.newGallery({"photoIDs":[8658535,8658552,8658830,8658890,8661939,8662095,8662119,8662158,8662236,8668603,8668636,8668924,8668929,8678398,8678399,8678400,8678404,8678411,8678417,8678419,8678420,8678427,8678428,8678429,9064691],"link":"gallery_456943.html","skipIndex":0,"section_code":"gallery","id":456943,"parentGallery":454620,"featured_images":"9064691,8678429,8678428,8678427,8678420,8678419,8678411,8678404,8678400,8678399,8678398,8668929,8668924,8662236,8662158,8658552","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Scotland: Landscapes"});galleries[456938] = clik.newGallery({"photoIDs":[8935448,8935449,8935450,8935462,8935463,8935468,8935470,9016892,8935452,8935454,8935455,8935456,8935461,8935473,8935397,8935446,8935447,8935451,8935453,8935457,8935459,8935460,8935466,8935467,8935458,8935469,8935471,8935475,9074276,9074281,8682417,8694800,8694801,8694803,8694804],"link":"gallery_456938.html","skipIndex":0,"section_code":"gallery","id":456938,"parentGallery":"","featured_images":"9074276,9016892,8935473,8935471,8935470,8935469,8935468,8935467,8935466,8935463,8935462,8935461,8935460,8935459,8935458,8935457,8935456,8935455,8935454,8935453,8935452,8935451,8935450,8935449,8935448,8935447,8935446","maxRecords":0,"usePopups":false,"singleSection":false,"title":"China"});galleries[456933] = clik.newGallery({"photoIDs":[8678409,8678425,8682347],"link":"gallery_456933.html","skipIndex":0,"section_code":"gallery","id":456933,"parentGallery":"","featured_images":"8682347,8678425,8678409","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Italy"});galleries[456944] = clik.newGallery({"photoIDs":[8652089,8662080,8662129,8662231,8662233,8662234,8668915,8678412,8678414,8678426],"link":"gallery_456944.html","skipIndex":0,"section_code":"gallery","id":456944,"parentGallery":454620,"featured_images":"8678426,8678414,8678412,8668915,8662234,8662233,8662231,8662129,8662080,8652089","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Scotland: Close Up"});galleries[456934] = clik.newGallery({"photoIDs":[8658526,8658614,8658683,8662151],"link":"gallery_456934.html","skipIndex":0,"section_code":"gallery","id":456934,"parentGallery":"","featured_images":8662151,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Greece"});galleries[456945] = clik.newGallery({"photoIDs":[8658754,8658777,8661920,8661981,8661995,8662085,8668459,8668471,8668619,8678408,8678410,8678418,8678422,8678423,8678424,8683201],"link":"gallery_456945.html","skipIndex":0,"section_code":"gallery","id":456945,"parentGallery":454620,"featured_images":"8683201,8678424,8678423,8678422,8678410,8678408,8668471,8658777,8658754","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Scotland: Golf"});galleries[456942] = clik.newGallery({"photoIDs":[8595999],"link":"gallery_456942.html","skipIndex":0,"section_code":"gallery","id":456942,"parentGallery":"","featured_images":8595999,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Athens, GA: My Hometown"});galleries[456946] = clik.newGallery({"photoIDs":[8668450,8678402,8678421],"link":"gallery_456946.html","skipIndex":0,"section_code":"gallery","id":456946,"parentGallery":454620,"featured_images":"8678421,8678402,8668450","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Scotland: Structures"});galleries[456936] = clik.newGallery({"photoIDs":[8658515,8658946,8659046,8678415,8682348],"link":"gallery_456936.html","skipIndex":0,"section_code":"gallery","id":456936,"parentGallery":"","featured_images":"8682348,8678415","maxRecords":0,"usePopups":false,"singleSection":false,"title":"USA: Georgia and the South"});galleries[456947] = clik.newGallery({"photoIDs":[],"link":"gallery_456947.html","skipIndex":0,"section_code":"gallery","id":456947,"parentGallery":454620,"featured_images":"","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Scotland: The Tatoo"});galleries[456935] = clik.newGallery({"photoIDs":[8658580,8682338],"link":"gallery_456935.html","skipIndex":0,"section_code":"gallery","id":456935,"parentGallery":"","featured_images":8682338,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"USA: North, East, and West"});galleries[456937] = clik.newGallery({"photoIDs":[8682346],"link":"gallery_456937.html","skipIndex":0,"section_code":"gallery","id":456937,"parentGallery":"","featured_images":8682346,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Australia and New Zealand"});galleries[456940] = clik.newGallery({"photoIDs":[8682354],"link":"gallery_456940.html","skipIndex":0,"section_code":"gallery","id":456940,"parentGallery":"","featured_images":8682354,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Art Images"});galleries[473828] = clik.newGallery({"photoIDs":[],"link":"gallery_473828.html","skipIndex":0,"section_code":"gallery","id":473828,"parentGallery":"","featured_images":"8997116,8997091,8997079,8997072,8997063,8997050,8997034,8997032,8997018,8997009","maxRecords":0,"usePopups":false,"singleSection":false,"title":"By Request"});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '8662234';
imageSets[2] = '9064691,8696677,8683201,8682354,8682348,8682347,8682346,8682338,8678429,8678428,8678427,8678426,8678425,8678424,8678423,8678422,8678421,8678420,8678419,8678415,8678414,8678412,8678411,8678410,8678409,8678408,8678404,8678402,8678400,8678399,8678398,8668929,8668924,8668915,8668471,8668450,8662236,8662234,8662233,8662231,8662158,8662151,8662129,8662080,8658777,8658754,8658552,8652089,8595999,9016892,8935470,8935468,8935463,8935462,8935450,8935449,8935448,8935473,8935461,8935456,8935455,8935454,8935452,8935460,8935459,8935457,8935453,8935451,8935447,8935446,8935467,8935466,8935458,9074276,8935471,8935469';
imageSets[1] = '9064691,8683201,8682354,8682348,8682347,8682346,8682338,8678429,8678428,8678427,8678426,8678425,8678424,8678423,8678422,8678421,8678420,8678419,8678415,8678414,8678412,8678411,8678410,8678409,8678408,8678404,8678402,8678400,8678399,8678398,8668929,8668924,8668915,8668471,8668450,8662236,8662234,8662233,8662231,8662158,8662151,8662129,8662095,8662080,8661939,8659046,8658946,8658890,8658830,8658777,8658754,8658683,8658614,8658580,8658552,8658535,8658526,8652089,8595999,9016892,8935470,8935468,8935463,8935462,8935450,8935473,8935461,8935456,8935452,8935460,8935457,8935453,8935451,8935466,8935458,9074276,8935471,8935469';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/srossphoto/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/srossphoto/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 || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
				  document.title = 'Sally Ross Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
			
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> $' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
						temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
					temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="SROSSPHOTO">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

