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[236246]=new thumbnail(236246,"51562","Big Wave","storm2_thumb.jpg",130,96,1);thumbnails[520312]=new thumbnail(520312,"21784","Stag2","stag2_thumb.jpg",130,94,1);thumbnails[520321]=new thumbnail(520321,"21784","Stag 12","stag12_thumb.jpg",130,94,1);thumbnails[520327]=new thumbnail(520327,"21784","Stag 13","stag13_thumb.jpg",130,171,1);thumbnails[520332]=new thumbnail(520332,"21784","Stag 10","stag 10_thumb.jpg",130,95,1);thumbnails[520336]=new thumbnail(520336,"21784","Stag on the run","stag run_thumb.jpg",130,90,1);thumbnails[500186]=new thumbnail(500186,"21852","Ullapool Evening","ullapool night2_thumb.jpg",130,86,1);thumbnails[500188]=new thumbnail(500188,"21852","Ullapool Evening 2","ullapool night 3_thumb.jpg",130,82,1);thumbnails[500194]=new thumbnail(500194,"21784","Cold Breath","deer backlight_thumb.jpg",130,192,1);thumbnails[520363]=new thumbnail(520363,"21852","Stalker Castle 3","stalker castle3_thumb.jpg",130,81,1);thumbnails[499926]=new thumbnail(499926,"38978","Moored on Barra","boat2_thumb.jpg",130,177,1);thumbnails[499939]=new thumbnail(499939,"38978","Tractor ","the tractor_thumb.jpg",130,195,1);thumbnails[499956]=new thumbnail(499956,"38978","Standing Stones","standing stones_thumb.jpg",130,87,1);thumbnails[499965]=new thumbnail(499965,"38978","Evening Fishing","fishing_thumb.jpg",130,176,1);thumbnails[499974]=new thumbnail(499974,"38978","Waiting for the tide","boat aground_thumb.jpg",130,188,1);thumbnails[499981]=new thumbnail(499981,"38978","Rusty Wheels","rusty wheels _thumb.jpg",130,179,1);thumbnails[499986]=new thumbnail(499986,"38978","old boat","wrecked_thumb.jpg",130,185,1);thumbnails[499988]=new thumbnail(499988,"38978","Waiting for the tide 2","boat landscape_thumb.jpg",130,87,1);thumbnails[499990]=new thumbnail(499990,"38978","On the Road","the road_thumb.jpg",130,88,1);thumbnails[499993]=new thumbnail(499993,"38978","Rowing Boat","Boat aground 3 landscape_thumb.jpg",130,90,1);thumbnails[499995]=new thumbnail(499995,"38978","Moored","moored_thumb.jpg",130,188,1);thumbnails[499998]=new thumbnail(499998,"38978","Isolation","figure on the beach_thumb.jpg",130,91,1);thumbnails[500008]=new thumbnail(500008,"38978","two Boats","two boats on beach_thumb.jpg",130,189,1);thumbnails[500011]=new thumbnail(500011,"38978","Evening Light","island_thumb.jpg",130,87,1);thumbnails[500012]=new thumbnail(500012,"38978","Moored Landscape","boat euist 2_thumb.jpg",130,86,1);thumbnails[500019]=new thumbnail(500019,"38978","lewis Stream","Lewis stream_thumb.jpg",130,77,1);thumbnails[500020]=new thumbnail(500020,"38978","Fishing Boat","fishing boat_thumb.jpg",130,184,1);thumbnails[500024]=new thumbnail(500024,"38978","moored fishing boat","boat 3_thumb.jpg",130,184,1);thumbnails[236272]=new thumbnail(236272,"21314","Gannet ","gannet-1-Morus-bassanus-_thumb.jpg",130,91,1);thumbnails[236274]=new thumbnail(236274,"21314","Low Flying Puffin","low-flying-puffin_thumb.jpg",130,88,1);thumbnails[236282]=new thumbnail(236282,"51562","Breaking Waves","roker-3_thumb.jpg",130,88,1);thumbnails[236288]=new thumbnail(236288,"21318","Staithes ","wait-for-tide_thumb.jpg",130,195,1);thumbnails[236290]=new thumbnail(236290,"21318","Staithes Village ","staithes-village_thumb.jpg",130,89,1);thumbnails[237137]=new thumbnail(237137,"21318","Moored Boats","staithes-2_thumb.jpg",130,87,1);thumbnails[237186]=new thumbnail(237186,"21425","Millennium Bridge","millennium-2_thumb.jpg",130,89,1);thumbnails[237211]=new thumbnail(237211,"21425","Millennium View 2","millennium-3_thumb.jpg",130,86,1);thumbnails[237216]=new thumbnail(237216,"21425","Millennium View 3","millennium-5_thumb.jpg",130,171,1);thumbnails[237222]=new thumbnail(237222,"21425","Millennium View 4","millennium-6_thumb.jpg",130,171,1);thumbnails[237224]=new thumbnail(237224,"21425","Millennium View 5","millennium-7_thumb.jpg",130,76,1);thumbnails[237227]=new thumbnail(237227,"21425","Millenium View 6<br>\r\n","millennium-8_thumb.jpg",130,87,1);thumbnails[237236]=new thumbnail(237236,"21440","We kiss in the shadows","kiss-in-the-shadows2_thumb.jpg",130,187,1);thumbnails[237270]=new thumbnail(237270,"21440","Angel panoramic","angel-5-panoramic_thumb.jpg",130,53,1);thumbnails[237272]=new thumbnail(237272,"21440","Angel Glow","angel-glow_thumb.jpg",130,120,1);thumbnails[237274]=new thumbnail(237274,"21440","Angel Head","angel-head-2_thumb.jpg",130,92,1);thumbnails[237276]=new thumbnail(237276,"21440","Angel in the Trees","angel-in-the-trees_thumb.jpg",130,88,1);thumbnails[237277]=new thumbnail(237277,"21440","Angel Sunset","angel-sunset_thumb.jpg",130,109,1);thumbnails[237281]=new thumbnail(237281,"21440","Sage at night","sage-night_thumb.jpg",130,96,1);thumbnails[238647]=new thumbnail(238647,"21318","Stormy Lighting","stormy-light_thumb.jpg",130,185,1);thumbnails[238698]=new thumbnail(238698,"21567","Broken Pot","spurn1_thumb.jpg",130,183,1);thumbnails[238704]=new thumbnail(238704,"21567","Lighthouse view","spurn2_thumb.jpg",130,179,1);thumbnails[238721]=new thumbnail(238721,"21567","Weathered Timber 2","spurn4_thumb.jpg",130,183,1);thumbnails[238728]=new thumbnail(238728,"21567","Weathered Timber","spurn3_thumb.jpg",130,183,1);thumbnails[238784]=new thumbnail(238784,"21576","Bev","bev-blue2_thumb.jpg",130,108,1);thumbnails[238786]=new thumbnail(238786,"21576","BevLee","bevlee_thumb.jpg",130,166,1);thumbnails[238791]=new thumbnail(238791,"21576","Charlotte","charlotte6_thumb.jpg",130,174,1);thumbnails[238795]=new thumbnail(238795,"21576","Charlotte 2","charlotte-mono_thumb.jpg",130,174,1);thumbnails[238802]=new thumbnail(238802,"21576","baby soft","hand_edited_thumb.jpg",130,145,1);thumbnails[238803]=new thumbnail(238803,"21576","Sam","sam_thumb.jpg",130,163,1);thumbnails[238806]=new thumbnail(238806,"21576","Seduction","seduction_thumb.jpg",130,165,1);thumbnails[238807]=new thumbnail(238807,"21576","The Touch of your Lips","touch-of-your-lips_thumb.jpg",130,97,1);thumbnails[238839]=new thumbnail(238839,"21314","Seagull","gull_thumb.jpg",130,86,1);thumbnails[238841]=new thumbnail(238841,"21314","Diving Gull","gull-dive_thumb.jpg",130,102,1);thumbnails[238842]=new thumbnail(238842,"21314","Puffin","puffin_thumb.jpg",130,95,1);thumbnails[238844]=new thumbnail(238844,"21314","Puffin View","puffin-looking_thumb.jpg",130,88,1);thumbnails[238845]=new thumbnail(238845,"21314","Feeding Puffins","puffins-feed-10x8_thumb.jpg",130,102,1);thumbnails[238846]=new thumbnail(238846,"21314","Two Gulls","two-gulls_thumb.jpg",130,86,1);thumbnails[238861]=new thumbnail(238861,"21597","Goldfinch","goldfinch_thumb.jpg",130,86,1);thumbnails[238865]=new thumbnail(238865,"21597","Kingfisher","kingfisher-A4_thumb.jpg",130,187,1);thumbnails[238868]=new thumbnail(238868,"21597","Meadow Pippet","meadow-pippet_thumb.jpg",130,93,1);thumbnails[238873]=new thumbnail(238873,"21597","Robin","robin_thumb.jpg",130,95,1);thumbnails[238876]=new thumbnail(238876,"21597","Woodpecker","woodpecker3_thumb.jpg",130,171,1);thumbnails[239621]=new thumbnail(239621,"21318","Threatening Rain","threatening-rain_thumb.jpg",130,91,1);thumbnails[240944]=new thumbnail(240944,"51560","Skidby Mill","skidby-mill_thumb.jpg",130,199,1);thumbnails[240946]=new thumbnail(240946,"51559","Helmsley","Helmsley_thumb.jpg",130,90,1);thumbnails[240949]=new thumbnail(240949,"21784","Bellow in the Mist","A3-Stag-bellow-mist2_thumb.jpg",130,93,1);thumbnails[240955]=new thumbnail(240955,"21784","Morning Deer","morning-deer_thumb.jpg",130,87,1);thumbnails[240956]=new thumbnail(240956,"21785","Spring Lambs","jump-lamb1_thumb.jpg",130,96,1);thumbnails[240964]=new thumbnail(240964,"21785","Lamb Landscape","lamb-landscape_thumb.jpg",130,98,1);thumbnails[240970]=new thumbnail(240970,"51559","Helmsley in Spring","Helmsley-protrait_thumb.jpg",130,195,1);thumbnails[241909]=new thumbnail(241909,"21846","SOund of Sleat","Isle-of-Skye-sound-of-sleat_thumb.jpg",130,191,1);thumbnails[241925]=new thumbnail(241925,"21848","The Island of Hoy taken at sunset. ","hoy-sunset_thumb.jpg",130,102,1);thumbnails[241936]=new thumbnail(241936,"21848","Lerwick","lerwick_thumb.jpg",130,195,1);thumbnails[241946]=new thumbnail(241946,"21848","Deserted and derelict","dead-gull_thumb.jpg",130,195,1);thumbnails[241948]=new thumbnail(241948,"21848","Hoy Sunset panorama","hoy-sunset-pano-1_thumb.jpg",130,46,1);thumbnails[241955]=new thumbnail(241955,"21848","Rowing Boat","rowing-boat_thumb.jpg",130,195,1);thumbnails[241965]=new thumbnail(241965,"21852","Mallaig harbour","mallaig_thumb.jpg",130,86,1);thumbnails[242332]=new thumbnail(242332,"21848","Hoy Sunset","island-sunset_thumb.jpg",130,87,1);thumbnails[242337]=new thumbnail(242337,"21846","Morning","sound-of-fleet-morning_thumb.jpg",130,87,1);thumbnails[242365]=new thumbnail(242365,"21846","Last Light","sound-of-fleet-last-light_thumb.jpg",130,88,1);thumbnails[243996]=new thumbnail(243996,"51563","Bridlington","bridlington_thumb.jpg",130,42,1);thumbnails[243997]=new thumbnail(243997,"51563","Runswick Bay","runswick-bay_thumb.jpg",130,86,1);thumbnails[244007]=new thumbnail(244007,"51564","Durham","A3-cottages-light-ray_thumb.jpg",130,93,1);thumbnails[244012]=new thumbnail(244012,"51552","Stokesley","autumn-lane2_thumb.jpg",130,91,1);thumbnails[244018]=new thumbnail(244018,"51552","Autumn Leaves","autumn-leaves_thumb.jpg",130,86,1);thumbnails[244020]=new thumbnail(244020,"51564","Fullwell Mill","fulwell-mill-silhouette_thumb.jpg",130,209,1);thumbnails[244026]=new thumbnail(244026,"51563","Thornton Le Dale","thornton-le-dale_thumb.jpg",130,89,1);thumbnails[244030]=new thumbnail(244030,"51563","Single tree","tree-autumn_thumb.jpg",130,197,1);thumbnails[244035]=new thumbnail(244035,"51563","Field Patterns","grass_thumb.jpg",130,85,1);thumbnails[244040]=new thumbnail(244040,"21425","City Nights","city-nights3_thumb.jpg",130,96,1);thumbnails[247032]=new thumbnail(247032,"21567","Smeatons Lighthouse","tower-spuirn_thumb.jpg",130,87,1);thumbnails[247062]=new thumbnail(247062,"51564","Lindisfarne Castle","Lindisfarne_thumb.jpg",130,87,1);thumbnails[352638]=new thumbnail(352638,"29169","Poppy field at sunset","poppy_thumb.jpg",130,195,1);thumbnails[352645]=new thumbnail(352645,"29169","Panoramic view of a poppy field","poppy panorama_thumb.jpg",130,66,1);thumbnails[520342]=new thumbnail(520342,"21784","Stag","stag_thumb.jpg",130,182,1);thumbnails[520364]=new thumbnail(520364,"21852","Stalker Castle 5","stalker castle 5_thumb.jpg",130,180,1);thumbnails[520375]=new thumbnail(520375,"44361","Flamborough head","flamborough_thumb.jpg",130,190,1);thumbnails[520377]=new thumbnail(520377,"51558","Fountains Abbey","fountains cloister_thumb.jpg",130,97,1);thumbnails[575054]=new thumbnail(575054,"51567","The Humber Bridge at night.","humber bridge_thumb.jpg",130,87,1);thumbnails[575107]=new thumbnail(575107,"21425","Tyne panorama at night","tyne-reflections3_thumb.jpg",130,57,1);thumbnails[575133]=new thumbnail(575133,"44361","North Bay","north bay_thumb.jpg",130,92,1);thumbnails[575141]=new thumbnail(575141,"44361","North Bay 4","northbay4_thumb.jpg",130,185,1);thumbnails[575143]=new thumbnail(575143,"44361","North Bay 2","northbay 2_thumb.jpg",130,179,1);thumbnails[589970]=new thumbnail(589970,"45405","Autumn 1","autumn portrait_thumb.jpg",130,193,1);thumbnails[589978]=new thumbnail(589978,"45405","Autumn Tree","autumn tree 2_thumb.jpg",130,195,1);thumbnails[589983]=new thumbnail(589983,"45405","Autumn tree landscape","autumn tree_thumb.jpg",130,94,1);thumbnails[589995]=new thumbnail(589995,"45405","Rotten","rotten_thumb.jpg",130,195,1);thumbnails[721752]=new thumbnail(721752,"55546","Industrial Heritage","industrial heritage_thumb.jpg",130,93,1);thumbnails[721755]=new thumbnail(721755,"55546","Miner hat","miners hat_thumb.jpg",130,176,1);thumbnails[721756]=new thumbnail(721756,"55546","Wheel Shadow","Wheel Shadow 1_thumb.jpg",130,100,1);thumbnails[721762]=new thumbnail(721762,"55546","Woodhorn Winch","Woodhorn Winch_thumb.jpg",130,173,1);var galleries=new Object();galleries[21783]=new gallery(21783,"520342,520336,520332,520327,520321,520312,500194,240964,240956,240955","Animals","gallery",[]);galleries[21585]=new gallery(21585,"238876,238873,238868,238865,238861,238846,238845,238844,238842,238841","Birds","gallery",[]);galleries[21784]=new gallery(21784,"520342,520336,520332,520327,520321,520312,500194,240955,240949","Deer","gallery",[520312,520321,520327,520332,520336,500194,240949,240955,520342]);galleries[44361]=new gallery(44361,"575143,575141,575133,520375","Flamborough","gallery",[520375,575133,575141,575143]);galleries[51558]=new gallery(51558,"520377","Fountains Abbey","gallery",[520377]);galleries[21597]=new gallery(21597,"238876,238873,238868,238865,238861","Garden Birds","gallery",[238861,238865,238868,238873,238876]);galleries[21440]=new gallery(21440,"237281,237277,237276,237274,237272,237270,237236","Gateshead","gallery",[237236,237270,237272,237274,237276,237277,237281]);galleries[51559]=new gallery(51559,"240970,240946","Helmsley","gallery",[240946,240970]);galleries[51561]=new gallery(51561,"575054,247032,240944,238728,238721,238704,238698","Humberside","gallery",[]);galleries[55546]=new gallery(55546,"721762,721756,721755,721752","Industrial","gallery",[721752,721755,721756,721762]);galleries[21852]=new gallery(21852,"520364,520363,500188,500186,241965","Mainland","gallery",[500186,500188,520363,241965,520364]);galleries[51567]=new gallery(51567,"575054","Misc Humberside","gallery",[575054]);galleries[51564]=new gallery(51564,"247062,244020,244007","Misc North east Images","gallery",[244007,244020,247062]);galleries[51563]=new gallery(51563,"244035,244030,244026,243997,243996","Misc Yorkshire Pictures","gallery",[243996,243997,244026,244030,244035]);galleries[45405]=new gallery(45405,"589995,589983,589978,589970","Moors","gallery",[589970,589978,589983,589995]);galleries[21425]=new gallery(21425,"575107,244040,237227,237224,237222,237216,237211,237186","Newcastle","gallery",[237186,237211,237216,237222,237224,237227,244040,575107]);galleries[21424]=new gallery(21424,"575107,247062,244040,244020,244007,237281,237277,237276,237274,237272","North east England","gallery",[]);galleries[38978]=new gallery(38978,"500024,500020,500019,500012,500011,500008,499998,499995,499993,499990","Outer Hebrides","gallery",[499926,499939,499956,499965,499974,499981,499986,499988,499990,499993,499995,499998,500008,500011,500012,500019,500020,500024]);galleries[21576]=new gallery(21576,"238807,238806,238803,238802,238795,238791,238786,238784","Portraits","gallery",[238784,238786,238791,238795,238802,238803,238806,238807]);galleries[21844]=new gallery(21844,"520364,520363,500188,500186,500024,500020,500019,500012,500011,500008","Scotland","gallery",[]);galleries[21314]=new gallery(21314,"238846,238845,238844,238842,238841,238839,236274,236272","Sea Birds","gallery",[236272,236274,238839,238841,238842,238844,238845,238846]);galleries[21848]=new gallery(21848,"242332,241955,241948,241946,241936,241925","Shetlands","gallery",[241925,241936,241946,241948,241955,242332]);galleries[51560]=new gallery(51560,"240944","Skidby Mill","gallery",[240944]);galleries[115709]=new gallery(115709,"","South Shields","gallery",[]);galleries[21785]=new gallery(21785,"240964,240956","Spring Lambs","gallery",[240956,240964]);galleries[21567]=new gallery(21567,"247032,238728,238721,238704,238698","Spurn Head","gallery",[238698,238704,238721,238728,247032]);galleries[21318]=new gallery(21318,"239621,238647,237137,236290,236288","Staithes","gallery",[236288,236290,237137,238647,239621]);galleries[51552]=new gallery(51552,"244018,244012","Stokesley","gallery",[244012,244018]);galleries[51562]=new gallery(51562,"236282,236246","Stormy Seas","gallery",[236246,236282]);galleries[29169]=new gallery(29169,"352645,352638","Summer Colour","gallery",[352638,352645]);galleries[21846]=new gallery(21846,"242365,242337,241909","The Hebrides","gallery",[241909,242337,242365]);galleries[21781]=new gallery(21781,"589995,589983,589978,589970,575143,575141,575133,520377,520375,352645","Yorkshire","gallery",[]);var imageSets=new Object();imageSets[1]="236246";imageSets[3]="721762,721756,721755,721752,589995,589983,589978,589970,575143,575141,575133,575107,575054,520377,520375,520364,520363,520342,520336,520332,520327,520321,520312,500194,500188,500186,500024,500020,500019,500012,500011,500008,499998,499995,499993,499990,499988,499986,499981,499974,499965,499956,499939,499926,352645,352638,247062,247032,244040,244035";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/johnshort/images";break}switch(a){case 1:b="http://www1.clikpic.com/johnshort/images";break}switch(a){case 2:b="http://admin.clikpic.com/johnshort/images";break}switch(a){case 4:b="http://www.clikchurch.com/johnshort/images";break}switch(a){case 5:b="http://www2.clikpic.com/johnshort/images";break}switch(a){case 15:b="http://www3.clikpic.com/johnshort/images";break}switch(a){case 21:b="http://www6.clikpic.com/johnshort/images";break}switch(a){case 18:b="http://www4.clikpic.com/johnshort/images";break}switch(a){case 19:b="http://www5.clikpic.com/johnshort/images";break}switch(a){case 22:b="http://tpc5/clikpic/johnshort/images";break}switch(a){case 23:b="http://tpc10/clikpic/johnshort/images";break}switch(a){case 24:b="http://tpc15/clikpic/johnshort/images";break}switch(a){case 25:b="http://tpc16/clikpic/johnshort/images";break}switch(a){case 31:b="http://www7.clikpic.com/johnshort/images";break}switch(a){case 32:b="http://admin2.clikpic.com/johnshort/images";break}switch(a){case 33:b="http://www8.clikpic.com/johnshort/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="canonphoto: "+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>John R Short </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="johnrshort@btinternet.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="johnrshort@btinternet.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+'")'})}}};