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[6341636]=new thumbnail(6341636,"351459","Loch Kishorn and Bealach Na Ba","_DSC0010Pass-of-Cattle-tone_thumb.jpg",130,81,15);thumbnails[5328100]=new thumbnail(5328100,"351459","Loch Cluanie","_DSC1955_L-Cluanie-2-copy_thumb.jpg",130,86,15);thumbnails[6425414]=new thumbnail(6425414,"351459","Loch Ard","141docktrees-tonemapped-co1_thumb.jpg",130,86,15);thumbnails[5328123]=new thumbnail(5328123,"351459","Lochcarron, Western Scotland","_DSC1991_L-Carrontonemapped_thumb.jpg",130,86,15);thumbnails[6341327]=new thumbnail(6341327,"351459","Loch Greshornish, Isle of Skye","_DSC1831Greshornich-boat-to_thumb.jpg",130,86,15);thumbnails[6341709]=new thumbnail(6341709,"351459","Croft at Greshornish, Isle of Skye","_DSC1916Skye-croft-tonemapp_thumb.jpg",130,86,15);thumbnails[5328270]=new thumbnail(5328270,"351459","Croft and sheep, Waternish Peninsula, Isle of Skye","_DSC18842__-2_tonemappedb_thumb.jpg",130,86,15);thumbnails[5359859]=new thumbnail(5359859,"351459","Loch Na Keal, Mull","L-Na-Keal1-copy_thumb.jpg",130,95,15);thumbnails[5359858]=new thumbnail(5359858,"351459","Loch Scridain, Mull","096-Loch-Scridasin-Mull-ton_thumb.jpg",130,86,15);thumbnails[5328259]=new thumbnail(5328259,"351459","Grass Point, Mull","_DSC0097Grass-Point1-tonema_thumb.jpg",130,86,15);thumbnails[6341803]=new thumbnail(6341803,"351459","Grasspoint landing stage, Mull","_DSC0089Grasspoint-dockBW2_thumb.jpg",130,84,15);thumbnails[6341888]=new thumbnail(6341888,"351459","Notice to visitors, Carsaig Pier, Mull","Carsaig-Pier1bw-copy_thumb.jpg",130,86,15);thumbnails[5359835]=new thumbnail(5359835,"351459","Lobster pot on Carsaig Pier, Mull","Carsaig-Pier-copy_thumb.jpg",130,96,15);thumbnails[5359845]=new thumbnail(5359845,"351459","Fisherman's store, Croig, Mull","2008-06-01Croig-hut-tonemap_thumb.jpg",130,86,15);thumbnails[5359839]=new thumbnail(5359839,"351459","Derelict fishing boats, Salen, Mull","2008-06-01Salen-boats-tonem_thumb.jpg",130,86,15);thumbnails[6430668]=new thumbnail(6430668,"351459","Girl Clare, Salen, Mull","Girl-Claire-108-tonemapped-_190E3705-24E8-5EC4-4F3860D73AF9EE80_thumb.jpg",130,86,15);thumbnails[6341980]=new thumbnail(6341980,"351459",'"Boat" hut, Calgary Bay, Mull',"_DSC0123Calgary-boat-shed-t_thumb.jpg",130,86,15);thumbnails[6430675]=new thumbnail(6430675,"351459","Lochbuie Post Office, Mull","2008-05-28-Scot1-014-Lochbu_190FE62E-24E8-5EC4-4F8F0B82B838CF4E_thumb.jpg",130,85,15);thumbnails[5328275]=new thumbnail(5328275,"351459","Standing stones, Glengorm, Mull","_DSC2123-Standing-stones-Gl_thumb.jpg",130,86,15);thumbnails[5359808]=new thumbnail(5359808,"351468","Lanyon Quoit, Cornwall ","_DSC0202Lannion-Q2BW-tonem_thumb.jpg",130,86,15);thumbnails[6345217]=new thumbnail(6345217,"351468","Men-an-Tol, ancient stones, West Penwith","_DSC0179MenanTol-tonemapped_thumb.jpg",130,86,15);thumbnails[5360675]=new thumbnail(5360675,"351468","Cornish Lugger, Whitsand Bay, SE Cornwall","_DSC2216Whitsands-lugger-to_thumb.jpg",130,87,15);thumbnails[6410826]=new thumbnail(6410826,"351468","Whitsand Bay, South East Cornwall","_DSC2559Whitsand-BayBW-ton_thumb.jpg",130,86,15);thumbnails[5360625]=new thumbnail(5360625,"351468","Summer afternoon, Pencarrow Head","Pencarrow1-98R4--copy_thumb.jpg",130,79,15);thumbnails[5360639]=new thumbnail(5360639,"351468","Pentire Head, N Cornwall","Pentire-Head-04E3-copy_thumb.jpg",130,91,15);thumbnails[6345267]=new thumbnail(6345267,"351468","Lifeguard hut, Gwithian Towans","Godrevy-hut-fog01-0408-cop_thumb.jpg",130,86,15);thumbnails[6345269]=new thumbnail(6345269,"351468","Sea fog, Upton Towans","Gwithianfog01-0407bw-copy_thumb.jpg",130,86,15);thumbnails[3399510]=new thumbnail(3399510,"351468","Coastal erosion, St Ives Bay","Gwithian-beach-erosion2-06N_thumb.jpg",130,96,15);thumbnails[6345307]=new thumbnail(6345307,"351468","Dune and marram grass, Upton Towans","Upton-Towans-dunes2-06K4-co_thumb.jpg",130,89,15);thumbnails[6345331]=new thumbnail(6345331,"351468","Godrevy Lighthouse","P1010398_Godrevy-Lighthouse_thumb.jpg",130,87,15);thumbnails[6401264]=new thumbnail(6401264,"351468","Ruined Ordnance shed, Upton Towans","Upton-Towans18-06K4_thumb.jpg",130,90,15);thumbnails[6382090]=new thumbnail(6382090,"351468","Towanroath Mine pumping house near St Agnes","_DSC0267Towanroath-pump-hse_thumb.jpg",130,87,15);thumbnails[6382117]=new thumbnail(6382117,"351468","Wheal Coates Mine, St Agnes","_DSC0357WhealCoates1tonemap_thumb.jpg",130,86,15);thumbnails[6382128]=new thumbnail(6382128,"351468","Porthoustock beach, The Lizard","_DSC0118_Porthoustock2_tone_thumb.jpg",130,81,15);thumbnails[5328315]=new thumbnail(5328315,"351470","Ile Vierge Lighthouse, Brittany","_DSC2244_Vougotlighthousefu_thumb.jpg",130,86,15);thumbnails[6345333]=new thumbnail(6345333,"351470","Port Blanc, Cotes D'Armor","_DSC2508Port-Blanc2BW-tone_thumb.jpg",130,86,15);thumbnails[3379383]=new thumbnail(3379383,"351470","Greve du Vougot, Finistere","Vogou-beach-07-17-30-copy_thumb.jpg",130,86,15);thumbnails[6347937]=new thumbnail(6347937,"351470","Greve du Vougot, Finistere","Vogou-beach-07-16-20-copy_thumb.jpg",130,82,15);thumbnails[5398144]=new thumbnail(5398144,"351470","Rock form, Ploumanac'h","_DSC2452_granite05fused-cop_thumb.jpg",130,86,15);thumbnails[5398169]=new thumbnail(5398169,"351470","Rock form 2, Ploumanac'h","_DSC2468-tonemapped02-copy_thumb.jpg",130,86,15);thumbnails[5398125]=new thumbnail(5398125,"351470","Cote de Granit Rose, Ploumanac'h","_DSC2440-fused02-copy_thumb.jpg",130,86,15);thumbnails[5398186]=new thumbnail(5398186,"351470","Tregastel, Cote de Granit Rose","_DSC2485tonemappedbw-copy_thumb.jpg",130,86,15);thumbnails[6354696]=new thumbnail(6354696,"351470","Rock form, Tregastel","_DSC0044_5_6_tonemapped-bw_thumb.jpg",130,86,15);thumbnails[6354855]=new thumbnail(6354855,"351470","Rock form 2, Tregastel","_DSC0038_39_40_tonemappedb_thumb.jpg",130,86,15);thumbnails[6354865]=new thumbnail(6354865,"351470","Rock form 3, Tregastel","_DSC0175_6_7_tonemappedbw-_thumb.jpg",130,83,15);thumbnails[6345460]=new thumbnail(6345460,"351470","Route des Ajoncs","Brittany05b-copy_filtered_t_thumb.jpg",130,84,15);thumbnails[5360677]=new thumbnail(5360677,"351470","Cote Sauvage, Morbihan","_DSC2250-Cote-Sauvage-tonem_thumb.jpg",130,85,15);thumbnails[6382135]=new thumbnail(6382135,"352014","Shoveldown, Dartmoor - 2010","_DSC0106Shoveldown_tonemapp_thumb.jpg",130,86,15);thumbnails[6382141]=new thumbnail(6382141,"352014","Keltor Rocks, Dartmoor - 2009","_DSC2898_Keltor01-tonemappe_thumb.jpg",130,86,15);thumbnails[6383235]=new thumbnail(6383235,"352014","Top Tor, Dartmoor - 2010","_DSC3447_8_9_TopTor01-tonem_thumb.jpg",130,86,15);thumbnails[6382148]=new thumbnail(6382148,"352014","Hey Tor, Dartmoor - 2010","_DSC0178_79_80Haytor01_tone_thumb.jpg",130,90,15);thumbnails[6430680]=new thumbnail(6430680,"352014","Discarded millwheel, Dartmoor 2008","2008-07-20-010-millwheel-to_thumb.jpg",130,86,15);thumbnails[6382184]=new thumbnail(6382184,"352014","Dry stone wall & stile, Dartmoor - 2010","_DSC3373_4_5_tonemapped-bw_thumb.jpg",130,86,15);thumbnails[6430686]=new thumbnail(6430686,"352014","Windy Post Cross, Dartmoor - 2008","2008-07-20-048-Windy-Cross-_thumb.jpg",130,86,15);thumbnails[6430698]=new thumbnail(6430698,"352014","Winter beach, Sidmouth, Devon - 2008","_DSC1565-Sidmouth01bw-tone_thumb.jpg",130,85,15);thumbnails[6382241]=new thumbnail(6382241,"352014","Dawlish Warren, Devon - 2009","Dawlish-Warren-01_beach-hut_0AFC2C0F-1EC9-D45B-1CE0E5D5CA8C4671_thumb.jpg",130,63,15);thumbnails[6382250]=new thumbnail(6382250,"352014","Great Plantation, Devon - 2010","_DSC0273-tonemappedsepia-co_thumb.jpg",130,86,15);thumbnails[6382267]=new thumbnail(6382267,"352014","Somerset Levels 1 - 2009","_DSC0164treerhineLevelsB_thumb.jpg",130,86,15);thumbnails[6382338]=new thumbnail(6382338,"352014","Somerset Levels 2 -2009","_DSC0149RhineLevels01bw-t_thumb.jpg",130,86,15);thumbnails[6382346]=new thumbnail(6382346,"352014","Pollarded tree, Somerset Levels - 2006","Pollarded-tree-97R6-copy_thumb.jpg",130,88,15);thumbnails[6382356]=new thumbnail(6382356,"352014","Dunster Beach, Somerset - 2009","_DSC0022_Dunster-Beach-chal_thumb.jpg",130,82,15);thumbnails[6382375]=new thumbnail(6382375,"352014","Ringstead Beach, Dorset - 2010","_DSC0031Ringstead_tonemappe_thumb.jpg",130,86,15);thumbnails[6382385]=new thumbnail(6382385,"352014","Memorial, St Aldhelm's Head, Dorset - 2010","_DSC000sculpture-St-AlbanHD_thumb.jpg",130,86,15);thumbnails[6382482]=new thumbnail(6382482,"352014","Quarry, Isle of Purbeck, Dorset - 2010","_DSC0151-St-Albans01-tonem_thumb.jpg",130,86,15);thumbnails[6380185]=new thumbnail(6380185,"352014","Avebury, Wiltshire - 2010","_DSC0046Avebury01-fusedBW-_thumb.jpg",130,86,15);thumbnails[6382457]=new thumbnail(6382457,"352014","Knap Hill, Wiltshire - 2010","_DSC0208Pewsey01-fusedBW-c_thumb.jpg",130,84,15);thumbnails[6382487]=new thumbnail(6382487,"352014","Dew pond, Golden Ball Hill, Wiltshire - 2010","_DSC0220_dew-pond-Pewsey_to_thumb.jpg",130,86,15);thumbnails[6382990]=new thumbnail(6382990,"352014","Aldeburgh, Suffolk - 2010","_DSC0037And2more_tonemapped_thumb.jpg",130,85,15);thumbnails[6383016]=new thumbnail(6383016,"352014","Cattle shed, The Tarn - 2009","_DSC2344_Pers-barn-01tonema_thumb.jpg",130,86,15);thumbnails[6383047]=new thumbnail(6383047,"352014","Notre Dame Chapel, The Tarn - 2010","_DSC0310_1_2_tonemappedbw-_thumb.jpg",130,86,15);thumbnails[6383057]=new thumbnail(6383057,"352014","Ile de Re 1 - 2010","_DSC0553Ile-de-Re001_4_5_to_thumb.jpg",130,83,15);thumbnails[6383091]=new thumbnail(6383091,"352014","Ile de Re 2 - 2010","_DSC0535_6_7_tonemappedbw-_thumb.jpg",130,82,15);thumbnails[6383095]=new thumbnail(6383095,"352014","War-time bunker, Ile de Re - 2010","_DSC0109_IleDR-gunsite01ton_thumb.jpg",130,86,15);thumbnails[6383097]=new thumbnail(6383097,"352014","War-time bunker 2 - 2010","_DSC0139_40_41_tonemapped-c_thumb.jpg",130,86,15);var galleries=new Object();galleries[354550]=new gallery(354550,"6430668,6425414,6382117,6382090,6354865,6354855,6354696,6347937,6345460,6345333,6345331,6345307,6345269,6345267,6345217,6341980,6341888,6341803,6341709,6341636,6341327,5398186,5398169,5398144,5398125,5360677,5360675,5360625,5359859,5359858,5359845,5359839,5359835,5359808,5328315,5328275,5328270,5328259,5328123,5328100,3399510,3379383","The Celtic Fringe","gallery",[]);galleries[351459]=new gallery(351459,"6430668,6425414,6341980,6341888,6341803,6341709,6341636,6341327,5359859,5359858,5359845,5359839,5359835,5328275,5328270,5328259,5328123,5328100","The Celtic Fringe - Alba (Scotland)","gallery",[6341636,5328100,6425414,5328123,6341327,6341709,5328270,5359859,5359858,5328259,6341803,6341888,5359835,5359845,5359839,6430668,6341980,6430675,5328275]);galleries[351468]=new gallery(351468,"6382117,6382090,6345331,6345307,6345269,6345267,6345217,5360675,5360625,5359808,3399510","The Celtic Fringe - Kernow (Cornwall)","gallery",[5359808,6345217,5360675,6410826,5360625,5360639,6345267,6345269,3399510,6345307,6345331,6401264,6382090,6382117,6382128]);galleries[351470]=new gallery(351470,"6354865,6354855,6354696,6347937,6345460,6345333,5398186,5398169,5398144,5398125,5360677,5328315,3379383","The Celtic Fringe - Breizh (Brittany)","gallery",[5328315,6345333,3379383,6347937,5398144,5398169,5398125,5398186,6354696,6354855,6354865,6345460,5360677]);galleries[352014]=new gallery(352014,"6430698,6430686,6430680,6383235,6383097,6383095,6383091,6383057,6383047,6383016,6382487,6382482,6382457,6382385,6382375,6382346,6382338,6382267,6382250,6382241,6382184,6382148,6382141,6382135,6380185","Other places","gallery",[6382135,6382141,6383235,6382148,6430680,6382184,6430686,6430698,6382241,6382250,6382267,6382338,6382346,6382356,6382375,6382385,6382482,6380185,6382457,6382487,6382990,6383016,6383047,6383057,6383091,6383095,6383097]);var imageSets=new Object();imageSets[1]="6430698,6430686,6430680,6425414,6383235,6383091,6383057,6383016,6382482,6382457,6382385,6382375,6382346,6382338,6382267,6382250,6382241,6382184,6382148,6382141,6382135,6382117,6382090,6380185,6354865,6354855,6354696,6347937,6345460,6345333,6345331,6345307,6345269,6345267,6345217,6341980,6341888,6341803,6341709,6341636,6341327,5398186,5398169,5398144,5398125,5360677,5360675,5360625,5359859,5359858,5359845,5359839,5359835,5359808,5328315,5328275,5328270,5328259,5328123,5328100,3399510,3379383";imageSets[2]="6430698,6430686,6430680,6430668,6425414,6383235,6383097,6383095,6383091,6383057,6383047,6383016,6382487,6382482,6382457,6382385,6382375,6382346,6382338,6382267,6382250,6382241,6382184,6382148,6382141,6382135,6382117,6382090,6380185,6354865,6354855,6354696,6347937,6345460,6345333,6345331,6345307,6345269,6345267,6345217,6341980,6341888,6341803,6341709,6341636,6341327,5398186,5398169,5398144,5398125,5360677,5360675,5360625,5359859,5359858,5359845,5359839,5359835,5359808,5328315,5328275,5328270,5328259,5328123,5328100,3399510,3379383";imageSets[3]="5360625";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/jmarks/images";break}switch(a){case 1:b="http://www1.clikpic.com/jmarks/images";break}switch(a){case 2:b="http://admin.clikpic.com/jmarks/images";break}switch(a){case 24:b="http://tpc15/clikpic/jmarks/images";break}switch(a){case 4:b="http://www.clikchurch.com/jmarks/images";break}switch(a){case 5:b="http://www2.clikpic.com/jmarks/images";break}switch(a){case 22:b="http://tpc5/clikpic/jmarks/images";break}switch(a){case 23:b="http://tpc10/clikpic/jmarks/images";break}switch(a){case 25:b="http://tpc16/clikpic/jmarks/images";break}switch(a){case 15:b="http://www3.clikpic.com/jmarks/images";break}switch(a){case 18:b="http://www4.clikpic.com/jmarks/images";break}switch(a){case 19:b="http://www5.clikpic.com/jmarks/images";break}switch(a){case 31:b="http://www7.clikpic.com/jmarks/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jmarks/images";break}switch(a){case 33:b="http://www8.clikpic.com/jmarks/images";break}switch(a){case 34:b="http://www9.clikpic.com/jmarks/images";break}switch(a){case 35:b="http://admin3.clikpic.com/jmarks/images";break}switch(a){case 37:b="http://admin4.clikpic.com/jmarks/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="'+escape(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="Mackay-Marks 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>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</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="john@johnmm.plus.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="john@johnmm.plus.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+'")'})}}};