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[1035817]=new thumbnail(1035817,"44108","Nature in Action: Blue-footed Booby diving. Limited Edition Print. (Winner of the 'Action' category of the 2007 Visions of Science Photo Competition).","Booby_thumb.jpg",130,184,1);thumbnails[570966]=new thumbnail(570966,"44108","Taking Off - Common Buzzard. Limited Edition Print.","TakingOffBuzzard_600_thumb.jpg",130,94,1);thumbnails[1035833]=new thumbnail(1035833,"44108","Nature in Action: Swan taking off. Limited Edition Print.","Swan taking off (sequence)_thumb.jpg",130,39,1);thumbnails[1035819]=new thumbnail(1035819,"44108","Nature in Action: Egret in flight. Limited Edition Print.","Egret in flight_thumb.jpg",130,41,1);thumbnails[1035823]=new thumbnail(1035823,"44108","Nature in Action: Little Egret landing a fish. Limited Edition Print.","Egret landing fish_thumb.jpg",130,38,1);thumbnails[2343437]=new thumbnail(2343437,"44108","Nature in Action: Swan in flight, panned.","swan(600)_thumb.jpg",130,45,1);thumbnails[2343442]=new thumbnail(2343442,"44108","Nature in Action: Long-eared Owl, No.2","Long-earedOwlNo2b(600)_thumb.jpg",130,39,1);thumbnails[4210991]=new thumbnail(4210991,"44108","Nature in Action: Black Stork landing","Nature_in_Action_BlackStork_600_thumb.jpg",130,36,1);thumbnails[4211002]=new thumbnail(4211002,"44108","Nature in Action: a parrot lick in Amazon.","Nature_in_Action_Parrots_600_thumb.jpg",130,94,1);thumbnails[4211003]=new thumbnail(4211003,"44108","Nature in Action: Gull-billed Tern","NatureinAction_GBTern_600_thumb.jpg",130,89,1);thumbnails[1256060]=new thumbnail(1256060,"44108","Nature in Action: Long-eared Owl, No.1","ju7z0240b(50x20)_thumb.jpg",130,39,1);thumbnails[2343454]=new thumbnail(2343454,"44108","Nature in Action: Iceland Gull in flight.","IcelandGull_flight (600)_thumb.jpg",130,40,1);thumbnails[2343450]=new thumbnail(2343450,"44108","Nature in Action: Curlew in flight.","Curlew_flight(600)_thumb.jpg",130,40,1);thumbnails[2343440]=new thumbnail(2343440,"44108","Nature in Action: Heron in flight","Nature in Action Heron (600)_thumb.jpg",130,40,1);thumbnails[1254990]=new thumbnail(1254990,"44108","Nature in Action: Mute Swan in flight.","SwanFlight2(600)_thumb.jpg",130,33,1);thumbnails[570942]=new thumbnail(570942,"44113","Movement in Blue Grey. Limited Edition Print.","Movement in blue-grey_600_thumb.jpg",130,184,1);thumbnails[1035826]=new thumbnail(1035826,"44113","Natural Beauty: Goldeneye. Limited Edition Print.","Goldeneye_thumb.jpg",130,93,1);thumbnails[570933]=new thumbnail(570933,"44113","Natural Beauty: Kingfishers. Limited Edition Print.","kingfisher_600_thumb.jpg",130,93,1);thumbnails[1646292]=new thumbnail(1646292,"44114","Beauty of Flowers No.5: Dandelion. Limited Edition Print","Beauty of Flowers no5 (600)_thumb.jpg",130,409,1);thumbnails[1646288]=new thumbnail(1646288,"44114","Beauty of Flowers No.6: Gazania. Limited Edition Print","Beauty of flowers no6(600)_thumb.jpg",130,409,1);thumbnails[1646286]=new thumbnail(1646286,"44114","Beauty of Flowers No.7: Maple. Limited Edition Print","Beauty of Flowers no7(600)_thumb.jpg",130,409,1);thumbnails[1646284]=new thumbnail(1646284,"44114","Beauty of Flowers No.8: Gazania. Limited Edition Print","Beauty of Flowers no8(600)_thumb.jpg",130,184,1);thumbnails[1646283]=new thumbnail(1646283,"44114","Beauty of Flowers No.9: Gazania again. Limited Edition Print","Beauty of Flowers no9(600)_thumb.jpg",130,184,1);thumbnails[1646281]=new thumbnail(1646281,"44114","Beauty of Flowers No.10: Dandelion clock. Limited Edition Print","Beauty of Flowers no10(600)_thumb.jpg",130,195,1);thumbnails[570889]=new thumbnail(570889,"44114","The Beauty of Flowers, No.1. Limited Edition Print.","Beauty of Flowers no1 600_thumb.jpg",130,184,1);thumbnails[570895]=new thumbnail(570895,"44114","The Beauty of Flowers, No.2. Limited Edition Print.","Beauty of Flowers no2 600_thumb.jpg",130,92,1);thumbnails[570902]=new thumbnail(570902,"44114","The Beauty of Flowers, No.3. Limited Edition Print.","Beauty of flowers no3 600_thumb.jpg",130,192,1);thumbnails[570907]=new thumbnail(570907,"44114","The Beauty of Flowers, No.4. Limited Edition Print.","Beauty of flowers no4 600_thumb.jpg",130,183,1);thumbnails[570973]=new thumbnail(570973,"44114","The Red Tree - homage to Piet Mondrian. Limited Edition Print.","The Red Tree_600_thumb.jpg",130,92,1);thumbnails[4210981]=new thumbnail(4210981,"44114","Beauty of Flowers N0.11","Beauty_of_Flowers_11_600_thumb.jpg",130,87,1);thumbnails[4210953]=new thumbnail(4210953,"44114","Beauty of Flowers No.12","Beauty_of_Flowers_12_600_thumb.jpg",130,174,1);thumbnails[622540]=new thumbnail(622540,"47606","Red Deer. Limited Edition Print.","RedDeer_thumb.jpg",130,173,1);thumbnails[622542]=new thumbnail(622542,"47606","Evening Light - Ruthven Barracks. Limited Edition Print.","RuthvenBarracks_thumb.jpg",130,86,1);thumbnails[622545]=new thumbnail(622545,"47606","Dawn after the Storm. Limited Edition Print.","NewForestDawn_thumb.jpg",130,160,1);thumbnails[648590]=new thumbnail(648590,"47606","Spotted. Limited Edition Print.","Spotted_thumb.jpg",130,104,1);thumbnails[2343421]=new thumbnail(2343421,"49431","Timelessness: Lanyon Quoit","LanyonQuoit(600)_thumb.jpg",130,174,1);thumbnails[699357]=new thumbnail(699357,"49431","Standing Stones at Callanish, Isle of Lewis, Scotland. Limited Edition Print.","Callanish(600)_thumb.jpg",130,92,1);thumbnails[699362]=new thumbnail(699362,"49431","Standing Stone, Machrie Moor, Isle of Arran. Limited Edition Print.","Machrie(600)_thumb.jpg",130,184,1);thumbnails[699366]=new thumbnail(699366,"49431","Stonehenge, Wiltshire. Limited Edition Print.","Stonehenge(600)_thumb.jpg",130,92,1);thumbnails[699623]=new thumbnail(699623,"49431","Standing Stones, Kintyre, and the Paps of Jura. Limited Edition print.","Stones+Paps(600)_thumb.jpg",130,92,1);thumbnails[699377]=new thumbnail(699377,"49431","Trethevy Quoit. Limited Edition Print.","TrethevyQuoit(600)_thumb.jpg",130,184,1);thumbnails[699379]=new thumbnail(699379,"49431","Standing Stone on Machrie Moor.","0006J_17BW1(600)_thumb.jpg",130,72,1);thumbnails[699383]=new thumbnail(699383,"49431","Standing Stone, Jura.","0007N_02BW6b(600)_thumb.jpg",130,85,1);thumbnails[699610]=new thumbnail(699610,"49431","Standing Stone.","0406B_17BW3(600)_thumb.jpg",130,178,1);thumbnails[699614]=new thumbnail(699614,"49431","Part of the Callanish Stone Circle.","0406E_08BW3(600)_thumb.jpg",130,177,1);thumbnails[648593]=new thumbnail(648593,"49431",'The "Hurlers" in winter.',"0012c_12BW(600)_thumb.jpg",130,90,1);thumbnails[615170]=new thumbnail(615170,"45802","St Michael's Mount ","0012a_15(400)_thumb.jpg",130,85,1);thumbnails[615172]=new thumbnail(615172,"45802","Newlyn Harbour","0110H_02(400)_thumb.jpg",130,97,1);thumbnails[622530]=new thumbnail(622530,"45802","St Michael's Mount.","crw_1476(400)_thumb.jpg",130,78,1);thumbnails[622532]=new thumbnail(622532,"45802","Sunset, St. Michael's Mount.","02123_02(400)_thumb.jpg",130,72,1);thumbnails[622533]=new thumbnail(622533,"45802","Godrevy Point.","0402i_15(400)_thumb.jpg",130,175,1);thumbnails[622550]=new thumbnail(622550,"47608","Etosha National Park, Namibia.","9911N_11_thumb.jpg",130,95,1);thumbnails[622551]=new thumbnail(622551,"47608","Mount Vesuvius across Naples Bay, Italy.","0103A_02(400)_thumb.jpg",130,145,1);thumbnails[622528]=new thumbnail(622528,"47608","Fitful Head, Mainland, Shetland.","9307e_19(400)_thumb.jpg",130,85,1);thumbnails[622552]=new thumbnail(622552,"47608","The Tatra Mountains, Poland.","0105z09-03(400)_thumb.jpg",130,93,1);thumbnails[622529]=new thumbnail(622529,"47608","Dawn, North Ronaldsay, Orkney.","9609g_02(400)_thumb.jpg",130,86,1);thumbnails[622554]=new thumbnail(622554,"47608","Amsterdam, Holland.","0109P_03_thumb.jpg",130,177,1);thumbnails[622555]=new thumbnail(622555,"47608","Cathedral at night, Barcelona, Spain.","0203B_09(400)_thumb.jpg",130,173,1);thumbnails[622556]=new thumbnail(622556,"47608","Foothills of the Pyrenees.","0404B_09(400)_thumb.jpg",130,94,1);thumbnails[622558]=new thumbnail(622558,"47608","The high Andes, Ecuador.","0411_4786(400)_thumb.jpg",130,87,1);thumbnails[622561]=new thumbnail(622561,"47608","City Walls, Tallinn, Estonia.","0504_8575(400)_thumb.jpg",130,195,1);thumbnails[622563]=new thumbnail(622563,"47608","Vancouver, Canada.","JU7Z0616(400)_thumb.jpg",130,87,1);thumbnails[622565]=new thumbnail(622565,"47608","Flying into LA International, California, USA.","ju7z4154(400)_thumb.jpg",130,85,1);thumbnails[644795]=new thumbnail(644795,"47608","Svalbard, Norway.","crw_1174(400)_thumb.jpg",130,87,1);var galleries=new Object();galleries[44108]=new gallery(44108,"4211003,4211002,4210991,2343454,2343450,2343442,2343437,1254990,1035833,1035823,1035819,1035817,570966","Nature in Action","gallery",[1035817,570966,1035833,1035819,1035823,2343437,2343442,4210991,4211002,4211003,1256060,2343454,2343450,2343440,1254990]);galleries[44113]=new gallery(44113,"1035826,570942,570933","Natural Beauty","gallery",[570942,1035826,570933]);galleries[44114]=new gallery(44114,"4210981,4210953,1646292,1646288,1646286,1646284,1646283,1646281,570973,570907,570902,570895,570889","Plant Extracts","gallery",[1646292,1646288,1646286,1646284,1646283,1646281,570889,570895,570902,570907,570973,4210981,4210953]);galleries[47606]=new gallery(47606,"648590,622545,622542,622540","Black and White Photography","gallery",[622540,622542,622545,648590]);galleries[49431]=new gallery(49431,"2343421,699623,699377,699366,699362,699357","Stones: Neolithic monuments.","gallery",[2343421,699357,699362,699366,699623,699377,699379,699383,699610,699614,648593]);galleries[45802]=new gallery(45802,"622533,622532,622530,615172,615170","Cornwall","gallery",[615170,615172,622530,622532,622533]);galleries[47608]=new gallery(47608,"644795,622565,622563,622561,622558,622556,622555,622554,622552,622551,622529,622528","World Travel","gallery",[622550,622551,622528,622552,622529,622554,622555,622556,622558,622561,622563,622565,644795]);var imageSets=new Object();imageSets[1]="4211002,4210953,2343437,2343421,1646292,1646288,1646286,1646284,1646283,1646281,1035833,1035826,1035823,1035819,1035817,699623,699357,648590,622542,622540,615170,570973,570966,570942,570902,570889";imageSets[2]="4211003,4211002,4210991,4210981,4210953,2343454,2343450,2343442,2343437,2343421,1646292,1646288,1646286,1646284,1646283,1646281,1254990,1035833,1035826,1035823,1035819,1035817,699623,699377,699366,699362,699357,648590,644795,622565,622563,622561,622558,622556,622555,622554,622552,622551,622545,622542,622540,622533,622532,622530,622529,622528,615172,615170,570973,570966,570942,570933,570907,570902,570895,570889";imageSets[3]="4211003,4211002,4210991,4210981,4210953,2343454,2343450,2343442,2343440,2343437,2343421,1646292,1646288,1646286,1646284,1646283,1646281,1256060,1254990,1035833,1035826,1035823,1035819,1035817,699623,699614,699610,699383,699379,699377,699366,699362,699357,648593,648590,644795,622565,622563,622561,622558,622556,622555,622554,622552,622551,622550,622545,622542,622540,622533";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/photoartbytonymills/images";break}switch(a){case 1:b="http://www1.clikpic.com/photoartbytonymills/images";break}switch(a){case 2:b="http://admin.clikpic.com/photoartbytonymills/images";break}switch(a){case 24:b="http://tpc15/clikpic/photoartbytonymills/images";break}switch(a){case 4:b="http://www.clikchurch.com/photoartbytonymills/images";break}switch(a){case 5:b="http://www2.clikpic.com/photoartbytonymills/images";break}switch(a){case 22:b="http://tpc5/clikpic/photoartbytonymills/images";break}switch(a){case 23:b="http://tpc10/clikpic/photoartbytonymills/images";break}switch(a){case 25:b="http://tpc16/clikpic/photoartbytonymills/images";break}switch(a){case 15:b="http://www3.clikpic.com/photoartbytonymills/images";break}switch(a){case 18:b="http://www4.clikpic.com/photoartbytonymills/images";break}switch(a){case 19:b="http://www5.clikpic.com/photoartbytonymills/images";break}switch(a){case 31:b="http://www7.clikpic.com/photoartbytonymills/images";break}switch(a){case 32:b="http://admin2.clikpic.com/photoartbytonymills/images";break}switch(a){case 33:b="http://www8.clikpic.com/photoartbytonymills/images";break}switch(a){case 34:b="http://www9.clikpic.com/photoartbytonymills/images";break}switch(a){case 35:b="http://admin3.clikpic.com/photoartbytonymills/images";break}switch(a){case 37:b="http://admin4.clikpic.com/photoartbytonymills/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="PhotoArt by Tony Mills: "+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="tonymills@btinternet.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="tonymills@btinternet.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+'")'})}}};