function thumbnail(g,e,b,f,d,a,c){this.id=g;this.galleries_id=e;this.caption=b;this.src=getServerPath(c)+"/"+f;this.width=d;this.height=a}function gallery(e,c,d,b,a){this.id=e;this.featured_images=c;this.title=d;this.section_code=b;this.photoIDs=a}var thumbnails=new Object();thumbnails[4360953]=new thumbnail(4360953,"","","Cover_thumb.jpg",130,98,18);thumbnails[1655935]=new thumbnail(1655935,"","The Rope","Lyme1_thumb.jpg",130,87,18);thumbnails[1765266]=new thumbnail(1765266,"","Out to Sea","Sea1_filteredr2_thumb.jpg",130,87,18);thumbnails[1765282]=new thumbnail(1765282,"","High on a Hill","Three_filtered_thumb.jpg",130,87,18);thumbnails[4367446]=new thumbnail(4367446,"95404","Reflecting","1_filtered_thumb.jpg",130,195,18);thumbnails[2753241]=new thumbnail(2753241,"95404","The Boathouse","SB-01_thumb.jpg",130,87,18);thumbnails[2250587]=new thumbnail(2250587,"95404","Out to Sea","Five_filtered8_thumb.jpg",130,195,18);thumbnails[2224536]=new thumbnail(2224536,"95404","Yellow","Four_filtered4_thumb.jpg",130,195,18);thumbnails[2195061]=new thumbnail(2195061,"95404","The Head","CustomName006_filteredwEB_thumb.jpg",130,87,18);thumbnails[2195085]=new thumbnail(2195085,"95404","Blue and White","CustomName011_filteredWeb_thumb.jpg",130,195,18);thumbnails[4367471]=new thumbnail(4367471,"95404","Boulders","D10_thumb.jpg",130,87,18);thumbnails[4367481]=new thumbnail(4367481,"95404","Red","HH2_thumb.jpg",130,195,18);thumbnails[4367488]=new thumbnail(4367488,"95404","Blue Skies","IMG_4475_thumb.jpg",130,87,18);thumbnails[4367498]=new thumbnail(4367498,"95404","Autumn Breeze","N01_thumb.jpg",130,87,18);thumbnails[4367619]=new thumbnail(4367619,"256363","Misty Morning","DB01_thumb.jpg",130,87,18);thumbnails[4367624]=new thumbnail(4367624,"256363","Still","DB02_thumb.jpg",130,195,18);thumbnails[4367632]=new thumbnail(4367632,"256363","Red","DB10_thumb.jpg",130,87,18);thumbnails[4367675]=new thumbnail(4367675,"256363","Out to Sea","HP33_thumb.jpg",130,87,18);thumbnails[4367643]=new thumbnail(4367643,"256363","Open Skies","HP19_thumb.jpg",130,195,18);thumbnails[4367652]=new thumbnail(4367652,"256363","Rusty","HP22_thumb.jpg",130,195,18);thumbnails[4367647]=new thumbnail(4367647,"256363","Rock Life","HP20__thumb.jpg",130,87,18);thumbnails[4367637]=new thumbnail(4367637,"256363","Pink","HP16_thumb.jpg",130,195,18);thumbnails[4367664]=new thumbnail(4367664,"256363","Golden Light","HP23_thumb.jpg",130,195,18);thumbnails[4367669]=new thumbnail(4367669,"256363","Creeper","HP27_thumb.jpg",130,87,18);thumbnails[4367678]=new thumbnail(4367678,"256363","Blue","HP36_thumb.jpg",130,195,18);thumbnails[4367680]=new thumbnail(4367680,"256363","Pebble Wash","HP50_thumb.jpg",130,195,18);thumbnails[4367729]=new thumbnail(4367729,"256363","Last Light","L02_thumb.jpg",130,87,18);thumbnails[4367737]=new thumbnail(4367737,"256363","Evening Tide","LL-P15_thumb.jpg",130,87,18);thumbnails[4367741]=new thumbnail(4367741,"256363","Out to Sea","LL-P16_thumb.jpg",130,195,18);thumbnails[4367755]=new thumbnail(4367755,"256363","Night Light","LL-P19_thumb.jpg",130,195,18);thumbnails[4367760]=new thumbnail(4367760,"256363","Four","LL-P25_thumb.jpg",130,87,18);thumbnails[4367763]=new thumbnail(4367763,"256363","Posted","LL-P26-RS_thumb.jpg",130,87,18);thumbnails[4367769]=new thumbnail(4367769,"256363","Standing Proud","LL-S05_thumb.jpg",130,87,18);thumbnails[4367773]=new thumbnail(4367773,"256363","Breaking Light","LL-S16_thumb.jpg",130,87,18);thumbnails[4367776]=new thumbnail(4367776,"256363","Two","M08_thumb.jpg",130,195,18);thumbnails[4367778]=new thumbnail(4367778,"256363","Shadow Land","M11_thumb.jpg",130,87,18);thumbnails[4367781]=new thumbnail(4367781,"256363","Hedging","OCM10_thumb.jpg",130,87,18);thumbnails[4367784]=new thumbnail(4367784,"256363","Bridging the Gap","PB03_thumb.jpg",130,87,18);thumbnails[4367789]=new thumbnail(4367789,"256363","Hillside","PB04_thumb.jpg",130,195,18);thumbnails[4367792]=new thumbnail(4367792,"256363","In the Pink","PB12_thumb.jpg",130,87,18);thumbnails[4367932]=new thumbnail(4367932,"256363","Stop.....Just Wait.....Mr Postman","TS04_thumb.jpg",130,195,18);thumbnails[4367936]=new thumbnail(4367936,"256363","Flowing","TS21_thumb.jpg",130,87,18);thumbnails[4367942]=new thumbnail(4367942,"256363","Ebb and Flow","TS24_thumb.jpg",130,195,18);thumbnails[4367962]=new thumbnail(4367962,"256363","Buttercup","TS25_thumb.jpg",130,195,18);thumbnails[4367970]=new thumbnail(4367970,"256363","Last Light","VOR03_thumb.jpg",130,195,18);thumbnails[4367975]=new thumbnail(4367975,"256363","Last Light","VOR07_thumb.jpg",130,87,18);thumbnails[4367979]=new thumbnail(4367979,"256363","Wild Waters","W03_thumb.jpg",130,87,18);thumbnails[4367985]=new thumbnail(4367985,"256363","Hidden","W24_thumb.jpg",130,195,18);thumbnails[4368022]=new thumbnail(4368022,"256363","Distant Light","W271_thumb.jpg",130,195,18);thumbnails[1342456]=new thumbnail(1342456,"94323","Shoreline","Hengistbury Head1_thumb.jpg",130,195,18);thumbnails[1655668]=new thumbnail(1655668,"94323","Evening Tide","Kim1_thumb.jpg",130,195,18);thumbnails[1342465]=new thumbnail(1342465,"94323","Puddles","e (2)_thumb.jpg",130,87,18);thumbnails[1342467]=new thumbnail(1342467,"94323","The Jetty","Jetty_thumb.jpg",130,195,18);thumbnails[1342512]=new thumbnail(1342512,"94323","Clutter","ClutterA_thumb.jpg",130,87,18);thumbnails[1655923]=new thumbnail(1655923,"94323","Stormy Weather","Two_filtered_thumb.jpg",130,87,18);thumbnails[1342520]=new thumbnail(1342520,"94323","Low Tide","A_thumb.jpg",130,195,18);thumbnails[1655021]=new thumbnail(1655021,"94323","The Arch","J6_thumb.jpg",130,87,18);thumbnails[1802644]=new thumbnail(1802644,"94323","Early Dawn","Early Dawn_thumb.jpg",130,87,18);thumbnails[1843544]=new thumbnail(1843544,"94323","Twisted","Twisted_thumb.jpg",130,195,18);thumbnails[2058525]=new thumbnail(2058525,"94323","Seaside","Three_filtered Large_thumb.jpg",130,87,18);thumbnails[1342531]=new thumbnail(1342531,"94323","Passing By","Sandbanks1_thumb.jpg",130,195,18);thumbnails[1655029]=new thumbnail(1655029,"94323","Out to Sea","J9_thumb.jpg",130,195,18);thumbnails[1802648]=new thumbnail(1802648,"94323","Surf","Four_filtered_thumb.jpg",130,195,18);thumbnails[1655811]=new thumbnail(1655811,"94323","The Post","1a_thumb.jpg",130,195,18);thumbnails[1342544]=new thumbnail(1342544,"94325","In Bloom","Hengistbury Head2_thumb.jpg",130,195,18);thumbnails[1342547]=new thumbnail(1342547,"94325","Frozen","Frozen_thumb.jpg",130,87,18);thumbnails[1655893]=new thumbnail(1655893,"94325","Through the Mist","Corfe1_filteredLarge_thumb.jpg",130,87,18);thumbnails[1342550]=new thumbnail(1342550,"94325","The Hay Bale","Hay Bale_thumb.jpg",130,195,18);thumbnails[1654973]=new thumbnail(1654973,"94325","Night Sky","J8_thumb.jpg",130,87,18);thumbnails[1342553]=new thumbnail(1342553,"94325","Morning Light","d_thumb.jpg",130,87,18);thumbnails[1342554]=new thumbnail(1342554,"94325","Out of the Mist","Corfe_filteredL_thumb.jpg",130,195,18);thumbnails[1342555]=new thumbnail(1342555,"94325","The Hoist","IMG_3631_filtered_thumb.jpg",130,87,18);thumbnails[1613580]=new thumbnail(1613580,"94325","The Wreck","Fourteen_filtered_thumb.jpg",130,87,18);thumbnails[1342719]=new thumbnail(1342719,"94325","The Rocks","Large_thumb.jpg",130,195,18);thumbnails[1342721]=new thumbnail(1342721,"94325","Two","Two Trees_thumb.jpg",130,87,18);thumbnails[1655028]=new thumbnail(1655028,"94325","High on a Hill","J3_thumb.jpg",130,87,18);thumbnails[1342729]=new thumbnail(1342729,"94325","Boardwalk","The Pier1_thumb.jpg",130,195,18);thumbnails[1342738]=new thumbnail(1342738,"94325","The Path","M2_filtered_thumb.jpg",130,87,18);thumbnails[4368079]=new thumbnail(4368079,"94325","Abandoned","Do5_thumb.jpg",130,195,18);thumbnails[2753237]=new thumbnail(2753237,"94326","Bonnie","SB-02_filtered_thumb.jpg",130,87,18);thumbnails[2224542]=new thumbnail(2224542,"94326","Sailboat","Two_filtered6_thumb.jpg",130,87,18);thumbnails[1342749]=new thumbnail(1342749,"94326","At Rest","Sandbanks2_thumb.jpg",130,87,18);thumbnails[1342755]=new thumbnail(1342755,"94326","Waiting to Sail","Waiting to Sail_thumb.jpg",130,87,18);thumbnails[2753239]=new thumbnail(2753239,"94326","Blue","SB-04_thumb.jpg",130,195,18);thumbnails[1342762]=new thumbnail(1342762,"94326","Evening Sail","B_thumb.jpg",130,195,18);thumbnails[1342772]=new thumbnail(1342772,"94326","Tied Up","e_thumb.jpg",130,87,18);thumbnails[2195089]=new thumbnail(2195089,"94326","The Lighthouse","CustomName026_filteredWEB_thumb.jpg",130,87,18);thumbnails[1342798]=new thumbnail(1342798,"94326","Four","FourA_thumb.jpg",130,87,18);thumbnails[1342831]=new thumbnail(1342831,"94326","Darkening Skies","Printing_thumb.jpg",130,87,18);thumbnails[1613586]=new thumbnail(1613586,"94326","The Old and the New","PICT0048_filteredL_thumb.jpg",130,87,18);thumbnails[1342833]=new thumbnail(1342833,"94326","The Buoy","Sand_filtered_thumb.jpg",130,87,18);thumbnails[1342834]=new thumbnail(1342834,"94326","Waiting to Sail","T5_filtered_thumb.jpg",130,87,18);thumbnails[1342836]=new thumbnail(1342836,"94326","Sea Wader","Nineteen_filteredRW_thumb.jpg",130,87,18);thumbnails[1400927]=new thumbnail(1400927,"94326","Red","Red_thumb.jpg",130,195,18);thumbnails[2738906]=new thumbnail(2738906,"172171","The Heathers","YM-02_thumb.jpg",130,195,18);thumbnails[2738911]=new thumbnail(2738911,"172171","Isolated","YM-06_filtered_thumb.jpg",130,195,18);thumbnails[2738915]=new thumbnail(2738915,"172171","Boulders","YM12_thumb.jpg",130,130,18);thumbnails[2738918]=new thumbnail(2738918,"172171","Rain Clouds","YM-11_thumb.jpg",130,195,18);thumbnails[2738921]=new thumbnail(2738921,"172171","Darkening Skies","YM-05_filtered_thumb.jpg",130,195,18);thumbnails[2738923]=new thumbnail(2738923,"172171","Tree Trunks","YM-04_thumb.jpg",130,195,18);thumbnails[2738924]=new thumbnail(2738924,"172171","Hills and Dales","YM-10_thumb.jpg",130,87,18);thumbnails[2738925]=new thumbnail(2738925,"172171","Touched by the Light","YM-07_thumb.jpg",130,195,18);thumbnails[2738926]=new thumbnail(2738926,"172171","Colouring Up","YM-03_thumb.jpg",130,87,18);thumbnails[2738928]=new thumbnail(2738928,"172171","The Grasses","YM-01_thumb.jpg",130,195,18);thumbnails[1343244]=new thumbnail(1343244,"94328","Double Act","Double Act_thumb.jpg",130,195,18);thumbnails[1343245]=new thumbnail(1343245,"94328","Inside Out","Lily_thumb.jpg",130,87,18);thumbnails[1343266]=new thumbnail(1343266,"94328","Buttercups","W3_filtereda_thumb.jpg",130,195,18);thumbnails[1343269]=new thumbnail(1343269,"94328","Purple","Sun2_filtered_thumb.jpg",130,87,18);thumbnails[1343272]=new thumbnail(1343272,"94328","In the Pink","Flower_filtered_thumb.jpg",130,195,18);thumbnails[1343276]=new thumbnail(1343276,"94328","Waterfall","Ten_filtered1_thumb.jpg",130,195,18);thumbnails[1343279]=new thumbnail(1343279,"94328","Unopen","Y1_filtered_thumb.jpg",130,87,18);thumbnails[1343280]=new thumbnail(1343280,"94328","Bluebell Wood","IMG_3844_thumb.jpg",130,195,18);thumbnails[1343283]=new thumbnail(1343283,"94328","Yellow","Y3_filtered_thumb.jpg",130,89,18);thumbnails[1343285]=new thumbnail(1343285,"94328","Tree Time","Arne 035_filteredL1_thumb.jpg",130,195,18);thumbnails[2058506]=new thumbnail(2058506,"94327","Darkening Skies","LC1_thumb.jpg",130,195,18);thumbnails[1342938]=new thumbnail(1342938,"94327","Riverside","Forest2_filtered_thumb.jpg",130,87,18);thumbnails[4366478]=new thumbnail(4366478,"94327","Balance","BALANCE1_thumb.jpg",130,195,18);thumbnails[1343024]=new thumbnail(1343024,"94327","The Rope","Lyme_thumb.jpg",130,87,18);thumbnails[1343025]=new thumbnail(1343025,"94327","Pebbles","Kimmeridge 1_thumb.jpg",130,195,18);thumbnails[1343075]=new thumbnail(1343075,"94327","Single","two_thumb.jpg",130,87,18);thumbnails[1343150]=new thumbnail(1343150,"94327","Cropped","Hay_thumb.jpg",130,87,18);thumbnails[1343216]=new thumbnail(1343216,"94327","Rythym","RYTHYM_thumb.jpg",130,87,18);thumbnails[1343237]=new thumbnail(1343237,"94327","Fishing Huts","Huts_thumb.jpg",130,87,18);thumbnails[1343240]=new thumbnail(1343240,"94327","Out to Sea","Sea1_filteredr_thumb.jpg",130,87,18);thumbnails[1765297]=new thumbnail(1765297,"94327","The Beach Huts","THURS1_thumb.jpg",130,87,18);thumbnails[4366534]=new thumbnail(4366534,"94327","Washing","P3_thumb.jpg",130,87,18);thumbnails[4366490]=new thumbnail(4366490,"94327","Isolated","D16_thumb.jpg",130,130,18);thumbnails[4366548]=new thumbnail(4366548,"94327","Fading Light","IMG_4484a_filtered_thumb.jpg",130,195,18);thumbnails[4366557]=new thumbnail(4366557,"94327","Waves","TS10_thumb.jpg",130,87,18);thumbnails[3995055]=new thumbnail(3995055,"241613","On the Prowl","11w_thumb.jpg",130,195,18);thumbnails[3995066]=new thumbnail(3995066,"241613","Double Act","5W_thumb.jpg",130,87,18);thumbnails[3995078]=new thumbnail(3995078,"241613","The Watchman","1W_thumb.jpg",130,130,18);thumbnails[3995080]=new thumbnail(3995080,"241613","Head in the Sand......","9w_thumb.jpg",130,87,18);thumbnails[3995082]=new thumbnail(3995082,"241613","Head in the Clouds","3W_thumb.jpg",130,195,18);thumbnails[3995084]=new thumbnail(3995084,"241613","Too Tired","7w_thumb.jpg",130,87,18);thumbnails[3995086]=new thumbnail(3995086,"241613","Resting Ledges","10AW_thumb.jpg",130,87,18);thumbnails[3995088]=new thumbnail(3995088,"241613","Silent Witness","15w_thumb.jpg",130,87,18);thumbnails[3995096]=new thumbnail(3995096,"241613","Cool Waters","12w_thumb.jpg",130,87,18);thumbnails[3995104]=new thumbnail(3995104,"241613","Gum Tree","6w_thumb.jpg",130,87,18);thumbnails[1654575]=new thumbnail(1654575,"111789","In Bloom","Hengistbury Head_thumb.jpg",130,195,18);thumbnails[1654577]=new thumbnail(1654577,"111789","Fishing Huts","Huts1_thumb.jpg",130,87,18);thumbnails[1654578]=new thumbnail(1654578,"111789","The Rocks","Kimmeridge_thumb.jpg",130,87,18);thumbnails[1654583]=new thumbnail(1654583,"111789","Out to Sea","Sea1_filteredr1_thumb.jpg",130,87,18);thumbnails[1654585]=new thumbnail(1654585,"111789","Boardwalk","The Pier_thumb.jpg",130,195,18);thumbnails[1654586]=new thumbnail(1654586,"111789","Passing By","Sandbanks11_thumb.jpg",130,195,18);thumbnails[1654603]=new thumbnail(1654603,"111789","Last Light","Sandbanks_thumb.jpg",130,87,18);thumbnails[1654608]=new thumbnail(1654608,"111789","Winter Blues","Winter-Blues_filteredB_thumb.jpg",130,195,18);thumbnails[1654617]=new thumbnail(1654617,"111789","Storm Clouds","Quay2_thumb.jpg",130,87,18);thumbnails[1654622]=new thumbnail(1654622,"111789","Shoreline","Hengistbury Head1a_thumb.jpg",130,195,18);var galleries=new Object();galleries[95404]=new gallery(95404,"2753241,2195061","Recent Additions","gallery",[4367446,2753241,2250587,2224536,2195061,2195085,4367471,4367481,4367488,4367498]);galleries[256363]=new gallery(256363,"4368022,4367985,4367979,4367975,4367970,4367962,4367942,4367936,4367932,4367792","Light and Land ","gallery",[4367619,4367624,4367632,4367675,4367643,4367652,4367647,4367637,4367664,4367669,4367678,4367680,4367729,4367737,4367741,4367755,4367760,4367763,4367769,4367773,4367776,4367778,4367781,4367784,4367789,4367792,4367932,4367936,4367942,4367962,4367970,4367975,4367979,4367985,4368022]);galleries[94323]=new gallery(94323,"2058525,1802644,1655021,1342512,1342465","Seascapes","gallery",[1342456,1655668,1342465,1342467,1342512,1655923,1342520,1655021,1802644,1843544,2058525,1342531,1655029,1802648,1655811]);galleries[94325]=new gallery(94325,"1655893,1655028,1654973,1342738,1342555,1342553,1342547","Landscapes","gallery",[1342544,1342547,1655893,1342550,1654973,1342553,1342554,1342555,1613580,1342719,1342721,1655028,1342729,1342738,4368079]);galleries[94326]=new gallery(94326,"2753237,2224542,2195089,1613586,1342836,1342834,1342833,1342831,1342798,1342772,1342755,1342749","Waterfront Travel","gallery",[2753237,2224542,1342749,1342755,2753239,1342762,1342772,2195089,1342798,1342831,1613586,1342833,1342834,1342836,1400927]);galleries[172171]=new gallery(172171,"2738926,2738924","Yorkshire Workshop","gallery",[2738906,2738911,2738915,2738918,2738921,2738923,2738924,2738925,2738926,2738928]);galleries[94328]=new gallery(94328,"1343283,1343279,1343269,1343245","Nature","gallery",[1343244,1343245,1343266,1343269,1343272,1343276,1343279,1343280,1343283,1343285]);galleries[94327]=new gallery(94327,"1765297,1343240,1343237,1343216,1343150,1343075,1343024,1342938","Black and White","gallery",[2058506,1342938,4366478,1343024,1343025,1343075,1343150,1343216,1343237,1343240,1765297,4366534,4366490,4366548,4366557]);galleries[241613]=new gallery(241613,"3995104,3995096,3995088,3995086,3995084,3995080,3995066","Wildlife","gallery",[3995055,3995066,3995078,3995080,3995082,3995084,3995086,3995088,3995096,3995104]);galleries[111789]=new gallery(111789,"1654617,1654603,1654583,1654578,1654577","LRPS","gallery",[1654575,1654577,1654578,1654583,1654585,1654586,1654603,1654608,1654617,1654622]);var imageSets=new Object();imageSets[1]="4360953";imageSets[2]="3995104,3995096,3995088,3995086,3995084,3995080,3995066,2753241,2753237,2738926,2738924,2224542,2195089,2195061,2058525,1802644,1765297,1765282,1765266,1655935,1655893,1655028,1655021,1654973,1654617,1654603,1654583,1654578,1654577,1613586,1343283,1343279,1343269,1343245,1343240,1343237,1343216,1343150,1343075,1343024,1342938,1342836,1342834,1342833,1342831,1342798,1342772,1342755,1342749,1342738,1342555,1342553,1342547,1342512,1342465";imageSets[3]="4368079,4368022,4367985,4367979,4367975,4367970,4367962,4367942,4367936,4367932,4367792,4367789,4367784,4367781,4367778,4367776,4367773,4367769,4367763,4367760,4367755,4367741,4367737,4367729,4367680,4367678,4367675,4367669,4367664,4367652,4367647,4367643,4367637,4367632,4367624,4367619,4367498,4367488,4367481,4367471,4367446,4366557,4366548,4366534,4366490,4366478,4360953,3995104,3995096,3995088";function randomListVal(a){arrayVals=a.split(",");if(arrayVals.length){pos=Math.round(Math.random()*(arrayVals.length-1));val=arrayVals[pos]}else{val=0}return val}function getServerPath(a){var b=-1;switch(a){case 34:b="http://www9.clikpic.com/debbielegg/images";break}switch(a){case 1:b="http://www1.clikpic.com/debbielegg/images";break}switch(a){case 2:b="http://admin.clikpic.com/debbielegg/images";break}switch(a){case 4:b="http://www.clikchurch.com/debbielegg/images";break}switch(a){case 5:b="http://www2.clikpic.com/debbielegg/images";break}switch(a){case 15:b="http://www3.clikpic.com/debbielegg/images";break}switch(a){case 21:b="http://www6.clikpic.com/debbielegg/images";break}switch(a){case 18:b="http://www4.clikpic.com/debbielegg/images";break}switch(a){case 19:b="http://www5.clikpic.com/debbielegg/images";break}switch(a){case 22:b="http://tpc5/clikpic/debbielegg/images";break}switch(a){case 23:b="http://tpc10/clikpic/debbielegg/images";break}switch(a){case 24:b="http://tpc15/clikpic/debbielegg/images";break}switch(a){case 25:b="http://tpc16/clikpic/debbielegg/images";break}switch(a){case 31:b="http://www7.clikpic.com/debbielegg/images";break}switch(a){case 32:b="http://admin2.clikpic.com/debbielegg/images";break}switch(a){case 33:b="http://www8.clikpic.com/debbielegg/images";break}return b}function showHomeImage(a){imageID=randomListVal("");if(!basic){a.src=photos[imageID].src;a.width=photos[imageID].width;a.height=photos[imageID].height}else{newImage=new Image(photos[imageID].width,photos[imageID].height);newImage.src=photos[imageID].src;document.images[a.name]=newImage}}function showHomeImageInline(){html="";imageID=randomListVal(imageSets[1]);if("gallery"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="gallery.html">'}}html+='<img src="'+backgrounds[imageID].src+'" width="'+backgrounds[imageID].width+'" height="'+backgrounds[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+backgrounds[imageID].caption+'" border="0">';if("gallery"!=""){html+="</a>"}$("#homepageimage").html(html)}function getNextId(b,d,a){var c=getArrayPos(d,b);if(a){if(c==0){nextImgPos=d.length-1}else{nextImgPos=c-1}}else{if(c==d.length-1){nextImgPos=0}else{nextImgPos=c+1}}nextImg=d[nextImgPos];return nextImg}function next(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a);if(nextImg!=-1){updateImage(nextImg,d,b)}}function updateImage(f,e,b){if(!basic){document.getElementById("imagePhoto").innerHTML='<img class="mainphoto photo" src="'+photos[f].src+' " id="mainPic" name="mainPic" width="'+photos[f].width+'" height="'+photos[f].height+'" alt="'+photos[f].caption+'">';e.value=photos[f].id;$("#imageTitle").html(photos[f].caption);document.title="WATERFRONT PHOTOGRAPHY: "+photos[f].caption;if(photos[f].caption==""){document.getElementById("imageTitle").style.display="none"}else{document.getElementById("imageTitle").style.display="block"}var a=fnGetImageDetails(f);if(a==""){document.getElementById("imageDetails").style.display="none";var c=document.getElementById("infoWrap");var d=document.getElementById("photoInfo");if(photos[f].caption==""){if(c!=null){c.className="empty"}if(d!=null){d.className="empty"}}else{if(c!=null){c.className="noinfo"}if(d!=null){d.className="noinfo"}}}else{document.getElementById("imageDetails").style.display="block";var c=document.getElementById("infoWrap");if(c!=null){c.className="normal"}var d=document.getElementById("photoInfo");if(d!=null){d.className="normal"}}document.getElementById("imageDetails").innerHTML=a;toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#paymentConfirm").hide();$("#paymentAddButton").unbind().click(function(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+c.item_price+"</p>";var e=c.purchase_instruction;var d=c.item_price;var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="deborah.legg@sky.com">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="deborah.legg@sky.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};
