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[2079819]=new thumbnail(2079819,"138885","","IMG_9275_thumb.jpg",130,109,18);thumbnails[2270705]=new thumbnail(2270705,"257980","","IMG_8328_thumb.jpg",130,107,18);thumbnails[2270766]=new thumbnail(2270766,"257980","","007mattie_thumb.jpg",130,86,18);thumbnails[2270768]=new thumbnail(2270768,"257980","","006adj2osc_thumb.jpg",130,86,18);thumbnails[2270769]=new thumbnail(2270769,"257980","","IMG_8385wis_thumb.jpg",130,195,18);thumbnails[2270770]=new thumbnail(2270770,"257980","","IMG_8369cropwis_thumb.jpg",130,166,18);thumbnails[2270791]=new thumbnail(2270791,"257980","","IMG_7917adjcropmill_thumb.jpg",130,89,18);thumbnails[2271976]=new thumbnail(2271976,"257980","","IMG_7976flash_thumb.jpg",130,87,18);thumbnails[2271977]=new thumbnail(2271977,"257980","","IMG_8634beanie_thumb.jpg",130,87,18);thumbnails[2953903]=new thumbnail(2953903,"257980","","IMG_0257adjsmallprint_thumb.jpg",130,142,18);thumbnails[4399939]=new thumbnail(4399939,"257980","millie- border collie cross","IMG_0418bwprintweb_thumb.jpg",130,163,18);thumbnails[4399946]=new thumbnail(4399946,"257980","","IMG_6331_thumb.jpg",130,157,18);thumbnails[4399947]=new thumbnail(4399947,"257980","archie","IMG_6342_thumb.jpg",130,161,18);thumbnails[4399955]=new thumbnail(4399955,"257980","black labrador","IMG_6315sml_thumb.jpg",130,103,18);thumbnails[4400146]=new thumbnail(4400146,"257980","","IMG_62981_thumb.jpg",130,200,18);thumbnails[4414325]=new thumbnail(4414325,"257980","","IMG_6289bw_thumb.jpg",130,182,18);thumbnails[4414331]=new thumbnail(4414331,"257980","","IMG_9202bwcruf_thumb.jpg",130,195,18);thumbnails[5057771]=new thumbnail(5057771,"257980","lucy","eblucy018_thumb.jpg",130,156,18);thumbnails[5057772]=new thumbnail(5057772,"257980","","eblucy021bw_thumb.jpg",130,156,18);thumbnails[5057775]=new thumbnail(5057775,"257980","poppy","poppy0480_thumb.jpg",130,176,18);thumbnails[5057776]=new thumbnail(5057776,"257980","bella","bella_thumb.jpg",130,95,18);thumbnails[1886348]=new thumbnail(1886348,"101269","","IMG_0259crop_thumb.jpg",130,139,18);thumbnails[1886355]=new thumbnail(1886355,"101269","","IMG_0270crop1_thumb.jpg",130,144,18);thumbnails[2045539]=new thumbnail(2045539,"101269","","015peng10x8_thumb.jpg",130,104,18);thumbnails[2045540]=new thumbnail(2045540,"101269","","504107ARG_thumb.jpg",130,196,18);thumbnails[2270707]=new thumbnail(2270707,"101269","","50220BD2_thumb.jpg",130,87,18);thumbnails[2953904]=new thumbnail(2953904,"101269","","IMG_9449_thumb.jpg",130,84,18);thumbnails[2270556]=new thumbnail(2270556,"101249","","007magnoliawisley_thumb.jpg",130,86,18);thumbnails[2270575]=new thumbnail(2270575,"101249","","IMG_9060ad_thumb.jpg",130,87,18);thumbnails[2270576]=new thumbnail(2270576,"101249","","IMG_9061twells_thumb.jpg",130,195,18);thumbnails[2270628]=new thumbnail(2270628,"101249","","IMG_9401_thumb.jpg",130,87,18);thumbnails[2270630]=new thumbnail(2270630,"101249","","IMG_9402_thumb.jpg",130,87,18);thumbnails[2270641]=new thumbnail(2270641,"101249","","IMG_9414print_thumb.jpg",130,195,18);thumbnails[2270643]=new thumbnail(2270643,"101249","","IMG_9421adj_thumb.jpg",130,195,18);thumbnails[2270650]=new thumbnail(2270650,"101249","","IMG_9567mt-stwhelleboreadj_thumb.jpg",130,87,18);thumbnails[2270651]=new thumbnail(2270651,"101249","","IMG_9626_thumb.jpg",130,195,18);thumbnails[2270654]=new thumbnail(2270654,"101249","","IMG_9631_2_thumb.jpg",130,195,18);thumbnails[2270667]=new thumbnail(2270667,"101249","","50482PS_thumb.jpg",130,86,18);thumbnails[2271991]=new thumbnail(2271991,"101249","","IMG_9631_11_thumb.jpg",130,82,18);thumbnails[2304955]=new thumbnail(2304955,"101249","","50370PT1_thumb.jpg",130,86,18);thumbnails[2330027]=new thumbnail(2330027,"101249","","kew1_thumb.jpg",130,87,18);thumbnails[2330029]=new thumbnail(2330029,"101249","","kew2_thumb.jpg",130,87,18);thumbnails[2346084]=new thumbnail(2346084,"101249","","IMG_9715ad_1_thumb.jpg",130,195,18);thumbnails[2953893]=new thumbnail(2953893,"101249","","50352PT_thumb.jpg",130,198,18);thumbnails[2953898]=new thumbnail(2953898,"101249","","IMG_0093adj_thumb.jpg",130,86,18);thumbnails[2953899]=new thumbnail(2953899,"101249","","IMG_0096_thumb.jpg.jpg",130,87,18);thumbnails[2953905]=new thumbnail(2953905,"101249","","IMG_9643adj_thumb.jpg",130,87,18);thumbnails[4105381]=new thumbnail(4105381,"101249","","IMG_6056_thumb.jpg",130,76,18);thumbnails[4105384]=new thumbnail(4105384,"101249","","IMG_6092_thumb.jpg",130,195,18);thumbnails[4105389]=new thumbnail(4105389,"101249","","IMG_6100_thumb.jpg",130,95,18);thumbnails[4105393]=new thumbnail(4105393,"101249","","IMG_6107_thumb.jpg",130,87,18);thumbnails[4105395]=new thumbnail(4105395,"101249","","IMG_6110_thumb.jpg",130,87,18);thumbnails[4105401]=new thumbnail(4105401,"101249","","IMG_6117_thumb.jpg",130,195,18);thumbnails[2270557]=new thumbnail(2270557,"101246","","50219Wbwwisley_thumb.jpg",130,87,18);thumbnails[2270559]=new thumbnail(2270559,"101246","","IMG9336hampton_thumb.jpg",130,87,18);thumbnails[2270560]=new thumbnail(2270560,"101246","","IMG_0223_thumb.jpg",130,195,18);thumbnails[2270570]=new thumbnail(2270570,"101246","","IMG_0261bw1_thumb.jpg",130,87,18);thumbnails[2270574]=new thumbnail(2270574,"101246","","IMG_8707adj_thumb.jpg",130,195,18);thumbnails[2270610]=new thumbnail(2270610,"101246","","IMG_9206rochefort_thumb.jpg",130,185,18);thumbnails[2270612]=new thumbnail(2270612,"101246","","IMG_9217rochefortad2_thumb.jpg",130,194,18);thumbnails[2270614]=new thumbnail(2270614,"101246","","IMG_9353hampton2_thumb.jpg",130,87,18);thumbnails[2270615]=new thumbnail(2270615,"101246","","IMG_9370hampton_thumb.jpg",130,105,18);thumbnails[2270618]=new thumbnail(2270618,"101246","","IMG_9369hampton_thumb.jpg",130,176,18);thumbnails[2270623]=new thumbnail(2270623,"101246","","IMG_9393hampton_thumb.jpg",130,87,18);thumbnails[2270635]=new thumbnail(2270635,"101246","","IMG_9405bw_thumb.jpg",130,195,18);thumbnails[2270637]=new thumbnail(2270637,"101246","","IMG_9405hampton_thumb.jpg",130,87,18);thumbnails[2270645]=new thumbnail(2270645,"101246","","IMG_9481adj_thumb.jpg",130,195,18);thumbnails[2270647]=new thumbnail(2270647,"101246","","IMG_9490_thumb.jpg",130,87,18);thumbnails[2270649]=new thumbnail(2270649,"101246","","IMG_9551_thumb.jpg",130,87,18);thumbnails[2270656]=new thumbnail(2270656,"101246","","IMG_9631adj_thumb.jpg",130,168,18);thumbnails[2270657]=new thumbnail(2270657,"101246","","IMG_9893hever_thumb.jpg",130,195,18);thumbnails[2270658]=new thumbnail(2270658,"101246","","IMG_9895hever_thumb.jpg",130,83,18);thumbnails[2270660]=new thumbnail(2270660,"101246","","IMG_9906hever_thumb.jpg",130,87,18);thumbnails[2271988]=new thumbnail(2271988,"101246","","IMG_93971_thumb.jpg",130,98,18);thumbnails[2330030]=new thumbnail(2330030,"101246","","kew3_thumb.jpg",130,195,18);thumbnails[2330032]=new thumbnail(2330032,"101246","","kew4_thumb.jpg",130,83,18);thumbnails[2953895]=new thumbnail(2953895,"101246","","IMG_0082_thumb.jpg.jpg",130,87,18);thumbnails[2953907]=new thumbnail(2953907,"101246","","IMG_9699ad_thumb.jpg",130,87,18);thumbnails[2953910]=new thumbnail(2953910,"101246","","IMG_9721ad_thumb.jpg",130,195,18);thumbnails[2953911]=new thumbnail(2953911,"101246","","IMG_9754_thumb.jpg",130,107,18);thumbnails[2953912]=new thumbnail(2953912,"101246","","IMG_9846_thumb.jpg",130,88,18);thumbnails[4105377]=new thumbnail(4105377,"101246","","IMG_6054_thumb.jpg",130,111,18);thumbnails[4105398]=new thumbnail(4105398,"101246","","IMG_6111_thumb.jpg",130,82,18);thumbnails[1886347]=new thumbnail(1886347,"126676","","IMG_0194crop_thumb.jpg",130,129,18);thumbnails[1888075]=new thumbnail(1888075,"126676","","IMG_0103cropbw3_thumb.jpg",130,180,18);thumbnails[1888177]=new thumbnail(1888177,"126676","","IMG_0077_thumb.jpg",130,195,18);thumbnails[1888298]=new thumbnail(1888298,"126676","","IMG_0324_thumb.jpg",130,80,18);thumbnails[2270503]=new thumbnail(2270503,"126676","","001battersea_thumb.jpg",130,86,18);thumbnails[2270504]=new thumbnail(2270504,"126676","","IMG_0322_thumb.jpg",130,71,18);thumbnails[2270549]=new thumbnail(2270549,"126676","","IMG_0861adj4abridge_thumb.jpg",130,74,18);thumbnails[2270553]=new thumbnail(2270553,"126676","","IMG_0916adjbridge_thumb.jpg",130,87,18);thumbnails[2270555]=new thumbnail(2270555,"126676","","IMG_0282printcorn_thumb.jpg",130,83,18);var galleries=new Object();galleries[138885]=new gallery(138885,"2079819","karen johnson","gallery",[2079819]);galleries[257980]=new gallery(257980,"5057776,5057775,5057772,5057771,4414331,4414325,4400146,4399955,4399947,4399946,4399939,2953903,2271977,2271976,2270791,2270770,2270769,2270768,2270766,2270705","dog portraits","gallery",[2270705,2270766,2270768,2270769,2270770,2270791,2271976,2271977,2953903,4399939,4399946,4399947,4399955,4400146,4414325,4414331,5057771,5057772,5057775,5057776]);galleries[101269]=new gallery(101269,"2045540,2045539,1886348","animal portraits","gallery",[1886348,1886355,2045539,2045540,2270707,2953904]);galleries[101249]=new gallery(101249,"4105401,4105395,4105389,4105384,2953905,2953899,2953898,2953893,2346084,2330029,2330027,2304955,2271991,2270667,2270654,2270651,2270643,2270641,2270630,2270628,2270576,2270556","botanical portraits","gallery",[2270556,2270575,2270576,2270628,2270630,2270641,2270643,2270650,2270651,2270654,2270667,2271991,2304955,2330027,2330029,2346084,2953893,2953898,2953899,2953905,4105381,4105384,4105389,4105393,4105395,4105401]);galleries[101246]=new gallery(101246,"4105398,4105377,2953911,2953910,2953895,2330030,2270660,2270658,2270657,2270656,2270645,2270637,2270635,2270618,2270615,2270574,2270570,2270560,2270557","garden","gallery",[2270557,2270559,2270560,2270570,2270574,2270610,2270612,2270614,2270615,2270618,2270623,2270635,2270637,2270645,2270647,2270649,2270656,2270657,2270658,2270660,2271988,2330030,2330032,2953895,2953907,2953910,2953911,2953912,4105377,4105398]);galleries[126676]=new gallery(126676,"2270555,2270553,2270549,2270504,2270503,1888298,1888177,1888075,1886347","landscape/fine art","gallery",[1886347,1888075,1888177,1888298,2270503,2270504,2270549,2270553,2270555]);var imageSets=new Object();imageSets[76312]="4105401,4105395,4105393,4105389,4105384,4105381,2953905,2953899,2953898,2953893,2346084,2330029,2330027,2304955,2271991,2270667,2270654,2270651,2270650,2270643,2270641,2270630,2270628,2270576,2270575,2270556";imageSets[80402]="2270555,2270553,2270549,2270504,2270503,1888298,1888177,1888075,1886347";imageSets[1]="5057776,5057775,5057772,4414331,4414325,4400146,4399955,4399947,4399946,4399939,2953903,2271977,2271976,2270791,2270770,2270769,2270766,2270705";imageSets[2]="5057776,5057775,5057772,5057771,4414331,4414325,4400146,4399955,4399947,4399946,4399939,4105401,4105398,4105395,4105389,4105384,4105377,2953911,2953910,2953905,2953903,2953899,2953898,2953895,2953893,2346084,2330030,2330029,2330027,2304955,2271991,2271977,2271976,2270791,2270770,2270769,2270768,2270766,2270705,2270667,2270660,2270658,2270657,2270656,2270654,2270651,2270645,2270643,2270641,2270637,2270635,2270630,2270628,2270618,2270615,2270576,2270574,2270570,2270560,2270557,2270556,2270555,2270553,2270549,2270504,2270503,2079819,2045540,2045539,1888298,1888177,1888075,1886348,1886347";imageSets[3]="5057776,5057775,5057771,4414331,4414325,4400146,4399955,4399947,4399946,4399939,2270555,2270504";imageSets[110779]="4414325,4400146,4399955,4399947,4399946";imageSets[76311]="2953904,2270707,2045540,2045539,1886355,1886348";imageSets[231783]="5057776,5057775,5057772,5057771,4414331,4414325,4400146,4399955,4399947,4399946,4399939,2953903,2271977,2271976,2270791,2270770,2270769,2270768,2270766,2270705";imageSets[107743]="4105398,4105377,2953912,2953911,2953910,2953907,2953895,2330032,2330030,2271988,2270660,2270658,2270656,2270649,2270647,2270645,2270637,2270635,2270623,2270618,2270615,2270614,2270612,2270610,2270574,2270570,2270560,2270559,2270557";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/karenj/images";break}switch(a){case 1:b="http://www1.clikpic.com/karenj/images";break}switch(a){case 2:b="http://admin.clikpic.com/karenj/images";break}switch(a){case 4:b="http://www.clikchurch.com/karenj/images";break}switch(a){case 5:b="http://www2.clikpic.com/karenj/images";break}switch(a){case 15:b="http://www3.clikpic.com/karenj/images";break}switch(a){case 21:b="http://www6.clikpic.com/karenj/images";break}switch(a){case 18:b="http://www4.clikpic.com/karenj/images";break}switch(a){case 19:b="http://www5.clikpic.com/karenj/images";break}switch(a){case 22:b="http://tpc5/clikpic/karenj/images";break}switch(a){case 23:b="http://tpc10/clikpic/karenj/images";break}switch(a){case 24:b="http://tpc15/clikpic/karenj/images";break}switch(a){case 25:b="http://tpc16/clikpic/karenj/images";break}switch(a){case 31:b="http://www7.clikpic.com/karenj/images";break}switch(a){case 32:b="http://admin2.clikpic.com/karenj/images";break}switch(a){case 33:b="http://www8.clikpic.com/karenj/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="karen johnson pet and garden 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="karenj3@googlemail.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="karenj3@googlemail.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+'")'})}}};