window.thumbnails = {};
															thumbnails[5825070] = clik.newPhoto({"id":5825070,"src":"10_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_5825070.html","width":130,"caption":"White Stair","height":130});
															thumbnails[5079523] = clik.newPhoto({"id":5079523,"src":"20_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_5079523.html","width":130,"caption":"Going for Gold","height":130});
															thumbnails[5824983] = clik.newPhoto({"id":5824983,"src":"30_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_5824983.html","width":130,"caption":"Green Back","height":130});
															thumbnails[5079554] = clik.newPhoto({"id":5079554,"src":"40_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_5079554.html","width":130,"caption":"River View","height":130});
															thumbnails[5079561] = clik.newPhoto({"id":5079561,"src":"50_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_5079561.html","width":130,"caption":"Glass","height":130});
															thumbnails[5825112] = clik.newPhoto({"id":5825112,"src":"60_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_5825112.html","width":130,"caption":"Second Look","height":130});
															thumbnails[5079560] = clik.newPhoto({"id":5079560,"src":"70_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_5079560.html","width":130,"caption":"Three","height":130});
															thumbnails[4567987] = clik.newPhoto({"id":4567987,"src":"80_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_4567987.html","width":130,"caption":"Checkerboard","height":130});
															thumbnails[2413250] = clik.newPhoto({"id":2413250,"src":"90_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_2413250.html","width":130,"caption":"Design","height":130});
															thumbnails[2578542] = clik.newPhoto({"id":2578542,"src":"100_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_2578542.html","width":130,"caption":"Dynamic Water","height":130});
															thumbnails[1727078] = clik.newPhoto({"id":1727078,"src":"110_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_1727078.html","width":130,"caption":"City","height":130});
															thumbnails[4568047] = clik.newPhoto({"id":4568047,"src":"120_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_4568047.html","width":130,"caption":"Stainless","height":130});
															thumbnails[1726951] = clik.newPhoto({"id":1726951,"src":"130-Orwell_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_1726951.html","width":130,"caption":"Orwell","height":130});
															thumbnails[7542554] = clik.newPhoto({"id":7542554,"src":"140_thumb.jpg","galleries_id":223883,"server_id":15,"link":"photo_7542554.html","width":130,"caption":"Dream","height":130});
															thumbnails[5824944] = clik.newPhoto({"id":5824944,"src":"150_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_5824944.html","width":130,"caption":"Accommodation I","height":130});
															thumbnails[5825045] = clik.newPhoto({"id":5825045,"src":"160_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_5825045.html","width":130,"caption":"Farewell","height":130});
															thumbnails[3673738] = clik.newPhoto({"id":3673738,"src":"170_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_3673738.html","width":130,"caption":"Steel and Glass","height":130});
															thumbnails[3673736] = clik.newPhoto({"id":3673736,"src":"180_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_3673736.html","width":130,"caption":"Station Roof","height":130});
															thumbnails[1727054] = clik.newPhoto({"id":1727054,"src":"190_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_1727054.html","width":130,"caption":"Exterior Forms","height":130});
															thumbnails[5079532] = clik.newPhoto({"id":5079532,"src":"_DSC9211-1b_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_5079532.html","width":130,"caption":"Try to see things...","height":130});
															thumbnails[1724335] = clik.newPhoto({"id":1724335,"src":"210_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_1724335.html","width":130,"caption":"Clean Windows","height":130});
															thumbnails[7547009] = clik.newPhoto({"id":7547009,"src":"220_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_7547009.html","width":130,"caption":"Old and New","height":130});
															thumbnails[7548928] = clik.newPhoto({"id":7548928,"src":"230_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_7548928.html","width":130,"caption":"Victoria","height":130});
															thumbnails[7547019] = clik.newPhoto({"id":7547019,"src":"250_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_7547019.html","width":130,"caption":"Soaring","height":130});
															thumbnails[7548926] = clik.newPhoto({"id":7548926,"src":"260_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_7548926.html","width":130,"caption":"Dunny Wall","height":130});
															thumbnails[7547013] = clik.newPhoto({"id":7547013,"src":"270_thumb.jpg","galleries_id":223880,"server_id":15,"link":"photo_7547013.html","width":130,"caption":"Arch","height":130});
															thumbnails[5825080] = clik.newPhoto({"id":5825080,"src":"280-Steppin_Out_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_5825080.html","width":130,"caption":"Steppin' Out","height":130});
															thumbnails[5079495] = clik.newPhoto({"id":5079495,"src":"290-I_Never_Realised_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_5079495.html","width":130,"caption":"I Never Realised","height":130});
															thumbnails[7551749] = clik.newPhoto({"id":7551749,"src":"_DSC0502-1a_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_7551749.html","width":130,"caption":"Complex Tensions","height":130});
															thumbnails[2413246] = clik.newPhoto({"id":2413246,"src":"300-Difference_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_2413246.html","width":130,"caption":"Difference","height":130});
															thumbnails[5079527] = clik.newPhoto({"id":5079527,"src":"310-FightingBack-1a_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_5079527.html","width":130,"caption":"Fighting Back","height":130});
															thumbnails[1723984] = clik.newPhoto({"id":1723984,"src":"320-TomorrowsGirls_I_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_1723984.html","width":130,"caption":"Tomorrows Girls I","height":130});
															thumbnails[3673742] = clik.newPhoto({"id":3673742,"src":"330-TomorrowsGirls_II_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_3673742.html","width":130,"caption":"Tomorrows Girls II","height":130});
															thumbnails[3665075] = clik.newPhoto({"id":3665075,"src":"340-UsThem_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_3665075.html","width":130,"caption":"Us and Them","height":130});
															thumbnails[3665072] = clik.newPhoto({"id":3665072,"src":"350-_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_3665072.html","width":130,"caption":"Within","height":130});
															thumbnails[3665074] = clik.newPhoto({"id":3665074,"src":"360-AmberAntics_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_3665074.html","width":130,"caption":"Amber Antics","height":130});
															thumbnails[1723809] = clik.newPhoto({"id":1723809,"src":"370-composit-1_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_1723809.html","width":130,"caption":"Modernity","height":130});
															thumbnails[1723978] = clik.newPhoto({"id":1723978,"src":"380-Torn_II-1a_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_1723978.html","width":130,"caption":"Torn II","height":130});
															thumbnails[4568050] = clik.newPhoto({"id":4568050,"src":"390-TooFar_thumb.jpg","galleries_id":115545,"server_id":15,"link":"photo_4568050.html","width":130,"caption":"Too Far","height":130});
															thumbnails[3673745] = clik.newPhoto({"id":3673745,"src":"400-OnceUponATime_thumb.jpg","galleries_id":115862,"server_id":15,"link":"photo_3673745.html","width":130,"caption":"Yesterday","height":130});
															thumbnails[1726942] = clik.newPhoto({"id":1726942,"src":"410-LastLight_thumb.jpg","galleries_id":115862,"server_id":15,"link":"photo_1726942.html","width":130,"caption":"Last Light","height":130});
															thumbnails[3665064] = clik.newPhoto({"id":3665064,"src":"421-If_Rothko_lived_in_Norfolk_..._thumb.jpg","galleries_id":115862,"server_id":19,"link":"photo_3665064.html","width":130,"caption":"If Rothko had Lived in Norfolk ...","height":130});
															thumbnails[7545501] = clik.newPhoto({"id":7545501,"src":"430-LongShaddows_thumb.jpg","galleries_id":115862,"server_id":15,"link":"photo_7545501.html","width":130,"caption":"Long Shaddows","height":130});
															thumbnails[7545502] = clik.newPhoto({"id":7545502,"src":"440-Remember_thumb.jpg","galleries_id":115862,"server_id":15,"link":"photo_7545502.html","width":130,"caption":"Remember","height":130});
															thumbnails[7545505] = clik.newPhoto({"id":7545505,"src":"450-LakePukaki_thumb.jpg","galleries_id":115862,"server_id":15,"link":"photo_7545505.html","width":130,"caption":"Lake Pukaki","height":130});
															thumbnails[7545508] = clik.newPhoto({"id":7545508,"src":"461-StickToThePath_thumb.jpg","galleries_id":115862,"server_id":19,"link":"photo_7545508.html","width":130,"caption":"Stick to the Path","height":130});
															thumbnails[7545510] = clik.newPhoto({"id":7545510,"src":"470-LookingUp_thumb.jpg","galleries_id":115862,"server_id":15,"link":"photo_7545510.html","width":130,"caption":"Looking Up","height":130});
															thumbnails[7545513] = clik.newPhoto({"id":7545513,"src":"480-BarleyCove_thumb.jpg","galleries_id":115862,"server_id":15,"link":"photo_7545513.html","width":130,"caption":"Barley Cove","height":130});
															thumbnails[5825063] = clik.newPhoto({"id":5825063,"src":"490-Thames_thumb.jpg","galleries_id":115862,"server_id":15,"link":"photo_5825063.html","width":130,"caption":"Thames","height":130});
															thumbnails[4567994] = clik.newPhoto({"id":4567994,"src":"Untitled-5_thumb.jpg","galleries_id":115862,"server_id":15,"link":"photo_4567994.html","width":130,"caption":"Tilled","height":130});
															thumbnails[7545530] = clik.newPhoto({"id":7545530,"src":"510-CloseToTheEdge_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545530.html","width":130,"caption":"Close to the Edge","height":130});
															thumbnails[7545533] = clik.newPhoto({"id":7545533,"src":"520-BusyYellow_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545533.html","width":130,"caption":"Busy Yellow","height":130});
															thumbnails[7545537] = clik.newPhoto({"id":7545537,"src":"530-RedBeam_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545537.html","width":130,"caption":"Beam","height":130});
															thumbnails[7545542] = clik.newPhoto({"id":7545542,"src":"535-LookAtMe_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545542.html","width":130,"caption":"Look At Me","height":130});
															thumbnails[7545545] = clik.newPhoto({"id":7545545,"src":"540-DifferentAspects_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545545.html","width":130,"caption":"Different Aspects","height":130});
															thumbnails[7545554] = clik.newPhoto({"id":7545554,"src":"Bike_in_the_light_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545554.html","width":130,"caption":"Bike in the Light","height":130});
															thumbnails[7545558] = clik.newPhoto({"id":7545558,"src":"560-GreenCair_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545558.html","width":130,"caption":"Green Chair","height":130});
															thumbnails[7545562] = clik.newPhoto({"id":7545562,"src":"570-AnOppertunity_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545562.html","width":130,"caption":"An Oppertunity","height":130});
															thumbnails[7545565] = clik.newPhoto({"id":7545565,"src":"580-Heels_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545565.html","width":130,"caption":"Heels","height":130});
															thumbnails[7545569] = clik.newPhoto({"id":7545569,"src":"590-KeepMe_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545569.html","width":130,"caption":"Keep Me posted","height":130});
															thumbnails[7545572] = clik.newPhoto({"id":7545572,"src":"600-DeepSteps_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545572.html","width":130,"caption":"Deep Steps","height":130});
															thumbnails[7545575] = clik.newPhoto({"id":7545575,"src":"610-DuvetDay_thumb.jpg","galleries_id":115863,"server_id":15,"link":"photo_7545575.html","width":130,"caption":"Duvet Day","height":130});
															thumbnails[7545592] = clik.newPhoto({"id":7545592,"src":"620-_thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_7545592.html","width":130,"caption":"Power","height":130});
															thumbnails[7545594] = clik.newPhoto({"id":7545594,"src":"630-Gulls_thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_7545594.html","width":130,"caption":"Flight","height":130});
															thumbnails[7545595] = clik.newPhoto({"id":7545595,"src":"640-FrostFlower_thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_7545595.html","width":130,"caption":"Frost Flower","height":130});
															thumbnails[7545596] = clik.newPhoto({"id":7545596,"src":"650-TrueColour_thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_7545596.html","width":130,"caption":"True Colour","height":130});
															thumbnails[7545598] = clik.newPhoto({"id":7545598,"src":"660-D.A._thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_7545598.html","width":130,"caption":"D.A.","height":130});
															thumbnails[7545600] = clik.newPhoto({"id":7545600,"src":"_DSC8497-1b_thumb.jpg","galleries_id":115864,"server_id":19,"link":"photo_7545600.html","width":130,"caption":"On the Beach","height":130});
															thumbnails[7545602] = clik.newPhoto({"id":7545602,"src":"680-_thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_7545602.html","width":130,"caption":"Fall","height":130});
															thumbnails[7545604] = clik.newPhoto({"id":7545604,"src":"691-Reeds_II_thumb.jpg","galleries_id":115864,"server_id":19,"link":"photo_7545604.html","width":130,"caption":"Reeds II","height":130});
															thumbnails[7545606] = clik.newPhoto({"id":7545606,"src":"700-SoftToTouch_thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_7545606.html","width":130,"caption":"Soft to Touch","height":130});
															thumbnails[7545607] = clik.newPhoto({"id":7545607,"src":"710-Beauty_thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_7545607.html","width":130,"caption":"Beauty","height":130});
															thumbnails[7545609] = clik.newPhoto({"id":7545609,"src":"Untitled-6_thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_7545609.html","width":130,"caption":"Slievebawn","height":130});
															thumbnails[5824964] = clik.newPhoto({"id":5824964,"src":"730-Blue_thumb.jpg","galleries_id":115864,"server_id":15,"link":"photo_5824964.html","width":130,"caption":"Blue","height":130});
															thumbnails[7545612] = clik.newPhoto({"id":7545612,"src":"740-Yesteryear_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_7545612.html","width":130,"caption":"Yesteryear","height":130});
															thumbnails[5825002] = clik.newPhoto({"id":5825002,"src":"750-GoodMorning_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_5825002.html","width":130,"caption":"Good Morning","height":130});
															thumbnails[7545615] = clik.newPhoto({"id":7545615,"src":"_DSC2212-1a_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_7545615.html","width":130,"caption":"Huts","height":130});
															thumbnails[7545617] = clik.newPhoto({"id":7545617,"src":"_DSC2900-1a_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_7545617.html","width":130,"caption":"Perfect","height":130});
															thumbnails[7545619] = clik.newPhoto({"id":7545619,"src":"_DSC5797-1_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_7545619.html","width":130,"caption":"Rescue","height":130});
															thumbnails[5825057] = clik.newPhoto({"id":5825057,"src":"DSC03756-1_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_5825057.html","width":130,"caption":"Claire","height":130});
															thumbnails[7545621] = clik.newPhoto({"id":7545621,"src":"_DSC1202-1_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_7545621.html","width":130,"caption":"Passing Through","height":130});
															thumbnails[7545624] = clik.newPhoto({"id":7545624,"src":"811-CoolingOff_thumb.jpg","galleries_id":115865,"server_id":19,"link":"photo_7545624.html","width":130,"caption":"Cooling Off","height":130});
															thumbnails[7545626] = clik.newPhoto({"id":7545626,"src":"OneDay_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_7545626.html","width":130,"caption":"One Day ...","height":130});
															thumbnails[7545628] = clik.newPhoto({"id":7545628,"src":"WaitingGame_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_7545628.html","width":130,"caption":"Waiting Game","height":130});
															thumbnails[7545630] = clik.newPhoto({"id":7545630,"src":"WalkTheWalk_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_7545630.html","width":130,"caption":"Walk the Walk","height":130});
															thumbnails[7545632] = clik.newPhoto({"id":7545632,"src":"850_thumb.jpg","galleries_id":115865,"server_id":15,"link":"photo_7545632.html","width":130,"caption":"The Cast","height":130});
															thumbnails[7545642] = clik.newPhoto({"id":7545642,"src":"860_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_7545642.html","width":130,"caption":"Zizkov Tower","height":130});
															thumbnails[5825008] = clik.newPhoto({"id":5825008,"src":"_DSC4970-1_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_5825008.html","width":130,"caption":"Harmony","height":130});
															thumbnails[7545645] = clik.newPhoto({"id":7545645,"src":"_DSC3103-1_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_7545645.html","width":130,"caption":"Mountain Blue","height":130});
															thumbnails[7545647] = clik.newPhoto({"id":7545647,"src":"_DSC1385-1a_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_7545647.html","width":130,"caption":"Arches","height":130});
															thumbnails[7545651] = clik.newPhoto({"id":7545651,"src":"901-Steps_thumb.jpg","galleries_id":115866,"server_id":19,"link":"photo_7545651.html","width":130,"caption":"The Steps","height":130});
															thumbnails[7545652] = clik.newPhoto({"id":7545652,"src":"911-Parasol_thumb.jpg","galleries_id":115866,"server_id":19,"link":"photo_7545652.html","width":130,"caption":"Parasol","height":130});
															thumbnails[7545656] = clik.newPhoto({"id":7545656,"src":"_DSC1533-2b_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_7545656.html","width":130,"caption":"Window","height":130});
															thumbnails[7545658] = clik.newPhoto({"id":7545658,"src":"_DSC1662-1a_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_7545658.html","width":130,"caption":"Spire","height":130});
															thumbnails[7545661] = clik.newPhoto({"id":7545661,"src":"_DSC5236-1_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_7545661.html","width":130,"caption":"I was There","height":130});
															thumbnails[5825042] = clik.newPhoto({"id":5825042,"src":"_DSC1663-1b_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_5825042.html","width":130,"caption":"Through the Door","height":130});
															thumbnails[7545663] = clik.newPhoto({"id":7545663,"src":"_DSC2953-1b_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_7545663.html","width":130,"caption":"Summer Breeze","height":130});
															thumbnails[7545667] = clik.newPhoto({"id":7545667,"src":"_DSC2979-1_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_7545667.html","width":130,"caption":"Azure","height":130});
															thumbnails[7545671] = clik.newPhoto({"id":7545671,"src":"981-GoldenSunset_thumb.jpg","galleries_id":115866,"server_id":19,"link":"photo_7545671.html","width":130,"caption":"Golden Sunset","height":130});
															thumbnails[5079556] = clik.newPhoto({"id":5079556,"src":"990_thumb.jpg","galleries_id":115866,"server_id":15,"link":"photo_5079556.html","width":130,"caption":"Inner City Rain Forest","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[223883] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Abstract","link":"gallery_223883.html","maxRecords":0.0,"photoIDs":[5825070.0,5079523.0,5824983.0,5079554.0,5079561.0,5825112.0,5079560.0,4567987.0,2413250.0,2578542.0,1727078.0,4568047.0,1726951.0,7542554.0],"skipIndex":0,"section_code":"gallery","featured_images":"5825070,5824983,5079560,5079523,4568047,4567987,2578542,1727078","id":223883,"singleSection":false});				  						galleries[223880] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Architecture","link":"gallery_223880.html","maxRecords":0.0,"photoIDs":[5824944.0,5825045.0,3673738.0,3673736.0,1727054.0,5079532.0,1724335.0,7547009.0,7548928.0,7547019.0,7548926.0,7547013.0],"skipIndex":0,"section_code":"gallery","featured_images":"7547019,7547013,5824944,3673736,1724335","id":223880,"singleSection":false});				  						galleries[115545] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Digital Art","link":"gallery_115545.html","maxRecords":0.0,"photoIDs":[5825080.0,5079495.0,7551749.0,2413246.0,5079527.0,1723984.0,3673742.0,3665075.0,3665072.0,3665074.0,1723809.0,1723978.0,4568050.0],"skipIndex":0,"section_code":"gallery","featured_images":"5825080,5079527,3673742,1723984","id":115545,"singleSection":false});				  						galleries[115862] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Land, Sea & Sky","link":"gallery_115862.html","maxRecords":0.0,"photoIDs":[3673745.0,1726942.0,3665064.0,7545501.0,7545502.0,7545505.0,7545508.0,7545510.0,7545513.0,5825063.0,4567994.0],"skipIndex":0,"section_code":"gallery","featured_images":"7545505,7545501,5825063","id":115862,"singleSection":false});				  						galleries[115863] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Manipulated","link":"gallery_115863.html","maxRecords":0.0,"photoIDs":[7545530.0,7545533.0,7545537.0,7545542.0,7545545.0,7545554.0,7545558.0,7545562.0,7545565.0,7545569.0,7545572.0,7545575.0],"skipIndex":0,"section_code":"gallery","featured_images":7545575.0,"id":115863,"singleSection":false});				  						galleries[115864] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nature","link":"gallery_115864.html","maxRecords":0.0,"photoIDs":[7545592.0,7545594.0,7545595.0,7545596.0,7545598.0,7545600.0,7545602.0,7545604.0,7545606.0,7545607.0,7545609.0,5824964.0],"skipIndex":0,"section_code":"gallery","featured_images":5824964.0,"id":115864,"singleSection":false});				  						galleries[115865] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_115865.html","maxRecords":0.0,"photoIDs":[7545612.0,5825002.0,7545615.0,7545617.0,7545619.0,5825057.0,7545621.0,7545624.0,7545626.0,7545628.0,7545630.0,7545632.0],"skipIndex":0,"section_code":"gallery","featured_images":5825057.0,"id":115865,"singleSection":false});				  						galleries[115866] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel","link":"gallery_115866.html","maxRecords":0.0,"photoIDs":[7545642.0,5825008.0,7545645.0,7545647.0,7545651.0,7545652.0,7545656.0,7545658.0,7545661.0,5825042.0,7545663.0,7545667.0,7545671.0,5079556.0],"skipIndex":0,"section_code":"gallery","featured_images":"7545645,7545642,5825008","id":115866,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7547019,7547013,7545575,7545505,7545501,5825080,5825070,5825063,5825042,5825002,5824983,5824964,5824944,5079560,5079527,5079523,5079495,4567987,3673742,3673736,3665072,2578542,2413250,1724335,1723984';
imageSets[2] = '7547019,7547013,7545645,7545642,7545575,7545505,7545501,5825080,5825070,5825063,5825057,5825008,5824983,5824964,5824944,5079560,5079527,5079523,4568047,4567987,3673742,3673736,2578542,1727078,1724335,1723984';
imageSets[3] = '7551749,7548928,7548926,7547019,7547013,7547009,7545671,7545667,7545663,7545661,7545658,7545656,7545652,7545651,7545647,7545645,7545642,7545632,7545630,7545628,7545626,7545624,7545621,7545619,7545617,7545615,7545612,7545609,7545607,7545606,7545604,7545602,7545600,7545598,7545596,7545595,7545594,7545592,7545575,7545572,7545569,7545565,7545562,7545558,7545554,7545545,7545542,7545537,7545533,7545530';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/keithwatt/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/keithwatt/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Keith Watt 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> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		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" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="wattever@ntlworld.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="wattever@ntlworld.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id),					title: galleries[gallery_id].title				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

