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[1695212]=new thumbnail(1695212,"112232","","balloon 0low  stormcolour_thumb.jpg",130,87,1);thumbnails[2004996]=new thumbnail(2004996,"","","tartan dragon 3 copy_thumb.jpg",130,94,1);thumbnails[5870751]=new thumbnail(5870751,"112232","","Aberystwyth_lowres1_thumb.jpg",130,87,1);thumbnails[1655195]=new thumbnail(1655195,"112232","","bwcolour huntjpg low res1_thumb.jpg",130,91,1);thumbnails[1662741]=new thumbnail(1662741,"112232","Portrait of Berriew","Berriewlow_thumb.jpg",130,195,1);thumbnails[2943699]=new thumbnail(2943699,"112232","On Time, steam train at Llangollen","llangollen 088bc_thumb.jpg",130,195,1);thumbnails[2885620]=new thumbnail(2885620,"179109","Please click on the voucher for more details","voucherlow_thumb.jpg",130,68,1);thumbnails[1655201]=new thumbnail(1655201,"112232","Hot Air Balloon over Church St, Welshpool","corn store st mary's low res_thumb.jpg",130,86,1);thumbnails[1662744]=new thumbnail(1662744,"112232","Llangollen, not to be missed while in Wales","llangollanlow_thumb.jpg",130,195,1);thumbnails[1662814]=new thumbnail(1662814,"112232","Portrait of Montgomery","montgomerylow1_thumb.jpg",130,195,1);thumbnails[1714180]=new thumbnail(1714180,"112232","HRH The Prince of Wales at Leighton 8th June 2007","HRHPrinceofWaleslow_thumb.jpg",130,195,1);thumbnails[1655189]=new thumbnail(1655189,"112232","","A storm at the old station low res_thumb.jpg",130,86,1);thumbnails[1662819]=new thumbnail(1662819,"112232","The Best of Welshpool Powys","welshpoollow_thumb.jpg",130,195,1);thumbnails[1712605]=new thumbnail(1712605,"112232","Dambuster over Lake Vyrnwy","vernwylow_thumb.jpg",130,195,1);thumbnails[1662821]=new thumbnail(1662821,"112232","Red Arrows Over Clywedog Dam","RedArrowslow_thumb.jpg",130,195,1);thumbnails[1717760]=new thumbnail(1717760,"112232","Llandinam","llandinam Ltd Ed low res _thumb.jpg",130,195,1);thumbnails[1662828]=new thumbnail(1662828,"112232","Portrait of Bridgnorth Shropshire","bridgnorthlow_thumb.jpg",130,87,1);thumbnails[1662835]=new thumbnail(1662835,"112232","Prelude to a Dogfight","airshow07low_thumb.jpg",130,87,1);thumbnails[2451817]=new thumbnail(2451817,"112232","Absolute precision, The Red Arrows","red arrowslow_thumb.jpg",130,87,1);thumbnails[1714183]=new thumbnail(1714183,"112232","This is Leighton 2007","Leighton2007low_thumb.jpg",130,195,1);thumbnails[2382517]=new thumbnail(2382517,"111840","","dave and karen low 048_thumb.jpg",130,86,1);thumbnails[3807624]=new thumbnail(3807624,"111840","","21st_birthday92dpia__thumb.jpg",130,195,1);thumbnails[4588132]=new thumbnail(4588132,"111840","","aswedding_245low_thumb.jpg",130,87,1);thumbnails[1662374]=new thumbnail(1662374,"111840","","proof12low_thumb.jpg",130,87,1);thumbnails[1662387]=new thumbnail(1662387,"111840","","Lukeage1low_thumb.jpg",130,184,1);thumbnails[4397737]=new thumbnail(4397737,"111840","","aswedding_low077_thumb.jpg",130,195,1);thumbnails[2382539]=new thumbnail(2382539,"111840","","dave and karen low 056_thumb.jpg",130,86,1);thumbnails[3807632]=new thumbnail(3807632,"111840","","21st_birthday92dpia_thumb.jpg",130,195,1);thumbnails[4397739]=new thumbnail(4397739,"111840","","alwynsam_low098_copy_thumb.jpg",130,87,1);thumbnails[4588686]=new thumbnail(4588686,"111840","","aswedding_low354xx_thumb.jpg",130,195,1);thumbnails[1662430]=new thumbnail(1662430,"111840","","pasttimes007_thumb.jpg",130,182,1);thumbnails[2808621]=new thumbnail(2808621,"111840","","wedding low 030ab_thumb.jpg",130,195,1);thumbnails[2451899]=new thumbnail(2451899,"111840","","Railway Children lowfinal_thumb.jpg",130,195,1);thumbnails[2808636]=new thumbnail(2808636,"111840","","wedding low018bc_thumb.jpg",130,195,1);thumbnails[3807638]=new thumbnail(3807638,"111840","","21st_birthday92dpib_thumb.jpg",130,195,1);thumbnails[1662382]=new thumbnail(1662382,"111840","","baby 007_thumb.jpg",130,96,1);thumbnails[1662391]=new thumbnail(1662391,"111840","A Combination of at least 8 photographs blended together! The ULTIMATE portrait which brings together all the things in your life which give the portrait a time and place!","at40_thumb.jpg",130,195,1);thumbnails[1697696]=new thumbnail(1697696,"111840","","Stuart white border f c copy_thumb.jpg",130,190,1);thumbnails[1818191]=new thumbnail(1818191,"111840","","Butterfly Paradise master elowres_thumb.jpg",130,130,1);thumbnails[4588090]=new thumbnail(4588090,"111840","","aswedding_071low_thumb.jpg",130,87,1);thumbnails[1697727]=new thumbnail(1697727,"111840","","new folder 001b copy_thumb.jpg",130,87,1);thumbnails[1662379]=new thumbnail(1662379,"111840","","baby003low_thumb.jpg",130,96,1);thumbnails[1668255]=new thumbnail(1668255,"111840","Portrait of the Railway Inn Forden Welshpool","railwayinnlow1_thumb.jpg",130,87,1);thumbnails[4397731]=new thumbnail(4397731,"111840","","asweddinglow_2741_thumb.jpg",130,87,1);thumbnails[1662393]=new thumbnail(1662393,"111840","","Martin Smith 061_thumb.jpg",130,195,1);thumbnails[1662433]=new thumbnail(1662433,"111840","","pasttimes012low_thumb.jpg",130,182,1);thumbnails[5291015]=new thumbnail(5291015,"111840","","copied_disc_2_pepi081_copy_thumb.jpg",130,162,1);thumbnails[5291027]=new thumbnail(5291027,"111840","","hunt2009_017512_thumb.jpg",130,86,1);thumbnails[1662435]=new thumbnail(1662435,"111840","","pasttimes016low_thumb.jpg",130,195,1);thumbnails[1662499]=new thumbnail(1662499,"111840","","baby001low_thumb.jpg",130,97,1);thumbnails[1712613]=new thumbnail(1712613,"111840","","karenlow1_thumb.jpg",130,195,1);thumbnails[2730905]=new thumbnail(2730905,"111840","","fraser010low21_thumb.jpg",130,91,1);thumbnails[1662439]=new thumbnail(1662439,"111840","","pasttimes019low_thumb.jpg",130,192,1);thumbnails[1818769]=new thumbnail(1818769,"111840","","Urban Chaos layers 1lowres_thumb.jpg",130,98,1);thumbnails[1818773]=new thumbnail(1818773,"111840","","Urban Chaos layers 2lowres_thumb.jpg",130,98,1);thumbnails[1662505]=new thumbnail(1662505,"111840","","Martin Smith 062_thumb.jpg",130,87,1);thumbnails[1662503]=new thumbnail(1662503,"111840","","pasttimes030low_thumb.jpg",130,182,1);thumbnails[1662442]=new thumbnail(1662442,"111840","","martin smith x 3_thumb.jpg",130,87,1);thumbnails[1662501]=new thumbnail(1662501,"111840","","Miragelow_thumb.jpg",130,182,1);thumbnails[1662508]=new thumbnail(1662508,"111840","","proof16low_thumb.jpg",130,87,1);thumbnails[1697700]=new thumbnail(1697700,"114197","Spoiling a good photo they are!!","becky holiday 030 copy_thumb.jpg",130,98,1);thumbnails[1697701]=new thumbnail(1697701,"114197","That's much better!","becky holiday 030b copy_thumb.jpg",130,98,1);thumbnails[1697705]=new thumbnail(1697705,"114197","He was a pain, glad he's gone!","becky holiday 030ri copy_thumb.jpg",130,93,1);thumbnails[1697715]=new thumbnail(1697715,"114197","BEFORE (badly faded)","herman copy_thumb.jpg",130,91,1);thumbnails[1697716]=new thumbnail(1697716,"114197","AFTER (contrast and tone corrected)","herman jpg 1 copy_thumb.jpg",130,91,1);thumbnails[1697717]=new thumbnail(1697717,"114197","BEFORE (creased and rough around the edges)","herman003 copy_thumb.jpg",130,184,1);thumbnails[1697718]=new thumbnail(1697718,"114197","AFTER (creases and folds gone and tidied up ready for another 70 years!)","herman003a copy_thumb.jpg",130,195,1);thumbnails[1697721]=new thumbnail(1697721,"114197","This photo would look good in colour!","peter copy_thumb.jpg",130,173,1);thumbnails[1697722]=new thumbnail(1697722,"114197","Hand coloured photo","peter hand coloured copy_thumb.jpg",130,173,1);thumbnails[1714201]=new thumbnail(1714201,"114197","A very small piece of the original with biro marks. Tone and contrast in need of correction.","MILITARY GROUP copy_thumb.jpg",130,183,1);thumbnails[1714202]=new thumbnail(1714202,"114197","Marks removed, tone and contrast corrected","MILITARY GROUP2  copy_thumb.jpg",130,183,1);thumbnails[1714198]=new thumbnail(1714198,"114197","finally hand coloured","MILITARY GROUP 1 copy_thumb.jpg",130,183,1);thumbnails[2085342]=new thumbnail(2085342,"204875","Work commissioned by Llettygynfach Farm, Forden. Welshpool, home of quality beef and lamb.","Llettygynfach low _thumb.jpg",130,87,1);thumbnails[3356248]=new thumbnail(3356248,"204875","","copied disc 1low 206_thumb.jpg",130,86,1);thumbnails[3356258]=new thumbnail(3356258,"204875","","copied disc 1low 201_thumb.jpg",130,86,1);thumbnails[3356294]=new thumbnail(3356294,"204875","","low025_thumb.jpg",130,86,1);thumbnails[3356302]=new thumbnail(3356302,"204875","","low063_thumb.jpg",130,86,1);thumbnails[1662330]=new thumbnail(1662330,"204875","A family run pub,The Railway Inn Forden.","railwayinnlow_thumb.jpg",130,87,1);thumbnails[2995410]=new thumbnail(2995410,"204875","Poster advertising event.","magiscroft low_thumb.jpg",130,86,1);thumbnails[3356257]=new thumbnail(3356257,"204875","","copied disc 1 low200_thumb.jpg",130,196,1);thumbnails[3356260]=new thumbnail(3356260,"204875","","copied disc 1 low181_thumb.jpg",130,86,1);thumbnails[3356293]=new thumbnail(3356293,"204875","","low015_thumb.jpg",130,86,1);thumbnails[3356296]=new thumbnail(3356296,"204875","","low041_thumb.jpg",130,86,1);thumbnails[3356298]=new thumbnail(3356298,"204875","","low043_thumb.jpg",130,86,1);thumbnails[3356300]=new thumbnail(3356300,"204875","","low059_thumb.jpg",130,91,1);thumbnails[3356304]=new thumbnail(3356304,"204875","","low071_thumb.jpg",130,121,1);thumbnails[3356307]=new thumbnail(3356307,"204875","","low077_thumb.jpg",130,147,1);thumbnails[3356308]=new thumbnail(3356308,"204875","","low082_thumb.jpg",130,86,1);thumbnails[3356312]=new thumbnail(3356312,"204875","","low111_thumb.jpg",130,86,1);thumbnails[3356314]=new thumbnail(3356314,"204875","","low142_thumb.jpg",130,86,1);thumbnails[3356316]=new thumbnail(3356316,"204875","","low156_thumb.jpg",130,86,1);thumbnails[3356317]=new thumbnail(3356317,"204875","","low160_thumb.jpg",130,188,1);thumbnails[3356319]=new thumbnail(3356319,"204875","","low no banner_thumb.jpg",130,91,1);thumbnails[2382775]=new thumbnail(2382775,"204875","The Castle Inn, Edgehill, Oxfordshire","low wip 13 castle inn mask copy_thumb.jpg",130,195,1);thumbnails[2808551]=new thumbnail(2808551,"204875","","prince charles low003_thumb.jpg",130,195,1);thumbnails[2808587]=new thumbnail(2808587,"204875","","prince charles low017_thumb.jpg",130,195,1);thumbnails[2808593]=new thumbnail(2808593,"204875","","prince charles low025_thumb.jpg",130,195,1);thumbnails[2808598]=new thumbnail(2808598,"204875","","prince charles low 009_thumb.jpg",130,195,1);thumbnails[2808600]=new thumbnail(2808600,"204875","","prince charles low 011_thumb.jpg",130,105,1);thumbnails[1712614]=new thumbnail(1712614,"115087","Created using your photo or ones I have taken for you","karenlow_thumb.jpg",130,87,1);thumbnails[3967412]=new thumbnail(3967412,"115087","","lowlucasmontc_jpg12_thumb.jpg",130,98,1);thumbnails[1712615]=new thumbnail(1712615,"115087","Maybe with an interesting tint!","karensepialow_thumb.jpg",130,87,1);thumbnails[2780107]=new thumbnail(2780107,"115087","","wedding4low_thumb.jpg",130,87,1);thumbnails[2523281]=new thumbnail(2523281,"115087"," 50th birthday, anniversary retirement gift","fraser montagelow_thumb.jpg",130,87,1);thumbnails[1712616]=new thumbnail(1712616,"115087","It can be any subject you like","mick and pam1low_thumb.jpg",130,189,1);thumbnails[2382656]=new thumbnail(2382656,"115087","The Castle Inn, Edgehill Oxfordshire","low Battle of Edgehill storm Ltd Ed_thumb.jpg",130,195,1);thumbnails[2382545]=new thumbnail(2382545,"115087","Have a quality montage made of your pet, be it a dog, cat, pony or even your prize bull!","Teddy low 1_thumb.jpg",130,87,1);thumbnails[1797244]=new thumbnail(1797244,"115087","You can have a commemorative montage made as a tribute to a loved one.","tributelow_thumb.jpg",130,195,1);thumbnails[1712621]=new thumbnail(1712621,"115088","A Custom Plaque (using your photo) to keep away strangers!","bitelow copy_thumb.jpg",130,195,1);thumbnails[1712625]=new thumbnail(1712625,"115088","To announce a new arrival!","new folder 001bb_thumb.jpg",130,87,1);thumbnails[1712631]=new thumbnail(1712631,"115088","Maybe something humourous!","luke's room_thumb.jpg",130,195,1);var galleries=new Object();galleries[179109]=new gallery(179109,"2885620","Gift Vouchers","gallery",[2885620]);galleries[112232]=new gallery(112232,"5870751,2943699,2451817,1717760,1714183,1714180,1712605,1695212,1662835,1662828","Limited Edition Photographs","gallery",[1695212,5870751,1655195,1662741,2943699,1655201,1662744,1662814,1714180,1655189,1662819,1712605,1662821,1717760,1662828,1662835,2451817,1714183]);galleries[111840]=new gallery(111840,"5291027,5291015,4588686,4588132,4588090,4397739,4397737,4397731,3807638,3807632","Traditional and Modern Portraits","gallery",[2382517,3807624,4588132,1662374,1662387,4397737,2382539,3807632,4397739,4588686,1662430,2808621,2451899,2808636,3807638,1662382,1662391,1697696,1818191,4588090,1697727,1662379,1668255,4397731,1662393,1662433,5291015,5291027,1662435,1662499,1712613,2730905,1662439,1818769,1818773,1662505,1662503,1662442,1662501,1662508]);galleries[110923]=new gallery(110923,"5291027,5291015,4588686,4588132,4588090,4397739,4397737,4397731,3807638,3807632","Portraits","gallery",[]);galleries[114197]=new gallery(114197,"1714202,1714201,1714198,1697722,1697721,1697718,1697717,1697716,1697715,1697705","Photo manipulation, retouching and repair","gallery",[1697700,1697701,1697705,1697715,1697716,1697717,1697718,1697721,1697722,1714201,1714202,1714198]);galleries[204875]=new gallery(204875,"3356319,3356317,3356316,3356314,3356312,3356308,3356307,3356304,3356302,3356300","Commercial","gallery",[2085342,3356248,3356258,3356294,3356302,1662330,2995410,3356257,3356260,3356293,3356296,3356298,3356300,3356304,3356307,3356308,3356312,3356314,3356316,3356317,3356319,2382775,2808551,2808587,2808593,2808598,2808600]);galleries[115087]=new gallery(115087,"3967412,2780107,2523281,2382656,2382545,1797244,1712616,1712615,1712614","Special Interest & Event Montages","gallery",[1712614,3967412,1712615,2780107,2523281,1712616,2382656,2382545,1797244]);galleries[115088]=new gallery(115088,"1712631,1712625,1712621","Custom Wall Plaques","gallery",[1712621,1712625,1712631]);var imageSets=new Object();imageSets[1]="3967412,3356302,3356294,3356258,3356248,2780107,2730905,2523281,2382545,2382539,2382517,1818769,1695212,1662508,1662505,1662442,1662379,1662330";imageSets[3]="5870751,5291027,5291015,4588686,4588132,4588090,4397739,4397737,4397731,3967412,3807638,3807632,3807624,3356319,3356317,3356316,3356314,3356312,3356308,3356307,3356304,3356302,3356300,3356298,3356296,3356294,3356293,3356260,3356258,3356257,3356248,2995410,2943699,2885620,2808636,2808621,2808600,2808598,2808593,2808587,2808551,2780107,2730905,2523281,2451899,2451817,2382775,2382656,2382545,2382539";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/weebolddavy/images";break}switch(a){case 1:b="http://www1.clikpic.com/weebolddavy/images";break}switch(a){case 2:b="http://admin.clikpic.com/weebolddavy/images";break}switch(a){case 24:b="http://tpc15/clikpic/weebolddavy/images";break}switch(a){case 4:b="http://www.clikchurch.com/weebolddavy/images";break}switch(a){case 5:b="http://www2.clikpic.com/weebolddavy/images";break}switch(a){case 22:b="http://tpc5/clikpic/weebolddavy/images";break}switch(a){case 23:b="http://tpc10/clikpic/weebolddavy/images";break}switch(a){case 25:b="http://tpc16/clikpic/weebolddavy/images";break}switch(a){case 15:b="http://www3.clikpic.com/weebolddavy/images";break}switch(a){case 18:b="http://www4.clikpic.com/weebolddavy/images";break}switch(a){case 19:b="http://www5.clikpic.com/weebolddavy/images";break}switch(a){case 31:b="http://www7.clikpic.com/weebolddavy/images";break}switch(a){case 32:b="http://admin2.clikpic.com/weebolddavy/images";break}switch(a){case 33:b="http://www8.clikpic.com/weebolddavy/images";break}switch(a){case 34:b="http://www9.clikpic.com/weebolddavy/images";break}switch(a){case 35:b="http://admin3.clikpic.com/weebolddavy/images";break}switch(a){case 37:b="http://admin4.clikpic.com/weebolddavy/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="Tartan Dragon 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].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="weebolddavy@aol.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="weebolddavy@aol.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+'")'})}}};