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[1612612]=new thumbnail(1612612,"","","hepsibah4_thumb.jpg",130,87,1);thumbnails[1612643]=new thumbnail(1612643,"","Fovea Gallery","fovea1.jpg",130,42,1);thumbnails[1612709]=new thumbnail(1612709,"","Harrow Contemporary at London Gallery West","londongallerywest_thumb.jpg",130,90,1);thumbnails[1612710]=new thumbnail(1612710,"","","stalbans_thumb.jpg",130,185,1);thumbnails[1613591]=new thumbnail(1613591,"","","mypicture_thumb.jpg",130,164,1);thumbnails[2193405]=new thumbnail(2193405,"273870","A Time to Dance I","atimetodancei_thumb.jpg",130,181,1);thumbnails[2193408]=new thumbnail(2193408,"273870","A Time to Dance II","atimetodanceii_thumb.jpg",130,189,1);thumbnails[2193411]=new thumbnail(2193411,"273870","A Time to Dance III","atimetodanceiii_thumb.jpg",130,179,1);thumbnails[2197686]=new thumbnail(2197686,"273870","Mautoki","mau_thumb.jpg",130,167,1);thumbnails[2746630]=new thumbnail(2746630,"","Falling Flowers in Mary Penley Exhibition ","audione_thumb.jpg",130,195,1);thumbnails[2746669]=new thumbnail(2746669,"","Hide and Seek ","auditwo_thumb.jpg",130,87,1);thumbnails[3408887]=new thumbnail(3408887,"","just arrived!","artistsinchina_thumb.jpg",130,98,1);thumbnails[3408909]=new thumbnail(3408909,"","my Hakka house","myhouse_thumb.jpg",130,173,1);thumbnails[3408915]=new thumbnail(3408915,"","with Chen Yuping and Shan Dan","nightontown_thumb.jpg",130,98,1);thumbnails[3427526]=new thumbnail(3427526,"","","chen&kiki_thumb.jpg",130,98,1);thumbnails[3427534]=new thumbnail(3427534,"","Liu Hong Liang proudly displays a print","Liuhongliang_thumb.jpg",130,98,1);thumbnails[3486553]=new thumbnail(3486553,"","Liege show","liegeone_thumb.jpg",130,98,1);thumbnails[3486554]=new thumbnail(3486554,"","Liege show by night","liegetwo_thumb.jpg",130,98,1);thumbnails[3486557]=new thumbnail(3486557,"","Liege by day","liegethree_thumb.jpg",130,173,1);thumbnails[3810365]=new thumbnail(3810365,"","lesoir","lesoirvictoire_thumb.jpg",130,180,1);thumbnails[4844379]=new thumbnail(4844379,"","","krakowweb_thumb.jpg",130,87,1);thumbnails[4844382]=new thumbnail(4844382,"","","krakowtwoweb_thumb.jpg",130,172,1);thumbnails[4933291]=new thumbnail(4933291,"","","krakow1_thumb.jpg",130,85,1);thumbnails[4933292]=new thumbnail(4933292,"","","krakow2_thumb.jpg",130,87,1);thumbnails[4933293]=new thumbnail(4933293,"","","krakow3_thumb.jpg",130,185,1);thumbnails[5282858]=new thumbnail(5282858,"","","hepweb5_thumb.jpg",130,195,1);thumbnails[5282859]=new thumbnail(5282859,"","","hepweb3_thumb.jpg",130,195,1);thumbnails[5282889]=new thumbnail(5282889,"","","hepweb4_thumb.jpg",130,85,1);thumbnails[5282890]=new thumbnail(5282890,"","","hepweb2_thumb.jpg",130,195,1);thumbnails[5282891]=new thumbnail(5282891,"","","hepweb1_thumb.jpg",130,195,1);thumbnails[1612631]=new thumbnail(1612631,"","Under One Sky","underonesky9_thumb.jpg",130,87,1);thumbnails[2193396]=new thumbnail(2193396,"273870","White Heat","whiteheat_thumb.jpg",130,183,1);thumbnails[1621917]=new thumbnail(1621917,"273870","Shift","shift_thumb.jpg",130,203,1);thumbnails[3787813]=new thumbnail(3787813,"230925","Dolce","Dolce_thumb.jpg",130,187,1);thumbnails[3787862]=new thumbnail(3787862,"230925","Con Fuoco","confuocoweb_thumb.jpg",130,183,1);thumbnails[4144948]=new thumbnail(4144948,"230925","Vivace","Vivaceweb_thumb.jpg",130,183,1);thumbnails[4789310]=new thumbnail(4789310,"230925","Apaise","Apaiseweb_thumb.jpg",130,183,1);thumbnails[4968238]=new thumbnail(4968238,"230925","Eclatante","eclatanteweb_thumb.jpg",130,139,1);thumbnails[4968254]=new thumbnail(4968254,"230925","Volante","volanteweb_thumb.jpg",130,132,1);thumbnails[4968261]=new thumbnail(4968261,"230925","Giocoso","giocoscoweb_thumb.jpg",130,142,1);thumbnails[4968267]=new thumbnail(4968267,"230925","Arioso","ariosoweb_thumb.jpg",130,146,1);thumbnails[1585405]=new thumbnail(1585405,"108403","A Time to Hate","atimetohate_thumb.jpg",130,176,1);thumbnails[1585407]=new thumbnail(1585407,"108403","A Time to Laugh","atimetolaugh_thumb.jpg",130,176,1);thumbnails[1585410]=new thumbnail(1585410,"108403","A Time to Love","atimetolove_thumb.jpg",130,173,1);thumbnails[1585427]=new thumbnail(1585427,"108403","A TIme to Weep","atimetoweep_thumb.jpg",130,177,1);thumbnails[5554952]=new thumbnail(5554952,"108403","A Time to Mend","atimetomendweb_thumb.jpg",130,139,1);thumbnails[5554959]=new thumbnail(5554959,"108403","A Time to Measure","atimetomeasureweb_thumb.jpg",130,139,1);thumbnails[5865443]=new thumbnail(5865443,"108403","A Time Beyond","timebeyond_thumb.jpg",130,139,1);thumbnails[3125758]=new thumbnail(3125758,"108788","Flight of Fancy","flightfancy1_thumb.jpg",130,194,1);thumbnails[3427343]=new thumbnail(3427343,"108788","Distant Song","distantsongweb_thumb.jpg",130,193,1);thumbnails[4484246]=new thumbnail(4484246,"108788","Sweet Song","sweetsongweb_thumb.jpg",130,191,1);thumbnails[1591921]=new thumbnail(1591921,"108788","Torn","torn_thumb.jpg",130,195,1);thumbnails[1591899]=new thumbnail(1591899,"108788","Rise","riseweb_thumb.jpg",130,198,1);thumbnails[1591794]=new thumbnail(1591794,"108788","Falling Flowers","fallingflowers_thumb.jpg",130,155,1);thumbnails[1591797]=new thumbnail(1591797,"108788","Falling Leaves","fallingleaves_thumb.jpg",130,177,1);thumbnails[1591800]=new thumbnail(1591800,"108788","Golden Bower","goldenbower_thumb.jpg",130,172,1);thumbnails[3427319]=new thumbnail(3427319,"209512","Conversation Piece No 1","conversationpiece1web_thumb.jpg",130,150,1);thumbnails[3427323]=new thumbnail(3427323,"209512","Conversation Piece No 2","conversationpiece2web_thumb.jpg",130,149,1);thumbnails[3427327]=new thumbnail(3427327,"209512","Conversation Piece No 3","conversationpiece3web_thumb.jpg",130,150,1);thumbnails[1591924]=new thumbnail(1591924,"108401","Where?","wherexsix_thumb.jpg",130,190,1);thumbnails[1585369]=new thumbnail(1585369,"108401","Angel","angel_thumb.jpg",130,109,1);thumbnails[1829139]=new thumbnail(1829139,"108401","True Colours","truecoloursforweb_thumb.jpg",130,135,1);thumbnails[1829228]=new thumbnail(1829228,"108401","Orange","orangeforweb_thumb.jpg",130,132,1);thumbnails[1829229]=new thumbnail(1829229,"108401","Green","greenforweb_thumb.jpg",130,132,1);thumbnails[1829232]=new thumbnail(1829232,"108401","Orange Variations","orangevariationsforweb4_thumb.jpg",130,51,1);thumbnails[1829235]=new thumbnail(1829235,"108401","Going Green","goinggreenforweb_thumb.jpg",130,51,1);thumbnails[1591803]=new thumbnail(1591803,"108405","Hide and Seek 1","Hide-and-Seekone_thumb.jpg",130,185,1);thumbnails[1592307]=new thumbnail(1592307,"108405","Hide and Seek 2","Hide-and-Seektwo_thumb.jpg",130,185,1);thumbnails[1592348]=new thumbnail(1592348,"108405","Caught","caughtup_thumb.jpg",130,181,1);thumbnails[1591910]=new thumbnail(1591910,"108405","Shine","shineup_thumb.jpg",130,188,1);thumbnails[1591894]=new thumbnail(1591894,"108405","Raw","raw_thumb.jpg",130,188,1);thumbnails[1585447]=new thumbnail(1585447,"108405","BLow","blow_thumb.jpg",130,184,1);thumbnails[1591884]=new thumbnail(1591884,"108793","Play Acting","playacting1.jpg",130,96,1);thumbnails[1591912]=new thumbnail(1591912,"108793","Sideways","Sideways1.jpg",130,96,1);thumbnails[1591914]=new thumbnail(1591914,"108793","Tell Me<br>\r\n","tellme1.jpg",130,98,1);thumbnails[1591915]=new thumbnail(1591915,"273885","Text","text_thumb.jpg",130,56,1);thumbnails[1591771]=new thumbnail(1591771,"108786","Close","closeupgreen_thumb.jpg",130,184,1);thumbnails[1591897]=new thumbnail(1591897,"108786","Redeemed","Redeemedforweb_thumb.jpg",130,183,1);thumbnails[1591798]=new thumbnail(1591798,"108786","Fresco","fresco_thumb.jpg",130,159,1);thumbnails[1591785]=new thumbnail(1591785,"108786","Faith","Faithforweb_thumb.jpg",130,145,1);thumbnails[1612885]=new thumbnail(1612885,"108786","Close Up","closeup_thumb.jpg",130,195,1);thumbnails[1612891]=new thumbnail(1612891,"108786","Mother and Child","motherchild_thumb.jpg",130,170,1);thumbnails[1585370]=new thumbnail(1585370,"108399","Arise","ariseedition_thumb.jpg",130,166,1);thumbnails[1591867]=new thumbnail(1591867,"108399","Innocence","Innocence_thumb.jpg",130,166,1);thumbnails[1591805]=new thumbnail(1591805,"108399","Hold Tight","Holdtight_thumb.jpg",130,152,1);thumbnails[1585353]=new thumbnail(1585353,"108399","Always","alwaysedition_thumb.jpg",130,138,1);thumbnails[1591887]=new thumbnail(1591887,"108399","Praise","Praiseyou_thumb.jpg",130,182,1);thumbnails[1591873]=new thumbnail(1591873,"108399","Love Eternal","loveeternalup_thumb.jpg",130,163,1);thumbnails[1591870]=new thumbnail(1591870,"108399","Little One","Littleone_thumb.jpg",130,146,1);thumbnails[2654617]=new thumbnail(2654617,"108399","Come With Me","comewithmeweb_thumb.jpg",130,154,1);thumbnails[1591926]=new thumbnail(1591926,"108399","Whisper","whisper_thumb.jpg",130,136,1);thumbnails[1668275]=new thumbnail(1668275,"108399","Little Floral Print","littlefloralprint_thumb.jpg",130,103,1);thumbnails[1591879]=new thumbnail(1591879,"108368","Memory Coat","memorycoat_thumb.jpg",130,193,1);thumbnails[1591780]=new thumbnail(1591780,"108368","Rag Dolls","dolls_thumb.jpg",130,185,1);thumbnails[1585342]=new thumbnail(1585342,"108368","Journey","ajourney_thumb.jpg",130,117,1);thumbnails[1591922]=new thumbnail(1591922,"108368","Trunk","trunkinstallation_thumb.jpg",130,93,1);thumbnails[1591923]=new thumbnail(1591923,"108368","Trust Me ","Trustmeisaid_thumb.jpg",130,105,1);thumbnails[1668276]=new thumbnail(1668276,"108368","Family Album 1925","familyalbum1925_thumb.jpg",130,173,1);var galleries=new Object();galleries[273870]=new gallery(273870,"2197686","Japanese Dancer Series","gallery",[2193405,2193408,2193411,2197686,2193396,1621917]);galleries[230925]=new gallery(230925,"4789310,3787862",'"Here" by Signdance series',"gallery",[3787813,3787862,4144948,4789310,4968238,4968254,4968261,4968267]);galleries[108403]=new gallery(108403,"5554952","A Time ....","gallery",[1585405,1585407,1585410,1585427,5554952,5554959,5865443]);galleries[273868]=new gallery(273868,"1592348,1592307,1591915,1591914,1591912,1591910,1591894,1591884,1591803,1585447","Large Black and White etchings","gallery",[]);galleries[273869]=new gallery(273869,"4789310,3787862,2197686","Dance","gallery",[]);galleries[108788]=new gallery(108788,"3427343","Flowers and Birds Series ","gallery",[3125758,3427343,4484246,1591921,1591899,1591794,1591797,1591800]);galleries[209512]=new gallery(209512,"3427327,3427323,3427319","Conversation Piece","gallery",[3427319,3427323,3427327]);galleries[273866]=new gallery(273866,"2654617,1591785","Early work","gallery",[]);galleries[108401]=new gallery(108401,"1829235,1829232,1829229,1829228,1829139,1591924,1585369","Signing","gallery",[1591924,1585369,1829139,1829228,1829229,1829232,1829235]);galleries[108405]=new gallery(108405,"1592348,1592307,1591910,1591894,1591803,1585447","Emotion","gallery",[1591803,1592307,1592348,1591910,1591894,1585447]);galleries[108793]=new gallery(108793,"1591914,1591912,1591884","Domestic Drama ","gallery",[1591884,1591912,1591914]);galleries[273885]=new gallery(273885,"1591915","Text","gallery",[1591915]);galleries[108786]=new gallery(108786,"1591785","Large Hands","gallery",[1591771,1591897,1591798,1591785,1612885,1612891]);galleries[108399]=new gallery(108399,"2654617","Hands","gallery",[1585370,1591867,1591805,1585353,1591887,1591873,1591870,2654617,1591926,1668275]);galleries[108368]=new gallery(108368,"1668276,1591923,1591922,1591879,1591780,1585342","Journey","gallery",[1591879,1591780,1585342,1591922,1591923,1668276]);var imageSets=new Object();imageSets[1]="5865443,5554959,5554952,4144948,3787862,3787813,3427343,3427327,3427323,3427319,3125758,2654617,2197686,2193411,2193408,2193405,2193396,1621917,1591922,1591899,1591879,1591800,1591797,1591794,1585427,1585410,1585407";imageSets[2]="5554952,4789310,3787862,3427343,2654617,2197686,1591785";imageSets[3]="5865443,5554959,5554952,5282891,5282890,5282889,5282859,5282858,4968267,4968261,4968254,4968238,4933293,4933292,4933291,4844382,4844379,4789310,4484246,4144948,3810365,3787862,3787813,3486557,3486554,3486553,3427534,3427526,3427343,3427327,3427323,3427319,3408915,3408909,3408887,3125758,2746669,2746630,2654617,2197686,2193411,2193408,2193405,2193396,1829235,1829232,1829229,1829228,1829139,1668276";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/margaretashman/images";break}switch(a){case 1:b="http://www1.clikpic.com/margaretashman/images";break}switch(a){case 2:b="http://admin.clikpic.com/margaretashman/images";break}switch(a){case 24:b="http://tpc15/clikpic/margaretashman/images";break}switch(a){case 4:b="http://www.clikchurch.com/margaretashman/images";break}switch(a){case 5:b="http://www2.clikpic.com/margaretashman/images";break}switch(a){case 22:b="http://tpc5/clikpic/margaretashman/images";break}switch(a){case 23:b="http://tpc10/clikpic/margaretashman/images";break}switch(a){case 25:b="http://tpc16/clikpic/margaretashman/images";break}switch(a){case 15:b="http://www3.clikpic.com/margaretashman/images";break}switch(a){case 18:b="http://www4.clikpic.com/margaretashman/images";break}switch(a){case 19:b="http://www5.clikpic.com/margaretashman/images";break}switch(a){case 31:b="http://www7.clikpic.com/margaretashman/images";break}switch(a){case 32:b="http://admin2.clikpic.com/margaretashman/images";break}switch(a){case 33:b="http://www8.clikpic.com/margaretashman/images";break}switch(a){case 34:b="http://www9.clikpic.com/margaretashman/images";break}switch(a){case 35:b="http://admin3.clikpic.com/margaretashman/images";break}switch(a){case 37:b="http://admin4.clikpic.com/margaretashman/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="margaret ashman : "+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> 							"+(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<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+'")'})}}};