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[5929644]=new thumbnail(5929644,"334660","","IMG_0109_copy_thumb.jpg",130,108,18);thumbnails[5929731]=new thumbnail(5929731,"334660","","IMG_0112_copy_thumb.jpg",130,87,18);thumbnails[5929744]=new thumbnail(5929744,"334660","","IMG_0115_copy_thumb.jpg",130,89,18);thumbnails[5929929]=new thumbnail(5929929,"334660","","IMG_0119_copy_thumb.jpg",130,195,18);thumbnails[5929956]=new thumbnail(5929956,"334660","","IMG_0120_copy_thumb.jpg",130,93,18);thumbnails[5930100]=new thumbnail(5930100,"334660","","IMG_0123_copy_thumb.jpg",130,87,18);thumbnails[5930192]=new thumbnail(5930192,"334660","","IMG_0127_copy_thumb.jpg",130,195,18);thumbnails[5930194]=new thumbnail(5930194,"334660","","IMG_0128_copy_thumb.jpg",130,195,18);thumbnails[5930298]=new thumbnail(5930298,"334660","","IMG_0131_copy_thumb.jpg",130,195,18);thumbnails[5930302]=new thumbnail(5930302,"334660","","IMG_0133_copy_thumb.jpg",130,195,18);thumbnails[5930386]=new thumbnail(5930386,"334660","","IMG_0140_copy_thumb.jpg",130,87,18);thumbnails[5930389]=new thumbnail(5930389,"334660","","IMG_0141_copy_thumb.jpg",130,87,18);thumbnails[5930390]=new thumbnail(5930390,"334660","","IMG_0142_copy_thumb.jpg",130,99,18);thumbnails[5930393]=new thumbnail(5930393,"334660","","IMG_0144_copy_thumb.jpg",130,195,18);thumbnails[5930397]=new thumbnail(5930397,"334660","","IMG_0147_copy_thumb.jpg",130,195,18);thumbnails[5930401]=new thumbnail(5930401,"334660","","IMG_0155_copy_thumb.jpg",130,101,18);thumbnails[5930476]=new thumbnail(5930476,"334660","","IMG_0157_copy_thumb.jpg",130,195,18);thumbnails[5932138]=new thumbnail(5932138,"","","IMG_0121_copy_thumb.jpg",130,95,18);thumbnails[5932169]=new thumbnail(5932169,"334660","","IMG_0132_copy_thumb.jpg",130,195,18);thumbnails[5932246]=new thumbnail(5932246,"334660","","IMG_0137copy_thumb.jpg",130,87,18);thumbnails[5932305]=new thumbnail(5932305,"334660","","IMG_0138_copy_thumb.jpg",130,195,18);thumbnails[5932329]=new thumbnail(5932329,"334660","","IMG_0153copy_thumb.jpg",130,195,18);thumbnails[5932332]=new thumbnail(5932332,"334660","","IMG_0159_copy_thumb.jpg",130,195,18);thumbnails[1853798]=new thumbnail(1853798,"","Sunburst","Sunburst_thumb.jpg",130,98,18);thumbnails[2288248]=new thumbnail(2288248,"150131","At The End of The Day","At the end of the Day_thumb.jpg",130,87,18);thumbnails[2288256]=new thumbnail(2288256,"150131","'Scruff'","Scruff_thumb.jpg",130,195,18);thumbnails[2439337]=new thumbnail(2439337,"150131","Too Much Turkey","Robin-for-web_thumb.jpg",130,148,18);thumbnails[3246679]=new thumbnail(3246679,"197530","Undercover Rainbow","Rugs-11_thumb.jpg",130,195,18);thumbnails[3276198]=new thumbnail(3276198,"150131","Here's Looking at You","Monkey_thumb.jpg",130,164,18);thumbnails[4847053]=new thumbnail(4847053,"121558","Refresh","Refresh_thumb.jpg",130,195,18);thumbnails[4895271]=new thumbnail(4895271,"121559","Falls at the Dingle","IMG_0872b_copy_thumb.jpg",130,94,18);thumbnails[4895627]=new thumbnail(4895627,"121558","Grace","Tulip_2_thumb.jpg",130,199,18);thumbnails[5333546]=new thumbnail(5333546,"121559","Lost Lake","Web-1_thumb.jpg",130,86,18);thumbnails[5333563]=new thumbnail(5333563,"121559","Wonderous Place","web_2_thumb.jpg",130,94,18);thumbnails[5333569]=new thumbnail(5333569,"121559","Upon Golden Pond","web3_thumb.jpg",130,87,18);thumbnails[5410403]=new thumbnail(5410403,"121558","Lilly The Pink","Lilly_The_Pink_thumb.jpg",130,189,18);thumbnails[5895502]=new thumbnail(5895502,"150131","Love is in the Air","IMG_0195C_thumb.jpg",130,142,18);thumbnails[5987528]=new thumbnail(5987528,"121558","","poppy5_web_thumb.jpg",130,130,18);thumbnails[2437502]=new thumbnail(2437502,"121558","Iris","Iris-for-Web_thumb.jpg",130,130,18);thumbnails[2438948]=new thumbnail(2438948,"121559","Lakeside Boats","Lakeside-Boats-for-web_thumb.jpg",130,61,18);thumbnails[2437618]=new thumbnail(2437618,"121558","Peace","Peace-for-web1_thumb.jpg",130,130,18);thumbnails[2438995]=new thumbnail(2438995,"121559","Lake Vyrnwy","Lake-Vyrnwy-for-web_thumb.jpg",130,167,18);thumbnails[3243044]=new thumbnail(3243044,"197530","Teracotta Pot","Terracotta-Pot-1_thumb.jpg",130,195,18);thumbnails[2438973]=new thumbnail(2438973,"121559","On The Rocks","On-The-Rocks-for-web_thumb.jpg",130,167,18);thumbnails[2439074]=new thumbnail(2439074,"121558","Lavender","Lavender-for-web_thumb.jpg",130,130,18);thumbnails[3243051]=new thumbnail(3243051,"197530","Steps","Steps-copy_thumb.jpg",130,195,18);thumbnails[2439090]=new thumbnail(2439090,"121559","Flame and Flight","Flame-and-Flight-for-web_thumb.jpg",130,101,18);thumbnails[2454071]=new thumbnail(2454071,"121558","Centre of Attention","Rose-for-web_thumb.jpg",130,130,18);thumbnails[3236903]=new thumbnail(3236903,"197530","Pillars","Pillars-14_thumb.jpg",130,87,18);thumbnails[2437522]=new thumbnail(2437522,"121558","The Colour Purple","Purple-Tulip-for-web_thumb.jpg",130,130,18);thumbnails[2930843]=new thumbnail(2930843,"121559","Above and Beyond","IMG_0183_thumb.jpg",130,161,18);thumbnails[3242970]=new thumbnail(3242970,"197530","Michelangelo Statues","Statues-best_thumb.jpg",130,60,18);thumbnails[2437657]=new thumbnail(2437657,"121558","A Burst of Sun","Sunflower-for-web_thumb.jpg",130,130,18);thumbnails[2438965]=new thumbnail(2438965,"121559","Lone Rambler","Lone-Rambler-for-web_thumb.jpg",130,167,18);thumbnails[3236906]=new thumbnail(3236906,"197530","The Colosseum","Coloss-23_thumb.jpg",130,87,18);thumbnails[2437479]=new thumbnail(2437479,"121558","Botanical","Botanical_thumb.jpg",130,130,18);thumbnails[2439068]=new thumbnail(2439068,"121559","Tree Among Rape","Tree-among-rape-for-web_thumb.jpg",130,71,18);thumbnails[2445731]=new thumbnail(2445731,"","Armed and Dangerous","Armed-and-Dangerous-for-web_thumb.jpg",130,101,18);thumbnails[3243047]=new thumbnail(3243047,"197530","Please Release Me","IMG_0032_thumb.jpg",130,195,18);thumbnails[2437719]=new thumbnail(2437719,"121558","Sneak Preview","Sneak-Preview-for-web_thumb.jpg",130,101,18);thumbnails[2439256]=new thumbnail(2439256,"121559","Enchanted","Enchanted-for-web_thumb.jpg",130,189,18);thumbnails[3243065]=new thumbnail(3243065,"197530","Tranquil","IMG_0240_thumb.jpg",130,195,18);thumbnails[2438840]=new thumbnail(2438840,"121558","Spring","Spring-for-web_thumb.jpg",130,130,18);thumbnails[2439303]=new thumbnail(2439303,"121559","Woodland Walk","Woodland-Walk-for-web_thumb.jpg",130,189,18);thumbnails[3243146]=new thumbnail(3243146,"197530","Any Takers","IMG_0271_thumb.jpg",130,195,18);thumbnails[2446021]=new thumbnail(2446021,"121559","York Bridge","York-Bridge-for-web_thumb.jpg",130,101,18);thumbnails[3113164]=new thumbnail(3113164,"121558","Serene","IMG_0156a1_thumb.jpg",130,96,18);thumbnails[3243156]=new thumbnail(3243156,"197530","Restless Afternoon","IMG_02242_thumb.jpg",130,84,18);thumbnails[2445738]=new thumbnail(2445738,"121559","Dusk","Dusk-for-web_thumb.jpg",130,167,18);thumbnails[3014094]=new thumbnail(3014094,"121558","Autumn Acer","Autumn_thumb.jpg",130,90,18);thumbnails[3243108]=new thumbnail(3243108,"197530","Menorcan Sandals","IMG_0158_thumb.jpg",130,87,18);thumbnails[1824236]=new thumbnail(1824236,"121559","Tree of Red","Tree of Red_thumb.jpg",130,194,18);thumbnails[2454066]=new thumbnail(2454066,"121558","Cactus Twirl","Cactus-Twirl-for-web_thumb.jpg",130,101,18);thumbnails[3243030]=new thumbnail(3243030,"197530","Night Light","IMG_0274_thumb.jpg",130,95,18);thumbnails[2437727]=new thumbnail(2437727,"121558","Tulip and Droplets","Tulip-and-Droplets-for-web_thumb.jpg",130,167,18);thumbnails[2438923]=new thumbnail(2438923,"121559","Menorca Sunset","Menorcan-sunset-for-web_thumb.jpg",130,101,18);thumbnails[3243026]=new thumbnail(3243026,"197530","Parga Town, Greece","IMG_0082_thumb.jpg",130,61,18);thumbnails[2437688]=new thumbnail(2437688,"121558","Tulip in Vase","Tulip-in-vase-for-web_thumb.jpg",130,167,18);thumbnails[2445742]=new thumbnail(2445742,"121559","Fountains Abbey","Fountains-Abbey-for-web_thumb.jpg",130,101,18);thumbnails[2931268]=new thumbnail(2931268,"121559","Calm Before the Storm","IMG_3137_thumb.jpg",130,93,18);thumbnails[2038886]=new thumbnail(2038886,"150131","Beggar Lady","Grazie_thumb.jpg",130,195,18);thumbnails[2437442]=new thumbnail(2437442,"121747","Excitement","Excitement_thumb.jpg",130,130,18);thumbnails[2437756]=new thumbnail(2437756,"121747","Oriental","Oriental-for-web_thumb.jpg",130,167,18);thumbnails[2437769]=new thumbnail(2437769,"121747","Warm Cirroco","Warm-Cirroco-for-web_thumb.jpg",130,101,18);thumbnails[2438844]=new thumbnail(2438844,"121747","Bluebell Wood","bluebell-wood-for-web_thumb.jpg",130,130,18);thumbnails[2438902]=new thumbnail(2438902,"121747","Opulence","Opulence-for-web_thumb.jpg",130,130,18);thumbnails[2439288]=new thumbnail(2439288,"121747","Attention","Attention-for-web_thumb.jpg",130,167,18);thumbnails[2454075]=new thumbnail(2454075,"121747","Wallpaper","Flower-power-for-web_thumb.jpg",130,130,18);thumbnails[3104660]=new thumbnail(3104660,"121747","Humbug","IMG_0168a copy1_thumb.jpg",130,153,18);thumbnails[3113237]=new thumbnail(3113237,"121747","Explosion","IMG_2947a-copy_thumb.jpg",130,96,18);thumbnails[4846709]=new thumbnail(4846709,"121747","Sweet Peas","Sweet_Peas_thumb.jpg",130,87,18);thumbnails[4846832]=new thumbnail(4846832,"121747","Uplifting","Uplifting_thumb.jpg",130,87,18);thumbnails[4895320]=new thumbnail(4895320,"121747","Poppy Power","Poppy_6b_thumb.jpg",130,94,18);thumbnails[4895584]=new thumbnail(4895584,"121747","Delicate","Delicate_copy1_thumb.jpg",130,195,18);thumbnails[2001551]=new thumbnail(2001551,"121747","Swingboats","Swing Boats_thumb.jpg",130,195,18);var galleries=new Object();galleries[121558]=new gallery(121558,"5987528,5410403,4895627,4847053,3113164,3014094,2454071,2454066,2439074,2438840","Fine Art","gallery",[4847053,4895627,5410403,5987528,2437502,2437618,2439074,2454071,2437522,2437657,2437479,2437719,2438840,3113164,3014094,2454066,2437727,2437688]);galleries[121559]=new gallery(121559,"5333569,5333563,5333546,4895271,2931268,2930843,2446021,2445742,2445738,2439303","Landscapes","gallery",[4895271,5333546,5333563,5333569,2438948,2438995,2438973,2439090,2930843,2438965,2439068,2439256,2439303,2446021,2445738,1824236,2438923,2445742,2931268]);galleries[150131]=new gallery(150131,"5895502,3276198,2439337,2288256,2288248,2038886","Portraiture","gallery",[2288248,2288256,2439337,3276198,5895502,2038886]);galleries[334660]=new gallery(334660,"5932332,5932329,5932305,5932246,5932169,5930476,5930401,5930397,5930393,5930390","St. Peter's Year 11 Prom Night","gallery",[5929644,5929731,5929744,5929929,5929956,5930100,5930192,5930194,5930298,5930302,5930386,5930389,5930390,5930393,5930397,5930401,5930476,5932169,5932246,5932305,5932329,5932332]);galleries[197530]=new gallery(197530,"3246679,3243156,3243146,3243108,3243065,3243051,3243047,3243044,3243030,3243026","Travel","gallery",[3246679,3243044,3243051,3236903,3242970,3236906,3243047,3243065,3243146,3243156,3243108,3243030,3243026]);galleries[121747]=new gallery(121747,"4895584,4895320,4846832,4846709,3113237,3104660,2454075,2439288,2438902,2438844","Contemporary","gallery",[2437442,2437756,2437769,2438844,2438902,2439288,2454075,3104660,3113237,4846709,4846832,4895320,4895584,2001551]);var imageSets=new Object();imageSets[1]="1853798";imageSets[3]="5987528,5932332,5932329,5932305,5932246,5932169,5932138,5930476,5930401,5930397,5930393,5930390,5930389,5930386,5930302,5930298,5930194,5930192,5930100,5929956,5929929,5929744,5929731,5929644,5895502,5410403,5333569,5333563,5333546,4895627,4895584,4895320,4895271,4847053,4846832,4846709,3276198,3246679,3243156,3243146,3243108,3243065,3243051,3243047,3243044,3243030,3243026,3242970,3236906,3236903";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/sdchatham/images";break}switch(a){case 1:b="http://www1.clikpic.com/sdchatham/images";break}switch(a){case 2:b="http://admin.clikpic.com/sdchatham/images";break}switch(a){case 24:b="http://tpc15/clikpic/sdchatham/images";break}switch(a){case 4:b="http://www.clikchurch.com/sdchatham/images";break}switch(a){case 5:b="http://www2.clikpic.com/sdchatham/images";break}switch(a){case 22:b="http://tpc5/clikpic/sdchatham/images";break}switch(a){case 23:b="http://tpc10/clikpic/sdchatham/images";break}switch(a){case 25:b="http://tpc16/clikpic/sdchatham/images";break}switch(a){case 15:b="http://www3.clikpic.com/sdchatham/images";break}switch(a){case 18:b="http://www4.clikpic.com/sdchatham/images";break}switch(a){case 19:b="http://www5.clikpic.com/sdchatham/images";break}switch(a){case 31:b="http://www7.clikpic.com/sdchatham/images";break}switch(a){case 32:b="http://admin2.clikpic.com/sdchatham/images";break}switch(a){case 33:b="http://www8.clikpic.com/sdchatham/images";break}switch(a){case 34:b="http://www9.clikpic.com/sdchatham/images";break}switch(a){case 35:b="http://admin3.clikpic.com/sdchatham/images";break}switch(a){case 37:b="http://admin4.clikpic.com/sdchatham/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="Sue Chatham 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="schatham@blueyonder.co.uk">';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="schatham@blueyonder.co.uk">';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+'")'})}}};