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[751980]=new thumbnail(751980,"58020","","IMG_0018_thumb.jpg",130,87,15);thumbnails[751983]=new thumbnail(751983,"58020","","IMG_0105_thumb.jpg",130,195,15);thumbnails[751984]=new thumbnail(751984,"58020","","IMG_0121_thumb.jpg",130,87,15);thumbnails[751986]=new thumbnail(751986,"58020","","IMG_0134_thumb.jpg",130,195,15);thumbnails[751988]=new thumbnail(751988,"58020","","IMG_0275_thumb.jpg",130,87,15);thumbnails[751990]=new thumbnail(751990,"58020","","IMG_0280_thumb.jpg",130,87,15);thumbnails[751991]=new thumbnail(751991,"58020","","IMG_0656_thumb.jpg",130,195,15);thumbnails[751993]=new thumbnail(751993,"58020","","RA03_thumb.002.jpg",130,87,15);thumbnails[1701544]=new thumbnail(1701544,"114417","Talisman Sabre 2007 Protest","Byfield_22nd_July_2007_thumb.jpg",130,85,15);thumbnails[1701557]=new thumbnail(1701557,"114417","Stop Cheney Sydney Feb 2007","cheneyfriday_thumb.jpg",130,87,15);thumbnails[1827948]=new thumbnail(1827948,"114417","Cheney visit to Sydney","007cheney_thumb.jpg",130,86,15);thumbnails[1827951]=new thumbnail(1827951,"114417","National Day of Action For Aboriginal Justice. Brisbane","DPP_083_thumb.jpg",130,87,15);thumbnails[1827953]=new thumbnail(1827953,"114417","Police Conga Line APEC 2007 Sydney","DPP_0165_thumb.jpg",130,87,15);thumbnails[1827966]=new thumbnail(1827966,"114417","APEC 2007. Sydney","DPP_180_thumb.jpg",130,87,15);thumbnails[2536939]=new thumbnail(2536939,"114417","The Western Shogdun Society","ready03_thumb.jpg",130,87,15);thumbnails[2536942]=new thumbnail(2536942,"114417","Tibetan Ptotesters, Olympic Torch Relay. Canberra","ready05_thumb.jpg",130,93,15);thumbnails[2536945]=new thumbnail(2536945,"114417","Bums not Bombs Protest. APEC Sydney","DPP_131web_thumb.JPG",130,87,15);thumbnails[2536948]=new thumbnail(2536948,"114417","ClimateCamp Australia 08","ready04_thumb.jpg",130,87,15);thumbnails[2536961]=new thumbnail(2536961,"114417"," Free Tibet.Tibetan Protester. Canberra","ready02_thumb.jpg",130,130,15);thumbnails[6059631]=new thumbnail(6059631,"340386","","IMG_0038book1222_thumb.JPG",130,87,15);thumbnails[6059632]=new thumbnail(6059632,"340386","","IMG_0066book1222_thumb.JPG",130,87,15);thumbnails[6059679]=new thumbnail(6059679,"340386","","60000034_thumb.JPG",130,87,15);thumbnails[6059681]=new thumbnail(6059681,"340386","","60000043_thumb.JPG",130,87,15);thumbnails[6059682]=new thumbnail(6059682,"340386","","Copy_of_IMG_3795_thumb.JPG",130,87,15);thumbnails[6059691]=new thumbnail(6059691,"340386","","IMG_5378_thumb.JPG",130,87,15);thumbnails[6059692]=new thumbnail(6059692,"340386","","IMG_5437crop_thumb.JPG",130,87,15);thumbnails[6059693]=new thumbnail(6059693,"340386","","IMG_5474_thumb.JPG",130,87,15);thumbnails[6059694]=new thumbnail(6059694,"340386","","IMG_5613_thumb.JPG",130,87,15);thumbnails[6059695]=new thumbnail(6059695,"340386","","IMG_5904_thumb.JPG",130,87,15);thumbnails[6059696]=new thumbnail(6059696,"340386","","IMG_5937ok_thumb.JPG",130,87,15);thumbnails[6059697]=new thumbnail(6059697,"340386","","IMG_6055_thumb.JPG",130,87,15);thumbnails[6059699]=new thumbnail(6059699,"340386","","IMG_6079_thumb.JPG",130,87,15);thumbnails[6059701]=new thumbnail(6059701,"340386","","IMG_6854_thumb.JPG",130,87,15);thumbnails[6059702]=new thumbnail(6059702,"340386","","IMG_6909_thumb.JPG",130,87,15);thumbnails[6059703]=new thumbnail(6059703,"340386","","IMG_6925_thumb.JPG",130,87,15);thumbnails[6059704]=new thumbnail(6059704,"340386","","IMG_8194_thumb.JPG",130,87,15);thumbnails[6059705]=new thumbnail(6059705,"340386","","IMG_8274_thumb.JPG",130,87,15);thumbnails[6059706]=new thumbnail(6059706,"340386","","IMG_8510_thumb.JPG",130,87,15);thumbnails[6059708]=new thumbnail(6059708,"340386","","IMG_8804book1222_thumb.JPG",130,87,15);thumbnails[6059709]=new thumbnail(6059709,"340386","","IMG_8841_thumb.JPG",130,87,15);thumbnails[6059710]=new thumbnail(6059710,"340386","","IMG_9058_thumb.JPG",130,87,15);thumbnails[6059711]=new thumbnail(6059711,"340386","","IMG_9137_thumb.JPG",130,87,15);thumbnails[6059712]=new thumbnail(6059712,"340386","","IMG_9152_thumb.JPG",130,87,15);thumbnails[6059713]=new thumbnail(6059713,"340386","","IMG_9210book1222_thumb.JPG",130,87,15);thumbnails[6059714]=new thumbnail(6059714,"340386","","IMG_9382book1222_thumb.JPG",130,87,15);thumbnails[6059715]=new thumbnail(6059715,"340386","","IMG_9521_thumb.JPG",130,87,15);thumbnails[6059716]=new thumbnail(6059716,"340386","","IMG_9625_thumb.JPG",130,87,15);thumbnails[6059717]=new thumbnail(6059717,"340386","","IMG_9734_thumb.JPG",130,87,15);thumbnails[6059718]=new thumbnail(6059718,"340386","","IMG_9867_thumb.JPG",130,87,15);thumbnails[6059719]=new thumbnail(6059719,"340386","","IMG_9904_thumb.JPG",130,87,15);thumbnails[6059720]=new thumbnail(6059720,"340386","","IMG_9934_thumb.JPG",130,87,15);thumbnails[6059721]=new thumbnail(6059721,"340386","","IMG_9953_thumb.JPG",130,87,15);thumbnails[6059749]=new thumbnail(6059749,"340397","","IMG_0794web1_thumb.JPG",130,87,15);thumbnails[6059750]=new thumbnail(6059750,"340397","","IMG_0718web1_thumb.JPG",130,87,15);thumbnails[6059752]=new thumbnail(6059752,"340397","","IMG_14981_thumb.JPG",130,87,15);thumbnails[6059753]=new thumbnail(6059753,"340397","","IMG_1586_thumb.JPG",130,87,15);thumbnails[6059754]=new thumbnail(6059754,"340397","","IMG_8533_thumb.JPG",130,87,15);thumbnails[6059755]=new thumbnail(6059755,"340397","","IMG_8645_thumb.JPG",130,87,15);thumbnails[6059756]=new thumbnail(6059756,"340397","","IMG_9277_thumb.JPG",130,87,15);thumbnails[6059757]=new thumbnail(6059757,"340397","","IMG_86471_thumb.JPG",130,87,15);thumbnails[6059758]=new thumbnail(6059758,"340397","","IMG_8415_thumb.JPG",130,87,15);thumbnails[6059759]=new thumbnail(6059759,"340397","","IMG_8097_thumb.JPG",130,87,15);thumbnails[6059760]=new thumbnail(6059760,"340397","","IMG_7992_thumb.JPG",130,87,15);thumbnails[6059761]=new thumbnail(6059761,"340397","","IMG_7821colour_thumb.JPG",130,87,15);thumbnails[6059763]=new thumbnail(6059763,"340397","","IMG_7766book1_thumb.JPG",130,87,15);thumbnails[6059764]=new thumbnail(6059764,"340397","","IMG_6612book1_thumb.JPG",130,87,15);thumbnails[6059765]=new thumbnail(6059765,"340397","","IMG_6563_thumb.JPG",130,87,15);thumbnails[6059766]=new thumbnail(6059766,"340397","","IMG_6354kor_thumb.JPG",130,87,15);thumbnails[6059767]=new thumbnail(6059767,"340397","","IMG_6019_thumb.JPG",130,87,15);thumbnails[6059768]=new thumbnail(6059768,"340397","","IMG_5689_thumb.JPG",130,87,15);thumbnails[6059769]=new thumbnail(6059769,"340397","","IMG_5577_thumb.JPG",130,87,15);thumbnails[6059770]=new thumbnail(6059770,"340397","","IMG_5489_thumb.JPG",130,87,15);thumbnails[6059771]=new thumbnail(6059771,"340397","","IMG_5469_thumb.JPG",130,87,15);thumbnails[6059773]=new thumbnail(6059773,"340397","","IMG_3615_thumb.JPG",130,195,15);thumbnails[6059775]=new thumbnail(6059775,"340397","","007095_thumb.JPG",130,87,15);thumbnails[6059777]=new thumbnail(6059777,"340397","","007100_thumb.JPG",130,87,15);thumbnails[6059778]=new thumbnail(6059778,"340386","","007101_thumb.JPG",130,87,15);thumbnails[6059779]=new thumbnail(6059779,"340386","","007096_thumb.JPG",130,87,15);thumbnails[6059780]=new thumbnail(6059780,"340386","","007097_thumb.JPG",130,87,15);thumbnails[6059791]=new thumbnail(6059791,"340400","","0070961_thumb.JPG",130,87,15);thumbnails[6059795]=new thumbnail(6059795,"340400","","007124_thumb.JPG",130,87,15);thumbnails[6059796]=new thumbnail(6059796,"340400","","0071001_thumb.JPG",130,87,15);thumbnails[6059797]=new thumbnail(6059797,"340400","","007102_thumb.JPG",130,87,15);thumbnails[6059798]=new thumbnail(6059798,"340400","","007099_thumb.JPG",130,87,15);thumbnails[6059800]=new thumbnail(6059800,"340400","","007103_thumb.JPG",130,87,15);thumbnails[6059802]=new thumbnail(6059802,"340400","","007108_thumb.JPG",130,87,15);thumbnails[6059806]=new thumbnail(6059806,"340400","","0070981_thumb.JPG",130,87,15);thumbnails[6059808]=new thumbnail(6059808,"340400","","007109_thumb.JPG",130,87,15);thumbnails[6059811]=new thumbnail(6059811,"340400","","007110_thumb.JPG",130,87,15);thumbnails[6059814]=new thumbnail(6059814,"340400","","IMG_62511_thumb.JPG",130,87,15);thumbnails[6059816]=new thumbnail(6059816,"340400","","0070982_thumb.JPG",130,87,15);thumbnails[6059824]=new thumbnail(6059824,"340400","","IMG_78131_thumb.JPG",130,87,15);thumbnails[6078693]=new thumbnail(6078693,"340400","","IMG_20591_thumb.JPG",130,87,15);thumbnails[6371181]=new thumbnail(6371181,"340397","","IMG_5603_thumb.JPG",130,87,15);var galleries=new Object();galleries[114417]=new gallery(114417,"2536961,2536948,2536945,2536942,2536939,1827966,1827953,1827951,1827948,1701557","Aust Protest","section149889",[1701544,1701557,1827948,1827951,1827953,1827966,2536939,2536942,2536945,2536948,2536961]);galleries[340386]=new gallery(340386,"6059780,6059779,6059778,6059721,6059720,6059719,6059718,6059717,6059716,6059715","Street Photos -  B/W","section407216",[6059631,6059632,6059679,6059681,6059682,6059691,6059692,6059693,6059694,6059695,6059696,6059697,6059699,6059701,6059702,6059703,6059704,6059705,6059706,6059708,6059709,6059710,6059711,6059712,6059713,6059714,6059715,6059716,6059717,6059718,6059719,6059720,6059721,6059778,6059779,6059780]);galleries[340397]=new gallery(340397,"6371181,6059777,6059775,6059773,6059771,6059770,6059769,6059768,6059767,6059766","Street Photos - Colour","section407218",[6059749,6059750,6059752,6059753,6059754,6059755,6059756,6059757,6059758,6059759,6059760,6059761,6059763,6059764,6059765,6059766,6059767,6059768,6059769,6059770,6059771,6059773,6059775,6059777,6371181]);galleries[340400]=new gallery(340400,"6078693,6059824,6059816,6059814,6059811,6059808,6059806,6059802,6059800,6059798","Street Photos - Portraits","section407219",[6059791,6059795,6059796,6059797,6059798,6059800,6059802,6059806,6059808,6059811,6059814,6059816,6059824,6078693]);galleries[58020]=new gallery(58020,"751993,751991,751990,751988,751986,751984,751983,751980","Weddings","gallery",[751980,751983,751984,751986,751988,751990,751991,751993]);var imageSets=new Object();imageSets[1]="6371181,6078693,6059824,6059816,6059814,6059811,6059808,6059806,6059802,6059800,6059798,6059797,6059796,6059795,6059791,6059780,6059779,6059778,6059777,6059775,6059773,6059771,6059770,6059769,6059768,6059767,6059766,6059765,6059764,6059763,6059761,6059760,6059759,6059758,6059757,6059756,6059755,6059754,6059753,6059752,6059750,6059749,6059721,6059720,6059719,6059718,6059717,6059716,6059715,6059714";imageSets[3]="6371181,6078693,6059824,6059816,6059814,6059811,6059808,6059806,6059802,6059800,6059798,6059797,6059796,6059795,6059791,6059780,6059779,6059778,6059777,6059775,6059773,6059771,6059770,6059769,6059768,6059767,6059766,6059765,6059764,6059763,6059761,6059760,6059759,6059758,6059757,6059756,6059755,6059754,6059753,6059752,6059750,6059749,6059721,6059720,6059719,6059718,6059717,6059716,6059715,6059714";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/allanmilnes/images";break}switch(a){case 1:b="http://www1.clikpic.com/allanmilnes/images";break}switch(a){case 2:b="http://admin.clikpic.com/allanmilnes/images";break}switch(a){case 24:b="http://tpc15/clikpic/allanmilnes/images";break}switch(a){case 4:b="http://www.clikchurch.com/allanmilnes/images";break}switch(a){case 5:b="http://www2.clikpic.com/allanmilnes/images";break}switch(a){case 22:b="http://tpc5/clikpic/allanmilnes/images";break}switch(a){case 23:b="http://tpc10/clikpic/allanmilnes/images";break}switch(a){case 25:b="http://tpc16/clikpic/allanmilnes/images";break}switch(a){case 15:b="http://www3.clikpic.com/allanmilnes/images";break}switch(a){case 18:b="http://www4.clikpic.com/allanmilnes/images";break}switch(a){case 19:b="http://www5.clikpic.com/allanmilnes/images";break}switch(a){case 31:b="http://www7.clikpic.com/allanmilnes/images";break}switch(a){case 32:b="http://admin2.clikpic.com/allanmilnes/images";break}switch(a){case 33:b="http://www8.clikpic.com/allanmilnes/images";break}switch(a){case 34:b="http://www9.clikpic.com/allanmilnes/images";break}switch(a){case 35:b="http://admin3.clikpic.com/allanmilnes/images";break}switch(a){case 37:b="http://admin4.clikpic.com/allanmilnes/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("section407216"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section407216.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("section407216"!=""){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="Allan Milnes 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> 				AU$"+(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="vjphoto@westnet.com.au">';b=b+'<input type="hidden" name="currency_code" value="AUD">';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="vjphoto@westnet.com.au">';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+'")'})}}};