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[2846179]=new thumbnail(2846179,"267057","Sunrise over Canvey Island","canvetislandsunrise_thumb.jpg",130,86,18);thumbnails[1714254]=new thumbnail(1714254,"267057","Shoreham harbour","shorham _thumb.jpg",130,86,18);thumbnails[2224653]=new thumbnail(2224653,"267057","The pier at Bognor Regis","bognorregis _thumb.jpg",130,95,18);thumbnails[3405177]=new thumbnail(3405177,"267057","Brighton seafront","brightonseafront_thumb.jpg",130,87,18);thumbnails[5558378]=new thumbnail(5558378,"267057","Weston super Mare","westonsupermare2_thumb.jpg",130,78,18);thumbnails[5543592]=new thumbnail(5543592,"267057","Westward Ho","westward_ho_81_thumb.jpg",130,87,18);thumbnails[5543574]=new thumbnail(5543574,"267057","Combe Martin","combe_martin_31_thumb.jpg",130,83,18);thumbnails[5140699]=new thumbnail(5140699,"267057","Cleethorpes on the east coast of England","cleethorpes26_thumb.jpg",130,80,18);thumbnails[6026140]=new thumbnail(6026140,"267057","Herne Bay on the north Kent coast","herne_bay_6_thumb.jpg",130,81,18);thumbnails[4620919]=new thumbnail(4620919,"267057","Angmering beach","angmeringbeach_thumb.jpg",130,87,18);thumbnails[5558382]=new thumbnail(5558382,"267057","storm gathers over Whitburn","whitburn5_thumb.jpg",130,70,18);thumbnails[5543585]=new thumbnail(5543585,"267057","Hartland point lighthouse","hartland_point_lighthouse_51_thumb.jpg",130,80,18);thumbnails[5543588]=new thumbnail(5543588,"267057","Lynmouth harbour entrance","lynmouth11_thumb.jpg",130,86,18);thumbnails[4621261]=new thumbnail(4621261,"267057","Sutton on sea Lincolnshire","suttononsea_thumb.jpg",130,87,18);thumbnails[4620942]=new thumbnail(4620942,"267057","Clevedon pier","clivedonpier_thumb.jpg",130,87,18);thumbnails[6013640]=new thumbnail(6013640,"267057","Dymchurch on the Kent coast","dymchurch_construction_project_20_thumb.jpg",130,87,18);thumbnails[6026166]=new thumbnail(6026166,"267057","Maryport fishing nets on the Cumbria coast","maryport19_thumb.jpg",64,100,18);thumbnails[5543953]=new thumbnail(5543953,"267057","The Humber bridge","humber_bridge4_thumb.jpg",63,100,18);thumbnails[5543970]=new thumbnail(5543970,"267057","Spinnaker Tower","spinaker_tower15_thumb.jpg",69,100,18);thumbnails[5543995]=new thumbnail(5543995,"115111","Winchester cathedral","winchestercathedral_thumb.jpg",63,100,18);thumbnails[5140758]=new thumbnail(5140758,"115111","Margate","margate_steps_thumb.jpg",130,89,18);thumbnails[5544059]=new thumbnail(5544059,"115111","Newhaven appartments","newhavenappartments_thumb.jpg",70,100,18);thumbnails[4231477]=new thumbnail(4231477,"115111","East Dean village green and pub","Eastbdeanpub_thumb.jpg",130,87,18);thumbnails[5544054]=new thumbnail(5544054,"115111","Frencham Great Pond in Surrey","bluelake__thumb.jpg",68,100,18);thumbnails[3644872]=new thumbnail(3644872,"115111","Winter in the Ashdown Forest","ashdownforest_thumb.jpg",130,87,18);thumbnails[2846166]=new thumbnail(2846166,"115111","Sheep on Ditchling common","ditchlingsheep_thumb.jpg",130,75,18);thumbnails[1713155]=new thumbnail(1713155,"115111","First light at Hassocks","firstlightinhassocks _thumb.jpg",130,83,18);thumbnails[1713154]=new thumbnail(1713154,"115111","Dawn at Hassocks","dawnathassocks _thumb.jpg",130,83,18);thumbnails[5543609]=new thumbnail(5543609,"115111","South downs snow","south_downs_snow_20_thumb.jpg",130,87,18);thumbnails[1714097]=new thumbnail(1714097,"115111","Wheat fields and a gathering storm","wheatfields _thumb.jpg",130,87,18);thumbnails[1713160]=new thumbnail(1713160,"115111","New Forest","newforestautumnleaves _thumb.jpg",130,86,18);thumbnails[1879789]=new thumbnail(1879789,"115111","Lone deer","deer_thumb.jpg",130,80,18);thumbnails[6013621]=new thumbnail(6013621,"115111","Countisbury Church","countisbury_church2_thumb.jpg",130,71,18);thumbnails[1714087]=new thumbnail(1714087,"115111","Rural Sussex","ruralSussex_thumb.jpg",130,93,18);thumbnails[1713334]=new thumbnail(1713334,"115111","Oil seed rape","oilseedrape  _thumb.jpg",130,98,18);thumbnails[1713156]=new thumbnail(1713156,"115111","Hay bales","haybales _thumb.jpg",130,81,18);thumbnails[2846213]=new thumbnail(2846213,"115111","Crawley office building","warped_thumb.jpg",130,84,18);thumbnails[1714084]=new thumbnail(1714084,"115111","South Downs barn","southdownshut _thumb.jpg",130,85,18);thumbnails[4231571]=new thumbnail(4231571,"115111","Seaford beach huts","seafordbeachbuts_thumb.jpg",130,91,18);thumbnails[6013631]=new thumbnail(6013631,"115111","Countisbury Common","countisbury_common_6_thumb.jpg",130,81,18);thumbnails[3405183]=new thumbnail(3405183,"115111","The Sussex downs","southdowns_thumb.jpg",130,87,18);thumbnails[6013599]=new thumbnail(6013599,"115111","Santa Express on the Bluebell Railway","bluebell_railway_23_thumb.jpg",126,100,18);thumbnails[6026138]=new thumbnail(6026138,"115111","Dymchurch Kiosk ","dymchurch_kiosk_3_thumb.jpg",130,87,18);thumbnails[5544079]=new thumbnail(5544079,"115112","Washington and Lee university","washingtonandlee_thumb.jpg",67,100,18);thumbnails[5544073]=new thumbnail(5544073,"115112","Ardfert Cathedral","ardfertcathedral_thumb.jpg",67,100,18);thumbnails[5544087]=new thumbnail(5544087,"115112","Chrysler building New York city","newyork_thumb.jpg",63,100,18);thumbnails[5544112]=new thumbnail(5544112,"115112","Sydney Opera house","sydneyoperahousesteps_thumb.jpg",67,100,18);thumbnails[5544119]=new thumbnail(5544119,"115112","Sydney Opera house 2","sydneyoperahouse_thumb.jpg",67,100,18);thumbnails[1713152]=new thumbnail(1713152,"115112","Canadian canoes","canadiancanoes_thumb.jpg",130,91,18);thumbnails[4231586]=new thumbnail(4231586,"115112","Shanghai Yu gardens","shanghaiyugardens2_thumb.jpg",130,83,18);thumbnails[4231589]=new thumbnail(4231589,"115112","Yu Gardens Shanghai","shanghaiyugardens3_thumb.jpg",130,91,18);thumbnails[2846210]=new thumbnail(2846210,"115112","Three boats","threeboats_thumb.jpg",130,75,18);thumbnails[1713157]=new thumbnail(1713157,"115112","Lake Moraine","lakemoraine _thumb.jpg",130,81,18);thumbnails[2846171]=new thumbnail(2846171,"115112","Blue building in Paris","bluebuilding_thumb.jpg",130,87,18);thumbnails[1714090]=new thumbnail(1714090,"115112","Postcard from Sydney","sydneyharbourbridge_thumb.jpg",130,88,18);thumbnails[2846182]=new thumbnail(2846182,"115112","Peggy's Cove Nova Scotia","peggyscove2_thumb.jpg",130,87,18);thumbnails[1714100]=new thumbnail(1714100,"115112","Sunset over Venice","sunsetovervenice_thumb.jpg",130,86,18);thumbnails[1714093]=new thumbnail(1714093,"115112","Impression of Venice","venice _thumb.jpg",130,81,18);thumbnails[1713332]=new thumbnail(1713332,"115112","New Orleans","neworleans _thumb.jpg",130,86,18);thumbnails[4231560]=new thumbnail(4231560,"115112","Civil Rights memorial","martinlutherking_thumb.jpg",130,88,18);thumbnails[1879747]=new thumbnail(1879747,"115112","Arlington, Washington DC","arlington _thumb.jpg",130,87,18);thumbnails[1714094]=new thumbnail(1714094,"115112","Washington DC","washington _thumb.jpg",130,87,18);thumbnails[1714098]=new thumbnail(1714098,"115112","Old door in Lisbon","walldoor_thumb.jpg",130,98,18);thumbnails[1713147]=new thumbnail(1713147,"115112","Achill Island","achillislandCoMayo_thumb.jpg",130,87,18);thumbnails[3405065]=new thumbnail(3405065,"115112","Bouctouche Eco Centre","boutouche_thumb.jpg",130,87,18);thumbnails[3644943]=new thumbnail(3644943,"115112","Giant's Causeway Northern Ireland","giantscauseway_thumb.jpg",130,85,18);thumbnails[4231582]=new thumbnail(4231582,"115112","Botanic gardens in Shanghai","shanghaibotanicgarden_thumb.jpg",130,87,18);thumbnails[3405229]=new thumbnail(3405229,"115112","Sri Mariamman temple","srimariamman_thumb.jpg",130,85,18);thumbnails[3405215]=new thumbnail(3405215,"115112","Ready for inspection","halifaxcitadel 5_thumb.jpg",130,87,18);thumbnails[5544070]=new thumbnail(5544070,"115112","South park walkway","brisbane_thumb.jpg",67,100,18);thumbnails[5544134]=new thumbnail(5544134,"115112","Chicago skyscraper","chicagoskyscraper__thumb.jpg",64,100,18);thumbnails[3405221]=new thumbnail(3405221,"115112","Singapore appartments","singaporeappartments_thumb.jpg",130,87,18);thumbnails[2846158]=new thumbnail(2846158,"115113","Frozen leaves","frozenleaves_thumb.jpg",130,85,18);thumbnails[2846160]=new thumbnail(2846160,"115113","Orange petals","orangepetals_thumb.jpg",130,86,18);thumbnails[1713131]=new thumbnail(1713131,"115113","Autumn colour","iimpressionistyellow_thumb.jpg",130,86,18);thumbnails[5543607]=new thumbnail(5543607,"115113","Oil seed rape","oil_seed_rape_ab_0011_thumb.jpg",130,82,18);thumbnails[1713133]=new thumbnail(1713133,"115113","Pink Gerbera","pinkgerbera _thumb.jpg",130,86,18);thumbnails[1713118]=new thumbnail(1713118,"115113","Abstract Flower","abstractpurpleflowers_thumb.jpg",130,86,18);thumbnails[5543605]=new thumbnail(5543605,"115113","Abstract flower","abstract_flower_ab680_thumb.jpg",130,85,18);thumbnails[1714247]=new thumbnail(1714247,"115113","Nasturtium","nastursun_thumb.jpg",130,92,18);thumbnails[5544485]=new thumbnail(5544485,"115113","Purple and yellow","purple_and_yellow_ab_695_thumb.jpg",130,85,18);thumbnails[1713141]=new thumbnail(1713141,"115113","Tulip profile","tulipprofile _thumb.jpg",130,86,18);thumbnails[1713140]=new thumbnail(1713140,"115113","Poppies","poppy 1_thumb.jpg",130,88,18);thumbnails[1879814]=new thumbnail(1879814,"115113","Red leaves","redleaves_thumb.jpg",130,77,18);thumbnails[5544475]=new thumbnail(5544475,"115113","Tall Tulips","tulips__thumb.jpg",62,100,18);thumbnails[5544479]=new thumbnail(5544479,"115113","Autumn colours","autumnredleaves__thumb.jpg",68,100,18);thumbnails[5544462]=new thumbnail(5544462,"115113","Bluebells","bluebells__thumb.jpg",65,100,18);thumbnails[5544471]=new thumbnail(5544471,"115113","Dandilion seed head","dandilion_thumb.jpg",69,100,18);thumbnails[1714242]=new thumbnail(1714242,"115224","Cheese grater","cheesegrater_thumb.jpg",130,90,18);thumbnails[1714246]=new thumbnail(1714246,"115224","Fork","fork _thumb.jpg",130,85,18);thumbnails[1714252]=new thumbnail(1714252,"115224","Rusted Bolt","rustedbolt _thumb.jpg",130,86,18);thumbnails[4231557]=new thumbnail(4231557,"115204","Lizzies wedding","Lizzieswedding_thumb.jpg",130,87,18);thumbnails[5548190]=new thumbnail(5548190,"115204","Nic and Tom on their wedding day","nicandtom_thumb.jpg",71,100,18);thumbnails[1714121]=new thumbnail(1714121,"115204","Tricia, Nic and Lizzie","triciaandgirls_thumb.jpg",130,87,18);thumbnails[1714117]=new thumbnail(1714117,"115204","Nic and Lizzie messing about","nicandlix_thumb.jpg",130,88,18);thumbnails[5548193]=new thumbnail(5548193,"115204","Tricia","tricia_thumb.jpg",67,100,18);thumbnails[1714113]=new thumbnail(1714113,"115204","Charlie","charlie _thumb.jpg",130,103,18);thumbnails[6013613]=new thumbnail(6013613,"115204","Charlie having a great day on the Bluebell Railway","bluebell_railway_27_thumb.jpg",130,87,18);var galleries=new Object();galleries[267057]=new gallery(267057,"6026166,6026140,6013640,5558382,5558378,5543970,5543953,5543592,5543588,5543585","Coastal UK","gallery",[2846179,1714254,2224653,3405177,5558378,5543592,5543574,5140699,6026140,4620919,5558382,5543585,5543588,4621261,4620942,6013640,6026166,5543953,5543970]);galleries[115111]=new gallery(115111,"6026138,6013631,6013621,6013599,5544059,5544054,5543995,5543609,5140758,4231571","around the UK","gallery",[5543995,5140758,5544059,4231477,5544054,3644872,2846166,1713155,1713154,5543609,1714097,1713160,1879789,6013621,1714087,1713334,1713156,2846213,1714084,4231571,6013631,3405183,6013599,6026138]);galleries[115112]=new gallery(115112,"5544134,5544119,5544112,5544087,5544079,5544073,5544070,4231589,4231586,4231582","around the world","gallery",[5544079,5544073,5544087,5544112,5544119,1713152,4231586,4231589,2846210,1713157,2846171,1714090,2846182,1714100,1714093,1713332,4231560,1879747,1714094,1714098,1713147,3405065,3644943,4231582,3405229,3405215,5544070,5544134,3405221]);galleries[115113]=new gallery(115113,"5544485,5544479,5544475,5544471,5544462,5543607,5543605,2846160,2846158,1879814","flowers and trees","gallery",[2846158,2846160,1713131,5543607,1713133,1713118,5543605,1714247,5544485,1713141,1713140,1879814,5544475,5544479,5544462,5544471]);galleries[115224]=new gallery(115224,"1714252,1714246,1714242","miscelleaneous","gallery",[1714242,1714246,1714252]);galleries[115204]=new gallery(115204,"6013613,5548193,5548190,4231557,1714121,1714117,1714113","Family","gallery",[4231557,5548190,1714121,1714117,5548193,1714113,6013613]);var imageSets=new Object();imageSets[1]="6013631,6013621,6013613,5544471,5544462,5544119,5544087,5544079,5544073,5544054,5543970,5543953,5543609,5543605,5543588,5543574,5140758,5140699,4621261,4620919,4231589,4231560,3644943,3405221,3405215,3405177,2846213,2846171,2846166,2224653,1879789,1714252,1714246,1714121,1714113,1714100,1714097,1714093,1713334,1713332,1713156,1713155,1713152,1713131,1713118";imageSets[3]="6026166,6026140,6026138,6013640,6013631,6013621,6013613,6013599,5558382,5558378,5548193,5548190,5544485,5544479,5544475,5544471,5544462,5544134,5544119,5544112,5544087,5544079,5544073,5544070,5544059,5544054,5543995,5543970,5543953,5543609,5543607,5543605,5543592,5543588,5543585,5543574,5140758,5140699,4621261,4620942,4620919,4231589,4231586,4231582,4231571,4231560,4231557,4231477,3644943,3644872";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/davideastley/images";break}switch(a){case 1:b="http://www1.clikpic.com/davideastley/images";break}switch(a){case 2:b="http://admin.clikpic.com/davideastley/images";break}switch(a){case 24:b="http://tpc15/clikpic/davideastley/images";break}switch(a){case 4:b="http://www.clikchurch.com/davideastley/images";break}switch(a){case 5:b="http://www2.clikpic.com/davideastley/images";break}switch(a){case 22:b="http://tpc5/clikpic/davideastley/images";break}switch(a){case 23:b="http://tpc10/clikpic/davideastley/images";break}switch(a){case 25:b="http://tpc16/clikpic/davideastley/images";break}switch(a){case 15:b="http://www3.clikpic.com/davideastley/images";break}switch(a){case 18:b="http://www4.clikpic.com/davideastley/images";break}switch(a){case 19:b="http://www5.clikpic.com/davideastley/images";break}switch(a){case 31:b="http://www7.clikpic.com/davideastley/images";break}switch(a){case 32:b="http://admin2.clikpic.com/davideastley/images";break}switch(a){case 33:b="http://www8.clikpic.com/davideastley/images";break}switch(a){case 34:b="http://www9.clikpic.com/davideastley/images";break}switch(a){case 35:b="http://admin3.clikpic.com/davideastley/images";break}switch(a){case 37:b="http://admin4.clikpic.com/davideastley/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="David Eastley 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> </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="DAVIDEASTLEY">';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+'")'})}}};