window.thumbnails = {};
															thumbnails[1840831] = clik.newPhoto({"id":1840831,"src":" ChurchatSitges_thumb.jpg","galleries_id":123485,"server_id":2,"link":"photo_1840831.html","width":130,"caption":"Church and Palms, Sitges","height":86});
															thumbnails[8660568] = clik.newPhoto({"id":8660568,"src":"Sorrento_thumb.jpg","galleries_id":452350,"server_id":1,"link":"photo_8660568.html","width":130,"caption":"Sorrento","height":196});
															thumbnails[8581207] = clik.newPhoto({"id":8581207,"src":"Paris_Pavements_thumb.jpg","galleries_id":452350,"server_id":1,"link":"photo_8581207.html","width":130,"caption":"Paris Pavements.","height":184});
															thumbnails[1840805] = clik.newPhoto({"id":1840805,"src":"  Bayatsitges_thumb.jpg","galleries_id":123483,"server_id":2,"link":"photo_1840805.html","width":130,"caption":"Bay, Sitges","height":87});
															thumbnails[1843325] = clik.newPhoto({"id":1843325,"src":"Lina-Stores-1_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_1843325.html","width":130,"caption":"Lina Stores, Soho","height":92});
															thumbnails[1846624] = clik.newPhoto({"id":1846624,"src":"Blue Shutters, Provence  Acrylic 60 x 80 cmjpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1846624.html","width":130,"caption":"Provence","height":98});
															thumbnails[1849319] = clik.newPhoto({"id":1849319,"src":"From_Brimham_Rocks  jpg1_thumb.jpg","galleries_id":123484,"server_id":1,"link":"photo_1849319.html","width":130,"caption":"Near Brimham Rocks, Yorkshire","height":62});
															thumbnails[2985000] = clik.newPhoto({"id":2985000,"src":"KN001009_thumb.jpg","galleries_id":183825,"server_id":1,"link":"photo_2985000.html","width":130,"caption":"Brooklyn Bridge (Detail)","height":195});
															thumbnails[8558192] = clik.newPhoto({"id":8558192,"src":"Brighton-Rain_At_dusk_thumb.jpg","galleries_id":452350,"server_id":1,"link":"photo_8558192.html","width":130,"caption":"Brighton, Rain At Dusk","height":185});
															thumbnails[1843432] = clik.newPhoto({"id":1843432,"src":"Restaurant,-Kensington_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_1843432.html","width":130,"caption":"Gilbert's Restaurant, Kensington","height":92});
															thumbnails[1846630] = clik.newPhoto({"id":1846630,"src":"Fooftops Gironajpg_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_1846630.html","width":130,"caption":"Rooftops, Girona","height":97});
															thumbnails[1849275] = clik.newPhoto({"id":1849275,"src":"Nidderdale_Tops_I  jpg_thumb.jpg","galleries_id":123484,"server_id":1,"link":"photo_1849275.html","width":130,"caption":"Nidderdale Tops","height":66});
															thumbnails[3507068] = clik.newPhoto({"id":3507068,"src":"London-Underground-Poster_thumb.jpg","galleries_id":183825,"server_id":1,"link":"photo_3507068.html","width":130,"caption":"London Transport Poster","height":180});
															thumbnails[8573026] = clik.newPhoto({"id":8573026,"src":"Wet_Pavements_Nat_Gal_thumb.jpg","galleries_id":452350,"server_id":1,"link":"photo_8573026.html","width":130,"caption":"Wet Pavements Near National Gallery","height":186});
															thumbnails[1843449] = clik.newPhoto({"id":1843449,"src":"Shops-Nottinghill_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_1843449.html","width":130,"caption":"Shops, Nottinghill","height":91});
															thumbnails[1846714] = clik.newPhoto({"id":1846714,"src":"Placa Real Barcelona  jpg_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_1846714.html","width":130,"caption":"Placa Real, Barcelona","height":98});
															thumbnails[1849304] = clik.newPhoto({"id":1849304,"src":"Road_Yorkshire_Dales  jpg_thumb.jpg","galleries_id":123484,"server_id":1,"link":"photo_1849304.html","width":130,"caption":"Near Pateley Bridge","height":58});
															thumbnails[1852478] = clik.newPhoto({"id":1852478,"src":" Fabbriche Vecchie, Venice   jpg1_thumb.jpg","galleries_id":123485,"server_id":2,"link":"photo_1852478.html","width":130,"caption":"fabbriche Vecchie, Venice","height":87});
															thumbnails[2985089] = clik.newPhoto({"id":2985089,"src":"CNV00001_thumb.jpg","galleries_id":183825,"server_id":1,"link":"photo_2985089.html","width":130,"caption":"Church Spire, Prague","height":204});
															thumbnails[8652745] = clik.newPhoto({"id":8652745,"src":"IMG_0007.JPG_thumb.jpg","galleries_id":452350,"server_id":1,"link":"photo_8652745.html","width":130,"caption":"Cafe De Flore, Paris","height":86});
															thumbnails[1846621] = clik.newPhoto({"id":1846621,"src":"Bateau Mouche at the Pont Neufjpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1846621.html","width":130,"caption":"Pont Neuf","height":90});
															thumbnails[8553688] = clik.newPhoto({"id":8553688,"src":"August_Heat_Haze_Near_Tudeley__23_x_40_cm__180_thumb.jpg","galleries_id":123484,"server_id":1,"link":"photo_8553688.html","width":130,"caption":"August Heat Haze Near Tudeley","height":75});
															thumbnails[1843248] = clik.newPhoto({"id":1843248,"src":"Brighton-Pavillion-_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_1843248.html","width":130,"caption":"Brighton Pavillion","height":184});
															thumbnails[1846626] = clik.newPhoto({"id":1846626,"src":"Cafe Gironajpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1846626.html","width":130,"caption":"Cafe, Girona","height":93});
															thumbnails[1846721] = clik.newPhoto({"id":1846721,"src":"Salute Venice jpg_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1846721.html","width":130,"caption":"Salute Venice","height":91});
															thumbnails[1852167] = clik.newPhoto({"id":1852167,"src":"Cromford Canal  Ajpg_thumb.jpg","galleries_id":123484,"server_id":1,"link":"photo_1852167.html","width":130,"caption":"Cromford Canal","height":94});
															thumbnails[1852191] = clik.newPhoto({"id":1852191,"src":"Marlow Bridge Ajpg_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_1852191.html","width":130,"caption":"Marlowe Bridge","height":92});
															thumbnails[1991388] = clik.newPhoto({"id":1991388,"src":"Amsterdam  MMjpg1_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_1991388.html","width":130,"caption":"Lift Bridge Amsterdam","height":87});
															thumbnails[2985105] = clik.newPhoto({"id":2985105,"src":"KN001015_thumb.jpg","galleries_id":183825,"server_id":1,"link":"photo_2985105.html","width":130,"caption":"Indian Doorway   ","height":88});
															thumbnails[8660603] = clik.newPhoto({"id":8660603,"src":"Crossing_Westminster_Bridge__21_x_30_cm1_thumb.jpg","galleries_id":452350,"server_id":1,"link":"photo_8660603.html","width":130,"caption":"Crossing Westminster Bridge","height":90});
															thumbnails[1852173] = clik.newPhoto({"id":1852173,"src":"Henley Bridge Acrylicjpg_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_1852173.html","width":130,"caption":"Henley Bridge","height":92});
															thumbnails[1849331] = clik.newPhoto({"id":1849331,"src":"Charing Cross at Nightjpg_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_1849331.html","width":130,"caption":"Charing Cross","height":91});
															thumbnails[1846638] = clik.newPhoto({"id":1846638,"src":"San Giacomojpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1846638.html","width":130,"caption":"San Giacomo, Venice","height":92});
															thumbnails[1852182] = clik.newPhoto({"id":1852182,"src":"Houses of Parliament Acrylic  60 x 40 cmjpg_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_1852182.html","width":130,"caption":"Parliament at Dusk","height":91});
															thumbnails[1930955] = clik.newPhoto({"id":1930955,"src":"Courtyard_Venice-_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1930955.html","width":130,"caption":"Courtyard Venice","height":204});
															thumbnails[2861582] = clik.newPhoto({"id":2861582,"src":"AutumnWalkNearPenshurst_thumb.jpg","galleries_id":123484,"server_id":1,"link":"photo_2861582.html","width":129,"caption":"Autumn Walk Near Leigh","height":92});
															thumbnails[2985217] = clik.newPhoto({"id":2985217,"src":"CNV00002_thumb.jpg","galleries_id":183825,"server_id":1,"link":"photo_2985217.html","width":130,"caption":"Baroque Church, Prague","height":72});
															thumbnails[4861958] = clik.newPhoto({"id":4861958,"src":"ArcadeVenice_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_4861958.html","width":130,"caption":"Arcade Venice","height":87});
															thumbnails[5142134] = clik.newPhoto({"id":5142134,"src":"Albert_Bridge___40_x_60_cm_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_5142134.html","width":130,"caption":"Albert Bridge II","height":88});
															thumbnails[5095878] = clik.newPhoto({"id":5095878,"src":"Evening-2-Walk-Golden-Gree_thumb.jpg","galleries_id":123484,"server_id":1,"link":"photo_5095878.html","width":130,"caption":"Evening walk Golden Green","height":87});
															thumbnails[1846636] = clik.newPhoto({"id":1846636,"src":"rooftops, provence  Acrylic 40 x 60 cmjpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1846636.html","width":130,"caption":"Hilltop Village, Provence","height":87});
															thumbnails[1852195] = clik.newPhoto({"id":1852195,"src":"Savoy Hoteljpg_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_1852195.html","width":130,"caption":"The Savoy","height":86});
															thumbnails[1930989] = clik.newPhoto({"id":1930989,"src":"Farmhouse_Umbria-_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1930989.html","width":130,"caption":"Farmhouse, Umbria","height":202});
															thumbnails[1934415] = clik.newPhoto({"id":1934415,"src":"Gothic_Balconies  jpg_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1934415.html","width":130,"caption":"Gothic Balconies","height":198});
															thumbnails[2985283] = clik.newPhoto({"id":2985283,"src":"CNV00005_thumb.jpg","galleries_id":183825,"server_id":1,"link":"photo_2985283.html","width":130,"caption":"Mosque, Cordoba    ","height":95});
															thumbnails[4864217] = clik.newPhoto({"id":4864217,"src":"Eus30x42cmOil_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_4864217.html","width":130,"caption":"Eus, Roussillon","height":92});
															thumbnails[8532965] = clik.newPhoto({"id":8532965,"src":"Looe_Harbour__80_x_60_cm_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_8532965.html","width":130,"caption":"Looe Harbour","height":173});
															thumbnails[1846640] = clik.newPhoto({"id":1846640,"src":"Side canal Venicejpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1846640.html","width":130,"caption":"Side Canal, Venice","height":91});
															thumbnails[1855705] = clik.newPhoto({"id":1855705,"src":"Amsterdam Houses  jpg_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_1855705.html","width":130,"caption":"Houses Amsterdam","height":183});
															thumbnails[2956504] = clik.newPhoto({"id":2956504,"src":"Light-On-Thames-Near-Charin_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_2956504.html","width":130,"caption":"Towards Charing Cross","height":178});
															thumbnails[2985369] = clik.newPhoto({"id":2985369,"src":"House-commission--MM3_thumb.jpg","galleries_id":183825,"server_id":1,"link":"photo_2985369.html","width":130,"caption":" House in Lindfield       ","height":56});
															thumbnails[5146181] = clik.newPhoto({"id":5146181,"src":"St_Clement_Danes_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_5146181.html","width":130,"caption":"St Clement Danes","height":184});
															thumbnails[8553451] = clik.newPhoto({"id":8553451,"src":"Lavender_Field_Lullingstone____Oil__A3___350_F____295_U-F_thumb.jpg","galleries_id":123484,"server_id":1,"link":"photo_8553451.html","width":130,"caption":"Lavander Field Near Lullingstone","height":92});
															thumbnails[1846690] = clik.newPhoto({"id":1846690,"src":"Red Building, Nice  Acrylic  30 x 42 cmjpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1846690.html","width":130,"caption":"Red Building,Nice","height":92});
															thumbnails[1855691] = clik.newPhoto({"id":1855691,"src":"StPaulsNightLights jpg_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_1855691.html","width":130,"caption":"St Pauls At Night","height":197});
															thumbnails[2985087] = clik.newPhoto({"id":2985087,"src":"KN001010_thumb.jpg","galleries_id":183825,"server_id":1,"link":"photo_2985087.html","width":130,"caption":"Corniche, Muscat","height":152});
															thumbnails[5142299] = clik.newPhoto({"id":5142299,"src":"Albert_Bridge_II___42_x_30_cm_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_5142299.html","width":130,"caption":"Albert Bridge I","height":182});
															thumbnails[8535115] = clik.newPhoto({"id":8535115,"src":"Amalfi___60_x_80_cm_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_8535115.html","width":130,"caption":"Amalfi","height":97});
															thumbnails[5142428] = clik.newPhoto({"id":5142428,"src":"The_Salute_Afternoon_Light____60_x_40_cm_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_5142428.html","width":130,"caption":"The Salute, Summer Afternoon","height":196});
															thumbnails[2974401] = clik.newPhoto({"id":2974401,"src":"_St-Pancras-International-S_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_2974401.html","width":130,"caption":"St Pancras International","height":197});
															thumbnails[2974460] = clik.newPhoto({"id":2974460,"src":"Hotel-Europa,-Evening-Light_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_2974460.html","width":130,"caption":"Hotel Europa, Evening","height":91});
															thumbnails[4899667] = clik.newPhoto({"id":4899667,"src":"Simpsons-DoorwayThe-Stran_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_4899667.html","width":130,"caption":"Simpson's Doorway, The Strand","height":194});
															thumbnails[4906034] = clik.newPhoto({"id":4906034,"src":"Honfleur21x30cmAcryl_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_4906034.html","width":130,"caption":"The Harbour, Honfleur","height":91});
															thumbnails[1852200] = clik.newPhoto({"id":1852200,"src":"The Embankment at Dusk  Ajpg_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_1852200.html","width":130,"caption":"The Embankment ","height":98});
															thumbnails[1934421] = clik.newPhoto({"id":1934421,"src":"Green_Door_Grand_Canal  jpg_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1934421.html","width":130,"caption":"Green Doorway","height":204});
															thumbnails[8539478] = clik.newPhoto({"id":8539478,"src":"Collioure___40_x_60_cm_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_8539478.html","width":130,"caption":"Collioure","height":86});
															thumbnails[8550096] = clik.newPhoto({"id":8550096,"src":"Shopfronts_Clerkenwell__30_x_42_cm_____thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_8550096.html","width":130,"caption":"Shopfronts Clerkenwell","height":183});
															thumbnails[1852198] = clik.newPhoto({"id":1852198,"src":"Shell Building at Nightjpg_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_1852198.html","width":130,"caption":"Shellmex Building ","height":91});
															thumbnails[1855710] = clik.newPhoto({"id":1855710,"src":"FlowerShopLoire jpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1855710.html","width":130,"caption":"Flower Shop","height":187});
															thumbnails[1934426] = clik.newPhoto({"id":1934426,"src":"Green_Palina jpg_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1934426.html","width":130,"caption":"Green Palina","height":197});
															thumbnails[1991314] = clik.newPhoto({"id":1991314,"src":"Doges Palace Winter  jpg1_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1991314.html","width":130,"caption":"Doge's Palace, Winter Light","height":196});
															thumbnails[8547529] = clik.newPhoto({"id":8547529,"src":"Old_Bank_Tonbridge___42_x_30_cm__thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_8547529.html","width":130,"caption":"Old Bank, Tonbridge","height":92});
															thumbnails[1855707] = clik.newPhoto({"id":1855707,"src":"Balconies_Barcelona jpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1855707.html","width":130,"caption":"Barcelona Balconies","height":196});
															thumbnails[1934431] = clik.newPhoto({"id":1934431,"src":"Two_Moored_Boats  jpg_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1934431.html","width":130,"caption":"Two Moored Boats","height":194});
															thumbnails[1991325] = clik.newPhoto({"id":1991325,"src":"AlhambraGrenada1_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1991325.html","width":130,"caption":"Alhambra, Grenada","height":184});
															thumbnails[8526465] = clik.newPhoto({"id":8526465,"src":"Wet-Piazza1_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_8526465.html","width":130,"caption":"Wet Piazza St Martin in The Fields","height":183});
															thumbnails[8551981] = clik.newPhoto({"id":8551981,"src":"Amalfi_mm_40_x_601_thumb.jpg","galleries_id":123483,"server_id":1,"link":"photo_8551981.html","width":130,"caption":"Amalfi","height":86});
															thumbnails[8552036] = clik.newPhoto({"id":8552036,"src":"Cafe_Clifford_Street___40_x_60_cm____mixed_media_thumb.jpg","galleries_id":123482,"server_id":1,"link":"photo_8552036.html","width":130,"caption":"Cafe Clifford Street","height":87});
															thumbnails[1855708] = clik.newPhoto({"id":1855708,"src":"ClearingSkyNearTheRialto  jpg_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1855708.html","width":130,"caption":"Clearing Sky, Grand Canal","height":173});
															thumbnails[1991349] = clik.newPhoto({"id":1991349,"src":"Chocolaterie, Nice A3jpg1_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1991349.html","width":130,"caption":"Chocolate Shop Nice","height":195});
															thumbnails[8541102] = clik.newPhoto({"id":8541102,"src":"Blackheath_thumb.jpg","galleries_id":123283,"server_id":1,"link":"photo_8541102.html","width":130,"caption":"Blackheath, Tranquil Vale","height":92});
															thumbnails[1991417] = clik.newPhoto({"id":1991417,"src":"San Marcojpg_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1991417.html","width":130,"caption":"San Marco","height":90});
															thumbnails[1852495] = clik.newPhoto({"id":1852495,"src":"Church Doorway, Vouvant  jpg1_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1852495.html","width":130,"caption":"Church Doorway, Vouvant","height":87});
															thumbnails[1854659] = clik.newPhoto({"id":1854659,"src":"2-Pallazzi-at-night1_thumb.jpg","galleries_id":123477,"server_id":1,"link":"photo_1854659.html","width":130,"caption":"Palazzi At Night","height":183});
															thumbnails[5160253] = clik.newPhoto({"id":5160253,"src":"Lighting_Up_Time_Westminster___60_x_80_cm1_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_5160253.html","width":130,"caption":"Lighting Up Time, Westminster","height":99});
															thumbnails[1840707] = clik.newPhoto({"id":1840707,"src":"View_From_Academia_ Bridge_thumb.jpg","galleries_id":123485,"server_id":1,"link":"photo_1840707.html","width":130,"caption":"View From The Academia ","height":96});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[123477] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery One","link":"gallery_123477.html","maxRecords":0.0,"photoIDs":[1846624.0,1846621.0,1846626.0,1846638.0,1846636.0,1846640.0,1846690.0,2974460.0,1855710.0,1855707.0,1855708.0,1854659.0],"skipIndex":0,"section_code":"gallery","featured_images":"2974460,1855710,1855708,1855707,1854659,1846690,1846640,1846638,1846636,1846626","id":123477,"singleSection":false});				  						galleries[123483] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery Two","link":"gallery_123483.html","maxRecords":0.0,"photoIDs":[1840805.0,1846630.0,1846714.0,1991388.0,4861958.0,4864217.0,1855705.0,8535115.0,5142428.0,4906034.0,8539478.0,8551981.0],"skipIndex":0,"section_code":"gallery","featured_images":"8551981,8539478,8535115,5142428,4906034,4864217,4861958,1991388,1855705,1846714","id":123483,"singleSection":false});				  						galleries[123283] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery Three","link":"gallery_123283.html","maxRecords":0.0,"photoIDs":[1852191.0,1852173.0,1849331.0,1852182.0,1852195.0,2956504.0,1855691.0,2974401.0,1852200.0,1852198.0,8526465.0,8541102.0],"skipIndex":0,"section_code":"gallery","featured_images":"8541102,8526465,2974401,2956504,1855691,1852200,1852198,1852195,1852191,1852182","id":123283,"singleSection":false});				  						galleries[123482] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery Four","link":"gallery_123482.html","maxRecords":0.0,"photoIDs":[1843325.0,1843432.0,1843449.0,1843248.0,5142134.0,8532965.0,5146181.0,5142299.0,4899667.0,8550096.0,8547529.0,8552036.0],"skipIndex":0,"section_code":"gallery","featured_images":"8552036,8550096,8547529,8532965,5146181,5142299,5142134,4899667,1843449,1843432","id":123482,"singleSection":false});				  						galleries[452350] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gallery Five","link":"gallery_452350.html","maxRecords":0.0,"photoIDs":[8660568.0,8581207.0,8558192.0,8573026.0,8652745.0,8660603.0],"skipIndex":0,"section_code":"gallery","featured_images":"8660603,8660568,8652745,8581207,8573026,8558192","id":452350,"singleSection":false});				  						galleries[123484] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_123484.html","maxRecords":0.0,"photoIDs":[1849319.0,1849275.0,1849304.0,8553688.0,1852167.0,2861582.0,5095878.0,8553451.0],"skipIndex":0,"section_code":"gallery","featured_images":"8553688,8553451,5095878,2861582,1852167,1849319,1849304,1849275","id":123484,"singleSection":false});				  						galleries[183825] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commissions","link":"gallery_183825.html","maxRecords":0.0,"photoIDs":[2985000.0,3507068.0,2985089.0,2985105.0,2985217.0,2985283.0,2985369.0,2985087.0],"skipIndex":0,"section_code":"gallery","featured_images":"3507068,2985369,2985283,2985217,2985105,2985089,2985087,2985000","id":183825,"singleSection":false});				  						galleries[123485] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Prints","link":"gallery_123485.html","maxRecords":0.0,"photoIDs":[1840831.0,1852478.0,1846721.0,1930955.0,1930989.0,1934415.0,1934421.0,1934426.0,1991314.0,1934431.0,1991325.0,1991349.0,1991417.0,1852495.0,5160253.0,1840707.0],"skipIndex":0,"section_code":"gallery","featured_images":1840707.0,"id":123485,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8660603,8660568,8652745,8581207,8573026,8558192,8553688,8553451,8552036,8551981,8550096,8547529,8541102,8539478,8535115,8532965,8526465,5160253,5146181,5142428,5142299,5142134,5095878,4906034,4899667,4864217,4861958,3507068,2985369,2985283,2985217,2985105,2985089,2985087,2985000,2974460,2974401,2956504,2861582,1991417,1991388,1991349,1991325,1991314,1934431,1934426,1934421,1934415,1930989,1930955';
imageSets[2] = '1840707';
imageSets[3] = '8660603,8660568,8652745,8581207,8573026,8558192,8553688,8553451,8552036,8551981,8550096,8547529,8541102,8539478,8535115,8532965,8526465,5160253,5146181,5142428,5142299,5142134,5095878,4906034,4899667,4864217,4861958,3507068,2985369,2985283,2985217,2985105,2985089,2985087,2985000,2974460,2974401,2956504,2861582,1991417,1991388,1991349,1991325,1991314,1934431,1934426,1934421,1934415,1930989,1930955';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/nickhebditch/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/nickhebditch/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 = 'Nick Hebditch: ' + 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>';
	}
				
				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>Order this print:</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.item_price !== '') {
			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;
	}
}

			

