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[5345691]=new thumbnail(5345691,"207744","Remains of an old pipeline at Hodbarrow Point.","IMG_6353_thumb.JPG",130,87,18);thumbnails[3643874]=new thumbnail(3643874,"222734","Althea Bleekman riding Coppindell Pizarro.","Althea_Bleekman0_thumb.JPG",130,195,18);thumbnails[3643879]=new thumbnail(3643879,"222734","Andrew Nicholson riding Kellistown Rover.","Andrew_Nicholson0_thumb.JPG",130,195,18);thumbnails[3643881]=new thumbnail(3643881,"222734","William Fox-Pitt riding Corofin Flyer.","william_Fox-Pitt0_thumb.JPG",130,195,18);thumbnails[3643883]=new thumbnail(3643883,"222734","William Fox-Pitt riding Corofin Flyer.","william_Fox-Pitt2_thumb.JPG",130,195,18);thumbnails[3655888]=new thumbnail(3655888,"222734","Christine Hardinge riding Crown Amazonite.","Christine_Hardinge0_thumb.JPG",130,195,18);thumbnails[3655922]=new thumbnail(3655922,"222734","Daisy Dick riding Tsaro.","Daisy_Dick_thumb.JPG",130,195,18);thumbnails[3655988]=new thumbnail(3655988,"222734","Lucinda Fredericks riding Erocia.","Lucinda_Fredericks_thumb.JPG",130,87,18);thumbnails[3655992]=new thumbnail(3655992,"222734","Danielle Dunn riding Boundalong.","Danielle_Dunn_thumb.JPG",130,195,18);thumbnails[3655993]=new thumbnail(3655993,"222734","Emily King riding King Joules.","Emily_King_thumb.JPG",130,195,18);thumbnails[3401435]=new thumbnail(3401435,"207746","KART #23 ","_MG_3378_thumb.JPG",130,92,18);thumbnails[3416635]=new thumbnail(3416635,"207746","Practice Lap at Clay Pigeon","_MG_3413_thumb.JPG",130,92,18);thumbnails[3416650]=new thumbnail(3416650,"207746","Kart 51 on a Practice Lap","_MG_4030_thumb.JPG",130,87,18);thumbnails[3401471]=new thumbnail(3401471,"207751","Robin (Erithacus rubecula)","_MG_2837_thumb.JPG",130,87,18);thumbnails[3400968]=new thumbnail(3400968,"204751","Golden Sunset Over The Duddon Estuary.","_MG_0953LSCAPES_thumb.JPG",130,195,18);thumbnails[3401439]=new thumbnail(3401439,"207744","The Old Sea Wall & Hodbarrow Lagoon. ","_MG_0674_thumb.JPG",130,87,18);thumbnails[3400936]=new thumbnail(3400936,"204751","Haverigg & Black Combe (1970 ft.)","_MG_0657LSCAPES_thumb.JPG",130,87,18);thumbnails[3400877]=new thumbnail(3400877,"204751","Hodbarrow Point from Millom Pier, Millom, Cumbria","_MG_0419LSCAPES_thumb.JPG",130,87,18);thumbnails[3418807]=new thumbnail(3418807,"207751","Female House Sparrow(Passer domesticus)","_MG_0121_thumb.JPG",130,173,18);thumbnails[3354870]=new thumbnail(3354870,"204751","Bluebell Woods Near Minterne Magna, Dorset.","_MG_4901aweb_thumb.JPG",130,195,18);thumbnails[3419714]=new thumbnail(3419714,"207744","Black Combe Across Hodbarrow","_MG_1803web_thumb.JPG",130,195,18);thumbnails[3419715]=new thumbnail(3419715,"204751","West Bay, Dorset","_MG_4051aweb_thumb.JPG",130,87,18);thumbnails[3419858]=new thumbnail(3419858,"204751","Pulpit Rock, Portland, Dorset","Portland Feb 07_078aweb_thumb.JPG",130,87,18);thumbnails[3420114]=new thumbnail(3420114,"208977","Carder Bee (Bombus pascuorum)","_MG_7280web_thumb.JPG",130,195,18);thumbnails[3420117]=new thumbnail(3420117,"208977","Large White Butterfly (Pieris brassicae)","_MG_7276web_thumb.JPG",130,195,18);thumbnails[3420121]=new thumbnail(3420121,"207751","Eurasian Eagle Owl(Bubo bubo)","_MG_6784web_thumb.JPG",130,87,18);thumbnails[3420123]=new thumbnail(3420123,"207751","Harris Hawk(Parabuteo unicinctus)","_MG_6709web_thumb.JPG",130,195,18);thumbnails[3420124]=new thumbnail(3420124,"207751","Sandwich Tern(Thalasseus sandvicensis) with Sand Eel","_MG_5586web_thumb.JPG",130,87,18);thumbnails[3420126]=new thumbnail(3420126,"208975","Stop Copying Me!","_MG_0771web_thumb.JPG",130,87,18);thumbnails[3541370]=new thumbnail(3541370,"207744","The Old Sea Wall with Hodbarrow Beacon & Windmill.","Hodbarrow_OSW1a_thumb.JPG",130,87,18);thumbnails[3541373]=new thumbnail(3541373,"207744","The Outer Barrier with Hodbarrow Beacon & the Old Sea Wall.","IMG_6405_thumb.JPG",130,87,18);thumbnails[3543759]=new thumbnail(3543759,"207744","Water Sports.","Wake_Boarding1_thumb.JPG",130,87,18);thumbnails[3543761]=new thumbnail(3543761,"207744","Limestone cliff of Hodbarrow Point.","Towsey2_thumb.JPG",130,87,18);thumbnails[3543763]=new thumbnail(3543763,"207744","Towsey Hole.","Towsey_Hole1_thumb.JPG",130,87,18);thumbnails[3543766]=new thumbnail(3543766,"207744","Redhills' Quarry.","Redhills_Quarry1_thumb.JPG",130,87,18);thumbnails[3543782]=new thumbnail(3543782,"207744","Outer Barrier Lighthouse.","Outer_Barrier_Lighthouse1_thumb.JPG",130,195,18);thumbnails[3543786]=new thumbnail(3543786,"207744","Water Cistern.","Old_Water_Cistern1_thumb.JPG",130,87,18);thumbnails[3543790]=new thumbnail(3543790,"207744","Old Sea Wall and Hodbarrow Beacon.","Old_Sea_Wall_Top1_thumb.JPG",130,87,18);thumbnails[3543793]=new thumbnail(3543793,"207744","No.6 & 7 shafts. ","No61_thumb.JPG",130,87,18);thumbnails[3543797]=new thumbnail(3543797,"207744","Remains of No.8.","No10_1_thumb.JPG",130,195,18);thumbnails[3543798]=new thumbnail(3543798,"207744","Hodbarrow Quarry.","Hodbarrow_Quarry1_thumb.JPG",130,87,18);thumbnails[3543804]=new thumbnail(3543804,"207744","Close up of one of the beams of Annie lowther Pit's engine house with hodbarrow Beacon Behind.","Beam1_thumb.JPG",130,195,18);thumbnails[3543806]=new thumbnail(3543806,"207744","Remains of Annie Lowther Pit.","Annie_lowther1_thumb.JPG",130,87,18);thumbnails[3543810]=new thumbnail(3543810,"207744","Sea plane landing on Hodbarrow.","Aeroplane0_thumb.JPG",130,87,18);thumbnails[3543833]=new thumbnail(3543833,"207744","Close up of the Old Sea Wall.","OSW_close_up1_thumb.JPG",130,87,18);thumbnails[3544397]=new thumbnail(3544397,"207744","Looking across Hodbarrow to Black Combe.","Hodbarrow__Black_Combe1_thumb.JPG",130,87,18);thumbnails[3544426]=new thumbnail(3544426,"207744","Hodbarrow Windmill.","HM20_thumb.JPG",130,87,18);thumbnails[3547316]=new thumbnail(3547316,"207744","Map of Hodbarrow.","MAP_Modified_thumb.JPG",130,92,18);thumbnails[3821332]=new thumbnail(3821332,"208977","Red Damselfly (Pyrrhosoma nymphula) on Ragged Robin flower (Lychnis flos-cuculi)","Red_Damselfly0_thumb.JPG",130,195,18);thumbnails[3821346]=new thumbnail(3821346,"204751","Grey Heron (Ardea cinerea)  At Dawn","Heron0_thumb.JPG",130,195,18);thumbnails[3821351]=new thumbnail(3821351,"207751","Canada Goose (Branta canadensis)","Canada_Goose0_thumb.JPG",130,195,18);thumbnails[4819502]=new thumbnail(4819502,"275348","","Nicola_Morgan0NM_thumb.JPG",130,195,18);thumbnails[4819504]=new thumbnail(4819504,"275348","","Nicola_Morgan1NM_thumb.JPG",130,87,18);thumbnails[4819506]=new thumbnail(4819506,"275348","","Nicola_Morgan3NM_thumb.JPG",130,195,18);thumbnails[4819507]=new thumbnail(4819507,"275348","","Nicola_Morgan15NM_thumb.JPG",130,195,18);thumbnails[4819513]=new thumbnail(4819513,"275348","","Nicola_Morgan17NM_thumb.JPG",130,195,18);thumbnails[4819514]=new thumbnail(4819514,"275348","","Nicola_Morgan33NM_thumb.JPG",130,195,18);thumbnails[4819516]=new thumbnail(4819516,"275348","","Nicola_Morgan23NM_thumb.JPG",130,195,18);thumbnails[5345685]=new thumbnail(5345685,"204751","Hodbarrow Point at dawn","IMG_6304_thumb.JPG",130,87,18);thumbnails[5345690]=new thumbnail(5345690,"204751","Hodbarrow Point","IMG_6331_thumb.JPG",130,87,18);thumbnails[5345693]=new thumbnail(5345693,"207744","Old explosives store on Hodbarrow Mains, looking toward Coniston Old Man","IMG_6480_thumb.JPG",130,87,18);thumbnails[5345697]=new thumbnail(5345697,"207744","Hodbarrow Quarry","IMG_6531_thumb.JPG",130,87,18);thumbnails[5372212]=new thumbnail(5372212,"232907","","Warning_thumb.jpg",130,195,18);thumbnails[5395019]=new thumbnail(5395019,"207751","Dipper (Cinclus cinclus)","IMG_4443_thumb.JPG",130,87,18);thumbnails[5395035]=new thumbnail(5395035,"204751","Fingle Bridge","Fingle_Bridge_thumb.JPG",130,195,18);thumbnails[5395042]=new thumbnail(5395042,"208977","Scarlet Tiger Moth (Callimorpha dominula)","IMG_1488_thumb.JPG",130,87,18);thumbnails[5395071]=new thumbnail(5395071,"","Edith at 90","Grandma0_thumb.JPG",130,195,18);thumbnails[5399323]=new thumbnail(5399323,"208975","Roe Deer (Capreolus capreolus)","IMG_3601DSCL_thumb.JPG",130,87,18);thumbnails[5399342]=new thumbnail(5399342,"204751","Beccy Falls","IMG_4864DSCL_thumb.JPG",130,195,18);thumbnails[5399345]=new thumbnail(5399345,"204751","Yewbarrow (2058 ft.)","IMG_6957DSCL_thumb.JPG",130,195,18);thumbnails[5399385]=new thumbnail(5399385,"204751","Great Gable (2949 ft.)","IMG_7049DSCL_thumb.JPG",130,195,18);thumbnails[5399392]=new thumbnail(5399392,"204751","The fells of Wasdale Head & Wastwater from Countess Beck","IMG_7002DSCL_thumb.JPG",130,87,18);thumbnails[5399431]=new thumbnail(5399431,"204751","Black Combe (1970 ft.) from the ancient British village on Woodland Fell","IMG_6929DSCL_thumb.JPG",130,87,18);thumbnails[5399453]=new thumbnail(5399453,"","Meghan","IMG_5752DSCL_thumb.JPG",130,195,18);thumbnails[5410105]=new thumbnail(5410105,"207751","Mandarin Drake (Aix galericulata)","BIRD_8_thumb.JPG",130,87,18);thumbnails[5410130]=new thumbnail(5410130,"208977","Emperor Dragonfly (Anax imperator)","INSECT_5_thumb.JPG",130,87,18);thumbnails[5410462]=new thumbnail(5410462,"208975","Galloway Cattle (Bos secies)","MAM_3_thumb.JPG",130,195,18);thumbnails[5410466]=new thumbnail(5410466,"208977","Seven Spot Ladybird (Coccinella 7-punctata)","INSECT_6_thumb.JPG",130,87,18);thumbnails[5410945]=new thumbnail(5410945,"207744","Hodbarrow Beacon Reflected in the Lagoon with Black Combe in the distance ","HM24_thumb.JPG",130,87,18);thumbnails[5410953]=new thumbnail(5410953,"207744","Outerbarrier From Hodbarrow Beacon","HM25_thumb.JPG",130,87,18);thumbnails[3821341]=new thumbnail(3821341,"232907","Grass Snake","Grass_Snake0_thumb.JPG",130,87,18);var galleries=new Object();galleries[222734]=new gallery(222734,"3655993,3655992,3655988,3655922,3655888,3643883,3643881,3643879,3643874","ALDON HORSE TRIALS","gallery",[3643874,3643879,3643881,3643883,3655888,3655922,3655988,3655992,3655993]);galleries[207751]=new gallery(207751,"5410105,5395019,3821351,3420124,3420123,3420121,3418807,3401471","BIRDS","gallery",[3401471,3418807,3420121,3420123,3420124,3821351,5395019,5410105]);galleries[207746]=new gallery(207746,"3416650,3416635,3401435","CLAY PIGEON KART RACING CIRCUIT","gallery",[3401435,3416635,3416650]);galleries[207744]=new gallery(207744,"5410953,5410945,5345697,5345693,5345691,3544426,3544397,3543833,3543810,3543798,3543790,3543782,3543761,3543759,3541373,3541370,3419714,3401439","HODBARROW MINES (1855 - 1968)","gallery",[5345691,3401439,3419714,3541370,3541373,3543759,3543761,3543763,3543766,3543782,3543786,3543790,3543793,3543797,3543798,3543804,3543806,3543810,3543833,3544397,3544426,3547316,5345693,5345697,5410945,5410953]);galleries[208977]=new gallery(208977,"5410466,5410130,5395042,3821332,3420117,3420114","INSECTS","gallery",[3420114,3420117,3821332,5395042,5410130,5410466]);galleries[204751]=new gallery(204751,"5399431,5399392,5399385,5399345,5399342,5395035,5345690,5345685,3821346,3419858,3419715,3400968,3400936,3400877,3354870","LANDSCAPES","gallery",[3400968,3400936,3400877,3354870,3419715,3419858,3821346,5345685,5345690,5395035,5399342,5399345,5399385,5399392,5399431]);galleries[208975]=new gallery(208975,"5410462,5399323,3420126","MAMMALS","gallery",[3420126,5399323,5410462]);galleries[275348]=new gallery(275348,"4819516,4819514,4819513,4819507,4819506,4819504,4819502","NICOLA MORGAN - TRIATHLETE","gallery",[4819502,4819504,4819506,4819507,4819513,4819514,4819516]);galleries[232907]=new gallery(232907,"5372212","REPTILES","gallery",[5372212,3821341]);galleries[206761]=new gallery(206761,"3655993,3655992,3655988,3655922,3655888,3643883,3643881,3643879,3643874,3416650,3416635,3401435","SPORT","gallery",[]);galleries[207750]=new gallery(207750,"5410466,5410462,5410130,5410105,5399323,5395042,5395019,5372212,3821351,3821332,3420126,3420124,3420123,3420121,3420117,3420114,3418807,3401471","WILDLIFE","gallery",[]);var imageSets=new Object();imageSets[1]="5410953,5410945,5410466,5410462,5410130,5410105,5399453,5399431,5399392,5399385,5399345,5399342,5399323,5395071,5395042,5395035,5395019,5345697,5345693,5345691,5345690,5345685,4819516,4819514,4819513,4819507,4819506,4819504,4819502,3821351,3821346,3821332,3655993,3655992,3655988,3655922,3655888,3643883,3643881,3643879,3643874,3544426,3544397,3543833,3543782,3543759,3541373,3541370,3420126,3420124,3420123,3420121,3420117,3420114,3419858,3419715,3419714,3418807,3416650,3416635,3401471,3401439,3401435,3400968,3400936,3400877,3354870";imageSets[2]="5410953,5410945,5410466,5410462,5410130,5410105,5399453,5399431,5399392,5399385,5399345,5399342,5399323,5395071,5395042,5395035,5395019,5372212,5345697,5345693,5345691,5345690,5345685,3821351,3821346,3821332,3655993,3655992,3655988,3655922,3655888,3643883,3643881,3643879,3643874,3544426,3544397,3543833,3543810,3543798,3543790,3543782,3543761,3543759,3541373,3541370,3420126,3420124,3420123,3420121,3420117,3420114,3419858,3419715,3419714,3418807,3416650,3416635,3401471,3401439,3401435,3400968,3400936,3400877,3354870";imageSets[3]="5410953,5410945,5410466,5410462,5410130,5410105,5399453,5399431,5399392,5399385,5399345,5399342,5399323,5395071,5395042,5395035,5395019,5345697,5345693,5345691,5345690,5345685,3541373,3400936";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/kirkphoto/images";break}switch(a){case 1:b="http://www1.clikpic.com/kirkphoto/images";break}switch(a){case 2:b="http://admin.clikpic.com/kirkphoto/images";break}switch(a){case 24:b="http://tpc15/clikpic/kirkphoto/images";break}switch(a){case 4:b="http://www.clikchurch.com/kirkphoto/images";break}switch(a){case 5:b="http://www2.clikpic.com/kirkphoto/images";break}switch(a){case 22:b="http://tpc5/clikpic/kirkphoto/images";break}switch(a){case 23:b="http://tpc10/clikpic/kirkphoto/images";break}switch(a){case 25:b="http://tpc16/clikpic/kirkphoto/images";break}switch(a){case 15:b="http://www3.clikpic.com/kirkphoto/images";break}switch(a){case 18:b="http://www4.clikpic.com/kirkphoto/images";break}switch(a){case 19:b="http://www5.clikpic.com/kirkphoto/images";break}switch(a){case 31:b="http://www7.clikpic.com/kirkphoto/images";break}switch(a){case 32:b="http://admin2.clikpic.com/kirkphoto/images";break}switch(a){case 33:b="http://www8.clikpic.com/kirkphoto/images";break}switch(a){case 34:b="http://www9.clikpic.com/kirkphoto/images";break}switch(a){case 35:b="http://admin3.clikpic.com/kirkphoto/images";break}switch(a){case 37:b="http://admin4.clikpic.com/kirkphoto/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="KIRK PHOTO: "+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="kirkphoto@supanet.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="kirkphoto@supanet.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+'")'})}}};