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[3012739]=new thumbnail(3012739,"95846","Stinkhorn Fungus","Stinkhorn_thumb.jpg",130,195,18);thumbnails[1451891]=new thumbnail(1451891,"95846","Water Lily","plant2_thumb.jpg",130,195,18);thumbnails[1451892]=new thumbnail(1451892,"95846","Fly Agaric","plants3_thumb.jpg",130,191,18);thumbnails[1451893]=new thumbnail(1451893,"95846","Parasol Mushroom","plants4_thumb.jpg",130,187,18);thumbnails[1451887]=new thumbnail(1451887,"100728","Kingfisher","birds8_thumb.jpg",130,182,18);thumbnails[1382172]=new thumbnail(1382172,"100728","Grey Owl","Grey_Owl_thumb.jpg",130,158,18);thumbnails[1451883]=new thumbnail(1451883,"100728","Red Kite","birds4_thumb.jpg",130,195,18);thumbnails[1924564]=new thumbnail(1924564,"100728","Arctic Tern.","19th Pics0003_thumb.JPG",130,195,18);thumbnails[1382123]=new thumbnail(1382123,"100728","Puffin","Puffin_thumb.jpg",130,148,18);thumbnails[1991404]=new thumbnail(1991404,"100728","Spotted Flycatchers nest","Faith 1 copy_thumb.jpg",130,185,18);thumbnails[1381971]=new thumbnail(1381971,"100728","Blue Tit","Blue Tit_thumb.jpg",130,110,18);thumbnails[1381980]=new thumbnail(1381980,"100728","Male Chaffinch","Chaffinch_thumb.jpg",130,102,18);thumbnails[1381981]=new thumbnail(1381981,"100728","Pied Wagtail","Pied_Wagtail_thumb.jpg",130,99,18);thumbnails[1382206]=new thumbnail(1382206,"100728","Robin","Robin_thumb.jpg",130,95,18);thumbnails[1451888]=new thumbnail(1451888,"100728","Damselfly","insect1_thumb.jpg",130,87,18);thumbnails[6255526]=new thumbnail(6255526,"96049","Limes","Limes_thumb.jpg",130,87,18);thumbnails[4106335]=new thumbnail(4106335,"96049","Ambleside Lake, Lake District","ambleside_thumb.jpg",130,87,18);thumbnails[4107058]=new thumbnail(4107058,"96049","Lake Buttermere, Lake District","buttermere_thumb.jpg",130,195,18);thumbnails[3807220]=new thumbnail(3807220,"96049","Craig Goch Dam","_MG_0254_thumb.jpg",130,195,18);thumbnails[3393860]=new thumbnail(3393860,"96049","Winter Snow","_MG_4516_thumb.jpg",130,87,18);thumbnails[3393867]=new thumbnail(3393867,"96049","More snow","_MG_4521_thumb.jpg",130,87,18);thumbnails[3227292]=new thumbnail(3227292,"96049","Craig Goch","Craig_Goch_Dam_thumb.jpg",130,87,18);thumbnails[3227298]=new thumbnail(3227298,"96049","Elan Valley","Elan_Valley_thumb.jpg",130,87,18);thumbnails[2509041]=new thumbnail(2509041,"96049","Barley field in Norfolk","CRW_1576_thumb.jpg",130,195,18);thumbnails[2506349]=new thumbnail(2506349,"96049","Glen Coe, Scotland","CRW_1366_thumb.jpg",130,195,18);thumbnails[2506351]=new thumbnail(2506351,"96049","Glen Coe, Scotland","CRW_1371_thumb.jpg",130,195,18);thumbnails[2506415]=new thumbnail(2506415,"96049","Glen Coe, Scotland","CRW_1376_thumb.jpg",130,195,18);thumbnails[1457024]=new thumbnail(1457024,"96049","Poole Harbour","copy3866_thumb.jpg",130,91,18);thumbnails[1431002]=new thumbnail(1431002,"96049","Hightown Hereford","Copy1927_thumb.jpg",130,87,18);thumbnails[1431009]=new thumbnail(1431009,"96049","Hereford Cathedral","_MG_1966_thumb.JPG",130,87,18);thumbnails[1428927]=new thumbnail(1428927,"96049","Pultney Weirs Bath","Pultney weirs _thumb.jpg",130,91,18);thumbnails[3359008]=new thumbnail(3359008,"96049","Ramsey Island. Pembrokeshire","IMG_0683 copy_thumb.jpg",130,202,18);thumbnails[1466194]=new thumbnail(1466194,"96049","Branksome Chine, Dorset","IMG_8264_thumb.JPG",130,87,18);thumbnails[1382842]=new thumbnail(1382842,"96049","The Moon and Planet Venus","landscape1_thumb.jpg",130,87,18);thumbnails[1456565]=new thumbnail(1456565,"96049","Herefordshire country house water garden","P1010014 copy_thumb.jpg",130,98,18);thumbnails[3343143]=new thumbnail(3343143,"96051","Cunard, RMS QE2.","IMG_0902 copy_thumb.jpg",130,91,18);thumbnails[1510169]=new thumbnail(1510169,"96051","S.S.Great Britain","copy 4637_thumb.jpg",130,87,18);thumbnails[3227290]=new thumbnail(3227290,"96051","SS Great Britain","SS_Great_Britain_thumb.jpg",130,195,18);thumbnails[3227291]=new thumbnail(3227291,"96051","First Officer","First_Officer_thumb.jpg",130,174,18);thumbnails[1451901]=new thumbnail(1451901,"96051","Duke of Gloucester 71000 Steam Train","transport9_thumb.jpg",130,87,18);thumbnails[1382922]=new thumbnail(1382922,"96051","Bicycle in Amsterdam","transport3_thumb.jpg",130,173,18);thumbnails[1431081]=new thumbnail(1431081,"96051","Brittany Ferries","1006copycopy_thumb.jpg",130,91,18);thumbnails[3336098]=new thumbnail(3336098,"98792","Rugby match  Hereford vs Solihull ","IMG_8012_thumb.JPG",130,87,18);thumbnails[3336143]=new thumbnail(3336143,"98792","Rugby match Hereford vs Solihull","IMG_8015_thumb.JPG",130,87,18);thumbnails[3336246]=new thumbnail(3336246,"98792","Rugby match, Hereford vs Solihull","IMG_8016_thumb.JPG",130,87,18);thumbnails[2946359]=new thumbnail(2946359,"98792","Professional windsurfer, Timo Mullen.","IMG_6654 copy_thumb.jpg",130,86,18);thumbnails[3343485]=new thumbnail(3343485,"98792","Worcestershire CCC<br>\r\nNew Road, Worcester.","copy 6300_thumb.jpg",130,51,18);thumbnails[1428844]=new thumbnail(1428844,"98792","Worcester County Cricket","3436_thumb.JPG",130,87,18);thumbnails[6255485]=new thumbnail(6255485,"98796","Witley Court Church","Witley_Court_Church_thumb.jpg",130,195,18);thumbnails[6255486]=new thumbnail(6255486,"98796","Witley Court","Witley_Court_thumb.jpg",130,87,18);thumbnails[6255490]=new thumbnail(6255490,"98796","Witley Court","Witley_Court1_thumb.jpg",130,195,18);thumbnails[6255497]=new thumbnail(6255497,"98796","Witley Court","Witley_Court_2_thumb.jpg",130,195,18);thumbnails[4250540]=new thumbnail(4250540,"98796","Lighthouse at Happisburgh, Norfolk","happisburgh_thumb.jpg",130,195,18);thumbnails[4107030]=new thumbnail(4107030,"98796","Dunkeld Cathedral, Scotland","dunkeld_thumb.jpg",130,86,18);thumbnails[4107257]=new thumbnail(4107257,"98796","Bridge House, Ambleside","bridge_thumb.jpg",130,195,18);thumbnails[4105354]=new thumbnail(4105354,"98796","Balmoral Castle, Scotland","Balmoral_thumb.jpg",130,87,18);thumbnails[4106152]=new thumbnail(4106152,"98796","Carr Bridge - old packhorse bridge","carr_bridge_thumb.jpg",130,197,18);thumbnails[3242374]=new thumbnail(3242374,"98796","Castelnaud","Castelnaud_thumb.jpg",130,87,18);thumbnails[3400335]=new thumbnail(3400335,"98796","Gold Hill, Shaftesbury, Dorset.","IMG_0184_thumb.JPG",130,98,18);thumbnails[1429513]=new thumbnail(1429513,"98796","Royal Crescent. Bath","RoyalCrescent_thumb.jpg",130,87,18);thumbnails[1426281]=new thumbnail(1426281,"98796","Bath Abbey","Abbey1_thumb.jpg",130,185,18);thumbnails[3358689]=new thumbnail(3358689,"98796","St Davids Cathedral. Pembrokeshire.","IMG_0712 copy_thumb.jpg",130,85,18);thumbnails[1426274]=new thumbnail(1426274,"98796","Worcester Cathedral","copy1636 2_thumb.jpg",130,91,18);thumbnails[4467802]=new thumbnail(4467802,"100733","Balloon Fiesta 2009","Baloon_Fiesta1_thumb.jpg",130,195,18);thumbnails[4467805]=new thumbnail(4467805,"100733","Baloons over Bristol","Baloon_Fiesta2_thumb.jpg",130,87,18);thumbnails[4467812]=new thumbnail(4467812,"100733","Red Arrows","Red_Arrows11_thumb.jpg",130,92,18);thumbnails[4467814]=new thumbnail(4467814,"100733","Red Arrows","Red_Arrows2_thumb.jpg",130,83,18);thumbnails[4467815]=new thumbnail(4467815,"100733","Red Arrows","Red_Arrows3_thumb.jpg",130,92,18);thumbnails[3339330]=new thumbnail(3339330,"100733","The London Eye","IMG_7434 copy1_thumb.jpg",130,87,18);thumbnails[3339392]=new thumbnail(3339392,"100733","The London Eye","IMG_7389_thumb.JPG",130,87,18);thumbnails[1569266]=new thumbnail(1569266,"100733","Westonbirt, National Arboretum.","copy 4751_thumb.jpg",130,185,18);thumbnails[1459828]=new thumbnail(1459828,"100733","RAF Red Arrows","copy copy 4265_thumb.jpg",130,91,18);thumbnails[1459849]=new thumbnail(1459849,"100733","RAF Red Arrows","copy 4150 copy copy_thumb.jpg",130,91,18);thumbnails[3397124]=new thumbnail(3397124,"100733","Red Arrows Display","copy 4292 copy_thumb.jpg",130,87,18);thumbnails[3695431]=new thumbnail(3695431,"225798","Harry","Harry_thumb.jpg",130,189,18);thumbnails[3964747]=new thumbnail(3964747,"240134","Canal Bridge","CRW_2379_7_8_thumb.jpg",130,86,18);thumbnails[3964764]=new thumbnail(3964764,"240134","Lapworth Junction","CRW_2397_5_6_thumb.jpg",130,92,18);thumbnails[3964776]=new thumbnail(3964776,"240134","Fisherman at Tardebigge ","fisherman_at_tardebiggepatchtool_thumb.jpg",130,197,18);thumbnails[2510189]=new thumbnail(2510189,"240134","Working boats at Braunston","IMG_7103sepia with noise_thumb.jpg",130,87,18);thumbnails[1451900]=new thumbnail(1451900,"240134","Stockton Locks, Grand Union Canal","transport8_thumb.jpg",130,189,18);thumbnails[4250397]=new thumbnail(4250397,"251629","Berney Arms Windmill at Great Yarmouth","Berney_thumb.jpg",130,195,18);thumbnails[4250232]=new thumbnail(4250232,"251629","Windmill at Cley Next to Sea, Norfolk","cleynexttosea_thumb.jpg",130,195,18);thumbnails[4250262]=new thumbnail(4250262,"251629","Drainage mill at Thurne, Norfolk","thurne_thumb.jpg",130,195,18);thumbnails[2509007]=new thumbnail(2509007,"251629","Turf Fen Windmill, Norfolk Broads","turf fen Windmill_thumb.watercolour.jpg",130,195,18);thumbnails[2506424]=new thumbnail(2506424,"251629","Thurne Windmill, Norfolk Broads","CRW_1512_thumb.jpg",130,87,18);thumbnails[2509031]=new thumbnail(2509031,"251629","Windmill at Thurne, Norfolk Broads","CRW_1490_thumb.jpg",130,87,18);thumbnails[1665445]=new thumbnail(1665445,"251629","Cambridgeshire Windmill","swaffham prior windmill_thumb.jpg",130,184,18);thumbnails[3227296]=new thumbnail(3227296,"114462","Dave and Viv","Dave_Viv_thumb.jpg",130,195,18);thumbnails[3227297]=new thumbnail(3227297,"114462","Viv","Viv_thumb.jpg",130,195,18);thumbnails[1717822]=new thumbnail(1717822,"114462","Laura","Laura_thumb.jpg",130,170,18);thumbnails[1717854]=new thumbnail(1717854,"114462","Laura and David Jones","Laura_Dave_thumb.jpg",130,157,18);var galleries=new Object();galleries[95846]=new gallery(95846,"3012739,1451893,1451892,1451891","Flora","gallery",[3012739,1451891,1451892,1451893]);galleries[100728]=new gallery(100728,"1991404,1924564,1451888,1451887,1451883,1382206,1382172,1382123,1381981,1381980,1381971","Fauna","gallery",[1451887,1382172,1451883,1924564,1382123,1991404,1381971,1381980,1381981,1382206,1451888]);galleries[96049]=new gallery(96049,"6255526,4107058,4106335,3807220,3393867,3393860,3359008,3227298,3227292,2509041,2506415,2506351,2506349,1466194,1457024,1456565,1431009,1431002,1428927,1382842","Landscapes","gallery",[6255526,4106335,4107058,3807220,3393860,3393867,3227292,3227298,2509041,2506349,2506351,2506415,1457024,1431002,1431009,1428927,3359008,1466194,1382842,1456565]);galleries[96051]=new gallery(96051,"3343143,3227291,3227290,1510169,1451901,1431081,1382922","Transport","gallery",[3343143,1510169,3227290,3227291,1451901,1382922,1431081]);galleries[98792]=new gallery(98792,"3343485,3336246,3336143,3336098,2946359,1428844","Sport","gallery",[3336098,3336143,3336246,2946359,3343485,1428844]);galleries[98796]=new gallery(98796,"6255497,6255490,6255486,6255485,4250540,4107257,4107030,4106152,4105354,3400335,3242374,1429513,1426281,1426274","Architecture","gallery",[6255485,6255486,6255490,6255497,4250540,4107030,4107257,4105354,4106152,3242374,3400335,1429513,1426281,3358689,1426274]);galleries[100733]=new gallery(100733,"4467815,4467814,4467812,4467805,4467802,3397124,3339392,3339330,1569266,1459849,1459828","Events","gallery",[4467802,4467805,4467812,4467814,4467815,3339330,3339392,1569266,1459828,1459849,3397124]);galleries[225798]=new gallery(225798,"3695431","People","gallery",[3695431]);galleries[240134]=new gallery(240134,"3964776,3964764,3964747,2510189,1451900","Waterways","gallery",[3964747,3964764,3964776,2510189,1451900]);galleries[251629]=new gallery(251629,"4250397,4250262,4250232,2509031,2509007,2506424,1665445","Windmills","gallery",[4250397,4250232,4250262,2509007,2506424,2509031,1665445]);galleries[114462]=new gallery(114462,"3227297,3227296,1717854,1717822","Wedding","gallery",[3227296,3227297,1717822,1717854]);var imageSets=new Object();imageSets[1]="6255526,6255497,6255490,6255486,6255485,4467815,4467814,4467812,4467805,4467802,4250540,4250397,4250262,4250232,4107257,4107058,4107030,4106335,4106152,4105354,3964776,3964764,3964747,3807220,3695431,3400335,3397124,3393867,3393860,3359008,3358689,3343485,3343143,3339392,3339330,3336246,3336143,3336098,3242374,3227298,3227297,3227296,3227292,3227291,3227290,3012739,2946359,2510189,2509041,2509031,2509007,2506424,2506415,2506351,2506349,1991404,1924564,1717854,1717822,1665445,1569266,1510169,1466194,1459849,1459828,1457024,1456565,1451901,1451900,1451893,1451892,1451891,1451888,1451887,1451883,1431081,1431009,1431002,1429513,1428927,1428844,1426281,1426274,1382922,1382842,1382206,1382172,1382123,1381981,1381980,1381971";imageSets[2]="6255526,6255497,6255490,6255486,6255485,4467815,4467814,4467812,4467805,4467802,4250540,4250397,4250262,4250232,4107257,4107058,4107030,4106335,4106152,4105354,3964776,3964764,3964747,3807220,3695431,3400335,3397124,3393867,3393860,3359008,3343485,3343143,3339392,3339330,3336246,3336143,3336098,3242374,3227298,3227297,3227296,3227292,3227291,3227290,3012739,2946359,2510189,2509041,2509031,2509007,2506424,2506415,2506351,2506349,1991404,1924564,1717854,1717822,1665445,1569266,1510169,1466194,1459849,1459828,1457024,1456565,1451901,1451900,1451893,1451892,1451891,1451888,1451887,1451883,1431081,1431009,1431002,1429513,1428927,1428844,1426281,1426274,1382922,1382842,1382206,1382172,1382123,1381981,1381980,1381971";imageSets[3]="6255526,6255497,6255490,6255486,6255485,4467815,4467814,4467812,4467805,4467802,3807220,3695431,3393867,3393860,3242374,3227298,3227297,3227292,3227291,3227290";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/bodenhamstudio/images";break}switch(a){case 1:b="http://www1.clikpic.com/bodenhamstudio/images";break}switch(a){case 2:b="http://admin.clikpic.com/bodenhamstudio/images";break}switch(a){case 24:b="http://tpc15/clikpic/bodenhamstudio/images";break}switch(a){case 4:b="http://www.clikchurch.com/bodenhamstudio/images";break}switch(a){case 5:b="http://www2.clikpic.com/bodenhamstudio/images";break}switch(a){case 22:b="http://tpc5/clikpic/bodenhamstudio/images";break}switch(a){case 23:b="http://tpc10/clikpic/bodenhamstudio/images";break}switch(a){case 25:b="http://tpc16/clikpic/bodenhamstudio/images";break}switch(a){case 15:b="http://www3.clikpic.com/bodenhamstudio/images";break}switch(a){case 18:b="http://www4.clikpic.com/bodenhamstudio/images";break}switch(a){case 19:b="http://www5.clikpic.com/bodenhamstudio/images";break}switch(a){case 31:b="http://www7.clikpic.com/bodenhamstudio/images";break}switch(a){case 32:b="http://admin2.clikpic.com/bodenhamstudio/images";break}switch(a){case 33:b="http://www8.clikpic.com/bodenhamstudio/images";break}switch(a){case 34:b="http://www9.clikpic.com/bodenhamstudio/images";break}switch(a){case 35:b="http://admin3.clikpic.com/bodenhamstudio/images";break}switch(a){case 37:b="http://admin4.clikpic.com/bodenhamstudio/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="Bodenham Studio: "+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>"}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).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+'<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+'")'})}}};