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[5242209]=new thumbnail(5242209,"","Tobacco Flower","23amsL1786_thumb.jpg",130,229,1);thumbnails[6278302]=new thumbnail(6278302,"","","L1006097-2_thumb.jpg",130,87,1);thumbnails[6278303]=new thumbnail(6278303,"","","L1006104-2-2_thumb.jpg",130,98,1);thumbnails[6278305]=new thumbnail(6278305,"","","L1006097-21_thumb.jpg",130,87,1);thumbnails[6278308]=new thumbnail(6278308,"","","L1006105-2_thumb.jpg",130,193,1);thumbnails[6278312]=new thumbnail(6278312,"","","L1006115-2_thumb.jpg",130,87,1);thumbnails[6278314]=new thumbnail(6278314,"","","L1006140-2_thumb.jpg",130,179,1);thumbnails[6278319]=new thumbnail(6278319,"","","L1006144-2_thumb.jpg",130,193,1);thumbnails[6278323]=new thumbnail(6278323,"","","L1006162-2_thumb.jpg",130,90,1);thumbnails[6278325]=new thumbnail(6278325,"","","L1006166-2_thumb.jpg",130,93,1);thumbnails[6278328]=new thumbnail(6278328,"","","L1006186-2_thumb.jpg",130,126,1);thumbnails[6278330]=new thumbnail(6278330,"352836","","L1006195-2_thumb.jpg",130,215,1);thumbnails[6278332]=new thumbnail(6278332,"","","L1006198-3-2_thumb.jpg",130,201,1);thumbnails[6278336]=new thumbnail(6278336,"","","L1006200-2_thumb.jpg",130,87,1);thumbnails[6278338]=new thumbnail(6278338,"","","L1006207-2_thumb.jpg",130,101,1);thumbnails[6278343]=new thumbnail(6278343,"","","L1006226-2_thumb.jpg",130,87,1);thumbnails[6278344]=new thumbnail(6278344,"","","L1006231-2_thumb.jpg",130,200,1);thumbnails[6278345]=new thumbnail(6278345,"","","L1006238-2_thumb.jpg",130,95,1);thumbnails[6278347]=new thumbnail(6278347,"","","L1006239-2_thumb.jpg",130,90,1);thumbnails[6278350]=new thumbnail(6278350,"","","L1006251_thumb.jpg",130,228,1);thumbnails[6278352]=new thumbnail(6278352,"","","L1006269-2_thumb.jpg",130,218,1);thumbnails[6278354]=new thumbnail(6278354,"","","L1006273_thumb.jpg",130,272,1);thumbnails[6278355]=new thumbnail(6278355,"","","L1006310-2_thumb.jpg",130,96,1);thumbnails[6278367]=new thumbnail(6278367,"","","L1006325-2_thumb.jpg",130,97,1);thumbnails[6377343]=new thumbnail(6377343,"352836","","L1006104-2-2_EC6B0D76-24E8-5EC4-4F601304DE202F7F_thumb.jpg",130,98,1);thumbnails[6377350]=new thumbnail(6377350,"352836","","L1006097-2_EC6BB03F-24E8-5EC4-4F3F0BB8E4C103FE_thumb.jpg",130,87,1);thumbnails[6377351]=new thumbnail(6377351,"352836","","L1006105-2_EC6C097B-24E8-5EC4-4F57E40E2D3F2FE9_thumb.jpg",130,193,1);thumbnails[6377352]=new thumbnail(6377352,"352836","","L1006115-2_EC6C65A6-24E8-5EC4-4F2E57F51ECB3319_thumb.jpg",130,87,1);thumbnails[6377355]=new thumbnail(6377355,"352836","","L1006131-2_thumb.jpg",130,86,1);thumbnails[6377356]=new thumbnail(6377356,"352836","","L1006140-2_EC6D2F50-24E8-5EC4-4F1277E239B15BE5_thumb.jpg",130,179,1);thumbnails[6377357]=new thumbnail(6377357,"352836","","L1006144-2_EC6D805E-24E8-5EC4-4F39E52EC8AFAB09_thumb.jpg",130,193,1);thumbnails[6377359]=new thumbnail(6377359,"352836","","L1006162-2_EC6E29FD-24E8-5EC4-4F2B5EDEE74F3118_thumb.jpg",130,90,1);thumbnails[6377360]=new thumbnail(6377360,"352836","","L1006166-2_EC6EB7E5-24E8-5EC4-4F52C7290E2CE981_thumb.jpg",130,93,1);thumbnails[6377385]=new thumbnail(6377385,"352836","","L1006200-2_EC6FB89D-24E8-5EC4-4F63A1C99952BC71_thumb.jpg",130,87,1);thumbnails[6377391]=new thumbnail(6377391,"352836","","L1006207-2_EC702FC2-24E8-5EC4-4FB501E880470A09_thumb.jpg",130,101,1);thumbnails[6377395]=new thumbnail(6377395,"352836","","L1006238-2_EC709D80-24E8-5EC4-4F5E819F07819020_thumb.jpg",130,95,1);thumbnails[6377400]=new thumbnail(6377400,"352836","","L1006239-2_EC711C85-24E8-5EC4-4F827E296A90B579_thumb.jpg",130,90,1);thumbnails[6377405]=new thumbnail(6377405,"352836","","L1006251_EC7179B8-24E8-5EC4-4F22F7867374E74B_thumb.jpg",130,228,1);thumbnails[6377407]=new thumbnail(6377407,"352836","","L1006273_EC71D4BA-24E8-5EC4-4F30993E84826C4C_thumb.jpg",130,272,1);thumbnails[6377411]=new thumbnail(6377411,"352836","","L1006310-2_EC723BD1-24E8-5EC4-4FF5F8FFA73AC9E4_thumb.jpg",130,96,1);thumbnails[6377413]=new thumbnail(6377413,"352836","","L1006325-2_EC728790-24E8-5EC4-4F267B182D1FEEB2_thumb.jpg",130,97,1);thumbnails[4875699]=new thumbnail(4875699,"","Minnis Bay Kent","C23amsL0375_thumb.jpg",130,87,1);thumbnails[6064018]=new thumbnail(6064018,"92832","","25ams5558_thumb.jpg",130,210,1);thumbnails[6064025]=new thumbnail(6064025,"92832","","25ams5569_thumb.jpg",130,193,1);thumbnails[6064042]=new thumbnail(6064042,"92832","red rose on black","25ams5584_thumb.jpg",130,109,1);thumbnails[6064052]=new thumbnail(6064052,"92832","singe red rose on black","25ams5591_thumb.jpg",130,208,1);thumbnails[5726589]=new thumbnail(5726589,"92832","Deep Blue Senetti Flower","24ams4199_thumb.jpg",130,87,1);thumbnails[5726594]=new thumbnail(5726594,"92832","Senetti Flower","24ams4223_thumb.jpg",130,87,1);thumbnails[2437171]=new thumbnail(2437171,"92832","Abstract Art Image of Brodiae Flowers.","C14_2706_thumb.jpg",130,195,1);thumbnails[3035596]=new thumbnail(3035596,"92832"," Acer Tree In Autumn","C18_5004_thumb.jpg",130,195,1);thumbnails[5066987]=new thumbnail(5066987,"92832","Tulip","C19_6984_thumb.jpg",130,195,1);thumbnails[5242194]=new thumbnail(5242194,"92832","","11octMP_thumb.jpg",130,195,1);thumbnails[5242197]=new thumbnail(5242197,"92832","","11octMPa_thumb.jpg",130,195,1);thumbnails[3820882]=new thumbnail(3820882,"92832","Aquilegia Flower","C19_8022_thumb.jpg",130,101,1);thumbnails[5500312]=new thumbnail(5500312,"92832","Pink Tropical Orchid","24ams3422_thumb.jpg",130,87,1);thumbnails[2341706]=new thumbnail(2341706,"92832","Summer Field of Poppies Through a Haze of Buttercups","C14_1725_thumb.jpg",130,87,1);thumbnails[2777115]=new thumbnail(2777115,"92831","Shell","C15_3418_thumb.jpg",130,87,1);thumbnails[2961813]=new thumbnail(2961813,"92831","Acer Leaves in Autumn","C17_4789_thumb.jpg",130,195,1);thumbnails[5242201]=new thumbnail(5242201,"92831","Stones Still Life","22ams_1129T_thumb.jpg",130,87,1);thumbnails[3559337]=new thumbnail(3559337,"92831","Abstract Image of Sea Shells","C18_6791_thumb.jpg",130,195,1);thumbnails[3820871]=new thumbnail(3820871,"92831","Dandelion Seeds in the Breeze","C19_7960_thumb.jpg",130,87,1);thumbnails[3820876]=new thumbnail(3820876,"92831","Dandelion Seed Head","C19_8058_thumb.jpg",130,195,1);thumbnails[5310826]=new thumbnail(5310826,"92831","City Twilight","L1002301_thumb.jpg",130,87,1);thumbnails[2341682]=new thumbnail(2341682,"92831","Abstract Image Representing Land and Sky","C13_1110_thumb.jpg",130,195,1);thumbnails[6064009]=new thumbnail(6064009,"296601","margate","25ams5423_thumb.jpg",130,86,1);thumbnails[5726601]=new thumbnail(5726601,"296601","Oblique Rainbow","L1004164-5-2_thumb.jpg",130,87,1);thumbnails[2776753]=new thumbnail(2776753,"296601","Hot Summer Day at Whitstable Beach","C15_3255_thumb.jpg",130,87,1);thumbnails[2777865]=new thumbnail(2777865,"296601","Dungeness Kent","C14_2268_thumb.jpg",130,195,1);thumbnails[3236013]=new thumbnail(3236013,"296601","The Sea in Winter","C18_5604_thumb.jpg",130,87,1);thumbnails[5242200]=new thumbnail(5242200,"296601","Hot day on the beach","22ams_1004_thumb.jpg",130,87,1);thumbnails[5500469]=new thumbnail(5500469,"296601","Kent 2010","L1003530_thumb.jpg",130,87,1);thumbnails[5500471]=new thumbnail(5500471,"296601","Winter 2010","L1003534_thumb.jpg",130,193,1);thumbnails[4876646]=new thumbnail(4876646,"296601","Ramsgate Harbour","C23amsL0895_thumb.jpg",130,87,1);thumbnails[4875703]=new thumbnail(4875703,"296601","The Pool Margate Beach Kent","C23amsL0639_thumb.jpg",130,87,1);thumbnails[4875706]=new thumbnail(4875706,"296601","Kite Flying Margate Beach Kent","C23amsL0699_thumb.jpg",130,92,1);thumbnails[3198265]=new thumbnail(3198265,"296601","Crundale Downs Kent","C18_5497_thumb.jpg",130,87,1);thumbnails[2776770]=new thumbnail(2776770,"174002","Tomatoes","C16-3778_thumb.jpg",130,195,1);thumbnails[2776773]=new thumbnail(2776773,"174002","Two Broad Beans","C15_2949_thumb.jpg",130,87,1);thumbnails[2777906]=new thumbnail(2777906,"174002","Olives","C14_2737_thumb.jpg",130,87,1);thumbnails[3753450]=new thumbnail(3753450,"174002","Garlic","C19_7856_thumb.jpg",130,87,1);thumbnails[4078269]=new thumbnail(4078269,"174002","Chives","C20_8601ams1_thumb.jpg",130,195,1);thumbnails[4876661]=new thumbnail(4876661,"174002","Beans","C23ams1268_thumb.jpg",130,87,1);thumbnails[5242207]=new thumbnail(5242207,"174002","Red Pepper","23amsL1774_thumb.jpg",130,193,1);thumbnails[4977822]=new thumbnail(4977822,"174002","Red Chillies","C23amsL12261_thumb.jpg",130,193,1);thumbnails[1312117]=new thumbnail(1312117,"296602","Preah Khan Temple, Angkor Wat, Cambodia","4539temple_thumb.jpg",130,87,1);thumbnails[1316310]=new thumbnail(1316310,"296602","Ta Prohm Temple Angkor Wat Cambodia","4482temple_thumb.jpg",130,84,1);thumbnails[1879811]=new thumbnail(1879811,"296602","Bangkok Thailand","CLT_8841_thumb.jpg",130,87,1);thumbnails[1879862]=new thumbnail(1879862,"296602","Young Girl walks Through a Rice Paddy Field, near the Mekong River, Laos","CLT_9090_thumb.jpg",130,87,1);thumbnails[3442460]=new thumbnail(3442460,"296602","Taj Mahal from the Banks of the Yamuna River","C19_5978_thumb.jpg",130,88,1);thumbnails[3442463]=new thumbnail(3442463,"296602","Taj Mahal Agra","CMG_6037_thumb.jpg",130,87,1);thumbnails[3442467]=new thumbnail(3442467,"296602","Yamuna River From the Taj Mahal","CMG_6065_thumb.jpg",130,87,1);thumbnails[3442470]=new thumbnail(3442470,"296602","Taj Mahal","CMG_6083_thumb.jpg",130,87,1);thumbnails[3442472]=new thumbnail(3442472,"296602","Taj Mahal","CMG_6120_thumb.jpg",130,87,1);thumbnails[3442533]=new thumbnail(3442533,"296602","The Backwaters, Kerala","CMG_6692_thumb.jpg",130,87,1);thumbnails[5500341]=new thumbnail(5500341,"296602","Ao Nang Thailand","24ams3482_thumb.jpg",130,87,1);thumbnails[3442529]=new thumbnail(3442529,"296602","Sunset Over the Backwaters, Kerala","CMG_6680_thumb.jpg",130,87,1);thumbnails[5500335]=new thumbnail(5500335,"296602","Ao Nang Thailand","24ams2633_thumb.jpg",130,87,1);var galleries=new Object();galleries[352836]=new gallery(352836,"6377360","Oli & Lu's Wedding","gallery",[6278330,6377343,6377350,6377351,6377352,6377355,6377356,6377357,6377359,6377360,6377385,6377391,6377395,6377400,6377405,6377407,6377411,6377413]);galleries[92832]=new gallery(92832,"5726589","Flora","gallery",[6064018,6064025,6064042,6064052,5726589,5726594,2437171,3035596,5066987,5242194,5242197,3820882,5500312,2341706]);galleries[92831]=new gallery(92831,"5310826","Abstract","gallery",[2777115,2961813,5242201,3559337,3820871,3820876,5310826,2341682]);galleries[296601]=new gallery(296601,"6064009,2776753","Places Home","gallery",[6064009,5726601,2776753,2777865,3236013,5242200,5500469,5500471,4876646,4875703,4875706,3198265]);galleries[174002]=new gallery(174002,"4977822","Fresh","gallery",[2776770,2776773,2777906,3753450,4078269,4876661,5242207,4977822]);galleries[296602]=new gallery(296602,"3442460","Places Away","gallery",[1312117,1316310,1879811,1879862,3442460,3442463,3442467,3442470,3442472,3442533,5500341,3442529,5500335]);var imageSets=new Object();imageSets[1]="6064042";imageSets[2]="6377360,6278325,6064009,5726589,5310826,4977822,3442460,2776753";imageSets[3]="6377413,6377411,6377407,6377405,6377400,6377395,6377391,6377385,6377360,6377359,6377357,6377356,6377355,6377352,6377351,6377350,6377343,6278367,6278355,6278354,6278352,6278350,6278347,6278345,6278344,6278343,6278338,6278336,6278332,6278330,6278328,6278325,6278323,6278319,6278314,6278312,6278308,6278305,6278303,6278302,6064052,6064042,6064025,6064018,6064009,5726594,5726589,5500471,5500469,5500341,5500335,5500312,5242200,5066987,4875706,4875703,4078269,3820882,3442533,3442472,3442470,2777865,2437171,1312117";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/stoxam/images";break}switch(a){case 1:b="http://www1.clikpic.com/stoxam/images";break}switch(a){case 2:b="http://admin.clikpic.com/stoxam/images";break}switch(a){case 24:b="http://tpc15/clikpic/stoxam/images";break}switch(a){case 4:b="http://www.clikchurch.com/stoxam/images";break}switch(a){case 5:b="http://www2.clikpic.com/stoxam/images";break}switch(a){case 22:b="http://tpc5/clikpic/stoxam/images";break}switch(a){case 23:b="http://tpc10/clikpic/stoxam/images";break}switch(a){case 25:b="http://tpc16/clikpic/stoxam/images";break}switch(a){case 15:b="http://www3.clikpic.com/stoxam/images";break}switch(a){case 18:b="http://www4.clikpic.com/stoxam/images";break}switch(a){case 19:b="http://www5.clikpic.com/stoxam/images";break}switch(a){case 31:b="http://www7.clikpic.com/stoxam/images";break}switch(a){case 32:b="http://admin2.clikpic.com/stoxam/images";break}switch(a){case 33:b="http://www8.clikpic.com/stoxam/images";break}switch(a){case 34:b="http://www9.clikpic.com/stoxam/images";break}switch(a){case 35:b="http://admin3.clikpic.com/stoxam/images";break}switch(a){case 37:b="http://admin4.clikpic.com/stoxam/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="ann stevens 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;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> 				&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="annstox@msn.com">';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="annstox@msn.com">';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+'")'})}}};