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[6113805]=new thumbnail(6113805,"209753","Crooked Mountain, Crooked Sea performing at the Boileroom, Guildford","DSC_1680__Boileroom_6_June_2010___thumb.jpg",129,92,32);thumbnails[6113841]=new thumbnail(6113841,"209753","Crooked Mountain, Crooked Sea performing at the Boileroom, Guildford.","DSC_1660__Boileroom_6_June_2010___copy_thumb.jpg",129,115,32);thumbnails[6113866]=new thumbnail(6113866,"209753","Crooked Mountain, Crooked Sea performing at the Boileroom, Guildford.","DSC_1693__Boileroom_6_June_2010___thumb.jpg",129,160,32);thumbnails[3435772]=new thumbnail(3435772,"260326","Frensham Church, Surrey.","FrenshamChurch_thumb.jpg",130,100,32);thumbnails[3435794]=new thumbnail(3435794,"209753","Caitlin Jenkins, potter, Ewenny Pottery, South Wales","Caitlin5CP206021_thumb.jpg",130,177,32);thumbnails[3435811]=new thumbnail(3435811,"","Broken window, King's Cross, London.","KingsCrossCP19304_thumb.jpg",130,210,32);thumbnails[3435898]=new thumbnail(3435898,"214547","Bronze sculpture: Phoenix by Geoffrey Dashwood. Height 78 cms, edition of 12.","Dashwood_phoenix_CP19682_thumb.jpg",130,218,32);thumbnails[3435907]=new thumbnail(3435907,"209753","Dan Darling and his Lovely Chaps.","_CP23855-02_JEFF_WILLIAMSedited_thumb.jpg",129,95,32);thumbnails[3435920]=new thumbnail(3435920,"209749","Guildhall Yard, London","MoLASGuildhallYard_thumb.jpg",130,162,32);thumbnails[3435947]=new thumbnail(3435947,"209749","Henry VIII gate, Windsor Castle.","MoLASReview2003henry8thgateedited_thumb.jpg",130,194,32);thumbnails[3437378]=new thumbnail(3437378,"209753","Louise Mizen, artist.","LouiseMizenDSC0026-01_thumb.jpg",130,157,32);thumbnails[3437428]=new thumbnail(3437428,"","Croft Photography: Some examles of commissioned published work. © Croft Photography","Publishedworkpicture_thumb.jpg",130,196,32);thumbnails[3437493]=new thumbnail(3437493,"260326","Misty winter morning, Frensham Great Pond, Surrey.","Misty winter day 9 frame 3_thumb.jpg",130,198,32);thumbnails[3437936]=new thumbnail(3437936,"209749","Weald and Downland Open Air Museum, Singleton, Sussex. © Croft Photography.","wealddownland_2_CP18599_thumb.jpg",130,86,32);thumbnails[3437956]=new thumbnail(3437956,"209749","Weald and Downland Open Air Museum, Sussex. © Croft Photography","weald&downland2CP18599_thumb.jpg",130,86,32);thumbnails[3438123]=new thumbnail(3438123,"260326","Andy & Charlie on the Bluebell Railway","andy&charlieCP24391_thumb.jpg",130,182,32);thumbnails[3438125]=new thumbnail(3438125,"209753","Steve Million, Chicago jazz pianist.","SteveMillionCP21553_thumb.jpg",130,143,32);thumbnails[3438139]=new thumbnail(3438139,"209753","Chicago jazz session.","Andy&Steve2CP21538_thumb.jpg",130,93,32);thumbnails[3508010]=new thumbnail(3508010,"260322","Katy & Michael's wedding.","kate&michaelCPH3558 copy_thumb.jpg",130,123,32);thumbnails[3508094]=new thumbnail(3508094,"260326","Grandfather and grandsons against an evening sky.","1984 spring plateau 2_thumb.jpg",130,139,32);thumbnails[3508105]=new thumbnail(3508105,"214547","Bobble Fruit, ceramic sculptures by Katherine Morling. © Katherine Morling.","KatherineMorling2CPH2378_bobble_thumb.jpg",130,124,32);thumbnails[3508817]=new thumbnail(3508817,"214547","BarCelona Painting 1 by Susan Czopor. Oil on Canvas. © Susan Czopor.","Bar Celona Painting 1_CPH3719-02 copy_thumb.jpg",130,96,32);thumbnails[3512148]=new thumbnail(3512148,"214547","Boxed Lovers 5, by Susan Czopor. Ceramic planter, height 33 cms. © Susan Czopor.","Boxed Lovers 5a height 33 cms 2004_thumb.jpg",130,122,32);thumbnails[3512214]=new thumbnail(3512214,"260322","Katy and Michael's wedding.","Katy_CPH3347_thumb.jpg",130,86,32);thumbnails[3512249]=new thumbnail(3512249,"209753","Killa Kela, beatbox artist.","Killa_CPH1526_thumb.jpg",130,119,32);thumbnails[3517028]=new thumbnail(3517028,"209749","18th century gasworks, east London.  © Museum of London Archaeology. Used with permission.","MoLAS ar 2003 gasworks 28202021_thumb.jpg",130,186,32);thumbnails[3576943]=new thumbnail(3576943,"209753","Mark Banning, World War 1 Battlefield Tour Guide.","Mark_B_CP25014_thumb.jpg",130,106,32);thumbnails[3599511]=new thumbnail(3599511,"260326","Trollstigen, Norway.","trollstigen_CP25228_thumb.jpg",130,133,32);thumbnails[3599520]=new thumbnail(3599520,"","Rochester Cathedral, Kent","rochester_CP25151_thumb.jpg",130,167,32);thumbnails[3599529]=new thumbnail(3599529,"260326","Midsummer midnight on the Trondheim Fjord, Norway","midnight__CP25178_thumb.jpg",130,132,32);thumbnails[3599543]=new thumbnail(3599543,"209749","The gold buckle from the Sutton Hoo treasure","sutton_hoo_CP25144-021_thumb.jpg",130,67,32);thumbnails[3599564]=new thumbnail(3599564,"209749","Head of a Queen Mother. ","queenmother_CP25146_thumb.jpg",130,224,32);thumbnails[3599618]=new thumbnail(3599618,"209749","Three bellarmine jug heads. Copyright MOLA. Used with permission.","Bellamines_CP25135_thumb.jpg",130,90,32);thumbnails[3599638]=new thumbnail(3599638,"209749","Roman intaglio from a finger-ring found during excavations at Canon Street Station, London.","intaglio__CP251431_thumb.jpg",130,152,32);thumbnails[3599685]=new thumbnail(3599685,"209749","Human skulls from excavations in London","skulls1_CP25138_thumb.jpg",130,90,32);thumbnails[3599690]=new thumbnail(3599690,"260326","Romsdalen, Norway. Evening sunlight.","romsdalen_CP25165_thumb.jpg",130,132,32);thumbnails[3599697]=new thumbnail(3599697,"209749","Excavations in progress at Erkebispegaarden (The archbishop's palace), Trondheim, Norway.","erkebispegaarden1_CP25154_thumb.jpg",130,129,32);thumbnails[3599794]=new thumbnail(3599794,"260326","Fjord near Bergen, Norway","fjord3CP25163_thumb.jpg",130,113,32);thumbnails[3599824]=new thumbnail(3599824,"260326","Norwegian fjordland.","fjordCP25158_thumb.jpg",130,130,32);thumbnails[3599830]=new thumbnail(3599830,"260326","Traditional haymaking at Aastfjorden, Norway.","haymaking_CP25247_thumb.jpg",130,114,32);thumbnails[3599845]=new thumbnail(3599845,"260326","A field in Kent","kentfield_CP25162_thumb.jpg",130,129,32);thumbnails[3600017]=new thumbnail(3600017,"260326","Vaagen, Bergen, Norway.","vaagen_CP25238_thumb.jpg",130,130,32);thumbnails[3600072]=new thumbnail(3600072,"260326","Stave church at Vik, Sognfjord, Norway.","stave_CP25205_thumb.jpg",130,133,32);thumbnails[3600080]=new thumbnail(3600080,"209749","Standing stones near Millstreet, Co. Cork, Ireland.","stela_CP25196_thumb.jpg",130,132,32);thumbnails[3600085]=new thumbnail(3600085,"260326","Isterdalen glacier, Norway.","glacier_CP25219_thumb.jpg",130,106,32);thumbnails[3600089]=new thumbnail(3600089,"260326","Bergen Cathedral, Norway.","bergen_CP25235_thumb.jpg",130,130,32);thumbnails[3637642]=new thumbnail(3637642,"209749","Mette-Sophie Gad, Mme. Gaugin, 1877, by Paul Gaugin. White marble.","Mette_CP25145_thumb.jpg",129,194,32);thumbnails[3637785]=new thumbnail(3637785,"214547",'"Arche Ossulaire", by Nicola Godden BA ARBS',"Nicola_Godden_DSC0015_arche_osssulaire_thumb.jpg",129,197,32);thumbnails[3637801]=new thumbnail(3637801,"214547",'"The Couple", by Nicola Godden BA ARBS.  ',"NicolaGodden_The_Couple_DSC0054_copy_thumb.jpg",129,331,32);thumbnails[3637824]=new thumbnail(3637824,"209749","Lord Lee of Fareham, by Benno Elkan.","Lord_Lee_CP25136_thumb.jpg",130,163,32);thumbnails[3643635]=new thumbnail(3643635,"214547","Mimi: Daredevil Queen of the Slack Rope, by Roxana Halls. 2005, Oil on Linen, 72 x 60 inches.<br>\r\n","_CPH4933roxana_21_thumb.jpg",129,160,32);thumbnails[3652488]=new thumbnail(3652488,"214547","House Sparrow, bronze sculpture by Geoffrey Dashwood. Height 16 cms, edition of 15.","_CP196331_thumb.jpg",129,160,32);thumbnails[3715984]=new thumbnail(3715984,"209749","Pottery from the Surrey- Hampshire border.","_CP25127border_wares_thumb.jpg",130,163,32);thumbnails[3758643]=new thumbnail(3758643,"209749","A Venetian glass tumbler excavated by Museum of London Archaeology.","venice_glass_CP25131_thumb.jpg",130,166,32);thumbnails[3817007]=new thumbnail(3817007,"214547",'"Ayesha", bronze sculpture by Nicola Godden. BA. ARBS. 122 cm tall (twice life size)',"_CP18641_nicola_godden__Ayesha1_thumb.jpg",130,196,32);thumbnails[3817024]=new thumbnail(3817024,"214547",'"Ayesha", bronze sculpture by Nicola Godden. BA. ARBS. 122 cms tall (twice life size).',"_CP18655_nicola_godden_Ayesha_thumb.jpg",130,272,32);thumbnails[3817032]=new thumbnail(3817032,"214547",'"La Famille", bronze sculpture by Nicola Godden, BA. ARBS. 28 cms tall, edition of 9.',"_CP18703_nicola_godden_La_Famille_thumb.jpg",129,185,32);thumbnails[4460070]=new thumbnail(4460070,"",'The band "Frayednot" at the Astolat, Guildford.',"Frayed_Not_CP26657_3_thumb.jpg",129,93,32);thumbnails[4461042]=new thumbnail(4461042,"209753","The Pluck & Squeeze Twmpath (Welsh folkdance) Band at Atlantic College, South Wales. This band appeared at Gavin & Stacey's wedding in the BBC TV series.","Atlantic_College__CP27068_9th_July_2009_thumb.jpg",130,106,32);thumbnails[4727493]=new thumbnail(4727493,"260326","Near Frensham Little Pond, Surrey.","frensham_trees_thumb.jpg",130,82,32);thumbnails[5062904]=new thumbnail(5062904,"260322","Carey and David","Carey__David__CP293151_thumb.jpg",129,182,32);thumbnails[5062915]=new thumbnail(5062915,"260322","Carey and David's Wedding","Carey__David__CP29445_thumb.jpg",129,108,32);thumbnails[5062943]=new thumbnail(5062943,"260322","Carey and David's Wedding: the Pastor and the Bridesmaids.","Carey__David_CP28985_thumb.jpg",129,108,32);thumbnails[5062955]=new thumbnail(5062955,"260322","Carey and David.","Carey__David__CP29088_thumb.jpg",129,98,32);thumbnails[5063052]=new thumbnail(5063052,"209753",'Jeff Williams\' "Jazz not Jazz"',"_CP23980_jeff_williams1_thumb.jpg",129,86,32);thumbnails[5063070]=new thumbnail(5063070,"209753",'Jeff Williams "Jazz not Jazz".',"_CP23956_jeff_williams1_thumb.jpg",129,86,32);thumbnails[5063408]=new thumbnail(5063408,"209753",'Jeff Williams\' "Jazz not Jazz"',"jeffwilliams_CP24102_PINK1_thumb.jpg",129,214,32);thumbnails[5232765]=new thumbnail(5232765,"","","MITRA_CP27980_thumb.jpg",129,71,32);thumbnails[5232772]=new thumbnail(5232772,"260322","Mitra and Tim's Wedding (with Sarah and Mark)","MITRA_CP279801_thumb.jpg",129,71,32);thumbnails[5232773]=new thumbnail(5232773,"260322","Mitra and Tim's Wedding (with Sarah and Mark)","mitra__CP27920-2_thumb.jpg",129,101,32);thumbnails[5232778]=new thumbnail(5232778,"260322","Mitra with her parents","Mitra_CP27887_thumb.jpg",129,80,32);thumbnails[5232782]=new thumbnail(5232782,"260322","Mitra","Mitra_CP27839_1_thumb.jpg",129,228,32);thumbnails[5232783]=new thumbnail(5232783,"260322","Mitra","MITRA_CP27808_thumb.jpg",129,114,32);thumbnails[6123872]=new thumbnail(6123872,"209753","Melissa, of the band Frayednot.","_CP26691FrayedNot___thumb.jpg",129,155,32);thumbnails[6123876]=new thumbnail(6123876,"209753","Frayednot","_CP26831FrayedNot1___thumb.jpg",129,188,32);thumbnails[6677429]=new thumbnail(6677429,"209749","Historic Building Documentation","_DSC2057_QNM10__PCA_Ltd_2010__thumb.jpg",129,86,32);thumbnails[3435769]=new thumbnail(3435769,"260322","Krissy & Andy's wedding.","Andy wedding1_thumb.jpg",129,89,32);thumbnails[3435832]=new thumbnail(3435832,"214547","Zebra Crossing, ceramic sculpture by Katherine Morling.","Katherine_Morling1CPH2365_zebra_thumb.jpg",129,148,32);thumbnails[3435813]=new thumbnail(3435813,"209753","Killa Kela, beatbox artist.","Killer4CPH1438 copy_thumb.jpg",130,86,32);thumbnails[3435744]=new thumbnail(3435744,"260326","Monknash, Glamorgan.","Monknash1CP20628_thumb.jpg",130,195,32);var galleries=new Object();galleries[214547]=new gallery(214547,"3817032,3817024,3817007,3652488,3643635,3637801,3637785,3512148,3508817,3508105","Artists' Documentation","gallery",[3435898,3508105,3508817,3512148,3637785,3637801,3643635,3652488,3817007,3817024,3817032,3435832]);galleries[209749]=new gallery(209749,"6677429,3758643,3715984,3637824,3637642,3600080,3599697,3599685,3599638,3599618","Museums and Archaeology","gallery",[3435920,3435947,3437936,3437956,3517028,3599543,3599564,3599618,3599638,3599685,3599697,3600080,3637642,3637824,3715984,3758643,6677429]);galleries[260326]=new gallery(260326,"4727493,3600089,3600085,3600072,3600017,3599845,3599830,3599824,3599794,3599690","Personal Work","gallery",[3435772,3437493,3438123,3508094,3599511,3599529,3599690,3599794,3599824,3599830,3599845,3600017,3600072,3600085,3600089,4727493,3435744]);galleries[209753]=new gallery(209753,"6123876,6123872,6113866,6113841,6113805,5063408,5063070,5063052,4461042,3576943","PR & Publicity Photography","gallery",[6113805,6113841,6113866,3435794,3435907,3437378,3438125,3438139,3512249,3576943,4461042,5063052,5063070,5063408,6123872,6123876,3435813]);galleries[260322]=new gallery(260322,"5232783,5232782,5232778,5232773,5232772,5062955,5062943,5062915,5062904,3512214","Weddings","gallery",[3508010,3512214,5062904,5062915,5062943,5062955,5232772,5232773,5232778,5232782,5232783,3435769]);var imageSets=new Object();imageSets[1]="3437428";imageSets[3]="6677429,6123876,6123872,6113866,6113841,6113805,5232783,5232782,5232778,5232773,5232772,5232765,5063408,5063070,5063052,5062955,5062943,5062915,5062904,4727493,4461042,4460070,3817032,3817024,3817007,3758643,3715984,3652488,3643635,3637824,3637801,3637785,3637642,3600089,3600085,3600080,3600072,3600017,3599845,3599830,3599824,3599794,3599697,3599690,3599685,3599638,3599618,3599564,3599543,3599529";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/croftphotography/images";break}switch(a){case 1:b="http://www1.clikpic.com/croftphotography/images";break}switch(a){case 2:b="http://admin.clikpic.com/croftphotography/images";break}switch(a){case 24:b="http://tpc15/clikpic/croftphotography/images";break}switch(a){case 4:b="http://www.clikchurch.com/croftphotography/images";break}switch(a){case 5:b="http://www2.clikpic.com/croftphotography/images";break}switch(a){case 22:b="http://tpc5/clikpic/croftphotography/images";break}switch(a){case 23:b="http://tpc10/clikpic/croftphotography/images";break}switch(a){case 25:b="http://tpc16/clikpic/croftphotography/images";break}switch(a){case 15:b="http://www3.clikpic.com/croftphotography/images";break}switch(a){case 18:b="http://www4.clikpic.com/croftphotography/images";break}switch(a){case 19:b="http://www5.clikpic.com/croftphotography/images";break}switch(a){case 31:b="http://www7.clikpic.com/croftphotography/images";break}switch(a){case 32:b="http://admin2.clikpic.com/croftphotography/images";break}switch(a){case 33:b="http://www8.clikpic.com/croftphotography/images";break}switch(a){case 34:b="http://www9.clikpic.com/croftphotography/images";break}switch(a){case 35:b="http://admin3.clikpic.com/croftphotography/images";break}switch(a){case 37:b="http://admin4.clikpic.com/croftphotography/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="Professional 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>"}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<129){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+'")'})}}};