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[1484613]=new thumbnail(1484613,"147217","Yellowcraig Beach","yellowcraigs beach_small_thumb.jpg",130,65,18);thumbnails[1484624]=new thumbnail(1484624,"147217","Gosford Bay Sunset","edinburgh from gosford bay_thumb.JPG",130,65,18);thumbnails[1608938]=new thumbnail(1608938,"109534","Rod out at work in East Lothian","rod_thumb.jpeg",130,93,18);thumbnails[1609153]=new thumbnail(1609153,"109534","Rod windsurfing on a windy day in Scotland","249689330_cb674194dc_o_thumb.jpg",130,85,18);thumbnails[1875025]=new thumbnail(1875025,"","Surfer's Paradise- Gold Coast","Ross's Pictures 002_rod_small_thumb.jpg",130,65,18);thumbnails[1938843]=new thumbnail(1938843,"","Coldingham Bay - Contemplation","coldingham_bay comtemplation_small_thumb.jpg",130,65,18);thumbnails[1993932]=new thumbnail(1993932,"147217","Blue Sea","blue waves_small_thumb.jpg",130,65,18);thumbnails[2036891]=new thumbnail(2036891,"147217","Golden Seas","golden seas_thumb.jpg",130,65,18);thumbnails[2072837]=new thumbnail(2072837,"147217","Forth Rail Bridge","forth rail bridge night_thumb.jpg",130,65,18);thumbnails[2160284]=new thumbnail(2160284,"147217","Edinburgh Castle","edinburgh castle mist_thumb.jpg",130,65,18);thumbnails[2235121]=new thumbnail(2235121,"147217","Ailsa Craig","ailsa craig_thumb.JPG",130,65,18);thumbnails[2835295]=new thumbnail(2835295,"","Longniddry Kite Surfer","longniddry kite surfer_thumb.jpg",130,65,18);thumbnails[3555836]=new thumbnail(3555836,"217595","Belhaven Bay Bridge","IMG_0599_2_small_thumb.jpg",130,78,18);thumbnails[3555870]=new thumbnail(3555870,"217595","Tree of Life","Misty_tree_small_thumb.JPG",130,88,18);thumbnails[3672962]=new thumbnail(3672962,"217595","Tree of Life 2","IMG_0219_3_small_thumb.jpg",130,108,18);thumbnails[3673086]=new thumbnail(3673086,"217595","Forth Rail Bridge 1","IMG_0837_Enhancer_small_thumb.JPG",130,195,18);thumbnails[3673097]=new thumbnail(3673097,"217595","North Berwick West Bay 1","IMG_1405_Enhancer_small_thumb.jpg",130,70,18);thumbnails[3673110]=new thumbnail(3673110,"217595","Boat on the Forth","IMG_1432-1_small_thumb.jpg",130,195,18);thumbnails[4434198]=new thumbnail(4434198,"217595","Abelady Bay","aberlady_bay_thumb.jpg",130,92,18);thumbnails[4473791]=new thumbnail(4473791,"217595","Bass Rock from Seacliff","IMG_1888_Enhancer_small_thumb.jpg",130,75,18);thumbnails[4473815]=new thumbnail(4473815,"217595","Bass Rock Storm","IMG_3364_small_thumb.jpg",130,79,18);thumbnails[4473833]=new thumbnail(4473833,"217595","Tantallon Sunswirl","IMG_3982_small_thumb.jpg",130,82,18);thumbnails[4473846]=new thumbnail(4473846,"217595","Milsey Bay Backwash","IMG_3448_small_thumb.jpg",130,182,18);thumbnails[4473867]=new thumbnail(4473867,"217595","Seacliff Backwash","IMG_3479_small_thumb.jpg",130,191,18);thumbnails[4473891]=new thumbnail(4473891,"217595","Pettico Wick","IMG_4160_small_thumb.jpg",130,190,18);thumbnails[4473903]=new thumbnail(4473903,"217595","West Bay- North Berwick","IMG_4279_small_thumb.jpg",130,77,18);thumbnails[4473915]=new thumbnail(4473915,"217595","The Old Pier- North Berwick","IMG_4235for_print_small_thumb.jpg",130,130,18);thumbnails[4497317]=new thumbnail(4497317,"217595","Turnberry Sunset 1","IMG_2046_small_thumb.JPG",130,130,18);thumbnails[4497326]=new thumbnail(4497326,"217595","Turnberry Lighthouse 2","IMG_2045And2more_small_thumb.JPG",130,141,18);thumbnails[4852579]=new thumbnail(4852579,"217595","North Berwick Bay","IMG_5783_small_thumb.jpg",130,83,18);thumbnails[4852582]=new thumbnail(4852582,"217595","East Lothian Field","IMG_5387_BW_small_thumb.jpg",130,79,18);thumbnails[4852618]=new thumbnail(4852618,"217595","Dunstanburgh Castle - Northumberland","IMG_5631_small_thumb.jpg",130,77,18);thumbnails[4852641]=new thumbnail(4852641,"217595","Preston Mill- Scotland","IMG_5251_small_thumb.jpg",130,195,18);thumbnails[4852657]=new thumbnail(4852657,"217595","Berwick Upon Tweed Lighthouse","IMG_5066_small_thumb.jpg",130,188,18);thumbnails[5019707]=new thumbnail(5019707,"217595","Seacliff Storm B&W","IMG_7291BW_small_thumb.jpg",130,85,18);thumbnails[5019730]=new thumbnail(5019730,"217595","Craigleith Sunset","IMG_3316_small_thumb.jpg",130,101,18);thumbnails[5231615]=new thumbnail(5231615,"217595","Pettico Wick","IMG_3377_small_thumb.jpg",130,78,18);thumbnails[1508318]=new thumbnail(1508318,"85559","Barns Ness Lighthouse","barns ness dawn_small_thumb.jpg",130,65,18);thumbnails[1484611]=new thumbnail(1484611,"85559","Berwick Law from Yellowcraig Beach","north berwick law from yellowcraigs Small_thumb.jpg",130,65,18);thumbnails[1756158]=new thumbnail(1756158,"85559","Elie Lighthouse","elie2_small_thumb.jpg",130,65,18);thumbnails[1938838]=new thumbnail(1938838,"85559","East Lothian Fields","eastlothian fields_small_thumb.jpg",130,65,18);thumbnails[1938840]=new thumbnail(1938840,"85559","Coldingham Surfer","coldingham final_small_thumb.jpg",130,65,18);thumbnails[1938850]=new thumbnail(1938850,"85559","Bass Rock Sunrise ","bass rock sunrise_small_thumb.jpg",130,65,18);thumbnails[1989839]=new thumbnail(1989839,"85559","Bass Rock from Seacliff","seacliff storm_small_thumb.jpg",130,65,18);thumbnails[2036871]=new thumbnail(2036871,"85559","Silver Sands 2, Aberdour","silver sands 3_thumb.jpg",130,65,18);thumbnails[2371840]=new thumbnail(2371840,"85559","Gullane Windsurfer","gullane windsurf v2_thumb.jpg",130,81,18);thumbnails[2566142]=new thumbnail(2566142,"85559","Calton Hill, Edinburgh","calton rod_thumb.jpg",130,70,18);thumbnails[2566143]=new thumbnail(2566143,"85559","Fidra Lighthouse from Yellowcraigs","fidra2_thumb.jpg",130,65,18);thumbnails[2566149]=new thumbnail(2566149,"85559","Newhaven Sunset, Edinburgh","newhaven sunset_thumb.jpg",130,65,18);thumbnails[2566201]=new thumbnail(2566201,"85559","West Bay, North Berwick","North Berwik West Bay_thumb.jpg",130,65,18);thumbnails[2649023]=new thumbnail(2649023,"85559","Bass Rock from Tantallon","bass rock from tantallon v2_thumb.jpg",130,73,18);thumbnails[2649031]=new thumbnail(2649031,"85559","One Man and his Dog","one man and his dog_thumb.jpg",130,52,18);thumbnails[2649032]=new thumbnail(2649032,"85559","Tantallon Castle","Tantallon_thumb.jpg",130,65,18);thumbnails[2864516]=new thumbnail(2864516,"85559","Bass Rock - Last Days of Summer","bass rock last day of summer_thumb.JPG",130,173,18);thumbnails[2864517]=new thumbnail(2864517,"85559","Bass Rock and Tantallon Castle","bass rock and tantallon 2_thumb.jpg",130,66,18);thumbnails[3136232]=new thumbnail(3136232,"85559","Spittal Lighthouse","spittal lighthouse_thumb.jpg",130,130,18);thumbnails[3136237]=new thumbnail(3136237,"85559","Aberdour Pier Fife","aberdour pier warped_thumb.jpg",130,69,18);thumbnails[3685898]=new thumbnail(3685898,"85559","The Lightness of Being","IMG_1375_Enhancer_bfa_small_thumb.jpg",130,92,18);thumbnails[4474072]=new thumbnail(4474072,"85559","Fidra Sunset","IMG_4570_bfa_small_thumb.jpg",130,65,18);thumbnails[4474103]=new thumbnail(4474103,"85559","West Bay Sunset -North Berwick","IMG_4279_bfa_small1_thumb.JPG",130,77,18);thumbnails[4474114]=new thumbnail(4474114,"85559","Seacliff Beach","IMG_1911BFA_small_thumb.JPG",130,69,18);thumbnails[1188049]=new thumbnail(1188049,"85559","Milsey Bay, North Berwick","North_Berwick-Milsey Bay_small_thumb.jpg",130,61,18);thumbnails[1187852]=new thumbnail(1187852,"85559","Berwick upon Tweed Lighthouse","berwick lighthouse_small_thumb.jpg",130,65,18);thumbnails[1204061]=new thumbnail(1204061,"85559","Sunset over Brownlands","sunset_over_brownlands_small_thumb.jpg",130,65,18);thumbnails[1187689]=new thumbnail(1187689,"85559","Arthur's Seat Summit in Winter","arthurs seat in winter_thumb.JPG",130,63,18);thumbnails[1204069]=new thumbnail(1204069,"85559","Traprain Law","traprian2_small_thumb.jpg",130,61,18);thumbnails[1266728]=new thumbnail(1266728,"85559","Belhaven Bay Waves, Dunbar<br>\r\n","belhaven_waves_thumb.jpg",130,65,18);thumbnails[1339208]=new thumbnail(1339208,"85559","Belhaven Bay - Bass Rock & Berwick Law","Belhaven Bay Berwick Law and Bass Rock small_thumb.jpg",130,65,18);thumbnails[1458559]=new thumbnail(1458559,"100735","Ganavan Sands Sunset Oban","ganavan bay oban_thumb.jpg",130,65,18);thumbnails[1458714]=new thumbnail(1458714,"100735","Calgary Bay Mull","calgary beach mull_thumb.jpg",130,65,18);thumbnails[1466505]=new thumbnail(1466505,"100735","Lismore Lighthouse Sound of Mull","lismore lighthouse sound of mull_thumb.jpg",130,73,18);thumbnails[1898332]=new thumbnail(1898332,"100735","The Cullins","Plockton rod 07 267 Edit_small_thumb.jpg",130,76,18);thumbnails[1963125]=new thumbnail(1963125,"100735","Cullins from Plockton","Cullins from Plockton_small_thumb.JPG",130,64,18);thumbnails[1989789]=new thumbnail(1989789,"100735","Beinn Dearg from Loch Glascarnoch","Beinn Dearg from Loch Glascarnoch_small_thumb.jpg",130,65,18);thumbnails[1989798]=new thumbnail(1989798,"100735","Rum, Eigg & Muck from Ardtoe","Rum, Eigg & Muck from Ardtoe_small_thumb.jpg",130,65,18);thumbnails[1989823]=new thumbnail(1989823,"100735","Mull from Iona","Mull from Iona_small_thumb.jpg",130,65,18);thumbnails[2160182]=new thumbnail(2160182,"100735","Skye Bridge","skye bridge_thumb.jpg",130,65,18);thumbnails[2371848]=new thumbnail(2371848,"100735","Brodick Bay, Isle of Arran","brodick bay_small_thumb.JPG",130,65,18);thumbnails[2371850]=new thumbnail(2371850,"100735","Goatfell, Isle of Arran","goatfell_small_thumb.jpg",130,65,18);thumbnails[2371851]=new thumbnail(2371851,"100735","Kildonan Beach, Isle of Arran","kildonan3_small_thumb.JPG",130,65,18);thumbnails[2835298]=new thumbnail(2835298,"100735","Kilantringan Lighthouse, Portpatrick","kill_thumb...jpg",130,65,18);thumbnails[2864510]=new thumbnail(2864510,"100735","Ailsa Craig From Arran","ailsa craig from arran_thumb.jpg",130,65,18);thumbnails[2963996]=new thumbnail(2963996,"100735","Oban Boat","oban boat_thumb.jpg",130,65,18);thumbnails[3136215]=new thumbnail(3136215,"100735","Kyle of Lochalsh","kyle of lochalsh2_thumb.jpg",130,65,18);thumbnails[3136219]=new thumbnail(3136219,"100735","Loch Lomond 2","loch lomond II_thumb.JPG",130,65,18);thumbnails[4497276]=new thumbnail(4497276,"100735","Turnberry Lighthouse Sunset","IMG_2012-1_bfa_small_thumb.jpg",130,65,18);thumbnails[4497286]=new thumbnail(4497286,"100735","Turnberry Golf Course","IMG_2063And2morebfa_small_thumb.JPG",130,67,18);thumbnails[1458557]=new thumbnail(1458557,"100735","Loch Lomond","loch lomond _thumb.JPG",130,65,18);thumbnails[1458583]=new thumbnail(1458583,"100735","Hutcheson's Memorial Oban","Hutchesons Memorial Oban_thumb.jpg",130,65,18);thumbnails[1458663]=new thumbnail(1458663,"100735","Loch Lubnaig Callander","Loch Lubnig Callander_thumb.jpg",130,65,18);thumbnails[2979850]=new thumbnail(2979850,"100735","Moon over Oban Bay","moon over oban bay cropped_thumb.jpg",130,197,18);thumbnails[3012989]=new thumbnail(3012989,"100735","Tiree Houses","BAZ_2416-1_rod_small_thumb.jpg",130,130,18);thumbnails[2835303]=new thumbnail(2835303,"100735","Southern Upland Way Trees","Southern Upland Trees_thumb.jpg",130,184,18);thumbnails[1199513]=new thumbnail(1199513,"100735","Isle of Harris","harris1_small_thumb.jpg",130,85,18);thumbnails[1458731]=new thumbnail(1458731,"100736","Sunset 1","Sunset11_thumb.jpg",130,130,18);thumbnails[1458737]=new thumbnail(1458737,"100736","Sunset 3","sunset3_thumb.jpg",130,130,18);thumbnails[1993933]=new thumbnail(1993933,"100736","Grey Sea","grey waves_small_thumb.jpg",130,65,18);thumbnails[1993934]=new thumbnail(1993934,"100736","Pink Sea","pink waves_small_thumb.jpg",130,65,18);thumbnails[2001258]=new thumbnail(2001258,"100736","Purple Sea","purple waves_small_thumb.jpg",130,65,18);thumbnails[2001262]=new thumbnail(2001262,"100736","Turquoise Sea","turquoise waves_small_thumb.jpg",130,65,18);thumbnails[2036903]=new thumbnail(2036903,"100736","Rainbow Sea","rainbow seas_small_thumb.jpg",130,65,18);thumbnails[2160286]=new thumbnail(2160286,"100736","Golden Seas 2","golden sea 2_thumb.jpg",130,65,18);thumbnails[2715563]=new thumbnail(2715563,"100736","Seascape 4","aberlady sunset 067_thumb.jpg",130,65,18);thumbnails[3012988]=new thumbnail(3012988,"100736","Seascape 1","seascape 1_thumb.jpg",130,130,18);thumbnails[3080168]=new thumbnail(3080168,"100736","Seascape 7","sEascape 7 small_thumb.jpg",130,130,18);thumbnails[3080176]=new thumbnail(3080176,"100736","Seascape 9","seascape9_thumb.jpg",130,130,18);thumbnails[3319226]=new thumbnail(3319226,"100736","Forest 10","forest 10 v2_small_thumb.JPG",130,129,18);thumbnails[3319248]=new thumbnail(3319248,"100736","Moon Rise 1","moon rise_small_thumb.JPG",130,130,18);thumbnails[3319251]=new thumbnail(3319251,"100736","Forest 3","woods3_small_thumb.JPG",130,130,18);thumbnails[3319254]=new thumbnail(3319254,"100736","Forest 7","FOREST 7_small_thumb.JPG",130,130,18);thumbnails[3402831]=new thumbnail(3402831,"100736","Sea of Tranquility 1","lammermuirs 019 flood_3_small_thumb.JPG",130,93,18);thumbnails[3402850]=new thumbnail(3402850,"100736","Sea of Tranquility 2","IMG_3873 attempt2_small1_thumb.JPG",130,84,18);thumbnails[2268270]=new thumbnail(2268270,"149011","Cullins from Plockton","Cullins from Plockton_small1_thumb.JPG",130,64,18);thumbnails[2271310]=new thumbnail(2271310,"149011","Morocco Windsurf","Morocco 2 final_thumb.jpg",130,162,18);thumbnails[2846438]=new thumbnail(2846438,"149011","Jura from Mull","summer hols 2008 1709_rod v92_thumb.jpg",130,65,18);thumbnails[2846445]=new thumbnail(2846445,"149011","Jura Sunset","summer hols 2008 134_rod_thumb.JPG",130,73,18);thumbnails[3133771]=new thumbnail(3133771,"149011","Isle of Barra sunset","DSC00251 sunrise softened BFAsmall_thumb.jpg",130,73,18);thumbnails[2046583]=new thumbnail(2046583,"136784","Example 1","sofa example 31_thumb.jpg",130,133,18);thumbnails[2046584]=new thumbnail(2046584,"136784","Example 2","sofa example 4_thumb.jpg",130,133,18);thumbnails[2050460]=new thumbnail(2050460,"136784","Example 3","sofa example 5_thumb.jpg",130,133,18);thumbnails[2050461]=new thumbnail(2050461,"136784","Example 4","sofa example 6_thumb.jpg",130,133,18);var galleries=new Object();galleries[109534]=new gallery(109534,"1609153,1608938"," Rod Hanchard-Goodwin","section144523",[1608938,1609153]);galleries[147217]=new gallery(147217,"2160284","Digital Art Open Editions","gallery",[1484613,1484624,1993932,2036891,2072837,2160284,2235121]);galleries[217595]=new gallery(217595,"3673097,3555836","Photographs","gallery",[3555836,3555870,3672962,3673086,3673097,3673110,4434198,4473791,4473815,4473833,4473846,4473867,4473891,4473903,4473915,4497317,4497326,4852579,4852582,4852618,4852641,4852657,5019707,5019730,5231615]);galleries[85559]=new gallery(85559,"3136237","Digital Art East Scotland Landscapes","gallery",[1508318,1484611,1756158,1938838,1938840,1938850,1989839,2036871,2371840,2566142,2566143,2566149,2566201,2649023,2649031,2649032,2864516,2864517,3136232,3136237,3685898,4474072,4474103,4474114,1188049,1187852,1204061,1187689,1204069,1266728,1339208]);galleries[100735]=new gallery(100735,"2371848","Digital Art-  West Scotland Landscapes","gallery",[1458559,1458714,1466505,1898332,1963125,1989789,1989798,1989823,2160182,2371848,2371850,2371851,2835298,2864510,2963996,3136215,3136219,4497276,4497286,1458557,1458583,1458663,2979850,3012989,2835303,1199513]);galleries[100736]=new gallery(100736,"3402850,2001258","Digital Art- Abstract","gallery",[1458731,1458737,1993933,1993934,2001258,2001262,2036903,2160286,2715563,3012988,3080168,3080176,3319226,3319248,3319251,3319254,3402831,3402850]);galleries[149011]=new gallery(149011,"3133771","Commissions","gallery",[2268270,2271310,2846438,2846445,3133771]);galleries[136784]=new gallery(136784,"2046584","Canvas Examples","gallery",[2046583,2046584,2050460,2050461]);var imageSets=new Object();imageSets[1]="3685898,3673097,3319226,3136237,3136215,3133771,3012989,3012988,2963996,2715563,2649032,2649023,2371848,2160284,1993932,1963125,1875025,1508318,1484611,1458557,1339208,1266728,1187689";imageSets[2]="3673097,3555836,3402850,3136237,3133771,2835295,2371848,2160284,2046584,2001258";imageSets[3]="5231615,5019730,5019707,4852657,4852641,4852618,4852582,4852579,4497326,4497317,4497286,4497276,4474114,4474103,4474072,4473915,4473903,4473891,4473867,4473846,4473833,4473815,4473791,4434198,3685898,3673110,3673097,3673086,3672962,3555870,3555836,3402850,3402831,3319254,3319251,3319248,3319226,3136237,3136232,3136219,3136215,3133771,3080176,3080168,3012989,3012988,2979850,2963996,2864517,2864516";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 21:b="http://www6.clikpic.com/rhanchard/images";break}switch(a){case 1:b="http://www1.clikpic.com/rhanchard/images";break}switch(a){case 2:b="http://admin.clikpic.com/rhanchard/images";break}switch(a){case 24:b="http://tpc15/clikpic/rhanchard/images";break}switch(a){case 4:b="http://www.clikchurch.com/rhanchard/images";break}switch(a){case 5:b="http://www2.clikpic.com/rhanchard/images";break}switch(a){case 22:b="http://tpc5/clikpic/rhanchard/images";break}switch(a){case 23:b="http://tpc10/clikpic/rhanchard/images";break}switch(a){case 25:b="http://tpc16/clikpic/rhanchard/images";break}switch(a){case 15:b="http://www3.clikpic.com/rhanchard/images";break}switch(a){case 18:b="http://www4.clikpic.com/rhanchard/images";break}switch(a){case 19:b="http://www5.clikpic.com/rhanchard/images";break}switch(a){case 31:b="http://www7.clikpic.com/rhanchard/images";break}switch(a){case 32:b="http://admin2.clikpic.com/rhanchard/images";break}switch(a){case 33:b="http://www8.clikpic.com/rhanchard/images";break}switch(a){case 34:b="http://www9.clikpic.com/rhanchard/images";break}switch(a){case 35:b="http://admin3.clikpic.com/rhanchard/images";break}switch(a){case 37:b="http://admin4.clikpic.com/rhanchard/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="blue fin art: "+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).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);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="hanchard_goodwin@yahoo.co.uk">';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="hanchard_goodwin@yahoo.co.uk">';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+'")'})}}};