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[4470226]=new thumbnail(4470226,"140916","","Reepham092006_thumb.jpg",130,130,18);thumbnails[4470228]=new thumbnail(4470228,"140916","","Reepham092017_thumb.jpg",130,130,18);thumbnails[5157644]=new thumbnail(5157644,"140916","","Motorhead-Cambridge-034_thumb.jpg",130,130,18);thumbnails[5157647]=new thumbnail(5157647,"140916","","Motorhead-Cambridge-063_thumb.jpg",130,130,18);thumbnails[5658757]=new thumbnail(5658757,"140916","","HIM-70-200-283_thumb.jpg",130,130,18);thumbnails[2538146]=new thumbnail(2538146,"140916","","Slaves-To-Gravity-254-v2_thumb.jpg",130,130,18);thumbnails[3413114]=new thumbnail(3413114,"140916","","Birkenhead_024_thumb.jpg",130,130,18);thumbnails[3437770]=new thumbnail(3437770,"140916","","Reel-Big-Fish-060_thumb.jpg",130,130,18);thumbnails[3787688]=new thumbnail(3787688,"140916","","Mr-Pink-032-copy-sml_thumb.jpg",130,130,18);thumbnails[4423571]=new thumbnail(4423571,"140916","","Hanzel-Und-Gretyl-258_thumb.jpg",130,130,18);thumbnails[4073436]=new thumbnail(4073436,"140916","","HIM-17-55-015_thumb.jpg",130,130,18);thumbnails[3801965]=new thumbnail(3801965,"140916","","Mr-Pink-055-copy_thumb.jpg",130,130,18);thumbnails[4793038]=new thumbnail(4793038,"140916","","Ian-Anderson-Kings-Lynn-Corn-Exchange-pt2-369_thumb.jpg",130,130,18);thumbnails[3488176]=new thumbnail(3488176,"140916","","Hellfire-Festival-Sat-024-v2_thumb.jpg",130,130,18);thumbnails[3410968]=new thumbnail(3410968,"140916","","Reel-Big-Fish-057_thumb.jpg",130,130,18);thumbnails[2522342]=new thumbnail(2522342,"140916","","Cherry-Poppin-Daddies-Camden-Underworld-370-2-2_thumb.jpg",130,130,18);thumbnails[2538158]=new thumbnail(2538158,"140916","","Slaves-To-Gravity-251_thumb.jpg",130,130,18);thumbnails[1777815]=new thumbnail(1777815,"140916","","Cherry-Poppin-Daddies-Camden-Underworld-378_thumb.jpg",130,130,18);thumbnails[4073440]=new thumbnail(4073440,"140916","","Prong-233-v2_thumb.jpg",130,130,18);thumbnails[2116916]=new thumbnail(2116916,"140916","","Leons-Band-022-EDIT_thumb.jpg",130,130,18);thumbnails[2538166]=new thumbnail(2538166,"140916","","Slaves To Gravity 013_thumb.jpg",130,130,18);thumbnails[3062074]=new thumbnail(3062074,"140916","","DLR 073_thumb.jpg",130,130,18);thumbnails[4010024]=new thumbnail(4010024,"119469","","Owen-garage-013_thumb.jpg",130,130,18);thumbnails[4488951]=new thumbnail(4488951,"119469","","Elietheia-West-Raynham-196_thumb.jpg",130,130,18);thumbnails[5615678]=new thumbnail(5615678,"119469","","Punky-Nuts-021-Edit_thumb.jpg",130,130,18);thumbnails[1777017]=new thumbnail(1777017,"119469","","Tessa-North-Walsham-019_thumb.jpg",130,130,18);thumbnails[1777742]=new thumbnail(1777742,"119469","","Logan--Gabriel-Bowens-026-Edit-2_thumb.jpg",130,130,18);thumbnails[2467370]=new thumbnail(2467370,"119469","","IMG_5352 EDIT_thumb.jpg",130,130,18);thumbnails[1777746]=new thumbnail(1777746,"119469","","rory 053 copy2_thumb.jpg",130,130,18);thumbnails[2217119]=new thumbnail(2217119,"119469","","rory_063_copy_thumb.jpg",130,130,18);thumbnails[3549736]=new thumbnail(3549736,"119469","","Leon_022_copy1_thumb.jpg",130,130,18);thumbnails[1781951]=new thumbnail(1781951,"119469","","self-portrait-025-Edit_thumb.jpg",130,130,18);thumbnails[1816722]=new thumbnail(1816722,"119469","","Macro_Insects_028-Edit_thumb.jpg",130,130,18);thumbnails[1781964]=new thumbnail(1781964,"119469","","036 edit_thumb.jpg",130,130,18);thumbnails[1967467]=new thumbnail(1967467,"119469","","King For A Day_thumb.JPG",130,130,18);thumbnails[3457613]=new thumbnail(3457613,"119469","","Tristan--Castle-Acre-024-Edit_thumb.jpg",130,130,18);thumbnails[2016306]=new thumbnail(2016306,"119469","","Owen Moody_thumb.JPG",130,130,18);thumbnails[2467376]=new thumbnail(2467376,"119469","","010 small_thumb.jpg",130,130,18);thumbnails[1987070]=new thumbnail(1987070,"119469","","Owen's Eye_thumb.JPG",130,130,18);thumbnails[1777825]=new thumbnail(1777825,"119469","","IMG_3765_thumb.JPG",130,130,18);thumbnails[4273797]=new thumbnail(4273797,"233266","","Bernie0019_thumb.JPG",130,130,18);thumbnails[4273859]=new thumbnail(4273859,"233266","","Bernie0074_thumb.JPG",130,130,18);thumbnails[4273865]=new thumbnail(4273865,"233266","","Bernie0047_thumb.JPG",130,130,18);thumbnails[4273871]=new thumbnail(4273871,"233266","","Bernie0087_thumb.JPG",130,130,18);thumbnails[4273875]=new thumbnail(4273875,"233266","","Bernie0005_thumb.JPG",130,130,18);thumbnails[6635262]=new thumbnail(6635262,"233266","","Laura_Bridal_shoot_090-Edit_thumb.jpg",130,130,18);thumbnails[3831734]=new thumbnail(3831734,"233266","Taken as assistant to official wedding photographer. ","Wedding-0811_thumb.jpg",130,130,18);thumbnails[3831739]=new thumbnail(3831739,"233266","Taken as assistant to official wedding photographer. ","Wedding-306_thumb.jpg",130,130,18);thumbnails[3831740]=new thumbnail(3831740,"233266","Taken as assistant to official wedding photographer. ","Wedding-283_thumb.jpg",130,130,18);thumbnails[3831741]=new thumbnail(3831741,"233266","Taken as assistant to official wedding photographer. ","Wedding-079_thumb.jpg",130,130,18);thumbnails[3831746]=new thumbnail(3831746,"233266","Taken as assistant to official wedding photographer. ","Wedding-199_thumb.jpg",130,130,18);thumbnails[3831744]=new thumbnail(3831744,"233266","Taken as assistant to official wedding photographer. ","Wedding-204_thumb.jpg",130,130,18);thumbnails[1776997]=new thumbnail(1776997,"119464","","Eagle Owl EDIT2_thumb.JPG",130,130,18);thumbnails[2443842]=new thumbnail(2443842,"119464","","TawnyOwl_thumb.jpg",130,130,18);thumbnails[1777739]=new thumbnail(1777739,"119464","","LaplandOwl_thumb.JPG",130,130,18);thumbnails[1882387]=new thumbnail(1882387,"119464","","Snow-027_thumb.jpg",130,130,18);thumbnails[3994392]=new thumbnail(3994392,"119464","","coolblue_thumb.jpg",130,130,18);thumbnails[3920758]=new thumbnail(3920758,"119464","","Peacock-013_thumb.jpg",130,130,18);thumbnails[3988884]=new thumbnail(3988884,"119464","","IMG_5426_copy_thumb.jpg",130,130,18);thumbnails[5553950]=new thumbnail(5553950,"119464","","Horses-and-Snow-019_thumb.jpg",130,130,18);thumbnails[1782212]=new thumbnail(1782212,"119464","","Iguana_thumb.JPG",130,130,18);thumbnails[2217115]=new thumbnail(2217115,"119464","","IMG_4597EDIT_thumb.jpg",130,130,18);thumbnails[2217113]=new thumbnail(2217113,"119464","","IMG_4579 EDIT_thumb.jpg",130,130,18);thumbnails[3988881]=new thumbnail(3988881,"119464","","IMG_5455_copy_thumb.jpg",130,130,18);thumbnails[1776509]=new thumbnail(1776509,"119471","","poppy-seedhead_2_thumb.jpg",130,130,18);thumbnails[1782222]=new thumbnail(1782222,"119471","","IMG2436edit_thumb.JPG",130,130,18);thumbnails[1776730]=new thumbnail(1776730,"119471","","Christmas Cactus_thumb.JPG",130,130,18);thumbnails[1781966]=new thumbnail(1781966,"119471","","passion flower_thumb.JPG",130,130,18);thumbnails[1816724]=new thumbnail(1816724,"119471","","lisianthus_thumb.JPG",130,130,18);thumbnails[1882395]=new thumbnail(1882395,"119471","","cactus1_thumb.JPG",130,130,18);thumbnails[1967479]=new thumbnail(1967479,"119471","","in bloom II_thumb.JPG",130,130,18);thumbnails[2177030]=new thumbnail(2177030,"119471","","Gossamer_thumb.jpg",130,130,18);thumbnails[3920769]=new thumbnail(3920769,"119471","","031_EDIT1_thumb.jpg",130,130,18);thumbnails[3423191]=new thumbnail(3423191,"119471","","IMG_5334_thumb.jpg",130,130,18);thumbnails[4401409]=new thumbnail(4401409,"119546","","West-Raynham-010_1_2_tonemapped_thumb.jpg",130,130,18);thumbnails[4950638]=new thumbnail(4950638,"119546","","West-Park-Mental-Asylum-037_8_9_tonemapped_thumb.jpg",130,130,18);thumbnails[3322756]=new thumbnail(3322756,"119546","","040_1_2_thumb.jpg",130,130,18);thumbnails[3993498]=new thumbnail(3993498,"119546","","Swaffham0048_thumb.JPG",130,130,18);thumbnails[1782208]=new thumbnail(1782208,"119546","","Coast00051_thumb.JPG",130,130,18);thumbnails[3982421]=new thumbnail(3982421,"119546","","Burnham_windmill00011_thumb.JPG",130,130,18);thumbnails[3322808]=new thumbnail(3322808,"119546","","Castle-Rising-Town-Night-stuff-035-v2_thumb.jpg",130,130,18);thumbnails[1777816]=new thumbnail(1777816,"119546","","Cambridge-058_59_60_tonemapped_thumb.jpg",130,130,18);thumbnails[1851977]=new thumbnail(1851977,"119546","","West-Park-Mental-Asylum-009_10_11_tonemapped-copy_thumb.jpg",130,130,18);thumbnails[1777818]=new thumbnail(1777818,"119546","","West-Park-Mental-Asylum-027_8_9_tonemapped_thumb.jpg",130,130,37);thumbnails[2012775]=new thumbnail(2012775,"119546","","Ruin_thumb.JPG",130,130,18);thumbnails[1846908]=new thumbnail(1846908,"119546","","West-Park-Mental-Asylum-Corridor_thumb.jpg",130,130,18);thumbnails[2012772]=new thumbnail(2012772,"120890","","Bleak-038-Edit_thumb.jpg",130,130,18);thumbnails[3354295]=new thumbnail(3354295,"120890","","Coastal0080_thumb.JPG",130,130,18);thumbnails[3354297]=new thumbnail(3354297,"120890","","Coastal0041_thumb.JPG",130,130,18);thumbnails[3982405]=new thumbnail(3982405,"120890","","Happisburgh-059_thumb.jpg",130,130,18);thumbnails[3982443]=new thumbnail(3982443,"120890","","Coast0021_thumb.JPG",130,130,18);thumbnails[5554073]=new thumbnail(5554073,"120890","","051_thumb.jpg",130,130,18);thumbnails[1882392]=new thumbnail(1882392,"120890","","Bawsey-Ruin-014_thumb.jpg",130,130,18);thumbnails[2217117]=new thumbnail(2217117,"120890","","Frost Highway_thumb.jpg",130,130,18);thumbnails[2217126]=new thumbnail(2217126,"120890","","Horses-and-Snow-053_thumb.jpg",130,130,18);thumbnails[3749363]=new thumbnail(3749363,"314858","","Elephants-before-after_thumb.jpg",130,69,18);thumbnails[2217120]=new thumbnail(2217120,"314858","","keyhole_thumb.jpg",130,130,18);var galleries=new Object();galleries[140916]=new gallery(140916,"5658757,4793038,3437770","Band Photography","gallery",[4470226,4470228,5157644,5157647,5658757,2538146,3413114,3437770,3787688,4423571,4073436,3801965,4793038,3488176,3410968,2522342,2538158,1777815,4073440,2116916,2538166,3062074]);galleries[119469]=new gallery(119469,"1816722,1777742,1777017","Portraiture","gallery",[4010024,4488951,5615678,1777017,1777742,2467370,1777746,2217119,3549736,1781951,1816722,1781964,1967467,3457613,2016306,2467376,1987070,1777825]);galleries[233266]=new gallery(233266,"6635262,4273865,4273859,3831734","Weddings","gallery",[4273797,4273859,4273865,4273871,4273875,6635262,3831734,3831739,3831740,3831741,3831746,3831744]);galleries[119464]=new gallery(119464,"1776997","Wildlife","gallery",[1776997,2443842,1777739,1882387,3994392,3920758,3988884,5553950,1782212,2217115,2217113,3988881]);galleries[119471]=new gallery(119471,"1776509","Plants and Flowers","gallery",[1776509,1782222,1776730,1781966,1816724,1882395,1967479,2177030,3920769,3423191]);galleries[119546]=new gallery(119546,"3322808,3322756,1777818,1777816","Buildings","gallery",[4401409,4950638,3322756,3993498,1782208,3982421,3322808,1777816,1851977,1777818,2012775,1846908]);galleries[120890]=new gallery(120890,"2217126,2012772","Out and About","gallery",[2012772,3354295,3354297,3982405,3982443,5554073,1882392,2217117,2217126]);galleries[314858]=new gallery(314858,"3749363,2217120","Photoshop","gallery",[3749363,2217120]);var imageSets=new Object();imageSets[1]="6635262,4793038,4423571,4401409,4273859,3982443,3982405,3831734,3801965,3354297,3354295,3322808,3322756,2467370,2443842,2217126,2217113,2177030,2116916,2012775,1967467,1816722,1777818,1777742,1776997,1776509";imageSets[2]="6635262,5658757,4793038,4273865,4273859,3831734,3437770,3322808,3322756,2217126,2012772,1816722,1777818,1777816,1777742,1777017,1776997,1776509";imageSets[3]="1776509";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/CBallard/images";break}switch(a){case 1:b="http://www1.clikpic.com/CBallard/images";break}switch(a){case 2:b="http://admin.clikpic.com/CBallard/images";break}switch(a){case 24:b="http://tpc15/clikpic/CBallard/images";break}switch(a){case 4:b="http://www.clikchurch.com/CBallard/images";break}switch(a){case 5:b="http://www2.clikpic.com/CBallard/images";break}switch(a){case 22:b="http://tpc5/clikpic/CBallard/images";break}switch(a){case 23:b="http://tpc10/clikpic/CBallard/images";break}switch(a){case 25:b="http://tpc16/clikpic/CBallard/images";break}switch(a){case 15:b="http://www3.clikpic.com/CBallard/images";break}switch(a){case 18:b="http://www4.clikpic.com/CBallard/images";break}switch(a){case 19:b="http://www5.clikpic.com/CBallard/images";break}switch(a){case 31:b="http://www7.clikpic.com/CBallard/images";break}switch(a){case 32:b="http://admin2.clikpic.com/CBallard/images";break}switch(a){case 33:b="http://www8.clikpic.com/CBallard/images";break}switch(a){case 34:b="http://www9.clikpic.com/CBallard/images";break}switch(a){case 35:b="http://admin3.clikpic.com/CBallard/images";break}switch(a){case 37:b="http://admin4.clikpic.com/CBallard/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="C Ballard Images: "+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>"}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="che@pachuco.fsnet.co.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="che@pachuco.fsnet.co.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+'")'})}}};