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[1832194]=new thumbnail(1832194,"","","ChannelMix2_thumb.jpg",130,194,15);thumbnails[5218581]=new thumbnail(5218581,"","","HomePage2_thumb.jpg",130,100,15);thumbnails[6510577]=new thumbnail(6510577,"","","Sofia_thumb.jpg",130,194,15);thumbnails[6511274]=new thumbnail(6511274,"358267","","Lee1_thumb.jpg",130,87,15);thumbnails[6512634]=new thumbnail(6512634,"358267","","Lee3_thumb.jpg",130,194,15);thumbnails[6511360]=new thumbnail(6511360,"358267","","Lee2_thumb.jpg",130,194,15);thumbnails[5282956]=new thumbnail(5282956,"358267","","_DSC0147_thumb.jpg",130,194,15);thumbnails[6513052]=new thumbnail(6513052,"358267","","AG_thumb.jpg",130,194,15);thumbnails[6513061]=new thumbnail(6513061,"358267","","WedFineArt1_thumb.jpg",130,87,15);thumbnails[5230171]=new thumbnail(5230171,"358267","","2_thumb.jpg",130,86,15);thumbnails[5230172]=new thumbnail(5230172,"358267","","1_77F7B8D5-2219-B5B5-4C7B1390D221D8F7_thumb.jpg",130,98,15);thumbnails[781468]=new thumbnail(781468,"358267","","1 (4)1_thumb.jpg",130,189,15);thumbnails[6569313]=new thumbnail(6569313,"331617","The Mewstone","1_8C3B2D16-24E8-5EC4-4F8D876F67CE9F48_thumb.jpg",130,87,15);thumbnails[1077757]=new thumbnail(1077757,"79741","Sun Shade","SunShade_thumb.jpg",130,195,15);thumbnails[5868840]=new thumbnail(5868840,"331617","The Meavy","Dartmoorfinal1_thumb.jpg",130,86,15);thumbnails[1077803]=new thumbnail(1077803,"79741","Balinese House","Balilo2_thumb.jpg",130,195,15);thumbnails[5868843]=new thumbnail(5868843,"331617","Belliver","BelliverBW_thumb.jpg",130,87,15);thumbnails[1077804]=new thumbnail(1077804,"79741","Necker Champagne","Glass_thumb.jpg",130,195,15);thumbnails[5868937]=new thumbnail(5868937,"331617","River Meavy","DatmoorFinal2_thumb.jpg",130,86,15);thumbnails[1077813]=new thumbnail(1077813,"79741","Cactuses","Cactuses_thumb.jpg",130,87,15);thumbnails[1123394]=new thumbnail(1123394,"82201","Shoreline","11_thumb.jpg",130,87,15);thumbnails[2407789]=new thumbnail(2407789,"155969","","4_thumb.jpg",130,194,15);thumbnails[5868975]=new thumbnail(5868975,"331617","Freathy Sunset","_DSC5422_thumb.jpg",130,86,15);thumbnails[1077824]=new thumbnail(1077824,"79741","Balinese House 2","house_thumb.jpg",130,87,15);thumbnails[1125688]=new thumbnail(1125688,"82201","Channel Surge","31_thumb.jpg",130,87,15);thumbnails[2407790]=new thumbnail(2407790,"155969","","5_thumb.jpg",130,194,15);thumbnails[5868983]=new thumbnail(5868983,"331617","Freathy Black & White","Whitsand1Final_thumb.jpg",130,85,15);thumbnails[1125679]=new thumbnail(1125679,"82201","Golden Reef","23_thumb.jpg",130,87,15);thumbnails[2407791]=new thumbnail(2407791,"155969","","6_thumb.jpg",130,194,15);thumbnails[5868992]=new thumbnail(5868992,"331617","Freathy Rocks","Final1_thumb.jpg",130,86,15);thumbnails[1433522]=new thumbnail(1433522,"82201","Rock Pool Swirl","36nat_thumb.jpg",130,87,15);thumbnails[1433586]=new thumbnail(1433586,"82201","Declining Surge","46pro_thumb.jpg",130,87,15);thumbnails[2407784]=new thumbnail(2407784,"155969","","1_thumb.jpg",130,87,15);thumbnails[5869022]=new thumbnail(5869022,"331617","Outer Hope","Hope1_thumb.jpg",130,86,15);thumbnails[1433527]=new thumbnail(1433527,"82201","Light Water","25_thumb.jpg",130,87,15);thumbnails[1433560]=new thumbnail(1433560,"82201","Swirling Water","42_thumb.jpg",130,87,15);thumbnails[1433593]=new thumbnail(1433593,"82201","Abstract Rock Pool","44pro_thumb.jpg",130,87,15);thumbnails[2407786]=new thumbnail(2407786,"155969","","3_thumb.jpg",130,87,15);thumbnails[5868719]=new thumbnail(5868719,"331617","The Eye","Eye_thumb.jpg",130,87,15);thumbnails[1433533]=new thumbnail(1433533,"82201","Sunlit Rock","43pro_thumb.jpg",130,87,15);thumbnails[5868705]=new thumbnail(5868705,"331617","Canary Wharf","WharfHDR_thumb.jpg",130,88,15);thumbnails[1089971]=new thumbnail(1089971,"80368","Dnieper Flats","beach_thumb.jpg",130,87,15);thumbnails[1125747]=new thumbnail(1125747,"80394","Bovi Point","52_thumb.jpg",130,195,15);thumbnails[1433538]=new thumbnail(1433538,"80394","Rushing gulley","27_thumb.jpg",130,195,15);thumbnails[3372146]=new thumbnail(3372146,"205646","Droskyn Point","Droskyn Point_thumb.jpg",130,88,15);thumbnails[1433540]=new thumbnail(1433540,"80394","Rock Pool Sunset","35pro_thumb.jpg",130,195,15);thumbnails[3564834]=new thumbnail(3564834,"205646","Bigbury Sunrise","Bantham1_tonemapped2_thumb.jpg",130,87,15);thumbnails[4383276]=new thumbnail(4383276,"80368","Traditional Couple","couple_thumb.jpg",130,87,15);thumbnails[1125753]=new thumbnail(1125753,"80394","Bovi Reef","41_thumb.jpg",130,195,15);thumbnails[3904420]=new thumbnail(3904420,"205646","Ray of Light","_DSC0032__1__2_tonemapped_thumb.jpg",130,87,15);thumbnails[1433547]=new thumbnail(1433547,"80394","Sunset Cove","12_thumb.jpg",130,195,15);thumbnails[3367232]=new thumbnail(3367232,"205646","Jenkins Quay","jenkinstoned1_thumb.jpg",130,130,15);thumbnails[4383315]=new thumbnail(4383315,"80368","Cherkassy Flats","Flats_thumb.jpg",130,87,15);thumbnails[3564789]=new thumbnail(3564789,"205646","Shaugh Prior","Dmoor2_thumb.jpg",130,87,15);thumbnails[4383386]=new thumbnail(4383386,"80368","Night Fishing","Fishing_thumb.jpg",130,87,15);thumbnails[1089972]=new thumbnail(1089972,"80368","River Dnieper","lads_thumb.jpg",130,87,15);thumbnails[1433553]=new thumbnail(1433553,"80394","Deep Gulley","20_thumb.jpg",130,195,15);thumbnails[4383402]=new thumbnail(4383402,"80368","Dnieper, Kiev","DniperKiev_thumb.jpg",130,87,15);thumbnails[5869069]=new thumbnail(5869069,"205646","Polzeath Surf","PolzyHDR2_thumb.jpg",130,87,15);thumbnails[3564780]=new thumbnail(3564780,"205646","Summer Cornfield","Cornfield_thumb.jpg",130,194,15);thumbnails[1089969]=new thumbnail(1089969,"80368","Village Lady","Granny_thumb.jpg",130,195,15);thumbnails[3603264]=new thumbnail(3603264,"205646","Lannacombe Sunset","Lan1new_thumb.jpg",130,194,15);thumbnails[4383416]=new thumbnail(4383416,"80368","Old Church","OldChurch_thumb.jpg",130,194,15);thumbnails[3372172]=new thumbnail(3372172,"205646","The Sound","The Sound_thumb.jpg",130,192,15);thumbnails[4383424]=new thumbnail(4383424,"80368","Statue of Freedom","Kievstatue_thumb.jpg",130,87,15);thumbnails[993778]=new thumbnail(993778,"74568","Thai Fishing Boat Sunset","thai1 copy_thumb.jpg",130,88,15);thumbnails[1433562]=new thumbnail(1433562,"80395","Hope Surf","Image61_thumb.jpg",130,195,15);thumbnails[3747961]=new thumbnail(3747961,"228786","","MOD2_thumb.jpg",130,87,15);thumbnails[4021926]=new thumbnail(4021926,"242705","","11_1_thumb.jpg",130,87,15);thumbnails[1000063]=new thumbnail(1000063,"74568","Low Tide Fisherman","1 (21) copy_thumb.jpg",130,88,15);thumbnails[1433564]=new thumbnail(1433564,"80395","Rocky Cove","Image1_thumb.jpg",130,195,15);thumbnails[4021907]=new thumbnail(4021907,"242705","","Babas1_thumb.jpg",130,87,15);thumbnails[996975]=new thumbnail(996975,"74568","Emerald Buddha Temple ","thai7 copy1_thumb.jpg",130,87,15);thumbnails[1433575]=new thumbnail(1433575,"80395","Hope Reef","Image4_thumb.jpg",130,195,15);thumbnails[3747963]=new thumbnail(3747963,"228786","","MOD3_thumb.jpg",130,87,15);thumbnails[4022051]=new thumbnail(4022051,"242705","","_DSC0025_thumb.jpg",130,87,15);thumbnails[996982]=new thumbnail(996982,"74568","Kinnari Buddha","thai6 copy_thumb.jpg",130,196,15);thumbnails[1433576]=new thumbnail(1433576,"80395","Misty Rock Pool","32_thumb.jpg",130,195,15);thumbnails[996989]=new thumbnail(996989,"74568","Old Wooden Sea Craft","thai2 copy_thumb.jpg",130,196,15);thumbnails[1433577]=new thumbnail(1433577,"80395","White Water","26_thumb.jpg",130,195,15);thumbnails[4022074]=new thumbnail(4022074,"242705","","_DSC0045_thumb.jpg",130,87,15);thumbnails[996991]=new thumbnail(996991,"74568","Emerald Buddha Temple","thai5 copy_thumb.jpg",130,195,15);thumbnails[1433578]=new thumbnail(1433578,"80395","Rock Pool Sunset 2","40pro_thumb.jpg",130,195,15);thumbnails[4022060]=new thumbnail(4022060,"242705","","_DSC0049_thumb.jpg",130,194,15);thumbnails[1135438]=new thumbnail(1135438,"74567","Chinese New Year","new year_thumb.jpg",130,87,15);thumbnails[1135523]=new thumbnail(1135523,"74567","Prayer Sticks","prayer sticks_thumb.jpg",130,87,15);thumbnails[1090041]=new thumbnail(1090041,"74567","Carved Buddhas","Carved Buddhas_thumb.jpg",130,85,15);thumbnails[1135544]=new thumbnail(1135544,"74567","Festival figures","festival figure1_thumb.jpg",130,87,15);thumbnails[992611]=new thumbnail(992611,"74567","Taiwanese Buddha","Bud_thumb.jpg",130,169,15);thumbnails[1135317]=new thumbnail(1135317,"74567","Dragon Temple","Dragotemple_thumb.jpg",130,195,15);var galleries=new Object();galleries[358267]=new gallery(358267,"6513061,6513052,6512634,6511360,6511274,5282956,5230172,5230171,781468","Weddings","section426991",[6511274,6512634,6511360,5282956,6513052,6513061,5230171,5230172,781468]);galleries[80393]=new gallery(80393,"1433578,1433538,1125753","Devon & Cornwall Seascapes","gallery",[]);galleries[331617]=new gallery(331617,"6569313,5869022,5868992,5868983,5868975,5868937,5868843,5868840,5868719,5868705","New Work","gallery",[6569313,5868840,5868843,5868937,5868975,5868983,5868992,5869022,5868719,5868705]);galleries[79741]=new gallery(79741,"1077757","Richard Bransons Necker Island","gallery",[1077757,1077803,1077804,1077813,1077824]);galleries[82201]=new gallery(82201,"1433593,1433586,1433560,1433533,1433527,1433522,1125688,1125679,1123394","Seascapes 1","gallery",[1123394,1125688,1125679,1433522,1433586,1433527,1433560,1433593,1433533]);galleries[155969]=new gallery(155969,"2407786","Stonehaven Project","section279775",[2407789,2407790,2407791,2407784,2407786]);galleries[331611]=new gallery(331611,"3564780","Digital Landscapes","gallery",[]);galleries[205646]=new gallery(205646,"3564780","Old Work","gallery",[3372146,3564834,3904420,3367232,3564789,5869069,3564780,3603264,3372172]);galleries[80394]=new gallery(80394,"1433538,1125753","Seascapes 2","gallery",[1125747,1433538,1433540,1125753,1433547,1433553]);galleries[80368]=new gallery(80368,"1089969","Ukraine","gallery",[1089971,4383276,4383315,4383386,1089972,4383402,1089969,4383416,4383424]);galleries[228786]=new gallery(228786,"3747963,3747961","29 Commando Plymouth","section279775",[3747961,3747963]);galleries[242705]=new gallery(242705,"4021926","Babas Restaurant","section279775",[4021926,4021907,4022051,4022074,4022060]);galleries[80395]=new gallery(80395,"1433578","Seascapes 3","gallery",[1433562,1433564,1433575,1433576,1433577,1433578]);galleries[74568]=new gallery(74568,"996989","Thailand","gallery",[993778,1000063,996975,996982,996989,996991]);galleries[74495]=new gallery(74495,"1089969,1077757,996989,992611","Travel ","gallery",[]);galleries[74567]=new gallery(74567,"992611","Taiwan","gallery",[1135438,1135523,1090041,1135544,992611,1135317]);var imageSets=new Object();imageSets[1]="5218581";imageSets[2]="4021926,3747963,3747961,3564780,2407786,1433578,1433538,1125753,1089969,1077757,996989,992611";imageSets[236851]="6513061,6513052,6512634,6511360,6511274,5282956,5230172,5230171,781468";imageSets[3]="6569313,6513061,6513052,6512634,6511360,6511274,6510577,5869069,5869022,5868992,5868983,5868975,5868937,5868843,5868840,5868719,5868705,5282956,5230172,5230171,5218581,4383424,4383416,4383402,4383386,4383315,4383276,4022074,4022060,4022051,4021926,4021907,3904420,3747963,3747961,3603264,3564834,3564789,3564780,3372172,3372146,3367232,2407791,2407790,2407789,2407786,2407784,1832194,1433593,1433586";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/tloates/images";break}switch(a){case 1:b="http://www1.clikpic.com/tloates/images";break}switch(a){case 2:b="http://admin.clikpic.com/tloates/images";break}switch(a){case 24:b="http://tpc15/clikpic/tloates/images";break}switch(a){case 4:b="http://www.clikchurch.com/tloates/images";break}switch(a){case 5:b="http://www2.clikpic.com/tloates/images";break}switch(a){case 22:b="http://tpc5/clikpic/tloates/images";break}switch(a){case 23:b="http://tpc10/clikpic/tloates/images";break}switch(a){case 25:b="http://tpc16/clikpic/tloates/images";break}switch(a){case 15:b="http://www3.clikpic.com/tloates/images";break}switch(a){case 18:b="http://www4.clikpic.com/tloates/images";break}switch(a){case 19:b="http://www5.clikpic.com/tloates/images";break}switch(a){case 31:b="http://www7.clikpic.com/tloates/images";break}switch(a){case 32:b="http://admin2.clikpic.com/tloates/images";break}switch(a){case 33:b="http://www8.clikpic.com/tloates/images";break}switch(a){case 34:b="http://www9.clikpic.com/tloates/images";break}switch(a){case 35:b="http://admin3.clikpic.com/tloates/images";break}switch(a){case 37:b="http://admin4.clikpic.com/tloates/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="Tobie Loates 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="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="tloates@pcad.ac.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="tloates@pcad.ac.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+'")'})}}};