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[4710914]=new thumbnail(4710914,"18906","Morning Mist over River Axe Devon UK","IMG_3881-River_Axeorton_thumb.jpg",130,87,15);thumbnails[4710925]=new thumbnail(4710925,"18906","Axe Valley Devon UK","IMG_3888-Axe_Valley_Devonorton_thumb.jpg",130,87,15);thumbnails[208790]=new thumbnail(208790,"18906","Flotsom at Treganhawke Beach Whitsand Bay Cornwall UK","IMG_1953_thumb.jpg",130,185,15);thumbnails[208866]=new thumbnail(208866,"18906","Sunset at Tregantle Beach Cornwall UK","IMG_2043_thumb.jpg",130,195,15);thumbnails[208877]=new thumbnail(208877,"18906","Freathy Beach Cornwall.","IMG_0871_thumb.jpg",130,88,15);thumbnails[208903]=new thumbnail(208903,"18906","Gentle waves.","IMG_1977_thumb.jpg",130,85,15);thumbnails[209232]=new thumbnail(209232,"18906","Whitsand Bay Cornwall","IMG_0143_thumb.jpg",130,186,15);thumbnails[337675]=new thumbnail(337675,"18906","Stones on Treganhawke Beach Cornwall UK","IMG_1988-treg+orton_thumb.jpg",130,195,15);thumbnails[337687]=new thumbnail(337687,"18906","Rame Head Cornwall UK","IMG_2148_thumb.jpg",130,90,15);thumbnails[337689]=new thumbnail(337689,"18906","Sunset at Whitsand Bay Cornwall.","IMG_0103-bw2_thumb.jpg",130,193,15);thumbnails[3499182]=new thumbnail(3499182,"18906","Newgale Beach Pembrokeshire","IMG_2826-newgale=orton_thumb.jpg",130,195,15);thumbnails[3499184]=new thumbnail(3499184,"18906","Washed up.","IMG_2837-newgale + orton_thumb.jpg",130,198,15);thumbnails[3499186]=new thumbnail(3499186,"18906","Cold day at Abereiddy, Pembrokeshire.","IMG_2797-abereiddy+bw+sf+orton_thumb.jpg",130,87,15);thumbnails[3499493]=new thumbnail(3499493,"18906","Looking back towards home.","IMG_0019-ps_thumb.jpg",130,87,15);thumbnails[3499535]=new thumbnail(3499535,"18906","Grasses & Rocks.","IMG_1939_thumb.jpg",130,195,15);thumbnails[3499553]=new thumbnail(3499553,"18906","Path to Rame Head.","IMG_2176-duo_thumb.jpg",130,195,15);thumbnails[3499555]=new thumbnail(3499555,"18906","Path to Rame Head.","IMG_2159_thumb.jpg",130,195,15);thumbnails[3499566]=new thumbnail(3499566,"18906","Newgale Beach.","IMG_2835-newgale+xprocess_thumb.jpg",130,87,15);thumbnails[3499611]=new thumbnail(3499611,"18906","Heading Back.","IMG_2825-newgale+orton_thumb.jpg",130,195,15);thumbnails[3774113]=new thumbnail(3774113,"18906","It's Cold....!!!","IMG_2473_-_mayhill_high_contrastmax_blur_thumb.jpg",130,87,15);thumbnails[4099600]=new thumbnail(4099600,"18906","Rainbow Over May Hill.","Copy_of_may_hill_panoramic2-cropped1_thumb.jpg",130,64,15);thumbnails[4339678]=new thumbnail(4339678,"18906","Church & Cornfields Stokenham Devon UK","IMG_3843-cornfield_stockenham_devon-sharp_thumb.jpg",130,195,15);thumbnails[4462201]=new thumbnail(4462201,"18906","Poppy Field & Malvern Hills.","IMG_3606-_poppies__orton_thumb.jpg",130,87,15);thumbnails[208689]=new thumbnail(208689,"18988","Bald Headed Eagle taken at Newent Falconry Centre","2005_1004Image0018_thumb.JPG",130,86,15);thumbnails[208777]=new thumbnail(208777,"18988","New Beginnings.","IMG_0132_thumb.jpg",130,195,15);thumbnails[209324]=new thumbnail(209324,"18988","Happy Looking Owl","owl - lowres_thumb.jpg",130,86,15);thumbnails[209652]=new thumbnail(209652,"18988","Bluebells.","Bluebells and Tree 1 + Orton_thumb.jpg",130,195,15);thumbnails[209654]=new thumbnail(209654,"18988","Secretary Bird","secretary bird_thumb.jpg",130,86,15);thumbnails[3499499]=new thumbnail(3499499,"18988","Mushrooms at Rame Head.","IMG_0076-vignette_thumb.jpg",130,192,15);thumbnails[5061187]=new thumbnail(5061187,"18988","","IMG_4644-leavesortonZZ_thumb.jpg",130,97,15);thumbnails[5061323]=new thumbnail(5061323,"18988","Just Leaves","IMG_4633-leavesortoncrop_thumb.jpg",130,124,15);thumbnails[5185257]=new thumbnail(5185257,"18988","From the shadows looking out.","IMG_4254-red_treeorton_thumb.jpg",130,87,15);thumbnails[208805]=new thumbnail(208805,"18991","Sunset at Whitsand Bay Cornwall","IMG_0105_thumb.jpg",130,186,15);thumbnails[209236]=new thumbnail(209236,"18991","Sunset At Whitsand Bay Cornwall UK","R0011459-lowres_thumb.jpg",130,173,15);thumbnails[209243]=new thumbnail(209243,"18991","Seagulls catching the last warm rays of the day.","Copy of R0011447-sky blend_thumb.jpg",130,98,15);thumbnails[209245]=new thumbnail(209245,"18991","Sunrise, Rame Head, Cornwall.","IMG_0060_thumb.jpg",130,87,15);thumbnails[212989]=new thumbnail(212989,"18991","Sunrise over Rame Head Whitsand Bay Cornwall UK","IMG_2112-rame_thumb.jpg",130,87,15);thumbnails[337706]=new thumbnail(337706,"18991","Sunrise over Rame Head.","Copy of 2007_0315(002)-lowres_thumb.jpg",130,195,15);thumbnails[531148]=new thumbnail(531148,"18991","Sunset over Whitsand Bay Cornwall UK","R0011454-ps_thumb.jpg",130,173,15);thumbnails[531168]=new thumbnail(531168,"18991","Sunset  Whitsand Bay Cornwall UK","Copy of IMG_0141a_thumb.jpg",130,87,15);thumbnails[531603]=new thumbnail(531603,"18991","Sunset  Whitsand Bay Cornwall UK","IMG_0117_thumb.jpg",130,185,15);thumbnails[531606]=new thumbnail(531606,"18991","Sunset 4 Whitsand Bay Cornwall UK","IMG_0023_thumb.jpg",130,85,15);thumbnails[3499198]=new thumbnail(3499198,"18991","Sunset & Snow.","IMG_2760- orton_thumb.jpg",130,87,15);thumbnails[3499203]=new thumbnail(3499203,"18991","Sunset, Snow & Shadows.","Copy of IMG_2735-yart lane_thumb.jpg",130,87,15);thumbnails[3499394]=new thumbnail(3499394,"18991","Surfers at Sunset","middle-1894_thumb.jpg",130,87,15);thumbnails[3499418]=new thumbnail(3499418,"18991","Sunset, Freathy Beach, Whitsand Bay, Cornwall, UK","IMG_0135_thumb.jpg",130,186,15);thumbnails[3499424]=new thumbnail(3499424,"18991","Sunset, Freathy Beach, Whitsand Bay, Cornwall, UK","IMG_0122_thumb.jpg",130,87,15);thumbnails[3499428]=new thumbnail(3499428,"18991","Sunset, Freathy Beach, Whitsand Bay, Cornwall, UK","IMG_0132a_thumb.jpg",130,85,15);thumbnails[3499512]=new thumbnail(3499512,"18991","Sunset at St. Michaels' Mount, Cornwall.","Copy of IMG_0035-blend sunset_thumb.jpg",130,157,15);thumbnails[3499578]=new thumbnail(3499578,"18991","Washed up.","IMG_0023a_thumb.jpg",130,195,15);thumbnails[5061015]=new thumbnail(5061015,"18991","Attack Ship at Sunset.","IMG_4497-attack_shiporton1_thumb.jpg",130,77,15);thumbnails[208702]=new thumbnail(208702,"18989","Boat in the clear blue waters of Mauritius","boat in mauritius-lowres_thumb.jpg",130,88,15);thumbnails[208715]=new thumbnail(208715,"18989","Boat repairs in Skopolos Greece","boat repair skopolos- lowres_thumb.jpg",130,184,15);thumbnails[208736]=new thumbnail(208736,"18989","Small Orthodox Church on Skopolos Greece","church on skopolos_thumb.JPG",130,85,15);thumbnails[208752]=new thumbnail(208752,"18989","Yachts in Jamaica","Copy of Copy of Copy of jamaica-02-040013 - lowres_thumb.jpg",130,173,15);thumbnails[208760]=new thumbnail(208760,"18989","Spiral Stairs Vatican Museum Rome","Copy of Copy of staircase rome_thumb.jpg",130,89,15);thumbnails[208769]=new thumbnail(208769,"18989","View of Florence from the Piazzale Michelangelo","Copy of DS060219122305-lowres_thumb.jpg",130,72,15);thumbnails[208842]=new thumbnail(208842,"18989","The Duomo in Florence.","DS060322210904-b&w-lowres_thumb.jpg",130,167,15);thumbnails[209210]=new thumbnail(209210,"18989","View From Piazzale Michelangelo Florence Italy.","DS060322211649-lowres_thumb.jpg",130,81,15);thumbnails[209222]=new thumbnail(209222,"18989","Lonely Tree, Fethiye Bay Turkey.","lonely tree-lowres_thumb.jpg",130,193,15);thumbnails[211308]=new thumbnail(211308,"18989","Sunrise in Jamaica","Copy of jamaica-02-040022-lowres_thumb.jpg",130,199,15);thumbnails[211319]=new thumbnail(211319,"18989","Paragliding over Olu Deniz Beach Turkey","Copy of 2005_1013Image0043-lowres_thumb.jpg",130,98,15);thumbnails[211324]=new thumbnail(211324,"18989","Havana Car","Copy of Copy of CUBA-nov030019-lowres_thumb.jpg",130,104,15);thumbnails[337627]=new thumbnail(337627,"18989","View from the Duomo ","DS060322211516-lowres_thumb.jpg",130,94,15);thumbnails[337647]=new thumbnail(337647,"18989","Sunset over Ile aux Cerfs Mauritius ","Copy of DS060312133232-lowres_thumb.jpg",130,70,15);thumbnails[208723]=new thumbnail(208723,"18997","Pink Cyclamen","cyclamens may hill (16)_thumb.jpg",130,163,15);thumbnails[208795]=new thumbnail(208795,"18997","Early Spotted Orchids.","IMG_0047_thumb.jpg",130,195,15);thumbnails[208831]=new thumbnail(208831,"18997","My Garden at Home.","DS060131221857-lowres1_thumb.jpg",130,200,15);thumbnails[208892]=new thumbnail(208892,"18997","Purple Geranium.","Copy of IMG_0017_thumb.jpg",130,87,15);thumbnails[208895]=new thumbnail(208895,"18997","Penstemon Pink Endurance.","IMG_0088_thumb.jpg",130,81,15);thumbnails[209214]=new thumbnail(209214,"18997","Frost covered Cow Parsley","IMG_0017jpeglowres_thumb.jpg",130,86,15);thumbnails[209246]=new thumbnail(209246,"18997","Orange Calendula","orange daisey_thumb.jpg",130,121,15);thumbnails[209650]=new thumbnail(209650,"18997","Spotted Orchid","IMG_0011_thumb.jpg",130,195,15);thumbnails[247828]=new thumbnail(247828,"18997","Dandelion Seed Heads ","dandelion seeds-lowres_thumb.jpg",130,87,15);thumbnails[306024]=new thumbnail(306024,"18997","Close Up of a Spotted Orchid.","IMG_0046_thumb.jpg",130,195,15);thumbnails[306026]=new thumbnail(306026,"18997","Spotted Orchid.","IMG_0062_thumb.jpg",130,195,15);thumbnails[306084]=new thumbnail(306084,"18997","Wood Anemones & Bluebells.","IMG_0102_thumb.jpg",130,195,15);thumbnails[337580]=new thumbnail(337580,"18997","Sweet Peas at Sunset.","sunset sweetpeas_thumb.jpg",130,190,15);thumbnails[337666]=new thumbnail(337666,"18997","Close up of Clematis Niobe..","IMG_00621_thumb.jpg",130,87,15);thumbnails[337674]=new thumbnail(337674,"18997","Close-up of Orange Calendula.","orange calendula_thumb.jpg",130,87,15);thumbnails[992891]=new thumbnail(992891,"18997","Nelly Moser Close-up","IMG_0085-orton_thumb.jpg",130,87,15);thumbnails[3499628]=new thumbnail(3499628,"18997","Rosa Eglantyne","IMG_0694-softfocus_thumb.jpg",130,87,15);thumbnails[5061009]=new thumbnail(5061009,"18992","Old Miners Shed.","IMG_4679-doorortonvigbwothers_thumb.jpg",130,116,15);thumbnails[208727]=new thumbnail(208727,"18992","Old Door Northern Colliery Cinderford ","IMG_0052-xprocess+overlay+bw+orton_thumb.jpg",130,195,15);thumbnails[208781]=new thumbnail(208781,"18992","Country Gate.","Copy of LOST-80-pinhole_thumb.jpg",130,195,15);thumbnails[208862]=new thumbnail(208862,"18992","Old Platform Clock, Severn Valley Railway, Kidderminster.","IMG_0990-orton+bw_thumb.jpg",130,170,15);thumbnails[337648]=new thumbnail(337648,"18992","Abandoned Colliery Buildings.","IMG_0029 - bw+sepia+orton_thumb.jpg",130,93,15);thumbnails[337670]=new thumbnail(337670,"18992","Dangerous Crossing!.","Copy_of_IMG_0038_thumb.jpg",130,161,15);thumbnails[337671]=new thumbnail(337671,"18992","Old Steam Train Carriage.","Copy of R0010380-ps sepia-tatty-pinhole_thumb.jpg",130,173,15);thumbnails[993144]=new thumbnail(993144,"18992","Waves hitting the Rocks.","IMG_0032_thumb.jpg",130,195,15);thumbnails[3499196]=new thumbnail(3499196,"18992","Path to Newgale Beach.","IMG_2820-newgale+orton+bw1_thumb.jpg",130,195,15);thumbnails[3499402]=new thumbnail(3499402,"18992","Waiting for the next wave.","IMG_1876_thumb.jpg",130,87,15);thumbnails[3499545]=new thumbnail(3499545,"18992","Chapel at Rame Head.","IMG_2169-bw+pinhole_thumb.jpg",130,195,15);thumbnails[3499562]=new thumbnail(3499562,"18992","Zooming!","IMG_2794-abereiddy+zoom_thumb.jpg",130,195,15);thumbnails[4357530]=new thumbnail(4357530,"18992","Boat at Beesands Devon UK","IMG_3763-_Boat_at_Beesandsortonbw_thumb.jpg",130,98,15);thumbnails[4357605]=new thumbnail(4357605,"18992","Shadows at Dusk.","IMG_3825-torcrossbw_thumb.jpg",130,195,15);thumbnails[4384012]=new thumbnail(4384012,"18992","Fish Drying","IMG_3765_-_bw__distressed_thumb.jpg",130,195,15);thumbnails[4413194]=new thumbnail(4413194,"18992","There's Nothing Better...!!","IMG_3793-guiness__sepia_thumb.jpg",77,130,15);var galleries=new Object();galleries[18906]=new gallery(18906,"209232","Landscapes","gallery",[4710914,4710925,208790,208866,208877,208903,209232,337675,337687,337689,3499182,3499184,3499186,3499493,3499535,3499553,3499555,3499566,3499611,3774113,4099600,4339678,4462201]);galleries[18988]=new gallery(18988,"208689","Nature/Wildlife","gallery",[208689,208777,209324,209652,209654,3499499,5061187,5061323,5185257]);galleries[18991]=new gallery(18991,"208805","Sunsets/Sunrise","gallery",[208805,209236,209243,209245,212989,337706,531148,531168,531603,531606,3499198,3499203,3499394,3499418,3499424,3499428,3499512,3499578,5061015]);galleries[18989]=new gallery(18989,"208702","Travel","gallery",[208702,208715,208736,208752,208760,208769,208842,209210,209222,211308,211319,211324,337627,337647]);galleries[18997]=new gallery(18997,"208831","Flowers","gallery",[208723,208795,208831,208892,208895,209214,209246,209650,247828,306024,306026,306084,337580,337666,337674,992891,3499628]);galleries[18992]=new gallery(18992,"4357530,208727","B&W","gallery",[5061009,208727,208781,208862,337648,337670,337671,993144,3499196,3499402,3499545,3499562,4357530,4357605,4384012,4413194]);var imageSets=new Object();imageSets[1]="992891,531606,531603,337689,337675,337674,337666,247828,212989,211308,209650,209232,208842,208805,208781,208760,208752,208736,208715,208702";imageSets[2]="4357530,209232,208831,208805,208727,208702,208689";imageSets[3]="5061015";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/marksaunders/images";break}switch(a){case 1:b="http://www1.clikpic.com/marksaunders/images";break}switch(a){case 2:b="http://admin.clikpic.com/marksaunders/images";break}switch(a){case 4:b="http://www.clikchurch.com/marksaunders/images";break}switch(a){case 5:b="http://www2.clikpic.com/marksaunders/images";break}switch(a){case 15:b="http://www3.clikpic.com/marksaunders/images";break}switch(a){case 21:b="http://www6.clikpic.com/marksaunders/images";break}switch(a){case 18:b="http://www4.clikpic.com/marksaunders/images";break}switch(a){case 19:b="http://www5.clikpic.com/marksaunders/images";break}switch(a){case 22:b="http://tpc5/clikpic/marksaunders/images";break}switch(a){case 23:b="http://tpc10/clikpic/marksaunders/images";break}switch(a){case 24:b="http://tpc15/clikpic/marksaunders/images";break}switch(a){case 25:b="http://tpc16/clikpic/marksaunders/images";break}switch(a){case 31:b="http://www7.clikpic.com/marksaunders/images";break}switch(a){case 32:b="http://admin2.clikpic.com/marksaunders/images";break}switch(a){case 33:b="http://www8.clikpic.com/marksaunders/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="Mark Saunders 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).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="catkins.mayhill@tiscali.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="catkins.mayhill@tiscali.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+'")'})}}};