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[941567]=new thumbnail(941567,"70870","","Whealowles_thumb.jpg212.jpg",130,204,1);thumbnails[941850]=new thumbnail(941850,"70871","","CHERRY06_thumb.jpg",130,84,1);thumbnails[948787]=new thumbnail(948787,"70877","","Sunset_thumb.jpg205.jpg",130,93,1);thumbnails[948856]=new thumbnail(948856,"70877","","Botcard_thumb.jpg",130,181,1);thumbnails[948859]=new thumbnail(948859,"70877","","Cotcard1_thumb.jpg203.jpg",130,88,1);thumbnails[948865]=new thumbnail(948865,"70877","","Cotcard2_thumb.jpg204.jpg",130,93,1);thumbnails[948876]=new thumbnail(948876,"70877","","Botty_thumb.jpg202.jpg",130,94,1);thumbnails[949589]=new thumbnail(949589,"70871","","leaf3_thumb.jpg150.jpg",130,87,1);thumbnails[976158]=new thumbnail(976158,"70872","","Liffey_thumb.jpg213.jpg",130,83,1);thumbnails[976302]=new thumbnail(976302,"70872","","Copen_thumb.jpg184.jpg",130,87,1);thumbnails[976345]=new thumbnail(976345,"70872","","Swin_thumb.jpg",130,83,1);thumbnails[990261]=new thumbnail(990261,"70870","","Cot-bike-B089_thumb.jpg",130,93,1);thumbnails[990273]=new thumbnail(990273,"70869","","Cot-stone-A087_thumb.jpg",130,84,1);thumbnails[990282]=new thumbnail(990282,"70870","","Tractor-B109_thumb.jpg",130,82,1);thumbnails[990488]=new thumbnail(990488,"70871","","Charlbury-tree-view081_thumb.jpg",130,83,1);thumbnails[990490]=new thumbnail(990490,"70871","","Cornbury073_thumb.jpg",130,204,1);thumbnails[990513]=new thumbnail(990513,"70870","","Botallack078_thumb.jpg",130,204,1);thumbnails[990557]=new thumbnail(990557,"70869","","Splashstone-A092_thumb.jpg",130,204,1);thumbnails[990570]=new thumbnail(990570,"70870","","Finstock-beam077_thumb.jpg",130,84,1);thumbnails[990573]=new thumbnail(990573,"70870","","Lanyon-A100_thumb.jpg",130,83,1);thumbnails[990575]=new thumbnail(990575,"70869","","Boulders-A104_thumb.jpg",130,204,1);thumbnails[990581]=new thumbnail(990581,"70869","","Stone-bridge-A116_thumb.jpg",130,204,1);thumbnails[990588]=new thumbnail(990588,"70869","","Stonelight-A111_thumb.jpg",130,81,1);thumbnails[990597]=new thumbnail(990597,"70870","","Saddle-A106_thumb.jpg",130,201,1);thumbnails[991621]=new thumbnail(991621,"70870","","Botallack-C112_thumb.jpg",130,212,1);thumbnails[991640]=new thumbnail(991640,"70871","","Charlbury-treeA075_thumb.jpg",130,204,1);thumbnails[991645]=new thumbnail(991645,"70871","","Gorse-A102_thumb.jpg",130,83,1);thumbnails[991654]=new thumbnail(991654,"70870","","LevantA093_thumb.jpg",130,204,1);thumbnails[991658]=new thumbnail(991658,"70872","","Nets097_thumb.jpg",130,83,1);thumbnails[991661]=new thumbnail(991661,"70872","","Newlyn-lighthouse090_thumb.jpg",130,83,1);thumbnails[991666]=new thumbnail(991666,"70869","","Rock-pasty098_thumb.jpg",130,83,1);thumbnails[991671]=new thumbnail(991671,"70869","","Stone-row-A105_thumb.jpg",130,83,1);thumbnails[991675]=new thumbnail(991675,"70870","","Tractor-A108_thumb.jpg",130,81,1);thumbnails[991687]=new thumbnail(991687,"70870","","Zennor-Gate-A114_thumb.jpg",130,83,1);thumbnails[993816]=new thumbnail(993816,"70870","","Stonegate_thumb.jpg180.jpg",130,201,1);thumbnails[1002381]=new thumbnail(1002381,"70870","","bath_thumb.jpg207.jpg",130,83,1);thumbnails[1002387]=new thumbnail(1002387,"70870","","doorlight_thumb.jpg211.jpg",130,204,1);thumbnails[1002392]=new thumbnail(1002392,"70869","","heartstone_thumb.jpg210.jpg",130,83,1);thumbnails[1002427]=new thumbnail(1002427,"70870","","wreck1_thumb.jpg208.jpg",130,83,1);thumbnails[1002461]=new thumbnail(1002461,"76368","","angel1_thumb.jpg209.jpg",130,83,1);thumbnails[1004539]=new thumbnail(1004539,"70870","","whealsunset_thumb.jpg215.jpg",130,204,1);thumbnails[1004542]=new thumbnail(1004542,"70870","","scotlake_thumb.jpg217.jpg",130,215,1);thumbnails[1004545]=new thumbnail(1004545,"70870","","subrust_thumb.jpg216.jpg",130,83,1);thumbnails[1004566]=new thumbnail(1004566,"70871","","leafywabi_thumb.jpg214.jpg",130,204,1);thumbnails[1029604]=new thumbnail(1029604,"76368","","tombb_thumb.jpg220.jpg",130,195,1);thumbnails[1029611]=new thumbnail(1029611,"76368","","tombc_thumb.jpg221.jpg",130,195,1);thumbnails[1029613]=new thumbnail(1029613,"76368","","tombd_thumb.jpg222.jpg",130,184,1);thumbnails[1029615]=new thumbnail(1029615,"76368","","tombe_thumb.jpg223.jpg",130,195,1);thumbnails[1029621]=new thumbnail(1029621,"76368","","tombf_thumb.jpg224.jpg",130,87,1);thumbnails[1029630]=new thumbnail(1029630,"76368","","tombg_thumb.jpg225.jpg",130,116,1);thumbnails[1029641]=new thumbnail(1029641,"76368","","tombh_thumb.jpg226.jpg",130,195,1);thumbnails[1034779]=new thumbnail(1034779,"70872","","Big-wheel_thumb.jpg231.jpg",130,83,1);thumbnails[1034781]=new thumbnail(1034781,"70872","","Charlbury_thumb.jpg229.jpg",130,83,1);thumbnails[1034782]=new thumbnail(1034782,"70872","","Merry-horse_thumb.jpg232.jpg",130,83,1);thumbnails[1034784]=new thumbnail(1034784,"70872","","Newlyn-drums_thumb.jpg230.jpg",130,83,1);thumbnails[1034801]=new thumbnail(1034801,"70869","","Zenhead_thumb.jpg228.jpg",130,204,1);thumbnails[1034841]=new thumbnail(1034841,"70870","","Scotswagon_thumb.jpg233.jpg",130,204,1);thumbnails[1064607]=new thumbnail(1064607,"70872","","IMG_0104_thumb.jpg",130,98,1);thumbnails[1064734]=new thumbnail(1064734,"70872","","IMG_0105_thumb.jpg",130,187,1);thumbnails[1064869]=new thumbnail(1064869,"70872","","IMG_0101_thumb.jpg",130,98,1);thumbnails[1100091]=new thumbnail(1100091,"70869","","CarnA_thumb.jpg238.jpg",130,82,1);thumbnails[1100126]=new thumbnail(1100126,"70869","","CarnB_thumb.jpg239.jpg",130,80,1);thumbnails[1100155]=new thumbnail(1100155,"70869","","CarnC_thumb.jpg240.jpg",130,80,1);thumbnails[1100220]=new thumbnail(1100220,"70870","","LanyonB_thumb.jpg236.jpg",130,199,1);thumbnails[1100283]=new thumbnail(1100283,"70869","","zennorA_thumb.jpg234.jpg",130,211,1);thumbnails[1100292]=new thumbnail(1100292,"70869","","Boulder-beachA_thumb.jpg247.jpg",130,195,1);thumbnails[1105753]=new thumbnail(1105753,"70870","","wreckrust_thumb.jpg",130,83,1);thumbnails[1105755]=new thumbnail(1105755,"70870","","wreckrustC_thumb.jpg255.jpg",130,84,1);thumbnails[1105758]=new thumbnail(1105758,"70870","","wreckrustD_thumb.jpg256.jpg",130,83,1);thumbnails[1124370]=new thumbnail(1124370,"70869","","Carnrock_thumb.jpg258.jpg",130,80,1);thumbnails[1124375]=new thumbnail(1124375,"70869","","Doublestone_thumb.jpg259.jpg",130,80,1);thumbnails[1124378]=new thumbnail(1124378,"70870","","Gatepost_thumb.jpg257.jpg",130,201,1);thumbnails[1124392]=new thumbnail(1124392,"70869","","Jet-stone_thumb.jpg",130,210,1);thumbnails[1124404]=new thumbnail(1124404,"70870","","Wreckrust-C_thumb.jpg265.jpg",130,91,1);thumbnails[1125481]=new thumbnail(1125481,"70869","","Stonenugget_thumb.jpg273.jpg",130,84,1);thumbnails[1125493]=new thumbnail(1125493,"70869","","Stonebright_thumb.jpg",130,199,1);thumbnails[1125498]=new thumbnail(1125498,"70869","","Stonepuddle_thumb.jpg269.jpg",130,84,1);thumbnails[1125502]=new thumbnail(1125502,"70869","","Stoneshadow-A_thumb.jpg267.jpg",130,202,1);thumbnails[1125509]=new thumbnail(1125509,"70869","","Stonewedge_thumb.jpg268.jpg",130,87,1);thumbnails[1125512]=new thumbnail(1125512,"70869","","Stonezen_thumb.jpg271.jpg",130,84,1);thumbnails[1125522]=new thumbnail(1125522,"70870","","Wreckrust-B_thumb.jpg261.jpg",130,80,1);thumbnails[1132918]=new thumbnail(1132918,"70870","","Cot-bike-A088-copy_thumb.jpg",130,83,1);thumbnails[1231446]=new thumbnail(1231446,"76368","","Angelic-chap_thumb.jpg336.jpg",130,204,1);thumbnails[1231450]=new thumbnail(1231450,"70869","","Curvestone_thumb.jpg308.jpg",130,195,1);thumbnails[1231455]=new thumbnail(1231455,"70870","","Roonagh_thumb.jpg342.jpg",130,87,1);thumbnails[1231458]=new thumbnail(1231458,"70870","","Mayo-bucket_thumb.jpg295.jpg",130,88,1);thumbnails[1231459]=new thumbnail(1231459,"70869","","Stone-hollow_thumb.jpg343.jpg",130,195,1);thumbnails[1231460]=new thumbnail(1231460,"70869","","Cover-crack_thumb.jpg245.jpg",130,195,1);thumbnails[1231463]=new thumbnail(1231463,"70869","","Stone-tennis_thumb.jpg281.jpg",130,195,1);thumbnails[1231469]=new thumbnail(1231469,"70869","","Stone-teeth-A_thumb.jpg286.jpg",130,83,1);thumbnails[1233311]=new thumbnail(1233311,"70872","","snow-wall_thumb.jpg",130,98,1);thumbnails[1233318]=new thumbnail(1233318,"70871","","snow-river_thumb.jpg",130,98,1);thumbnails[1233329]=new thumbnail(1233329,"70871","","IMG_0201_1_thumb.jpg",130,98,1);thumbnails[1519552]=new thumbnail(1519552,"70872","","Buddha-froglet_thumb.jpg374.jpg",130,204,1);thumbnails[1519560]=new thumbnail(1519560,"70872","","Croagh-E_thumb.jpg375.jpg",130,83,1);thumbnails[1519565]=new thumbnail(1519565,"70872","","Dublin-Liffey-B_thumb.jpg380.jpg",130,80,1);thumbnails[1519572]=new thumbnail(1519572,"70870","","Mayo-bucket_sheep_thumb.jpg365.jpg",130,81,1);thumbnails[1519573]=new thumbnail(1519573,"70869","","Stone-cradle_thumb.jpg367.jpg",130,83,1);thumbnails[1519579]=new thumbnail(1519579,"70869","","Wet-stone-A_thumb.jpg378.jpg",130,84,1);thumbnails[3578138]=new thumbnail(3578138,"219177","Think Before you Think","Clikpic-think-cover1_thumb.jpg",130,196,1);thumbnails[934703]=new thumbnail(934703,"70875","STAFFORD BEER: A PERSONAL MEMOIR (WITH BRIAN ENO)","Staffbook_thumb.jpg199.jpg",130,190,1);thumbnails[931769]=new thumbnail(931769,"70875","TONY O'MALLEY: AN IRISH ARTIST IN CORNWALL","Tonybook_thumb.jpg197.jpg",130,190,1);thumbnails[1013929]=new thumbnail(1013929,"70875","STONELIGHT","Stone-cover_thumb.jpg353.jpg",130,154,1);thumbnails[934707]=new thumbnail(934707,"70875","ZAWN LENS: WORDS & IMAGES FROM WEST CORNWALL","Zawnbook_thumb.jpg201.jpg",130,192,1);thumbnails[934694]=new thumbnail(934694,"70875","COTSWOLD PLACE-NAMES","Cotsbook_thumb.jpg200.jpg",130,188,1);thumbnails[934676]=new thumbnail(934676,"70875","OXFORDSHIRE PLACE-NAMES","Oxonbook_thumb.jpg198.jpg",130,188,1);var galleries=new Object();galleries[70872]=new gallery(70872,"1519552","ALLSORTS","gallery",[976158,976302,976345,991658,991661,1034779,1034781,1034782,1034784,1064607,1064734,1064869,1233311,1519552,1519560,1519565]);galleries[70875]=new gallery(70875,"934703","BOOKS","gallery",[934703,931769,1013929,934707,934694,934676]);galleries[70877]=new gallery(70877,"948856","CARDS","gallery",[948787,948856,948859,948865,948876]);galleries[70871]=new gallery(70871,"990490","LEAFSCAPES","gallery",[941850,949589,990488,990490,991640,991645,1004566,1233318,1233329]);galleries[219177]=new gallery(219177,"3578138","NEW PUBLICATION","gallery",[3578138]);galleries[70870]=new gallery(70870,"1034841","RUINSCAPES","gallery",[941567,990261,990282,990513,990570,990573,990597,991621,991654,991675,991687,993816,1002381,1002387,1002427,1004539,1004542,1004545,1034841,1100220,1105753,1105755,1105758,1124378,1124404,1125522,1132918,1231455,1231458,1519572]);galleries[70869]=new gallery(70869,"1100283","STONESCAPES","gallery",[990273,990557,990575,990581,990588,991666,991671,1002392,1034801,1100091,1100126,1100155,1100283,1100292,1124370,1124375,1124392,1125481,1125493,1125498,1125502,1125509,1125512,1231450,1231459,1231460,1231463,1231469,1519573,1519579]);galleries[76368]=new gallery(76368,"1231446","TOMBSCAPES","gallery",[1002461,1029604,1029611,1029613,1029615,1029621,1029630,1029641,1231446]);var imageSets=new Object();imageSets[1]="990273";imageSets[2]="3578138,1519552,1231446,1100283,1034841,990490,948856,934703";imageSets[3]="3578138,1519579,1519573,1519572,1519565,1519560,1519552,1233329,1233318,1233311,1231469,1231463,1231460,1231459,1231458,1231455,1231450,1231446,1132918,1125522,1125512,1125509,1125502,1125498,1125493,1125481,1124404,1124392,1124378,1124375,1124370,1105758,1105755,1105753,1100292,1100283,1100220,1100155,1100126,1100091,1064869,1064734,1064607,1034841,1034801,1034784,1034782,1034781,1034779,1029641";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/whitty/images";break}switch(a){case 1:b="http://www1.clikpic.com/whitty/images";break}switch(a){case 2:b="http://admin.clikpic.com/whitty/images";break}switch(a){case 4:b="http://www.clikchurch.com/whitty/images";break}switch(a){case 5:b="http://www2.clikpic.com/whitty/images";break}switch(a){case 15:b="http://www3.clikpic.com/whitty/images";break}switch(a){case 21:b="http://www6.clikpic.com/whitty/images";break}switch(a){case 18:b="http://www4.clikpic.com/whitty/images";break}switch(a){case 19:b="http://www5.clikpic.com/whitty/images";break}switch(a){case 22:b="http://tpc5/clikpic/whitty/images";break}switch(a){case 23:b="http://tpc10/clikpic/whitty/images";break}switch(a){case 24:b="http://tpc15/clikpic/whitty/images";break}switch(a){case 25:b="http://tpc16/clikpic/whitty/images";break}switch(a){case 31:b="http://www7.clikpic.com/whitty/images";break}switch(a){case 32:b="http://admin2.clikpic.com/whitty/images";break}switch(a){case 33:b="http://www8.clikpic.com/whitty/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="Wavestone Press: "+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="wavestone@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="wavestone@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+'")'})}}};