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[4407038]=new thumbnail(4407038,"258246"," Swallowtail","swallowtail1_thumb.jpg",130,86,2);thumbnails[4407169]=new thumbnail(4407169,"258246"," Perched Swallowtail","perched-swallowtail2_thumb.jpg",130,86,2);thumbnails[4407175]=new thumbnail(4407175,"258246","Hummingbird Moth","hummingbird-moth_thumb.jpg",130,86,2);thumbnails[4407184]=new thumbnail(4407184,"258246","The Cat","the-cat_thumb.jpg",130,99,2);thumbnails[4407188]=new thumbnail(4407188,"258246","The Stables Sun Terrace nr Maleville","the-sun-terrace1_thumb.jpg",130,86,2);thumbnails[3966058]=new thumbnail(3966058,"109908","REFLECTIONS","wastwater_thumb.jpg",130,86,15);thumbnails[3966087]=new thumbnail(3966087,"109908","REFLECTIONS","wastwater-2_thumb.jpg",130,86,15);thumbnails[4279191]=new thumbnail(4279191,"109908","From Whinn Rigg","FROM-WHINN-RIGG1_thumb.jpg",130,86,15);thumbnails[4279085]=new thumbnail(4279085,"109908","Reflections on Wastwater","wastwater-lakeland_thumb.jpg",130,86,15);thumbnails[4279096]=new thumbnail(4279096,"109908","Wastwater","wastwater-evening_thumb.jpg",130,86,15);thumbnails[4279101]=new thumbnail(4279101,"109908","Wastwater","wastwater1_thumb.jpg",130,86,15);thumbnails[4279105]=new thumbnail(4279105,"109908","","reflections_thumb.jpg",130,86,15);thumbnails[4279251]=new thumbnail(4279251,"252750","Cadair Idris","cadair-idris_thumb.jpg",130,86,15);thumbnails[4279196]=new thumbnail(4279196,"252750","Towards Snowdon","from-cadair-towards-snowdon_thumb.jpg",130,86,15);thumbnails[4279128]=new thumbnail(4279128,"252750","Gazing down the estuary ","gazing-down-the-estuary-to-Barmouth_thumb.jpg",130,86,15);thumbnails[4279256]=new thumbnail(4279256,"252750","The mouth of Barmouth Estuary","barmouth-estuary_thumb.jpg",130,86,15);thumbnails[3287748]=new thumbnail(3287748,"200439","","rowberrow_thumb.jpg",130,98,15);thumbnails[3287756]=new thumbnail(3287756,"200439","","rowberrow woods_thumb.jpg",130,86,15);thumbnails[3287759]=new thumbnail(3287759,"200439","","rowberrow woods2_thumb.jpg",130,86,15);thumbnails[3287762]=new thumbnail(3287762,"200439","","woods 3_thumb.jpg",130,196,15);thumbnails[1128393]=new thumbnail(1128393,"83574","strawberries and cream","strawberries and cream 1_thumb.jpg",130,86,15);thumbnails[1132818]=new thumbnail(1132818,"82532","autumn trees","autumn-trees-11_thumb.jpg",130,196,15);thumbnails[1135289]=new thumbnail(1135289,"83574","Albino Orchid","albino orchid 1_thumb.jpg",130,126,15);thumbnails[1135295]=new thumbnail(1135295,"82532","Bluebell Wood","bluebell-wood-1_thumb.jpg",130,86,15);thumbnails[1135297]=new thumbnail(1135297,"111141","Lighthouse Burnham on Sea","burnham-on-sea-lighthouse-1_thumb.jpg",130,86,15);thumbnails[1135299]=new thumbnail(1135299,"83831","Dartmoor Skies","dartmoor-1_thumb.jpg",130,86,15);thumbnails[1135305]=new thumbnail(1135305,"83831","Dartmoor Landscape ","dartmoor-landscape-1_thumb.jpg",130,86,15);thumbnails[1135310]=new thumbnail(1135310,"83832","Water at Rockford","water-at-Rockford-Exmoor-1_thumb.jpg",130,83,15);thumbnails[1135425]=new thumbnail(1135425,"82532","Wells Cathedral","Wells-cathedral-1_thumb.jpg",130,86,15);thumbnails[1135436]=new thumbnail(1135436,"111141","Exmoor Coast","from-valley-of-the-rocks-Ex_thumb.jpg",130,87,15);thumbnails[1135437]=new thumbnail(1135437,"82532","shivering trees","trees-11_thumb.jpg",130,86,15);thumbnails[1135441]=new thumbnail(1135441,"111145","Fritillary Butterfly","butterfly-1_thumb.jpg",130,95,15);thumbnails[1135535]=new thumbnail(1135535,"83574","Spotted Orchids","spotted-orchids-1_thumb.jpg",130,196,15);thumbnails[1135540]=new thumbnail(1135540,"83574","After the rain","after-the-rain-11_thumb.jpg",130,196,15);thumbnails[1135574]=new thumbnail(1135574,"111141","Safely in","safely-in-1_thumb.jpg",130,86,15);thumbnails[1135592]=new thumbnail(1135592,"82532","Bishops Palace Walls","bishops-palace-wells-1_thumb.jpg",130,196,15);thumbnails[1135604]=new thumbnail(1135604,"83574","British Orchid","british-orchid-1_thumb.jpg",130,196,15);thumbnails[1135611]=new thumbnail(1135611,"83831","Ponies above the Dart Gorge","dartmoor-ponies-1_thumb.jpg",130,86,15);thumbnails[1135614]=new thumbnail(1135614,"83574","Pretty as a picture","pretty-as-a-picture-1_thumb.jpg",130,86,15);thumbnails[1155919]=new thumbnail(1155919,"82532","National Trust Selworthy Cottage","national-trust-selworthy-co_thumb.jpg",130,86,15);thumbnails[1155935]=new thumbnail(1155935,"82532","Allerford","allerford-copy_thumb.jpg",130,86,15);thumbnails[1155944]=new thumbnail(1155944,"82532","nestling in the gardens Selworthy","selworthy-gardens_thumb.jpg",130,86,15);thumbnails[1155992]=new thumbnail(1155992,"111141","The Beach","beach-copy_thumb.jpg",130,76,15);thumbnails[1156016]=new thumbnail(1156016,"82532","picture postcard of Allerford","allerford-posterised-copy_thumb.jpg",130,86,15);thumbnails[1156025]=new thumbnail(1156025,"83574","April Showers","april-showers-13_thumb.jpg",130,86,15);thumbnails[1156037]=new thumbnail(1156037,"83831","View from Saddle Tor","from-saddle-tor-1_thumb.jpg",130,86,15);thumbnails[1156042]=new thumbnail(1156042,"83831","Hay Tor","haytor-1_thumb.jpg",130,86,15);thumbnails[1156044]=new thumbnail(1156044,"111141","High Tide at Kilve","high-tide-at-Kilve-1_thumb.jpg",130,86,15);thumbnails[1156059]=new thumbnail(1156059,"111145","Silver Washed Fritillary","silver-washed-fritillary-1_thumb.jpg",130,86,15);thumbnails[1156061]=new thumbnail(1156061,"111145","Smiler","smiler-1_thumb.jpg",130,196,15);thumbnails[1156066]=new thumbnail(1156066,"83574","Spotted Orchid","spotted-orchid-1_thumb.jpg",130,196,15);thumbnails[1156067]=new thumbnail(1156067,"111145","Lady in the sun","lady-in-the-sun-1_thumb.jpg",130,86,15);thumbnails[1156070]=new thumbnail(1156070,"111145","Red Admiral","painted-lady-1_thumb.jpg",130,86,15);thumbnails[1157621]=new thumbnail(1157621,"83831","Stone gateway","stone-gateway-dartmoor-1_thumb.jpg",130,196,15);thumbnails[1157624]=new thumbnail(1157624,"111141","lonely fisherman at dusk","lonely-fisherman-with-light_thumb.jpg",130,86,15);thumbnails[1157629]=new thumbnail(1157629,"83831","Ponies on Dr Blackalls Drive, Dartmoor","ponies-on-dr-blackalls-driv_thumb.jpg",130,83,15);thumbnails[1157748]=new thumbnail(1157748,"83831","Clapper bridge","postbridge-clapper-bridge-c_thumb.jpg",130,86,15);thumbnails[1157772]=new thumbnail(1157772,"82532","winter trees","winter-trees-copy_thumb.jpg",130,196,15);thumbnails[1157794]=new thumbnail(1157794,"82532","Wells Cathedral","wells-cathedral-front-aspec_thumb.jpg",130,87,15);thumbnails[1157902]=new thumbnail(1157902,"82532","wheat fields","wheat-field-copy_thumb.jpg",130,86,15);thumbnails[1165534]=new thumbnail(1165534,"111141","Dusk, <br>\r\n","DSC_2356_edited-1x2_edited-_thumb.jpg",130,196,15);thumbnails[1176596]=new thumbnail(1176596,"82532","Hestercombe","urn-treated-copy_thumb.jpg",130,198,15);thumbnails[1190588]=new thumbnail(1190588,"111141","Beer harbour","beer-copy1_thumb.jpg",130,86,15);thumbnails[1190595]=new thumbnail(1190595,"111141","Boat at Porlock Weir","boat-copy_thumb.jpg",130,86,15);thumbnails[1190598]=new thumbnail(1190598,"111145","Fritillary Butterfly","butterfly-2-copy_thumb.jpg",130,86,15);thumbnails[1190599]=new thumbnail(1190599,"111145","Silver Washed Fritillary","butterfly-3-copy_thumb.jpg",130,86,15);thumbnails[1190605]=new thumbnail(1190605,"111145","Ringlet","butterfly-4-copy_thumb.jpg",130,86,15);thumbnails[1190612]=new thumbnail(1190612,"82532","Wells ","church-copy_thumb.jpg",130,86,15);thumbnails[1190615]=new thumbnail(1190615,"83574","Euphobias","euphorbias-2-copy_thumb.jpg",130,86,15);thumbnails[1190619]=new thumbnail(1190619,"83574","Euphobias","euphorbias-copy_thumb.jpg",130,86,15);thumbnails[1190621]=new thumbnail(1190621,"111141","Blue seas","exmoor-coastline-copy_thumb.jpg",130,86,15);thumbnails[1190623]=new thumbnail(1190623,"111141","Lyme Regis","lyme-regis-copy_thumb.jpg",130,86,15);thumbnails[1190624]=new thumbnail(1190624,"111141","Myrtleberry Cleeve","view-from-the-cleaves-exmoo_thumb.jpg",130,86,15);thumbnails[1190626]=new thumbnail(1190626,"83832","Rowan Tree","rowan-tree_thumb.jpg",130,196,15);thumbnails[1190627]=new thumbnail(1190627,"83574","Primrose Family","primrose-family-copy_thumb.jpg",130,86,15);thumbnails[1190628]=new thumbnail(1190628,"111141","Kilve Rocks","kilve-6-copy_thumb.jpg",130,86,15);thumbnails[1329947]=new thumbnail(1329947,"83831","Ryders Hill on Holne Ridge, Dartmoor","ryders-hill_thumb.jpg",130,86,15);thumbnails[1617391]=new thumbnail(1617391,"109908","Catbells","catbells_thumb.jpg",130,86,15);thumbnails[1624170]=new thumbnail(1624170,"109908","Catbells over Derwent Water","catbells derwent water_thumb.jpg",130,86,15);thumbnails[1624175]=new thumbnail(1624175,"109908","From Haystacks","from haystacks_thumb.jpg",130,86,15);thumbnails[1624188]=new thumbnail(1624188,"109908","Derwent Water","derwent1_thumb.jpg",130,86,15);thumbnails[1624194]=new thumbnail(1624194,"109908","From Catbells towards Keswick","catbells derwent water 2_thumb.jpg",130,86,15);thumbnails[1624196]=new thumbnail(1624196,"83574","Dahlia","dahlia_thumb.jpg",130,86,15);thumbnails[1624207]=new thumbnail(1624207,"83574","Pink Dahlia","pink dahlia_thumb.jpg",130,86,15);thumbnails[1624214]=new thumbnail(1624214,"83574","Red Dahlia","red dahlia_thumb.jpg",130,92,15);thumbnails[1624217]=new thumbnail(1624217,"83574","Red Dahlia in the Autumn sun","red dahlia 2_thumb.jpg",130,102,15);thumbnails[1640083]=new thumbnail(1640083,"82532","Corfe Castle","corfe-2-copy_thumb.jpg",130,86,15);thumbnails[1640091]=new thumbnail(1640091,"109908","Castlerigg","DSC_4647-caslerigg_thumb.jpg",130,86,15);thumbnails[1640102]=new thumbnail(1640102,"83831","Dartmoor Skies","dartmoor-skies_thumb.jpg",130,86,15);thumbnails[1640113]=new thumbnail(1640113,"111141","Evening Fishermen","evenings-fishing-copy_thumb.jpg",130,86,15);thumbnails[1640117]=new thumbnail(1640117,"83831","Skies over Hound Tor","from-hound-tor-copy_thumb.jpg",130,86,15);thumbnails[1640130]=new thumbnail(1640130,"83831","Hound Tor","hound-tor-copy_thumb.jpg",130,86,15);thumbnails[1640140]=new thumbnail(1640140,"111141","Stormy seas at Kilve","kilve-5-copy_thumb.jpg",130,86,15);thumbnails[1640149]=new thumbnail(1640149,"83832","View to Lynmouth","view-lynmouth-copy_thumb.jpg",130,86,15);thumbnails[1135283]=new thumbnail(1135283,"82532","Abbot's Fish House","abbot's-fish-house1_thumb.jpg",130,86,15);var galleries=new Object();galleries[258246]=new gallery(258246,"4407188,4407184,4407175,4407169,4407038","Aveyron France","section114557",[4407038,4407169,4407175,4407184,4407188]);galleries[111145]=new gallery(111145,"1190605,1190599,1190598,1156070,1156067,1156061,1156059,1135441","Butterflies and Dragonflies","section114557",[1135441,1156059,1156061,1156067,1156070,1190598,1190599,1190605]);galleries[111141]=new gallery(111141,"1640140,1640113,1190628,1190624,1190623,1190621,1190595,1190588,1165534,1157624","Coastal Life","section114557",[1135297,1135436,1135574,1155992,1156044,1157624,1165534,1190588,1190595,1190621,1190623,1190624,1190628,1640113,1640140]);galleries[83831]=new gallery(83831,"1640130,1640117,1640102,1329947,1157748,1157629,1157621,1156042,1156037,1135611","Dartmoor","section114557",[1135299,1135305,1135611,1156037,1156042,1157621,1157629,1157748,1329947,1640102,1640117,1640130]);galleries[83832]=new gallery(83832,"1640149,1190626,1135310","Devon","section114557",[1135310,1190626,1640149]);galleries[82532]=new gallery(82532,"1640083,1190612,1176596,1157902,1157794,1157772,1156016,1155944,1155935,1155919","Landscapes","section114557",[1132818,1135295,1135425,1135437,1135592,1155919,1155935,1155944,1156016,1157772,1157794,1157902,1176596,1190612,1640083,1135283]);galleries[109908]=new gallery(109908,"4279191,4279105,4279101,4279096,4279085,3966087,3966058,1640091,1624194,1624188","The Lake District","section114557",[3966058,3966087,4279191,4279085,4279096,4279101,4279105,1617391,1624170,1624175,1624188,1624194,1640091]);galleries[83574]=new gallery(83574,"1135289","Up close and personal","section114557",[1128393,1135289,1135535,1135540,1135604,1135614,1156025,1156066,1190615,1190619,1190627,1624196,1624207,1624214,1624217]);galleries[252750]=new gallery(252750,"4279256,4279251,4279196,4279128","Wales","section114557",[4279251,4279196,4279128,4279256]);galleries[200439]=new gallery(200439,"3287762,3287759,3287756,3287748","Winter Scenes","section114557",[3287748,3287756,3287759,3287762]);var imageSets=new Object();imageSets[1]="3966087,3966058,3287762,3287759,3287756,3287748,1640149,1640140,1640130,1640117,1640113,1640102,1640091,1640083,1624217,1624214,1624207,1624196,1624194,1624188,1624175,1624170,1617391,1329947,1190628,1190626,1190624,1190623,1190621,1190615,1190612,1190605,1190599,1190598,1190595,1190588,1176596,1165534,1157902,1157794,1157772,1157748,1157629,1157624,1157621,1156070,1156067,1156066,1156061,1156059,1156044,1156042,1156037,1156025,1156016,1155992,1155944,1155935,1155919,1135614,1135611,1135604,1135592,1135574,1135540,1135535,1135441,1135437,1135436,1135425,1135310,1135305,1135299,1135297,1135295,1135289,1135283,1128393";imageSets[2]="3287762,3287759,3287756,3287748,1135289";imageSets[3]="4407188,4407184,4407175,4407169,4407038,4279256,4279251,4279196,4279191,4279128,4279105,4279101,4279096,4279085,3966087,3966058,3287762,3287759,3287756,3287748,1640149,1640140,1640130,1640117,1640113,1640102,1640091,1640083,1624217,1624214,1624207,1624196,1624194,1624188,1624175,1624170,1617391,1329947,1190628,1190627,1190626,1190624,1190623,1190621,1190619,1190615,1190612,1190605,1190599,1190598";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 1:b="http://www1.clikpic.com/dianesmith/images";break}switch(a){case 2:b="http://admin.clikpic.com/dianesmith/images";break}switch(a){case 4:b="http://www.clikchurch.com/dianesmith/images";break}switch(a){case 5:b="http://www2.clikpic.com/dianesmith/images";break}switch(a){case 15:b="http://www3.clikpic.com/dianesmith/images";break}switch(a){case 21:b="http://www6.clikpic.com/dianesmith/images";break}switch(a){case 18:b="http://www4.clikpic.com/dianesmith/images";break}switch(a){case 19:b="http://www5.clikpic.com/dianesmith/images";break}switch(a){case 22:b="http://tpc5/clikpic/dianesmith/images";break}switch(a){case 23:b="http://tpc10/clikpic/dianesmith/images";break}switch(a){case 24:b="http://tpc15/clikpic/dianesmith/images";break}switch(a){case 25:b="http://tpc16/clikpic/dianesmith/images";break}switch(a){case 31:b="http://www7.clikpic.com/dianesmith/images";break}switch(a){case 32:b="http://admin2.clikpic.com/dianesmith/images";break}switch(a){case 33:b="http://www8.clikpic.com/dianesmith/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("section114557"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section114557.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("section114557"!=""){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="diane smith 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").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>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 							"+c.item_price+"</p>";var e=c.purchase_instruction;var d=c.item_price;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+'<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+'")'})}}};