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[3761855]=new thumbnail(3761855,"229511","Houseboat","Barge_River_Thames_thumb.jpg",130,81,15);thumbnails[3768267]=new thumbnail(3768267,"229511","St Georges flag in snow","England_flag_thumb.JPG",130,173,15);thumbnails[3768273]=new thumbnail(3768273,"229511","River Kwai Hotel","RIVER_KWAI_HOTEL1_thumb.JPG",130,98,15);thumbnails[3768363]=new thumbnail(3768363,"241949","Team Work","warm_up_thumb.JPG",130,98,15);thumbnails[3768365]=new thumbnail(3768365,"241949","Divers","LONDON_KIDS_20071_thumb.JPG",130,106,15);thumbnails[3768368]=new thumbnail(3768368,"229853","Fungus","fungus_thumb.JPG",130,98,15);thumbnails[3771385]=new thumbnail(3771385,"230066","Sherlock Holmes Pub","Sherlock_Holmes_pub1_thumb.jpg",130,98,15);thumbnails[3771446]=new thumbnail(3771446,"241949","Vertical Take off","display_thumb.JPG",130,173,15);thumbnails[3771450]=new thumbnail(3771450,"229853","Snow on cars","cars_under_snow_thumb.JPG",130,98,15);thumbnails[3775876]=new thumbnail(3775876,"241949","Inverted Helicoptor","NicksInvertedTrex500-1_thumb.JPG",130,98,15);thumbnails[3876259]=new thumbnail(3876259,"229843","Fallen Telephone box","TELEPHONE_BOX_ON_ITS_SIDE_thumb.jpg",130,173,15);thumbnails[3876272]=new thumbnail(3876272,"229843","Fallen Telephone boxes","TELE_BOX_DOC_thumb.jpg",130,98,15);thumbnails[3876274]=new thumbnail(3876274,"229853","Dandelion Seeds","SEEDS_2_thumb.jpg",130,192,15);thumbnails[3876276]=new thumbnail(3876276,"229853","Dandelion Group","SEEDS_thumb.jpg",130,91,15);thumbnails[3876307]=new thumbnail(3876307,"229853","Cat watching television","HOLLY_BLUE_TIT_2_thumb.jpg",130,202,15);thumbnails[3882710]=new thumbnail(3882710,"229511","Green Grocers","ST_GEORGE_FLAG_ASHFORD_2009_thumb.jpg",130,92,15);thumbnails[3882731]=new thumbnail(3882731,"229853","Daises & Dandelions","5557_thumb.jpg",130,91,15);thumbnails[3882733]=new thumbnail(3882733,"229853","Blossom close","5555_thumb.jpg",130,191,15);thumbnails[3882736]=new thumbnail(3882736,"229853","Blossom","250_thumb.jpg",130,173,15);thumbnails[3883390]=new thumbnail(3883390,"229853","Red Tree","Autumn_colours_staines_surrey_middlesex_2008_2_thumb.jpg",130,182,15);thumbnails[3883511]=new thumbnail(3883511,"229853","Swan Close up","swan_river_thames_staines_surrey_middlesex_2008_thumb.jpg",130,173,15);thumbnails[3890862]=new thumbnail(3890862,"230066","Staines Town Hall","021_thumb.jpg",130,173,15);thumbnails[3890870]=new thumbnail(3890870,"229843","Mask","2008_12_01_0107_thumb.jpg",130,173,15);thumbnails[3890875]=new thumbnail(3890875,"229511","Aquaduct","cut_thumb.jpg",130,98,15);thumbnails[3890879]=new thumbnail(3890879,"230066","Hampton Court","egahm_thumb.jpg",130,112,15);thumbnails[3890885]=new thumbnail(3890885,"229843","Union Jack","union_jack_flying1_thumb.jpg",130,130,15);thumbnails[3900165]=new thumbnail(3900165,"229511","Weeping Willow","WEEPING_TREE_SUNBURY_thumb.jpg",130,98,15);thumbnails[3900184]=new thumbnail(3900184,"229853","Skeleton Tree","tree_thumb.jpg",130,173,15);thumbnails[3900187]=new thumbnail(3900187,"229511","Seats by River","THAMES_SUNBURY_DOC_1_thumb.jpg",130,98,15);thumbnails[3900199]=new thumbnail(3900199,"241949","Raptor","raptor_thumb.jpg",130,98,15);thumbnails[3900202]=new thumbnail(3900202,"229843","Post Box","MAY_2009_LALEHAM_019_thumb.jpg",130,228,15);thumbnails[3900205]=new thumbnail(3900205,"229843","Rusty Hinge","MAY_2009_LALEHAM_018_thumb.jpg",130,177,15);thumbnails[3900219]=new thumbnail(3900219,"229853","Canadian Geese","GEESE_DOC_thumb.jpg",130,98,15);thumbnails[3900225]=new thumbnail(3900225,"229843","Staines Town Gardens","DESIGN_STAINES_DOC_5_thumb.jpg",130,98,15);thumbnails[3900229]=new thumbnail(3900229,"229853","Fallen Tree","CUT_DOWN_TREE_DOC_thumb.jpg",130,98,15);thumbnails[3900234]=new thumbnail(3900234,"230066","Sunbury Church Tower","CHURCH_TOWER_SUNBURY_thumb.jpg",130,173,15);thumbnails[3900242]=new thumbnail(3900242,"229853","Bull Rushes","BULL_RUSHES_DOC_thumb.jpg",130,98,15);thumbnails[3914225]=new thumbnail(3914225,"229853","Charlton Village","charlton_village__thumb.jpg",130,183,15);thumbnails[3914228]=new thumbnail(3914228,"241949","Hovering","flyrap_thumb.jpg",130,80,15);thumbnails[3914232]=new thumbnail(3914232,"229843","Staines statue","pushpull_thumb.jpg",130,146,15);thumbnails[3914237]=new thumbnail(3914237,"229853","Dew on Leaves","MAY_2009_LALEHAM_016_thumb.jpg",130,173,15);thumbnails[3914241]=new thumbnail(3914241,"229843","No Parking","MAY_2009_LALEHAM_055_thumb.jpg",130,97,15);thumbnails[3914244]=new thumbnail(3914244,"229511","River Thames","thames1_thumb.jpg",130,98,15);thumbnails[3929426]=new thumbnail(3929426,"230066","Windsor Castle","WINDSOR_CASTLE_7_thumb.jpg",130,98,15);thumbnails[3945542]=new thumbnail(3945542,"230066","Pepper Pot Hill Watch Tower","PEPPERPOT_HILL_WILTSHIRE_2_thumb.jpg",130,173,15);thumbnails[3945546]=new thumbnail(3945546,"229511","Rape Seed - Wiltshire","RAPE_SEED_OIL_FIELDS_WILTSHIRE_thumb.jpg",130,98,15);thumbnails[4037679]=new thumbnail(4037679,"229853","Mother & Baby","MOTHER_DUCK_DUCKLING_thumb.jpg",130,162,15);thumbnails[4037684]=new thumbnail(4037684,"229843","Water Supply","WATER__SUPPLY_thumb.jpg",130,174,15);thumbnails[4037694]=new thumbnail(4037694,"229853","Borders","IMG_0001_2_thumb.JPG",130,98,15);thumbnails[4037699]=new thumbnail(4037699,"229511","Thames Riverbank","RIVERBANK_6_thumb.jpg",130,98,15);thumbnails[4037702]=new thumbnail(4037702,"230066","St Peters Church, Staines","St_Peters_church_staines_surrey_2008_thumb.jpg",130,173,15);thumbnails[4045737]=new thumbnail(4045737,"229853","New Forest ponies","NEW_FOREST_JUNE_7TH_09____300_thumb.jpg",130,98,15);thumbnails[4045750]=new thumbnail(4045750,"229853","Rainbows End","MOTORWAY_STORM_CLOUDS___300_thumb.jpg",130,98,15);thumbnails[5372379]=new thumbnail(5372379,"229853","Koala","ATT515328_thumb.jpg",130,98,15);thumbnails[5372383]=new thumbnail(5372383,"229853","Koala 1","ATT515332_thumb.jpg",130,87,15);thumbnails[5372384]=new thumbnail(5372384,"229853","Koala 2","ATT515334_thumb.jpg",130,87,15);thumbnails[5372387]=new thumbnail(5372387,"229853","Koala 3","ATT515337_thumb.jpg",130,211,15);thumbnails[5372388]=new thumbnail(5372388,"229853","Koala 4","ATT515338_thumb.jpg",130,98,15);thumbnails[5372400]=new thumbnail(5372400,"229843","Gaslight","Gaslight_thumb.jpg",130,189,15);thumbnails[5372404]=new thumbnail(5372404,"229843","RN Falklands","RN_Falklands_thumb.jpg",130,98,15);thumbnails[3876292]=new thumbnail(3876292,"227754","Bugatti front","LAGONDA_DOC_1_thumb.jpg",130,174,15);thumbnails[3768366]=new thumbnail(3768366,"227755","Floating Market","HAPPY_THAI_TRADER1_thumb.JPG",130,98,15);thumbnails[3771442]=new thumbnail(3771442,"227755","Family","Family_Group_thumb.JPG",130,98,15);thumbnails[3771459]=new thumbnail(3771459,"227755","Busker","busking_thumb.JPG",130,173,15);thumbnails[3771467]=new thumbnail(3771467,"227755","Lovers?","thai_boy__gril_thumb.JPG",130,188,15);thumbnails[3790927]=new thumbnail(3790927,"227755","Chainsaw","Tree_Surgeon_thumb.JPG",130,173,15);thumbnails[3876252]=new thumbnail(3876252,"227755","Texting","TEXTING_thumb.jpg",130,173,15);thumbnails[3883477]=new thumbnail(3883477,"227755","Thai work site","BUILDING_WORKERS_THAILAND_2008____3_thumb.jpg",130,98,15);thumbnails[3883478]=new thumbnail(3883478,"227755","Thai Constrution worker","BUILDING_WORKER_THAILAND_2008_thumb.jpg",130,173,15);thumbnails[3883480]=new thumbnail(3883480,"227755","Thai Construction Worker","BUILDING_WORKERS_THAILAND_2008_thumb.jpg",130,98,15);thumbnails[3883485]=new thumbnail(3883485,"227755","Buddist Monk","HOLY_MAN_THAILAND_2008_thumb.jpg",130,163,15);thumbnails[3883487]=new thumbnail(3883487,"227755","Sqeezebox","IMG_0035_thumb.jpg",130,136,15);thumbnails[3883490]=new thumbnail(3883490,"227755","Mother & Baby","mum__baby_thumb.jpg",130,148,15);thumbnails[3890855]=new thumbnail(3890855,"227755","Stilt Man","006_thumb.jpg",130,173,15);thumbnails[3900209]=new thumbnail(3900209,"227755","Lumberjacks","lumberjacks_thumb.jpg",130,173,15);thumbnails[3900213]=new thumbnail(3900213,"227755","Lumberjack","lumber_thumb.jpg",130,127,15);thumbnails[3945540]=new thumbnail(3945540,"227755","Regular","LOCAL_MAN_SHAFTSBURY_WILTSHIRE_thumb.jpg",130,185,15);thumbnails[3945549]=new thumbnail(3945549,"227755","Whiskers","Whiskers_thumb.jpg",130,173,15);thumbnails[4045704]=new thumbnail(4045704,"227755","Model","_mg_4451asleylouisebigemailoncouch1_thumb.jpg",130,87,15);thumbnails[4045705]=new thumbnail(4045705,"227755","Model1","_mg_4452ashleylouiseonsofabigemail2_thumb.jpg",130,87,15);var galleries=new Object();galleries[229843]=new gallery(229843,"5372404,5372400,4037684,3914241,3914232,3900225,3900205,3900202,3890885,3890870","Misc","gallery",[3876259,3876272,3890870,3890885,3900202,3900205,3900225,3914232,3914241,4037684,5372400,5372404]);galleries[229853]=new gallery(229853,"5372388,5372387,5372384,5372383,5372379,4045750,4045737,4037694,4037679,3914237","Nature","gallery",[3768368,3771450,3876274,3876276,3876307,3882731,3882733,3882736,3883390,3883511,3900184,3900219,3900229,3900242,3914225,3914237,4037679,4037694,4045737,4045750,5372379,5372383,5372384,5372387,5372388]);galleries[230066]=new gallery(230066,"4037702,3945542,3929426,3900234,3890879,3890862,3771385","Places","gallery",[3771385,3890862,3890879,3900234,3929426,3945542,4037702]);galleries[229511]=new gallery(229511,"4037699,3945546,3914244,3900187,3900165,3890875,3882710,3768273,3768267,3761855","Scenic","gallery",[3761855,3768267,3768273,3882710,3890875,3900165,3900187,3914244,3945546,4037699]);galleries[241949]=new gallery(241949,"3914228,3900199,3775876,3771446,3768365,3768363","Sports & Pastimes","gallery",[3768363,3768365,3771446,3775876,3900199,3914228]);galleries[227754]=new gallery(227754,"3876292","News","gallery",[3876292]);galleries[227755]=new gallery(227755,"4045705,4045704,3945549,3945540,3900213,3900209,3890855,3883490,3883487,3883485","People","gallery",[3768366,3771442,3771459,3771467,3790927,3876252,3883477,3883478,3883480,3883485,3883487,3883490,3890855,3900209,3900213,3945540,3945549,4045704,4045705]);var imageSets=new Object();imageSets[1]="5372404,5372400,5372388,5372387,5372384,5372383,5372379,4045750,4045737,4045705,4045704,4037702,4037699,4037694,4037684,4037679,3945549,3945546,3945542,3945540,3929426,3914244,3914241,3914237,3914232,3914228,3914225,3900242,3900234,3900229,3900225,3900219,3900213,3900209,3900205,3900202,3900199,3900187,3900184,3900165,3890885,3890879,3890875,3890870,3890862,3890855,3883511,3883490,3883487,3883485";imageSets[3]="5372404,5372400,5372388,5372387,5372384,5372383,5372379,4045750,4045737,4045705,4045704,4037702,4037699,4037694,4037684,4037679,3945549,3945546,3945542,3945540,3929426,3914244,3914241,3914237,3914232,3914228,3914225,3900242,3900234,3900229,3900225,3900219,3900213,3900209,3900205,3900202,3900199,3900187,3900184,3900165,3890885,3890879,3890875,3890870,3890862,3890855,3883511,3883490,3883487,3883485";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 34:b="http://www9.clikpic.com/romark1/images";break}switch(a){case 1:b="http://www1.clikpic.com/romark1/images";break}switch(a){case 2:b="http://admin.clikpic.com/romark1/images";break}switch(a){case 4:b="http://www.clikchurch.com/romark1/images";break}switch(a){case 5:b="http://www2.clikpic.com/romark1/images";break}switch(a){case 15:b="http://www3.clikpic.com/romark1/images";break}switch(a){case 21:b="http://www6.clikpic.com/romark1/images";break}switch(a){case 18:b="http://www4.clikpic.com/romark1/images";break}switch(a){case 19:b="http://www5.clikpic.com/romark1/images";break}switch(a){case 22:b="http://tpc5/clikpic/romark1/images";break}switch(a){case 23:b="http://tpc10/clikpic/romark1/images";break}switch(a){case 24:b="http://tpc15/clikpic/romark1/images";break}switch(a){case 25:b="http://tpc16/clikpic/romark1/images";break}switch(a){case 31:b="http://www7.clikpic.com/romark1/images";break}switch(a){case 32:b="http://admin2.clikpic.com/romark1/images";break}switch(a){case 33:b="http://www8.clikpic.com/romark1/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="'+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="Romark 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="romarkimages@hotmail.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="romarkimages@hotmail.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+'")'})}}};