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[6309813]=new thumbnail(6309813,"268009","A lovely window lit natural light bridal portait","Bride-Jo-08-July-2010_thumb.jpg",130,193,15);thumbnails[6100335]=new thumbnail(6100335,"334763","The Lovely Katie Green","Katie-Green-Lingerie-by-Tony-Cashen_thumb.jpg",130,163,15);thumbnails[5933802]=new thumbnail(5933802,"334763","Arty Figure Work","Arty-Nude_thumb.jpg",130,87,15);thumbnails[4646143]=new thumbnail(4646143,"268009","Sunsetd and silouettes","Carl_and_Rene__Sunset_thumb.jpg",130,195,15);thumbnails[4646153]=new thumbnail(4646153,"268009","The Groom","Carl_Wedding_day_thumb.jpg",130,182,15);thumbnails[4646157]=new thumbnail(4646157,"268009","Wedded Bliss","Wedded_Bliss_thumb.jpg",130,182,15);thumbnails[6309823]=new thumbnail(6309823,"268009","A portrait showing the bride and groom with a little help from our friend Photoshop","Carl-and-Ren-Web_thumb.jpg",130,195,15);thumbnails[3751849]=new thumbnail(3751849,"228956",'Mans Best Friend  "Peppa"',"Peppa_Feb_2009_thumb.jpg",130,182,15);thumbnails[5999993]=new thumbnail(5999993,"228956","DJ The Rabbit ","DJ-Rabbit_thumb.jpg",130,130,15);thumbnails[5999998]=new thumbnail(5999998,"228956","The Phantom Channel changer","DJ-and-the-remote_thumb.jpg",130,182,15);thumbnails[6000006]=new thumbnail(6000006,"228956","When you just have to turn to the drink","DJ-and-the-Drink-Problem_thumb.jpg",130,192,15);thumbnails[3752445]=new thumbnail(3752445,"228956","Mr Leopard","Mr_Leopard_thumb.jpg",130,92,15);thumbnails[3752286]=new thumbnail(3752286,"342181","Little Elllie","Little_Elle_thumb.jpg",130,195,15);thumbnails[3751906]=new thumbnail(3751906,"342181","Joel ","Joel_2_years_thumb.jpg",130,113,15);thumbnails[3727446]=new thumbnail(3727446,"228956","Giss a Kiss","Giss_a_kiss_thumb.jpg",130,168,15);thumbnails[4341962]=new thumbnail(4341962,"342181","Ga ga blurb blurb!!","Baby_web_thumb.jpg",130,87,15);thumbnails[4646141]=new thumbnail(4646141,"268009","Wedding day","Carl_and_Ren_Wedding_thumb.jpg",130,182,15);thumbnails[4646144]=new thumbnail(4646144,"268009","Weddings are a piece of Cake","Carl_and_Rene_Cake_thumb.jpg",130,182,15);thumbnails[4646183]=new thumbnail(4646183,"268009","The Rings","Carl_and_Rene_The_rings_thumb.jpg",130,130,15);thumbnails[4646254]=new thumbnail(4646254,"268009","The Bride","The_Bride_thumb.jpg",130,89,15);thumbnails[4646318]=new thumbnail(4646318,"268009","The Bride 2","The_Bride_2_thumb.jpg",130,195,15);thumbnails[4648273]=new thumbnail(4648273,"268009","Here Comes The Girls","Here_come_the_girls_thumb.jpg",130,195,15);thumbnails[4688597]=new thumbnail(4688597,"342181","Mr bouncer and his ball","Baby_and_ball_thumb.jpg",130,195,15);thumbnails[5722151]=new thumbnail(5722151,"342181","Right mum your turn","Mum-and-Baby-girl_thumb.jpg",130,71,15);thumbnails[5808775]=new thumbnail(5808775,"228956","Belle and Rene","Bella_net_thumb.jpg",130,93,15);thumbnails[5837811]=new thumbnail(5837811,"228956","Girls best friend as well","Phoebs-and-Sam-To-web_thumb.jpg",130,163,15);thumbnails[5837886]=new thumbnail(5837886,"342181","Laugh, for you mum anything!","Mum-and-daughter2_thumb.jpg",130,130,15);thumbnails[5899594]=new thumbnail(5899594,"228956","One Proud Dog","Arthur-web_thumb.jpg",130,87,15);thumbnails[5933836]=new thumbnail(5933836,"334763","The bueaty of the human female form","Arty-Nude-2_thumb.jpg",130,182,15);thumbnails[6080573]=new thumbnail(6080573,"341349","The dark spooky wood","Ellie-in-the-Enchanted-wood_thumb.jpg",130,198,15);thumbnails[6080576]=new thumbnail(6080576,"341349","The Enchanted Wood","Night-Creatures_thumb.jpg",130,195,15);thumbnails[6136497]=new thumbnail(6136497,"342181","Baby William Aged 1 year 2 months","William-7-Arty-web_thumb.jpg",130,163,15);thumbnails[6136500]=new thumbnail(6136500,"342181","Baby Wills 2","William-3-Arty-web-2_thumb.jpg",130,104,15);thumbnails[6174286]=new thumbnail(6174286,"222183","Royal Ascott 2010","Ascot-2-a-for-Web_thumb.jpg",130,195,15);thumbnails[6174297]=new thumbnail(6174297,"222183","Looking Lovely","Ascot-4-a-for-web_thumb.jpg",130,195,15);thumbnails[6087784]=new thumbnail(6087784,"222183","Phoebe","Phoebs-Model-Girl_thumb.jpg",130,163,15);thumbnails[5948666]=new thumbnail(5948666,"222183","Family portrait bringing colour and personality to the forefront","me_and_mummy_thumb.jpg",130,163,15);thumbnails[5715306]=new thumbnail(5715306,"222183","Brother and sisterly love","The-Tebbut-Kids-Web_thumb.jpg",130,178,15);thumbnails[3726419]=new thumbnail(3726419,"222183","Amber","Amber-2_BW-Web_thumb.jpg",130,195,15);thumbnails[5711021]=new thumbnail(5711021,"222183","The lovely Champayne Mel ","My-Mel-web_thumb.jpg",130,195,15);thumbnails[5624003]=new thumbnail(5624003,"222183","Sam","Sam_web_thumb.jpg",130,182,15);thumbnails[5628397]=new thumbnail(5628397,"222183","Phoebe ","Phoebe_Portrait_web_thumb.jpg",130,163,15);thumbnails[5678494]=new thumbnail(5678494,"222183","Phoebe ","Little_Phoebs_thumb.jpg",130,130,15);thumbnails[4646385]=new thumbnail(4646385,"222183","Portfolio pictures Cyprus","Ryan_Cyprus_2_thumb.jpg",130,195,15);thumbnails[4111847]=new thumbnail(4111847,"222183","Cow - Boy  - Carl","Carl_Cowboy_5_web_thumb.jpg",130,182,15);thumbnails[4111862]=new thumbnail(4111862,"222183","Fit lad ? Well not bad for forty","Carl_Weights_4_web_thumb.jpg",130,182,15);thumbnails[4112116]=new thumbnail(4112116,"222183","Home James","Limmo_Girls_thumb.jpg",130,195,15);thumbnails[3729673]=new thumbnail(3729673,"222183","So where's the waves?","Surfer_Boy__thumb.jpg",130,92,15);thumbnails[3729693]=new thumbnail(3729693,"222183","Whoops","Now_What_thumb.jpg",130,182,15);thumbnails[3746085]=new thumbnail(3746085,"222183","Looking Cool","Carl_thumb.jpg",130,190,15);thumbnails[3637069]=new thumbnail(3637069,"222183","","Tony_October_Piccy_thumb.jpg",130,198,15);thumbnails[3767050]=new thumbnail(3767050,"222183","Football Star","Football_Star_thumb.jpg",130,111,15);thumbnails[3726879]=new thumbnail(3726879,"222183","Sassy Lady","Sassy_Lady_thumb.jpg",130,182,15);thumbnails[4341959]=new thumbnail(4341959,"222183","","Ellieweb_thumb.jpg",130,195,15);thumbnails[4646372]=new thumbnail(4646372,"222183","Ryan portfolio ","Ryan_Cyprus_thumb.jpg",130,195,15);thumbnails[4646446]=new thumbnail(4646446,"222183","Portrait for Portfolio Cyprus","Ryan_3_thumb.jpg",130,195,15);thumbnails[5624042]=new thumbnail(5624042,"222183","","Jane_thumb.jpg",130,182,15);thumbnails[5631925]=new thumbnail(5631925,"222183","Arty Phoebe","Phoebe_Arty_web_thumb.jpg",130,104,15);thumbnails[5714998]=new thumbnail(5714998,"222183","Family Life","The-Tebbuts-4-web_thumb.jpg",130,160,15);thumbnails[5715295]=new thumbnail(5715295,"222183","Hghkey","Amber-and-Mel-Highkey-Web_thumb.jpg",130,170,15);thumbnails[5722112]=new thumbnail(5722112,"222183","Susan","Susan-Web_thumb.jpg",130,195,15);thumbnails[5837799]=new thumbnail(5837799,"222183","Just wanna have fun","Charly_Greenwood_thumb.jpg",130,163,15);thumbnails[5837815]=new thumbnail(5837815,"222183","What a day","Alfie-at-wedding-web_thumb.jpg",130,173,15);thumbnails[6100422]=new thumbnail(6100422,"222183","A Sudio shot of KAtie Green taken by our senior photographer Tony","Kaite_Green_1_thumb.jpg",130,164,15);thumbnails[6100426]=new thumbnail(6100426,"222183","Another shot of the ever lovely Katie Green taken by Tony in studio","Katie_Green_2_thumb.jpg",130,171,15);thumbnails[3729715]=new thumbnail(3729715,"227618","Lets go","Lets_Go_thumb.jpg",130,195,15);thumbnails[3752422]=new thumbnail(3752422,"227618","Daniel","Daniel_thumb.jpg",130,195,15);thumbnails[3729532]=new thumbnail(3729532,"227618","I prefer the 68 myself","A_Chardonnay_I_believe_thumb.jpg",130,163,15);thumbnails[3729566]=new thumbnail(3729566,"227618","Its just up here dad","Its_just_up_here_dad_thumb.jpg",130,131,15);thumbnails[3729527]=new thumbnail(3729527,"227618","Little Tinker","Little_Tinker_thumb.jpg",130,195,15);thumbnails[5624066]=new thumbnail(5624066,"227594","Montgenevre by Tony Cashen","Montgenevre_thumb.jpg",130,98,15);thumbnails[3767047]=new thumbnail(3767047,"227594","Muddeford Quay","Muddeford_thumb.jpg",130,87,15);thumbnails[3767022]=new thumbnail(3767022,"227594","Waddesden Manor","Waadesden_Web_thumb.jpg",130,195,15);thumbnails[3740284]=new thumbnail(3740284,"227594","Chevy","Chevey_thumb.jpg",130,134,15);thumbnails[3752384]=new thumbnail(3752384,"227594","Poole Harbour","Poole_Harbour_thumb.jpg",130,87,15);thumbnails[3752299]=new thumbnail(3752299,"227594","London's Millenniums Wheel","Millenium_Wheel_thumb.jpg",130,173,15);thumbnails[3752472]=new thumbnail(3752472,"227594","Jamesons Ireland","Jamesons_thumb.jpg",130,98,15);thumbnails[4341974]=new thumbnail(4341974,"222184","Mind the bend","Silverstone_Rally_School_web_thumb.jpg",130,93,15);thumbnails[3766257]=new thumbnail(3766257,"222184","Black Tie Events","Mayball21_thumb.jpg",130,195,15);thumbnails[3915841]=new thumbnail(3915841,"222184","Cheers","Prom_girls_thumb.jpg",130,195,15);thumbnails[3915852]=new thumbnail(3915852,"222184","Another smile please","Prom_Girls_2_thumb.jpg",130,195,15);thumbnails[3915864]=new thumbnail(3915864,"222184","We're off","Prom_Girls_3_thumb.jpg",130,87,15);thumbnails[4341966]=new thumbnail(4341966,"227593","Ah Grasshopper ","Grasshopper_for_web_thumb.jpg",130,93,15);thumbnails[4112305]=new thumbnail(4112305,"227593","Macro Head","Macro_Head_thumb.jpg",130,130,15);thumbnails[3729717]=new thumbnail(3729717,"227593","Dragon Fly","Dragon_Fly_Macro_thumb.jpg",130,94,15);thumbnails[4112675]=new thumbnail(4112675,"227593","To Bee or not to Bee","_MG_5409_thumb.JPG",130,179,15);thumbnails[3729716]=new thumbnail(3729716,"227593","Grey butterfly","Butterfly_thumb.jpg",130,179,15);thumbnails[4112650]=new thumbnail(4112650,"227593","Beezzzzzz","_MG_5402_thumb.JPG",130,179,15);thumbnails[4112660]=new thumbnail(4112660,"227593","An old dragon","Dragon_Fly_Closeup_thumb.jpg",130,95,15);thumbnails[3767058]=new thumbnail(3767058,"227593","Gardens are great","Macro_Head1_thumb.jpg",130,130,15);thumbnails[4112314]=new thumbnail(4112314,"227593","Hairy Flower Power","Macro_Flower_thumb.jpg",130,138,15);thumbnails[4341983]=new thumbnail(4341983,"227593","Whats in a drop of rain? Water I guess!","Leaf_for_Web_thumb.jpg",130,93,15);var galleries=new Object();galleries[334763]=new gallery(334763,"6100335,5933836,5933802","Artistic","gallery",[6100335,5933802,5933836]);galleries[342181]=new gallery(342181,"6136500,6136497,5837886,5722151,4688597,4341962,3752286,3751906","Children and Bumps to babies","gallery",[3752286,3751906,4341962,4688597,5722151,5837886,6136497,6136500]);galleries[228956]=new gallery(228956,"6000006,5999998,5999993,5899594,5837811,5808775,3752445,3751849,3727446","Pet Portraits","gallery",[3751849,5999993,5999998,6000006,3752445,3727446,5808775,5837811,5899594]);galleries[341349]=new gallery(341349,"6080576,6080573","Story Line Photography","gallery",[6080573,6080576]);galleries[268009]=new gallery(268009,"6309823,6309813,4648273,4646318,4646254,4646183,4646157,4646153,4646144,4646143","Weddings","gallery",[6309813,4646143,4646153,4646157,6309823,4646141,4646144,4646183,4646254,4646318,4648273]);galleries[222183]=new gallery(222183,"4111862","Posed Portraits","gallery",[6174286,6174297,6087784,5948666,5715306,3726419,5711021,5624003,5628397,5678494,4646385,4111847,4111862,4112116,3729673,3729693,3746085,3637069,3767050,3726879,4341959,4646372,4646446,5624042,5631925,5714998,5715295,5722112,5837799,5837815,6100422,6100426]);galleries[227618]=new gallery(227618,"3752422,3729715,3729566,3729532,3729527","Natural Portraits","gallery",[3729715,3752422,3729532,3729566,3729527]);galleries[227594]=new gallery(227594,"3740284","General","gallery",[5624066,3767047,3767022,3740284,3752384,3752299,3752472]);galleries[222184]=new gallery(222184,"3915841","Events","gallery",[4341974,3766257,3915841,3915852,3915864]);galleries[227593]=new gallery(227593,"4112675","Macro Work","gallery",[4341966,4112305,3729717,4112675,3729716,4112650,4112660,3767058,4112314,4341983]);var imageSets=new Object();imageSets[1]="3637069";imageSets[2]="4112675,4111862,3915841,3740284";imageSets[3]="6309823,6309813,6174297,6174286,6136500,6136497,6100426,6100422,6100335,6087784,6080576,6080573,6000006,5999998,5999993,5948666,5933836,5933802,5899594,5837886,5837815,5837811,5837799,5808775,5722151,5722112,5715306,5715295,5714998,5711021,5678494,5631925,5628397,5624066,5624042,5624003,4688597,4648273,4646446,4646385,4646372,4646318,4646254,4646183,4646157,4646153,4646144,4646143,4646141,4341983";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/chilmark/images";break}switch(a){case 1:b="http://www1.clikpic.com/chilmark/images";break}switch(a){case 2:b="http://admin.clikpic.com/chilmark/images";break}switch(a){case 24:b="http://tpc15/clikpic/chilmark/images";break}switch(a){case 4:b="http://www.clikchurch.com/chilmark/images";break}switch(a){case 5:b="http://www2.clikpic.com/chilmark/images";break}switch(a){case 22:b="http://tpc5/clikpic/chilmark/images";break}switch(a){case 23:b="http://tpc10/clikpic/chilmark/images";break}switch(a){case 25:b="http://tpc16/clikpic/chilmark/images";break}switch(a){case 15:b="http://www3.clikpic.com/chilmark/images";break}switch(a){case 18:b="http://www4.clikpic.com/chilmark/images";break}switch(a){case 19:b="http://www5.clikpic.com/chilmark/images";break}switch(a){case 31:b="http://www7.clikpic.com/chilmark/images";break}switch(a){case 32:b="http://admin2.clikpic.com/chilmark/images";break}switch(a){case 33:b="http://www8.clikpic.com/chilmark/images";break}switch(a){case 34:b="http://www9.clikpic.com/chilmark/images";break}switch(a){case 35:b="http://admin3.clikpic.com/chilmark/images";break}switch(a){case 37:b="http://admin4.clikpic.com/chilmark/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="A1photographic.com: "+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>Order this print:</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="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="CHILMARK">';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+'")'})}}};