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[6363037]=new thumbnail(6363037,"","","DSC_0109_thumb.jpg",130,157,15);thumbnails[4405899]=new thumbnail(4405899,"320049","Pals<br>\r\n<br>\r\n","pals_copy_thumb.jpg",130,128,15);thumbnails[5625373]=new thumbnail(5625373,"320049","A Happy Chap","DSCF0398_copy_4AB7B352-1EC9-D45B-1C8EB82761615F7B_thumb.jpg",130,98,15);thumbnails[4405887]=new thumbnail(4405887,"320049","Bad Hair Day<br>\r\n<br>\r\n","bad_hair_day_copy_thumb.jpg",130,117,15);thumbnails[4405909]=new thumbnail(4405909,"320049","My Best Side","my_best_side_copy_thumb.jpg",130,116,15);thumbnails[5313201]=new thumbnail(5313201,"320049","BURNING BRIGHT<br>\r\n","Tiger_copy_thumb.jpg",130,72,15);thumbnails[5313191]=new thumbnail(5313191,"320049","Leopard","DSC_0681_copy_thumb.jpg",130,92,15);thumbnails[5513574]=new thumbnail(5513574,"320049"," What The Devil Is That !!!","DSC_0154_copyA_thumb.jpg",130,85,15);thumbnails[5363029]=new thumbnail(5363029,"320049","SHY AND GENTLE GIANT","SHY_GIANT_copy_thumb.jpg",130,183,15);thumbnails[5635179]=new thumbnail(5635179,"320049","I can see you ","DSCF0397_copy_thumb.jpg",130,173,15);thumbnails[4556528]=new thumbnail(4556528,"320049","Giant Panda","DSCF0230_thumb.JPG",130,98,15);thumbnails[6362967]=new thumbnail(6362967,"320049","There was an Irishman an Englishman and A Scotsman","DSC_0102_thumb.jpg",130,86,15);thumbnails[4556488]=new thumbnail(4556488,"320049","Trouble and Strife","trouble_and_strife_copy_thumb.jpg",130,52,15);thumbnails[4563041]=new thumbnail(4563041,"235807","","Wolf_copy_thumb.jpg",130,87,15);thumbnails[4563044]=new thumbnail(4563044,"235807","","everything_574_copy_thumb.jpg",130,87,15);thumbnails[4563048]=new thumbnail(4563048,"235807","","17_copy_thumb.jpg",130,87,15);thumbnails[4563185]=new thumbnail(4563185,"235807","","262_copy_thumb.jpg",130,63,15);thumbnails[4563186]=new thumbnail(4563186,"235807","Japanese Crane","100_copy_thumb.jpg",130,87,15);thumbnails[4563190]=new thumbnail(4563190,"235807","Swans","241_copy12_thumb.jpg",130,88,15);thumbnails[4563260]=new thumbnail(4563260,"257694","Happy Child","babyface_copy_thumb.jpg",130,96,15);thumbnails[4755191]=new thumbnail(4755191,"235807","","mallard_thumb.jpg",130,87,15);thumbnails[4755196]=new thumbnail(4755196,"235807","","mantis_thumb.jpg",130,87,15);thumbnails[4755204]=new thumbnail(4755204,"235807","","otter_thumb.jpg",130,101,15);thumbnails[4973643]=new thumbnail(4973643,"278535","","DSC_0003_thumb.jpg",130,86,15);thumbnails[4973784]=new thumbnail(4973784,"278535","Liz Williams<br>\r\n","b_thumb.jpg",130,86,15);thumbnails[5244493]=new thumbnail(5244493,"235807","","Picture_914_copya_thumb.jpg",130,136,15);thumbnails[5334985]=new thumbnail(5334985,"235807","Winter Wolf","snow1_thumb.jpg",130,86,15);thumbnails[5352464]=new thumbnail(5352464,"257694","Portrait of Kelly Nunn Martin based on an underwater photograph by Darin Basile. <br>\r\n","DSC_0736_copy_thumb.jpg",130,176,15);thumbnails[5622313]=new thumbnail(5622313,"278535","","DSCF0397_thumb.jpg",130,173,15);thumbnails[5622316]=new thumbnail(5622316,"278535","","DSCF0399_thumb.jpg",130,173,15);thumbnails[5914459]=new thumbnail(5914459,"278535","Eastern Frontier Indian","DSC_0101_thumb.jpg",130,196,15);thumbnails[6362895]=new thumbnail(6362895,"278535","Black Panther .","DSC_0095_thumb.jpg",130,196,15);thumbnails[4755189]=new thumbnail(4755189,"235807","","leopard_thumb.jpg",130,87,15);thumbnails[5622317]=new thumbnail(5622317,"278535","Life is good","DSCF0398_copy_thumb.jpg",130,98,15);thumbnails[4430962]=new thumbnail(4430962,"235807","Cheeky Chap","cheeky_chap_copy_thumb.jpg",130,86,15);thumbnails[4403565]=new thumbnail(4403565,"235807","Been Discovered!","ziggy_908_thumb.jpg",130,86,15);thumbnails[4405891]=new thumbnail(4405891,"257694","Johnny Cash","JOHHNY-CASH_copy_thumb.jpg",130,127,15);thumbnails[4405905]=new thumbnail(4405905,"257694","Commissioned Artistic Nude<br>\r\n<br>\r\n","Gill_copy_thumb.jpg",130,181,15);thumbnails[4430764]=new thumbnail(4430764,"235807","Not A Happy Bunny (Scotish Wildcat)","ziggy_723_copy_thumb.jpg",130,86,15);thumbnails[4405913]=new thumbnail(4405913,"257694","White Horse Pawnee Indian Scout","White_Horse_copy_thumb.jpg",130,164,15);thumbnails[4431006]=new thumbnail(4431006,"235807","Still Not A Happy Bunny","ziggy_720_copy_thumb.jpg",130,171,15);thumbnails[4552697]=new thumbnail(4552697,"261969","","dave_butcher_014_thumb.jpg",130,196,15);thumbnails[4552706]=new thumbnail(4552706,"261969","","dave_butcher_054_thumb.jpg",130,196,15);thumbnails[4552711]=new thumbnail(4552711,"261969","","dave_butcher_060_thumb.jpg",130,87,15);thumbnails[4552740]=new thumbnail(4552740,"261969","","dave_butcher_066_thumb.jpg",130,106,15);thumbnails[4552749]=new thumbnail(4552749,"261969","AND NOW FOR THE NEWS","dave_butcher_067_thumb.jpg",130,196,15);thumbnails[4552757]=new thumbnail(4552757,"261969","","dave_butcher_070_thumb.jpg",130,87,15);thumbnails[4552765]=new thumbnail(4552765,"261969"," HELLO !!!","dave_butcher_071_thumb.jpg",130,95,15);thumbnails[4552791]=new thumbnail(4552791,"261969","","dave_butcher_072_thumb.jpg",130,132,15);thumbnails[4552823]=new thumbnail(4552823,"261969","","dave_butcher_063_thumb.jpg",130,196,15);thumbnails[4755181]=new thumbnail(4755181,"261969","","flickr_thumb.jpg",130,87,15);thumbnails[4796336]=new thumbnail(4796336,"261969","Field Mouse.","mouse_thumb.jpg",130,196,15);thumbnails[5363028]=new thumbnail(5363028,"235808","FRENCH  BARN","FRENCH_BARN_copy_thumb.jpg",130,81,15);thumbnails[5019632]=new thumbnail(5019632,"286753","MISTY STILL LAKE","DSC_0462a_copy_thumb.jpg",130,196,15);thumbnails[5291779]=new thumbnail(5291779,"286753","","DSC_0456_copya_copyc_thumb.jpg",130,200,15);thumbnails[4405866]=new thumbnail(4405866,"258194","SNOWY  OWL","ret_014_copy_thumb.jpg",130,86,15);thumbnails[4405875]=new thumbnail(4405875,"258194","Kestrel","ret_034_copy_thumb.jpg",130,196,15);thumbnails[4405876]=new thumbnail(4405876,"258194","Kestrel","ret_039_copy_thumb.jpg",130,196,15);thumbnails[4405877]=new thumbnail(4405877,"258194","","ret_042_copy_thumb.jpg",130,196,15);thumbnails[5128361]=new thumbnail(5128361,"258194","","ret_022_copy_thumb.jpg",130,86,15);thumbnails[5291786]=new thumbnail(5291786,"258194","","DSC_0456_copyb_thumb.jpg",130,86,15);thumbnails[4796285]=new thumbnail(4796285,"258194","WILD TERRITORY","wolft_thumb.jpg",130,86,15);thumbnails[5019627]=new thumbnail(5019627,"258194","THE OLD DAYS","DSC_0434_copya_copya_thumb.jpg",130,86,15);thumbnails[5296836]=new thumbnail(5296836,"258194","A MOTHERLY LOVE","DSC_0625_copya_thumb.jpg",130,172,15);thumbnails[4796297]=new thumbnail(4796297,"258194","THIS IS WHAT HAPPENS WHEN YOU SWITCH OFF THE BEDROOM LIGHT !","nightt_thumb.jpg",130,86,15);thumbnails[4405878]=new thumbnail(4405878,"258194","Snow Leapard","ret_045_copy_thumb.jpg",130,196,15);thumbnails[4563087]=new thumbnail(4563087,"264717","I took this while experimenting with various shutter speeds , quite like the results though.","wine_glass_023_copy_thumb.jpg",130,196,15);thumbnails[4585919]=new thumbnail(4585919,"264717","","DSC_0784_copy_thumb.jpg",130,196,15);thumbnails[4796305]=new thumbnail(4796305,"265614","","DSC_0483_copysmall_thumb.jpg",130,86,15);thumbnails[5019651]=new thumbnail(5019651,"265614","","DSC_0505_copya_copyabc_thumb.jpg",130,87,15);thumbnails[4431051]=new thumbnail(4431051,"258655","Tania Claire","t12_copya_thumb.jpg",130,125,15);thumbnails[4755036]=new thumbnail(4755036,"258655","Tania Claire","t52_copy_thumb.jpg",130,161,15);thumbnails[4755207]=new thumbnail(4755207,"258655","Liz Williams","portrait_thumb.jpg",130,149,15);thumbnails[5387506]=new thumbnail(5387506,"258655","Kelly Nunn Martin<br>\r\nPortrait drawn from a photo by Darin Basile","KELLY_SHOT_SMALLEST_copy_thumb.jpg",130,159,15);thumbnails[5387507]=new thumbnail(5387507,"258655","Young Child","babyface_copy_441F2789-2219-B5B5-4CC8B2D370B9FC20_thumb.jpg",130,96,15);thumbnails[5538491]=new thumbnail(5538491,"258655","HANNAHS WEDDING","DSCF0386a_thumb.jpg",130,91,15);thumbnails[6362470]=new thumbnail(6362470,"352307","Fine Art Wildlife Greeting Cards","DSC_0094_thumb.jpg",130,86,15);thumbnails[6362477]=new thumbnail(6362477,"352307","Raptors Greeting Cards","DSC_0083_thumb.jpg",130,86,15);thumbnails[6362478]=new thumbnail(6362478,"352307","Raptors 2","DSC_0084_thumb.jpg",130,51,15);thumbnails[6362481]=new thumbnail(6362481,"352307","Big Cats ( Tigers)","DSC_0085_thumb.jpg",130,86,15);thumbnails[6362483]=new thumbnail(6362483,"352307","Snow Leopard","DSC_0086_thumb.jpg",130,86,15);thumbnails[6362486]=new thumbnail(6362486,"352307","Leopards","DSC_0087_thumb.jpg",130,86,15);thumbnails[6362488]=new thumbnail(6362488,"352307","","DSC_0088_thumb.jpg",130,86,15);thumbnails[6362617]=new thumbnail(6362617,"352307","Miscellaneous","DSC_0089_thumb.jpg",130,86,15);thumbnails[6362788]=new thumbnail(6362788,"352307","Humour - Well we have to have a laugh with some of my drunken friends here (hic)","DSC_0090_thumb.jpg",130,179,15);var galleries=new Object();galleries[320049]=new gallery(320049,"6362967,5635179,5625373,5513574,5363029,5313201,5313191,4556528,4556488,4405909","Wildlife","gallery",[4405899,5625373,4405887,4405909,5313201,5313191,5513574,5363029,5635179,4556528,6362967,4556488]);galleries[278535]=new gallery(278535,"6362895,5914459,5622317,5622316,5622313,4973784,4973643","Ongoing Projects","gallery",[4973643,4973784,5622313,5622316,5914459,6362895,5622317]);galleries[257694]=new gallery(257694,"5352464,4563260,4405913,4405905,4405891","Portrait Pencil Drawings","gallery",[4563260,5352464,4405891,4405905,4405913]);galleries[235807]=new gallery(235807,"5334985,5244493,4755204,4755196,4755191,4755189,4563190,4563186,4563185,4563048","Wildlife Photography","gallery",[4563041,4563044,4563048,4563185,4563186,4563190,4755191,4755196,4755204,5244493,5334985,4755189,4430962,4403565,4430764,4431006]);galleries[261969]=new gallery(261969,"4796336,4755181,4552823,4552791,4552765,4552757,4552749,4552740,4552711,4552706","Macro Photography","gallery",[4552697,4552706,4552711,4552740,4552749,4552757,4552765,4552791,4552823,4755181,4796336]);galleries[235808]=new gallery(235808,"5363028","Pen and Ink Art","gallery",[5363028]);galleries[286753]=new gallery(286753,"5291779,5019632","Moody Themes","gallery",[5019632,5291779]);galleries[258194]=new gallery(258194,"5296836,5291786,5128361,5019627,4796297,4796285,4405878,4405877,4405876,4405875","Digital Art","gallery",[4405866,4405875,4405876,4405877,5128361,5291786,4796285,5019627,5296836,4796297,4405878]);galleries[265614]=new gallery(265614,"5019651,4796305","Architecture","gallery",[4796305,5019651]);galleries[264717]=new gallery(264717,"4585919,4563087","Odds and Sods","gallery",[4563087,4585919]);galleries[258655]=new gallery(258655,"5538491,5387507,5387506,4755207,4755036,4431051","Portraiture","gallery",[4431051,4755036,4755207,5387506,5387507,5538491]);galleries[352307]=new gallery(352307,"6362788,6362617,6362488,6362486,6362483,6362481,6362478,6362477,6362470","GREETING  CARDS","gallery",[6362470,6362477,6362478,6362481,6362483,6362486,6362488,6362617,6362788]);var imageSets=new Object();imageSets[1]="5019627,4405909,4405899";imageSets[3]="6363037,6362967,6362895,6362788,6362617,6362488,6362486,6362483,6362481,6362478,6362477,6362470,5914459,5635179,5625373,5622317,5622316,5622313,5538491,5513574,5387507,5387506,5363029,5363028,5352464,5334985,5313201,5313191,5296836,5291786,5291779,5244493,5128361,5019651,5019632,5019627,4973784,4973643,4796336,4796305,4796297,4796285,4755207,4755204,4755196,4755191,4755189,4755181,4755036,4585919";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/Davebs/images";break}switch(a){case 1:b="http://www1.clikpic.com/Davebs/images";break}switch(a){case 2:b="http://admin.clikpic.com/Davebs/images";break}switch(a){case 24:b="http://tpc15/clikpic/Davebs/images";break}switch(a){case 4:b="http://www.clikchurch.com/Davebs/images";break}switch(a){case 5:b="http://www2.clikpic.com/Davebs/images";break}switch(a){case 22:b="http://tpc5/clikpic/Davebs/images";break}switch(a){case 23:b="http://tpc10/clikpic/Davebs/images";break}switch(a){case 25:b="http://tpc16/clikpic/Davebs/images";break}switch(a){case 15:b="http://www3.clikpic.com/Davebs/images";break}switch(a){case 18:b="http://www4.clikpic.com/Davebs/images";break}switch(a){case 19:b="http://www5.clikpic.com/Davebs/images";break}switch(a){case 31:b="http://www7.clikpic.com/Davebs/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Davebs/images";break}switch(a){case 33:b="http://www8.clikpic.com/Davebs/images";break}switch(a){case 34:b="http://www9.clikpic.com/Davebs/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Davebs/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Davebs/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="Wildart Drawings and 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;resizePhotoInfo();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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="DAVEBS">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};