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[4850286]=new thumbnail(4850286,"203572","FLAMBOROUGH LIGHTHOUSE","_MG_0859_thumb.gif",130,195,1);thumbnails[4850413]=new thumbnail(4850413,"203572","THORNWICK BAY NORTH-LANDING EAST YORKSHIRE","_MG_0831_thumb.gif",130,195,1);thumbnails[4850290]=new thumbnail(4850290,"203572","COMMA  POLYGONIA C-ALBUM","_MG_1697_thumb.gif",130,85,1);thumbnails[5555006]=new thumbnail(5555006,"203572","kestrel","_MG_2122_thumb.gif",130,195,1);thumbnails[6608148]=new thumbnail(6608148,"203572","Urban Fox","_MG_5201-b_thumb.gif",130,87,1);thumbnails[5555040]=new thumbnail(5555040,"203572","Roe deer in snow","_MG_2715_thumb.gif",130,87,1);thumbnails[5600205]=new thumbnail(5600205,"203572","Redshank","_MG_3345_thumb.gif",130,87,1);thumbnails[5555075]=new thumbnail(5555075,"203572","Knot","_MG_2877_thumb.gif",130,87,1);thumbnails[5600206]=new thumbnail(5600206,"203572","Corncrake","_MG_3419_thumb.gif",130,87,1);thumbnails[5555157]=new thumbnail(5555157,"203572","Sanderling","_MG_2909_thumb.gif",130,145,1);thumbnails[5555183]=new thumbnail(5555183,"203572","Turnstone","_MG_2920_thumb.gif",130,87,1);thumbnails[6168136]=new thumbnail(6168136,"344842","","_MG_3839_thumb.gif",130,165,1);thumbnails[6168214]=new thumbnail(6168214,"344842","","_MG_3889_thumb.gif",130,195,1);thumbnails[6168217]=new thumbnail(6168217,"344842","","_MG_3887_thumb.gif",130,195,1);thumbnails[6168221]=new thumbnail(6168221,"344842","","_MG_3902_thumb.gif",130,195,1);thumbnails[6409572]=new thumbnail(6409572,"344842","","_MG_4538_thumb.gif",130,138,1);thumbnails[6409576]=new thumbnail(6409576,"344842","","_MG_4573_thumb.gif",130,195,1);thumbnails[6409587]=new thumbnail(6409587,"344842","","_MG_4929_thumb.gif",130,170,1);thumbnails[6409590]=new thumbnail(6409590,"344842","","_MG_4993_thumb.gif",130,195,1);thumbnails[6409594]=new thumbnail(6409594,"344842","","_MG_4995_thumb.gif",130,195,1);thumbnails[6409598]=new thumbnail(6409598,"344842","","_MG_5007_thumb.gif",130,195,1);thumbnails[6409773]=new thumbnail(6409773,"344842","","_MG_5129_thumb.gif",130,168,1);thumbnails[6409801]=new thumbnail(6409801,"344842","","_MG_5112_thumb.gif",130,195,1);thumbnails[6409834]=new thumbnail(6409834,"344842","","_MG_4572_thumb.gif",130,135,1);thumbnails[6409843]=new thumbnail(6409843,"344842","","_MG_4619_thumb.gif",130,139,1);thumbnails[6409858]=new thumbnail(6409858,"344842","","_MG_49061_thumb.gif",130,195,1);thumbnails[6409890]=new thumbnail(6409890,"344842","","_MG_4883_thumb.gif",130,169,1);thumbnails[6409993]=new thumbnail(6409993,"344842","","_MG_4478-a_thumb.gif",130,195,1);thumbnails[6168144]=new thumbnail(6168144,"344843","","_MG_4741_thumb.gif",130,195,1);thumbnails[6168149]=new thumbnail(6168149,"344843","","_MG_4670_thumb.gif",130,159,1);thumbnails[6168150]=new thumbnail(6168150,"344843","","_MG_4744_thumb.gif",130,195,1);thumbnails[6168157]=new thumbnail(6168157,"344843","","IMG_4836_thumb.gif",130,138,1);thumbnails[6168502]=new thumbnail(6168502,"344843","","neg-301_thumb.gif",130,152,1);thumbnails[6168641]=new thumbnail(6168641,"344843","","neg-7_thumb.gif",130,86,1);thumbnails[6168644]=new thumbnail(6168644,"344843","","neg-29_thumb.gif",130,191,1);thumbnails[6168650]=new thumbnail(6168650,"344843","","neg-23_thumb.gif",130,86,1);thumbnails[6168920]=new thumbnail(6168920,"344843","","neg-19_thumb.gif",130,198,1);thumbnails[6168931]=new thumbnail(6168931,"344843","","neg-31_thumb.gif",130,198,1);thumbnails[6168138]=new thumbnail(6168138,"344843","","_MG_4634_thumb.gif",130,190,1);thumbnails[3182431]=new thumbnail(3182431,"183547","BALD EAGLE","BALD EAGLE_thumb.jpg",130,87,1);thumbnails[3182486]=new thumbnail(3182486,"183547","COMMON TERN IN FLIGHT","COMMON TERN_thumb.jpg",130,94,1);thumbnails[3182505]=new thumbnail(3182505,"183547","GREY SEALS ","GREY SEALS_thumb.jpg",130,87,1);thumbnails[3182511]=new thumbnail(3182511,"183547","GREY SEALS MATING","GREY SEALS MATING_thumb.jpg",130,87,1);thumbnails[3182573]=new thumbnail(3182573,"183547","EAGLE OWL","EAGLE OWL_thumb.jpg",130,86,1);thumbnails[3182592]=new thumbnail(3182592,"183547","GREY SEAL PUP","GREY SEAL_thumb.jpg",130,87,1);thumbnails[3699481]=new thumbnail(3699481,"183547","COMMON FROG","_MG_9349_thumb.gif",130,87,1);thumbnails[3699551]=new thumbnail(3699551,"183547","BROWN RAT","_MG_9312_thumb.gif",130,87,1);thumbnails[4195682]=new thumbnail(4195682,"183547","JUVENILE SWALLOW","_MG_0554_thumb.jpg",130,195,1);thumbnails[4850375]=new thumbnail(4850375,"183547","escarboucle WATER LILLY","escarboucle_thumb.gif",130,87,1);thumbnails[3278069]=new thumbnail(3278069,"183547","GREY SQUIRREL IN SNOW","_MG_6621_thumb.gif",130,87,1);thumbnails[3487103]=new thumbnail(3487103,"183547","HIGHLAND CATTLE","_MG_8100-a_thumb.gif",130,172,1);thumbnails[3699579]=new thumbnail(3699579,"183547","LONG TAILED TIT","_MG_9231_thumb.gif",130,178,1);thumbnails[4163155]=new thumbnail(4163155,"183547","GREAT SPOTTED WOODPECKER FEEDING YOUNG","_MG_0158_thumb.jpg",130,87,1);thumbnails[4264466]=new thumbnail(4264466,"183547","ROE DEER IN DRY DRAINAGE DITCH","_MG_0598_thumb.gif",130,159,1);thumbnails[2997647]=new thumbnail(2997647,"183547","WATER LILLY","LILLY-00001_thumb.gif",130,87,1);thumbnails[3486997]=new thumbnail(3486997,"183547","RED DEER STAG","_MG_8375_thumb.gif",130,195,1);thumbnails[3337940]=new thumbnail(3337940,"183547","GREY SQUIRREL IN TREE","_MG_7376_thumb.jpg",130,195,1);thumbnails[2997150]=new thumbnail(2997150,"183547","CHEETAH-","CHEETAH-00002_thumb.gif",130,87,1);thumbnails[2997001]=new thumbnail(2997001,"183547","FARMYARD-DUCKS","FARMYARD-DUCKS-0001-DAVE-UNEY_thumb.gif",130,87,1);thumbnails[3337916]=new thumbnail(3337916,"183547","WHOOPER SWAN","_MG_6950_thumb.gif",130,195,1);thumbnails[2996942]=new thumbnail(2996942,"183547","EUROPEAN-OTTER ON BANK","EUROPEAN-OTTER-0004-DAVE-UNEY_thumb.gif",130,87,1);thumbnails[2995645]=new thumbnail(2995645,"183547","DANCING DOLPHINS","bottle-nose-dolphins--0001-dave-uney_thumb.gif",130,87,1);thumbnails[2988685]=new thumbnail(2988685,"183547","SUPERB-STARLING","SUPERB-STARLING-00002_thumb.gif",130,87,1);thumbnails[3487059]=new thumbnail(3487059,"183547","RED DEER RUTTING","_MG_8484_thumb.gif",130,87,1);thumbnails[2988682]=new thumbnail(2988682,"183547","GREVYS-ZEBRA-","GREVYS-ZEBRA-6_thumb.gif",130,87,1);thumbnails[3487020]=new thumbnail(3487020,"183547","RED DEER STAG AT REST","_MG_8466_thumb.gif",130,87,1);thumbnails[2988671]=new thumbnail(2988671,"183547","TAWNEY-EAGLE","TAWNEY-EAGLE-00005_thumb.gif",130,87,1);thumbnails[3486978]=new thumbnail(3486978,"183547","","_MG_8038_thumb.gif",130,90,1);thumbnails[2988661]=new thumbnail(2988661,"183547","RETICULATED-GIRAFFE","RETICULATED-GIRAFFE-00003_thumb.gif",130,87,1);thumbnails[2988623]=new thumbnail(2988623,"183547","BEE-EATER","BEE-EATER_thumb.gif",130,87,1);thumbnails[3487132]=new thumbnail(3487132,"183547","RED SQUIRREL SCIURUS VULGARIS","_MG_8316_thumb.gif",130,100,1);thumbnails[3422113]=new thumbnail(3422113,"183547","HEN HARRIER","_MG_7657_thumb.jpg",130,87,1);thumbnails[2987889]=new thumbnail(2987889,"183547","FIELD ROSE","_MG_3998_thumb.gif",130,87,1);thumbnails[3337919]=new thumbnail(3337919,"183547","WHOOPER SWAN  ","_MG_6947_thumb.gif",130,87,1);thumbnails[2987884]=new thumbnail(2987884,"183547","KITTIWAKE ATTACKING GANNET","_MG_3862_thumb.gif",130,87,1);thumbnails[2987183]=new thumbnail(2987183,"183547"," GANNET IN FLIGHT","_MG_3863_thumb.gif",130,87,1);thumbnails[3035525]=new thumbnail(3035525,"183547","Grey Squirrel","grey-squirrel_thumb.gif",130,87,1);thumbnails[3035469]=new thumbnail(3035469,"183547","puffin on rocks ","puffin_thumb.gif",130,87,1);thumbnails[3035080]=new thumbnail(3035080,"183547","Sykes monkey","sykes-monkey_thumb.gif",130,87,1);thumbnails[3025056]=new thumbnail(3025056,"183547","HIPP0 YAWNING","HIPPO_thumb.gif",130,87,1);thumbnails[2998270]=new thumbnail(2998270,"183547","RETICULATED-GIRAFFE","RETICULATED-GIRAFFE-00001_thumb.gif",130,195,1);thumbnails[2987833]=new thumbnail(2987833,"183547","SPOONBILL","_MG_2878_thumb.gif",130,195,1);thumbnails[2988021]=new thumbnail(2988021,"183547","NEW FORREST PONIES","_MG_2119_thumb.gif",130,195,1);thumbnails[2988132]=new thumbnail(2988132,"183547","RAZORBILL ON CLIFF","_MG_3820_thumb.gif",130,195,1);thumbnails[2997331]=new thumbnail(2997331,"183547","ARCTIC-TERN","ARCTIC-TERN_thumb.gif",130,195,1);thumbnails[3035071]=new thumbnail(3035071,"183547","Grevy's zebra","GREVYS-ZEBRA_thumb.gif",130,195,1);thumbnails[3035264]=new thumbnail(3035264,"183547","Lioness","lion-1_thumb.gif",130,195,1);thumbnails[2997409]=new thumbnail(2997409,"183548","RABBIT-WITH-MYX","RABBIT-WITH-MYX_thumb.gif",130,87,1);thumbnails[2997380]=new thumbnail(2997380,"183548","HUMBER-BRIDGE","HUMBER-BRIDGE-0001-DAVE-UNEY_thumb.gif",130,87,1);thumbnails[2996991]=new thumbnail(2996991,"183548","SKIDBY-MILL","SKIDBY-MILL-0003-DAVE-UNEY_thumb.gif",130,87,1);thumbnails[2987866]=new thumbnail(2987866,"183548","SPURN LIGHTHOUSE","_MG_3421_thumb.gif",130,195,1);thumbnails[2988265]=new thumbnail(2988265,"183548","SKIPSEA CHURCH ","_MG_3970_thumb.gif",130,82,1);thumbnails[2988235]=new thumbnail(2988235,"183548","BLUEBELLS AT NORTH CLIFFE WOODS","_MG_3940_thumb.gif",130,87,1);thumbnails[2988284]=new thumbnail(2988284,"183548","HOWDEN ABBEY","_MG_3619_thumb.gif",130,195,1);thumbnails[2988043]=new thumbnail(2988043,"183548","SPURN LIGHTHOUSE","_MG_3592_thumb.gif",130,87,1);thumbnails[2996959]=new thumbnail(2996959,"183548","OUT-NEWTON-WIND-GENERATORS","OUT-NEWTON-WIND-GENERATORS-0001-DAVE-UNEY_thumb.gif",130,195,1);thumbnails[2987095]=new thumbnail(2987095,"183548","SUNSET OVER SALTEND","_MG_3608_thumb.gif",130,87,1);thumbnails[3422192]=new thumbnail(3422192,"183548","THE DEEP HULL","_MG_7640_thumb.jpg",130,195,1);thumbnails[3035490]=new thumbnail(3035490,"183548","Walney Island light-house","walney-island-lighthouse_thumb.gif",130,87,1);thumbnails[3422162]=new thumbnail(3422162,"183548","THE DEEP HULL","_MG_7637_thumb.jpg",130,87,1);var galleries=new Object();galleries[203572]=new gallery(203572,"6608148,5600206,5600205,5555183,5555157,5555075,5555040,5555006,4850413,4850290","NEW IMAGES","gallery",[4850286,4850413,4850290,5555006,6608148,5555040,5600205,5555075,5600206,5555157,5555183]);galleries[344842]=new gallery(344842,"6409993,6409890,6409858,6409843,6409834,6409801,6409773,6409598,6409594,6409590","Portraits","gallery",[6168136,6168214,6168217,6168221,6409572,6409576,6409587,6409590,6409594,6409598,6409773,6409801,6409834,6409843,6409858,6409890,6409993]);galleries[344843]=new gallery(344843,"6168931,6168920,6168650,6168644,6168641,6168502,6168157,6168150,6168149,6168144","Wedding Photography","gallery",[6168144,6168149,6168150,6168157,6168502,6168641,6168644,6168650,6168920,6168931,6168138]);galleries[183547]=new gallery(183547,"4195682,3699579,3487132,2987833","NATURE","gallery",[3182431,3182486,3182505,3182511,3182573,3182592,3699481,3699551,4195682,4850375,3278069,3487103,3699579,4163155,4264466,2997647,3486997,3337940,2997150,2997001,3337916,2996942,2995645,2988685,3487059,2988682,3487020,2988671,3486978,2988661,2988623,3487132,3422113,2987889,3337919,2987884,2987183,3035525,3035469,3035080,3025056,2998270,2987833,2988021,2988132,2997331,3035071,3035264]);galleries[183548]=new gallery(183548,"3422162,2987866","Landscapes and Environment","gallery",[2997409,2997380,2996991,2987866,2988265,2988235,2988284,2988043,2996959,2987095,3422192,3035490,3422162]);var imageSets=new Object();imageSets[1]="3025056";imageSets[2]="4195682,3699579,3487132,3422162,2987866,2987833";imageSets[3]="6608148,6409993,6409890,6409858,6409843,6409834,6409801,6409773,6409598,6409594,6409590,6409587,6409576,6409572,6168931,6168920,6168650,6168644,6168641,6168502,6168221,6168217,6168214,6168157,6168150,6168149,6168144,6168138,6168136,5600206,5600205,5555183,5555157,5555075,5555040,5555006,4850413,4850375,4850290,4850286,4264466,4195682,4163155,3699579,3699551,3699481,3487132,3487103,3487059,3487020";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/DAVIDUNEY/images";break}switch(a){case 1:b="http://www1.clikpic.com/DAVIDUNEY/images";break}switch(a){case 2:b="http://admin.clikpic.com/DAVIDUNEY/images";break}switch(a){case 24:b="http://tpc15/clikpic/DAVIDUNEY/images";break}switch(a){case 4:b="http://www.clikchurch.com/DAVIDUNEY/images";break}switch(a){case 5:b="http://www2.clikpic.com/DAVIDUNEY/images";break}switch(a){case 22:b="http://tpc5/clikpic/DAVIDUNEY/images";break}switch(a){case 23:b="http://tpc10/clikpic/DAVIDUNEY/images";break}switch(a){case 25:b="http://tpc16/clikpic/DAVIDUNEY/images";break}switch(a){case 15:b="http://www3.clikpic.com/DAVIDUNEY/images";break}switch(a){case 18:b="http://www4.clikpic.com/DAVIDUNEY/images";break}switch(a){case 19:b="http://www5.clikpic.com/DAVIDUNEY/images";break}switch(a){case 31:b="http://www7.clikpic.com/DAVIDUNEY/images";break}switch(a){case 32:b="http://admin2.clikpic.com/DAVIDUNEY/images";break}switch(a){case 33:b="http://www8.clikpic.com/DAVIDUNEY/images";break}switch(a){case 34:b="http://www9.clikpic.com/DAVIDUNEY/images";break}switch(a){case 35:b="http://admin3.clikpic.com/DAVIDUNEY/images";break}switch(a){case 37:b="http://admin4.clikpic.com/DAVIDUNEY/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="DAVIDUNEYPHOTOGRAPHY: "+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+'")'})}}};