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[928192]=new thumbnail(928192,"70771","'Mount Pumori' ","Casio Pictures 1404_thumb.JPG",130,98,1);thumbnails[928193]=new thumbnail(928193,"70771","Mount Nuptse 7849m at Sunset.","Casio Pictures 1468_thumb.jpg",130,173,1);thumbnails[928339]=new thumbnail(928339,"224527","'Smoke and Soul' ","foto10_thumb.JPG",130,106,1);thumbnails[928346]=new thumbnail(928346,"70618","'Sadhu'","Sadhu1_thumb.jpg",130,102,1);thumbnails[930553]=new thumbnail(930553,"164461","'Mani' Stone","Nepal Photos 15 008_thumb.jpg",130,98,1);thumbnails[939512]=new thumbnail(939512,"70618","'The Great Stupa'","The Great Stupa Kathmandu_thumb.jpg",130,173,1);thumbnails[1084292]=new thumbnail(1084292,"224527","'Before the Cremation' ","crem131_thumb.jpg",130,152,1);thumbnails[1084693]=new thumbnail(1084693,"80054","'Prayer and Thought' ","nepal2004 060_thumb.JPG",130,107,1);thumbnails[1085127]=new thumbnail(1085127,"83173","'The Disappearing World' Old Tingri. Tibet.","Stuarts  Nepal 2005 206_thumb.jpg",130,102,1);thumbnails[1143525]=new thumbnail(1143525,"80054","","Copy of nepal2004 070_thumb.jpg",130,93,1);thumbnails[1143552]=new thumbnail(1143552,"80054","'Man of the City'","Copy of nepal2004 134_thumb.JPG",130,181,1);thumbnails[2581189]=new thumbnail(2581189,"164461","'Nuru'","wwwCopy of Casio Pictures 1564_thumb.jpg",130,173,1);thumbnails[2584922]=new thumbnail(2584922,"164461","'Porters'","foto12_thumb.JPG",130,66,1);thumbnails[2586287]=new thumbnail(2586287,"83173","Along The Plateau. The Himalayas. Tibet.","Copy of Copy of Stuarts  Nepal 2005 239_thumb.jpg",130,84,1);thumbnails[2586292]=new thumbnail(2586292,"83173","'Stupa' Along The Plateau. Tibet.","Copy of Copy of Tibetan Plateau_thumb.jpg",130,119,1);thumbnails[2586294]=new thumbnail(2586294,"83173","'Rongbuk Glacier'","Rongbuk Glacier Tibet 05_thumb.jpg",130,68,1);thumbnails[2586300]=new thumbnail(2586300,"83173","'Old Settlement' Tibet.","Copy of Copy of Tibetan Plateau7 05_thumb.jpg",130,74,1);thumbnails[2586321]=new thumbnail(2586321,"83173","'Old Tingri' Tibet.","Copy of Copy of Janes Nepal 2005 316_thumb.JPG",130,70,1);thumbnails[2588383]=new thumbnail(2588383,"83173","'Driven' Old Tingri. Tibet.","Copy of Copy of Stuarts  Nepal 2005 209_thumb.jpg",130,87,1);thumbnails[2588389]=new thumbnail(2588389,"83173","","Copy of Stuarts  Nepal 2005 192_thumb.jpg",130,100,1);thumbnails[2588423]=new thumbnail(2588423,"83173","'Rongbuk' ","wwwCopy of Stuarts  Nepal 2005 293_thumb.jpg",130,98,1);thumbnails[2615471]=new thumbnail(2615471,"164461","","Copy of Casio Pictures 1613_thumb.jpg",130,98,1);thumbnails[2615523]=new thumbnail(2615523,"83173","Mother and Children. Along The Plateau. Tibet.","Janes Nepal 2005 1382_thumb.JPG",130,111,1);thumbnails[2620127]=new thumbnail(2620127,"164461","","nnnCopy of sherpa3_thumb.jpg",130,117,1);thumbnails[2620234]=new thumbnail(2620234,"164461","'Fur Geljin'","Copy of lead sherpa1_thumb.jpg",130,98,1);thumbnails[2659822]=new thumbnail(2659822,"164461","'En Route'","foto11_thumb.jpg",130,173,1);thumbnails[2661437]=new thumbnail(2661437,"164461","","Copy of Nepal06 126_thumb.jpg",130,173,1);thumbnails[2664107]=new thumbnail(2664107,"83173","Tibetan Child. Near to Rongbuk.","Copy of Stuarts  Nepal 2005 272_thumb.jpg",130,173,1);thumbnails[2719383]=new thumbnail(2719383,"80054","","cccccCopy of nepal2004 1671_thumb.JPG",130,120,1);thumbnails[2719427]=new thumbnail(2719427,"80054","'Stupa's' Swayambhunath.","sssCopy of Janes Nepal 2005 2281_thumb.jpg",130,85,1);thumbnails[2719510]=new thumbnail(2719510,"224527","'Watching the Cremation'","wwwcopy of Watching the Cremation1_thumb.jpg",130,105,1);thumbnails[2730768]=new thumbnail(2730768,"70618","'Prayer Candles'","Copy of Janes Nepal 2005 2522_thumb.jpg",130,86,1);thumbnails[2730771]=new thumbnail(2730771,"70618","'The Prayer Wheel'","finCopy of nepal2004 0661_thumb.jpg",130,123,1);thumbnails[2730786]=new thumbnail(2730786,"70618","'Bhaktapur Square'","Pottery Square Bhaktapur2_thumb.jpg",130,89,1);thumbnails[2732241]=new thumbnail(2732241,"70618","'The Buddha' World Peace Stupa. ","Copy of Stuarts  Nepal 2005 0432_thumb.jpg",130,174,1);thumbnails[2732254]=new thumbnail(2732254,"224527","The Cremation.","fin fin finCopy of nepal2004 1252_thumb.jpg",130,69,1);thumbnails[2732262]=new thumbnail(2732262,"224527","The Cremation.","3finCopy of Copy of nepal2004 1221_thumb.jpg",130,91,1);thumbnails[2732271]=new thumbnail(2732271,"224527","","Copy of nepal2004 1231_thumb.jpg",130,98,1);thumbnails[2732275]=new thumbnail(2732275,"70618","'Watching the Sunrise'","Man and Sunrise_thumb. Pokhara Valley Nepal1.jpg",130,86,1);thumbnails[2732432]=new thumbnail(2732432,"70771","'Everest on Fire' ","Casio Picturesadobe 14551_thumb.jpg",130,102,1);thumbnails[2732447]=new thumbnail(2732447,"70771","","wwwCopy of Casio Pictures 14051_thumb.JPG",130,98,1);thumbnails[2732449]=new thumbnail(2732449,"70771","","nnnCopy of Stuarts  Nepal 2005 4671_thumb.jpg",130,82,1);thumbnails[2732450]=new thumbnail(2732450,"70618","'Phewa Lake'","Copy of colour clikpicCopy of Janes Nepal 2005 1031_thumb.jpg",130,54,1);thumbnails[2733302]=new thumbnail(2733302,"80054","'Swayambhunath'","Copy of Janes Nepal 2005 233_thumb.JPG",130,86,1);thumbnails[2733320]=new thumbnail(2733320,"80054","'Carrying the Load'","Copy of nepal2004 146_1_thumb.JPG",130,110,1);thumbnails[3111854]=new thumbnail(3111854,"70771","'Everest Region'","cccCopy of Copy of cornwall 296_thumb.jpg",130,75,1);thumbnails[3111931]=new thumbnail(3111931,"70618","'Lammergeyer'","aaaCopy of Copy of cornwall 1162_thumb.jpg",130,102,1);thumbnails[3125055]=new thumbnail(3125055,"70771","'Mera Glacier'","nnnCopy of cornwall 437_thumb.jpg",130,86,1);thumbnails[3198987]=new thumbnail(3198987,"224527","","zzzCopy of cornwall 609_thumb.jpg",130,84,1);thumbnails[3227173]=new thumbnail(3227173,"164461","'Rescue'","222Copy of cornwall 1187_thumb.jpg",130,90,1);thumbnails[3227175]=new thumbnail(3227175,"224527","","bbbCopy of cornwall 6371_thumb.jpg",130,86,1);thumbnails[3604274]=new thumbnail(3604274,"70618","'THE ROBE'","robe333Copy_of_mmmCopy_of_for_jerry_3_Copy_of_Monks_Great_Stupa_thumb.jpg",130,97,1);thumbnails[3604275]=new thumbnail(3604275,"80054","","Copy_of_Janes_Nepal_2005_240_thumb.JPG",130,89,1);thumbnails[3604276]=new thumbnail(3604276,"80054","","Copy_of_Copy_of_Janes_Nepal_2005_246_thumb.JPG",130,79,1);thumbnails[3604298]=new thumbnail(3604298,"80054","'Watching'","cornwall_386_thumb.jpg",130,119,1);thumbnails[3675679]=new thumbnail(3675679,"224527","","cornwall_377_thumb.jpg",130,86,1);thumbnails[3675684]=new thumbnail(3675684,"224527","","cornwall_630_thumb.jpg",130,86,1);thumbnails[3675689]=new thumbnail(3675689,"224527","","Copy_of_Casio_Pictures_678_thumb.JPG",130,98,1);thumbnails[3675704]=new thumbnail(3675704,"224527","","zzzCopy_of_cornwall_6091_thumb.jpg",130,84,1);thumbnails[4329192]=new thumbnail(4329192,"80054","","Copy_of_Copy_of_Copy_of_Janes_Nepal_2005_0591_thumb.jpg",130,89,1);thumbnails[4329220]=new thumbnail(4329220,"83173","'Prayer Flags' ","Copy_of_Tibetan_Plateau10_05_thumb.jpg",130,98,1);thumbnails[4329264]=new thumbnail(4329264,"83173","Along The Plateau.","final_clik_pic-Copy_of_Copy_fin1of_Copy_of_Tibetan_Plateau_05_thumb.jpg",130,91,1);thumbnails[4329269]=new thumbnail(4329269,"83173","Along The Plateau.","Tibetan_Plat_One_thumb.jpg",130,90,1);thumbnails[4329275]=new thumbnail(4329275,"70618","'Dreaming'","dreaming_thumb.jpg",130,86,1);thumbnails[4329280]=new thumbnail(4329280,"80054","'Faith'","bbbbbbCopy_of_nepal2004_299123_thumb.JPG",130,78,1);thumbnails[4329320]=new thumbnail(4329320,"70771","","Himalayan_mountain_thumb.jpg",130,86,1);thumbnails[4329474]=new thumbnail(4329474,"70771","'Everest' North Face. In the Clouds.","Copy_of_One_Mans_Mountain_thumb.JPG",130,87,1);thumbnails[4329716]=new thumbnail(4329716,"83173","People of 'Old Tingri' ","Old_Tingri_Tibet_Aug051_thumb.jpg",130,83,1);thumbnails[4420457]=new thumbnail(4420457,"70771","'Everest' South Face","Casio_Pictures_1433_thumb.JPG",130,168,1);thumbnails[4420460]=new thumbnail(4420460,"70771","'Everest' South Face Sunset","Everest_Sunset_thumb.jpg",130,168,1);thumbnails[4420464]=new thumbnail(4420464,"70618","'Child of Nepal'","Child_of_Nepal_thumb.jpg",130,336,1);thumbnails[4420467]=new thumbnail(4420467,"80054","'Child of Nepal'","Copy_of_bbbbbbCopy_of_3rd_Copy_of_Child_of_Nepal_thumb.jpg",130,336,1);thumbnails[4420720]=new thumbnail(4420720,"70771","'Himalayas' in Blue","Himalayas_in_Blue_thumb.jpg",130,98,1);thumbnails[4420728]=new thumbnail(4420728,"70771","'Collecting Storm'","Copy_of_foto91_thumb.jpg",130,173,1);thumbnails[4420735]=new thumbnail(4420735,"80054","'Woman of the City'","woman_Copy_of_Copy_of_nepal2004_073_thumb.jpg",130,223,1);thumbnails[4425108]=new thumbnail(4425108,"70771","","Copy_of_mmmmmCopy_of_wwwCopy_of_Stuarts__Nepal_2005_306_thumb.jpg",130,84,1);thumbnails[4425206]=new thumbnail(4425206,"224527","","Copy_of_cornwall_591_thumb.jpg",130,86,1);thumbnails[4425211]=new thumbnail(4425211,"70771","","mmmCopy_of_cornwall_926_thumb.jpg",130,86,1);thumbnails[4425293]=new thumbnail(4425293,"224527","","Copy_of_cornwall_599_thumb.jpg",130,94,1);thumbnails[4426301]=new thumbnail(4426301,"70618","'Mani' Prayer Stones","Mani_Prayer_Stones_Everest_thumb.jpg",130,73,1);thumbnails[4427150]=new thumbnail(4427150,"70771","","Copy_of_cornwall_9831_thumb.jpg",130,89,1);thumbnails[4427152]=new thumbnail(4427152,"70771","'Above the clouds' ","kCopy_of_bbbbCopy_of_cornwall_1178_thumb.jpg",130,86,1);thumbnails[4427156]=new thumbnail(4427156,"70771","","dddCopy_of_mmmCopy_of_cornwall_1178_thumb.jpg",130,99,1);thumbnails[5692300]=new thumbnail(5692300,"70771","","clik_pik_Copy_of_cornwall_972_thumb.jpg",130,78,1);thumbnails[5692327]=new thumbnail(5692327,"70618","Words of Wisdom","book_proposal_fin_Copy_of_Copy_of_cornwall_792_thumb.jpg",130,86,1);thumbnails[5750666]=new thumbnail(5750666,"70771","","clikpic_Recovered_JPEG_Digital_Camera_766812_thumb.jpg",130,86,1);thumbnails[5750988]=new thumbnail(5750988,"70618","","clikpicRecovered_JPEG_Digital_Camera_4309_thumb.jpg",130,86,1);thumbnails[5751094]=new thumbnail(5751094,"70618","Phewa Lake","clikpicCopy_of_Janes_Nepal_2005_1021_thumb.JPG",130,83,1);thumbnails[6103819]=new thumbnail(6103819,"","'Himalayan Peak'","Himalayan_mountain_128E9607-1EC9-D45B-1C6E7A7ADD10AEE0_thumb.jpg",130,86,1);thumbnails[6103846]=new thumbnail(6103846,"70618","Sherpa Children","sherpas_1290EF97-1EC9-D45B-1CFA7380ADE096B7_thumb.JPG",130,98,1);thumbnails[6103866]=new thumbnail(6103866,"","Child of Nepal","book_proposal_RBChild_of_Nepal_thumb.jpg",130,335,1);thumbnails[6103875]=new thumbnail(6103875,"","Tibetan family","book_proposalFamily_Tibet_thumb.jpg",130,110,1);thumbnails[6551556]=new thumbnail(6551556,"70618","Prayer Meeting","websiteCopy_of_Recovered_JPEG_Digital_Camera_2862_thumb.jpg",130,68,1);thumbnails[6551568]=new thumbnail(6551568,"70618","","website_Copy_of_Recovered_JPEG_Digital_Camera_1778_thumb.jpg",130,192,1);thumbnails[6551650]=new thumbnail(6551650,"80054","","WebsiteCopy_of_BW_Recovered_JPEG_Digital_Camera_3320_thumb.jpg",130,98,1);thumbnails[6625115]=new thumbnail(6625115,"","","Copy_of_cornwall_1167_thumb.jpg",130,195,1);thumbnails[6673721]=new thumbnail(6673721,"364649","","xxxCopy_of_Copy_of_Recovered_JPEG_Digital_Camera_5052_thumb.jpg",130,86,1);thumbnails[6673739]=new thumbnail(6673739,"364649","","Copy_of_Recovered_JPEG_Digital_Camera_4372_thumb.jpg",130,195,1);thumbnails[6673784]=new thumbnail(6673784,"364649","","Copy_of_Recovered_JPEG_Digital_Camera_5726_thumb.jpg",130,85,1);thumbnails[6673790]=new thumbnail(6673790,"364649","","Copy_of_Recovered_JPEG_Digital_Camera_6185_thumb.jpg",130,87,1);thumbnails[6673793]=new thumbnail(6673793,"364649","","Copy_of_Recovered_JPEG_Digital_Camera_610_thumb.jpg",130,151,1);thumbnails[6673848]=new thumbnail(6673848,"364649","","Copy_of_Copy_of_cornwall_749_thumb.jpg",130,86,1);thumbnails[6673854]=new thumbnail(6673854,"364649","","Copy_of_Recovered_JPEG_Digital_Camera_10231_thumb.jpg",130,97,1);thumbnails[6673888]=new thumbnail(6673888,"364649","","hhCopy_of_Copy_of_Recovered_JPEG_Digital_Camera_3662_thumb.jpg",130,84,1);thumbnails[6677557]=new thumbnail(6677557,"364649","","ggCopy_of_Copy_of_Recovered_JPEG_Digital_Camera_4700_thumb.jpg",130,195,1);thumbnails[6677562]=new thumbnail(6677562,"364649","","Recovered_JPEG_Digital_Camera_1679_thumb.jpg",130,67,1);thumbnails[6677566]=new thumbnail(6677566,"364649","","Recovered_JPEG_Digital_Camera_1755_thumb.jpg",130,98,1);thumbnails[6677568]=new thumbnail(6677568,"364649","Monastery","Copy_of_Recovered_JPEG_Digital_Camera_2965_thumb.jpg",130,94,1);thumbnails[6677828]=new thumbnail(6677828,"","Daily Mirror. Photograph by Anne Staub.","Copy_of_Daily_Mirror_2IMG_3049_thumb.JPG",130,87,1);var galleries=new Object();galleries[364649]=new gallery(364649,"6677568,6677566,6677562,6677557,6673888,6673854,6673848,6673793,6673790,6673784","**New Photographs**","gallery",[6673721,6673739,6673784,6673790,6673793,6673848,6673854,6673888,6677557,6677562,6677566,6677568]);galleries[80054]=new gallery(80054,"3604298","Black & White","gallery",[1084693,1143525,1143552,2719383,2719427,2733302,2733320,3604275,3604276,3604298,4329192,4329280,4420467,4420735,6551650]);galleries[70618]=new gallery(70618,"6551568,6551556,6103846,5751094,5750988,5692327,4426301,4420464,4329275,3604274","Colour","gallery",[928346,939512,2730768,2730771,2730786,2732241,2732275,2732450,3111931,3604274,4329275,4420464,4426301,5692327,5750988,5751094,6103846,6551556,6551568]);galleries[70771]=new gallery(70771,"3111854","Everest and Mountains","gallery",[928192,928193,2732432,2732447,2732449,3111854,3125055,4329320,4329474,4420457,4420460,4420720,4420728,4425108,4425211,4427150,4427152,4427156,5692300,5750666]);galleries[224527]=new gallery(224527,"2732262","The Cremation","gallery",[928339,1084292,2719510,2732254,2732262,2732271,3198987,3227175,3675679,3675684,3675689,3675704,4425206,4425293]);galleries[83173]=new gallery(83173,"2615523","Tibet","gallery",[1085127,2586287,2586292,2586294,2586300,2586321,2588383,2588389,2588423,2615523,2664107,4329220,4329264,4329269,4329716]);galleries[164461]=new gallery(164461,"2620234","Trekking Snaps","gallery",[930553,2581189,2584922,2615471,2620127,2620234,2659822,2661437,3227173]);var imageSets=new Object();imageSets[1]="6551568";imageSets[2]="3604298,3111854,2732262,2620234,2615523";imageSets[3]="4329264";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/sbb9/images";break}switch(a){case 1:b="http://www1.clikpic.com/sbb9/images";break}switch(a){case 2:b="http://admin.clikpic.com/sbb9/images";break}switch(a){case 24:b="http://tpc15/clikpic/sbb9/images";break}switch(a){case 4:b="http://www.clikchurch.com/sbb9/images";break}switch(a){case 5:b="http://www2.clikpic.com/sbb9/images";break}switch(a){case 22:b="http://tpc5/clikpic/sbb9/images";break}switch(a){case 23:b="http://tpc10/clikpic/sbb9/images";break}switch(a){case 25:b="http://tpc16/clikpic/sbb9/images";break}switch(a){case 15:b="http://www3.clikpic.com/sbb9/images";break}switch(a){case 18:b="http://www4.clikpic.com/sbb9/images";break}switch(a){case 19:b="http://www5.clikpic.com/sbb9/images";break}switch(a){case 31:b="http://www7.clikpic.com/sbb9/images";break}switch(a){case 32:b="http://admin2.clikpic.com/sbb9/images";break}switch(a){case 33:b="http://www8.clikpic.com/sbb9/images";break}switch(a){case 34:b="http://www9.clikpic.com/sbb9/images";break}switch(a){case 35:b="http://admin3.clikpic.com/sbb9/images";break}switch(a){case 37:b="http://admin4.clikpic.com/sbb9/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="Stuart Baker-Brown Photography: "+photos[f].caption;if(photos[f].caption==""){document.getElementById("imageTitle").style.display="none"}else{document.getElementById("imageTitle").style.display="block"}var a=fnGetImageDetails(f);if(a==""){document.getElementById("imageDetails").style.display="none";var c=document.getElementById("infoWrap");var d=document.getElementById("photoInfo");if(photos[f].caption==""){if(c!=null){c.className="empty"}if(d!=null){d.className="empty"}}else{if(c!=null){c.className="noinfo"}if(d!=null){d.className="noinfo"}}}else{document.getElementById("imageDetails").style.display="block";var c=document.getElementById("infoWrap");if(c!=null){c.className="normal"}var d=document.getElementById("photoInfo");if(d!=null){d.className="normal"}}document.getElementById("imageDetails").innerHTML=a;toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#paymentConfirm").hide();$("#paymentAddButton").unbind().click(function(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="s.bakerbrown@virgin.net">';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="s.bakerbrown@virgin.net">';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+'")'})}}};