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[5287222]=new thumbnail(5287222,"","","artist_at_work_thumb.jpg",130,117,5);thumbnails[5313936]=new thumbnail(5313936,"298799","Tulips","Tulip_thumb.jpg",130,167,5);thumbnails[5312773]=new thumbnail(5312773,"298799","Rhododendron","Rhododendron_thumb.jpg",130,165,5);thumbnails[5310461]=new thumbnail(5310461,"298799","Hydrangea","Hydrandea_thumb.jpg",130,169,5);thumbnails[5313948]=new thumbnail(5313948,"298799","Orchid","Orchid_thumb.jpg",130,158,5);thumbnails[5313942]=new thumbnail(5313942,"298799","Old Fashioned Rose","Old-Fashioned-Rose_thumb.jpg",130,110,5);thumbnails[5436827]=new thumbnail(5436827,"298799","Dandelion","dandilion_thumb.jpg",130,131,5);thumbnails[5436828]=new thumbnail(5436828,"298799","Dog Rose","dog_rose_thumb.jpg",130,130,5);thumbnails[5436829]=new thumbnail(5436829,"298799","Meadow Flowers","meadow_flowers_thumb.jpg",130,130,5);thumbnails[5436831]=new thumbnail(5436831,"298799","Roadside Flowers","roadside_flowers_thumb.jpg",130,129,5);thumbnails[5436832]=new thumbnail(5436832,"298799","Water lily","waterlily_thumb.jpg",130,131,5);thumbnails[5470100]=new thumbnail(5470100,"298799","Thunbergia","thunbergia_thumb.jpg",130,262,5);thumbnails[5470084]=new thumbnail(5470084,"298799","Flowers of the forest","flowers_of_the_forest_thumb.jpg",130,189,5);thumbnails[5470087]=new thumbnail(5470087,"298799","Flowers of the Tulip Tree","Ffowers_of_the_tulip_tree_thumb.jpg",130,173,5);thumbnails[5470094]=new thumbnail(5470094,"298799","Heliconia","heliconia_thumb.jpg",130,179,5);thumbnails[5470111]=new thumbnail(5470111,"298799","Mock Orange","mock_orange_thumb.jpg",130,163,5);thumbnails[5285768]=new thumbnail(5285768,"297310","Ariadne","ariadne2_thumb.jpg",130,108,5);thumbnails[5288749]=new thumbnail(5288749,"297310","Barquentines Unloading","barquentines_unloading_thumb.jpg",130,104,5);thumbnails[5285732]=new thumbnail(5285732,"297310","HMS Volage","HMS_volage_thumb.jpg",130,107,5);thumbnails[5288771]=new thumbnail(5288771,"297310","Calm Waters","calm_waters_thumb.jpg",130,108,5);thumbnails[5290905]=new thumbnail(5290905,"297310","Treacherous Sea","treacherous_coast_thumb.jpg",130,104,5);thumbnails[5288795]=new thumbnail(5288795,"297310","Cludad de Inca","cludad_de_inca_thumb.jpg",130,166,5);thumbnails[5288862]=new thumbnail(5288862,"297310","Lord Jim","lord_jim_thumb.jpg",130,155,5);thumbnails[5288866]=new thumbnail(5288866,"297310","The Race - Navahoe in 1893","Navahoe_thumb.jpg",130,157,5);thumbnails[5288865]=new thumbnail(5288865,"297310","Lunch break Colchester wharf","lunch_break_colchester_wharf_thumb.jpg",130,166,5);thumbnails[5288867]=new thumbnail(5288867,"297310","Ships that pass in the night","ships_that_pass_in_the_night_thumb.jpg",130,154,5);thumbnails[5290877]=new thumbnail(5290877,"297310","Cutty Sark","cutty_sark_thumb.jpg",130,103,5);thumbnails[5290887]=new thumbnail(5290887,"297310","HMS Pickle","HMS_pickle_thumb.jpg",130,104,5);thumbnails[5290888]=new thumbnail(5290888,"297310","Leaving Port","leaving_port_thumb.jpg",130,103,5);thumbnails[5290891]=new thumbnail(5290891,"297310","Off to sail the Seven Seas","off_to_sail_the_seven-_seas_thumb.jpg",130,103,5);thumbnails[5290892]=new thumbnail(5290892,"297310","The Lonely Sea","The_lonely_sea_thumb.jpg",130,104,5);thumbnails[5290899]=new thumbnail(5290899,"297310","Doldrums","doldrums_thumb.jpg",130,107,5);thumbnails[5290902]=new thumbnail(5290902,"297310","Shackletons Endurance","shakeltons_endeavour_thumb.jpg",130,103,5);thumbnails[5288772]=new thumbnail(5288772,"297310","Cicumnavigation","Circumnavigation_thumb.jpg",130,65,5);thumbnails[5290900]=new thumbnail(5290900,"297310","Cleared for action","cleared_for_action_thumb.jpg",130,59,5);thumbnails[5290906]=new thumbnail(5290906,"297310","Thames Barges","thames_barges_thumb.jpg",130,56,5);thumbnails[6012673]=new thumbnail(6012673,"338425","Think Pink","think_pink_thumb.jpg",130,84,5);thumbnails[6012812]=new thumbnail(6012812,"338425","Lotus Flower","lotusflower_thumb.jpg",130,85,5);thumbnails[6012748]=new thumbnail(6012748,"338425","Deep Velvet","deep_velvet_thumb.jpg",130,84,5);thumbnails[6012819]=new thumbnail(6012819,"338425","Reaching Out","reaching_out_thumb.jpg",130,83,5);thumbnails[6012822]=new thumbnail(6012822,"338425","Colour Compliments","colour_compliments_thumb.jpg",130,85,5);thumbnails[6027021]=new thumbnail(6027021,"338425","Four Little Maids","four_little_maids_thumb.jpg",130,202,5);thumbnails[6027026]=new thumbnail(6027026,"338425","Morning Light","morning_light_thumb.jpg",130,201,5);thumbnails[6027028]=new thumbnail(6027028,"338425","Night Mooring","night_mooring_thumb.jpg",130,202,5);thumbnails[6027020]=new thumbnail(6027020,"338425","Dewdrop","dewdrop_thumb.jpg",130,202,5);thumbnails[6027017]=new thumbnail(6027017,"338425","Curtain Call","curtain_call_thumb.jpg",130,199,5);thumbnails[6028378]=new thumbnail(6028378,"338425","Centrepiece","centrepiece_thumb.jpg",130,202,5);thumbnails[6027014]=new thumbnail(6027014,"338425","Counterchange","counterchange_thumb.jpg",130,197,5);thumbnails[6027024]=new thumbnail(6027024,"338425","High Peaks","high_peaks_thumb.jpg",130,215,5);thumbnails[6027031]=new thumbnail(6027031,"338425","Tulips  in relief","tulips_in_relief_thumb.jpg",130,220,5);thumbnails[6027029]=new thumbnail(6027029,"338425","Seeing Red","seeing_red_thumb.jpg",130,201,5);thumbnails[5310271]=new thumbnail(5310271,"298795","Flotsam","Flotsum_thumb.jpg",130,90,5);thumbnails[5310281]=new thumbnail(5310281,"298795","Lanterns","Lanterns_thumb.jpg",130,93,5);thumbnails[5310261]=new thumbnail(5310261,"298795","Boundary","boundary_thumb.jpg",130,182,5);thumbnails[5310295]=new thumbnail(5310295,"298795","Watering Cans","Watering-Cans_thumb.jpg",130,204,5);thumbnails[5310276]=new thumbnail(5310276,"298795","Forcing Pots","Forcing-Pots_thumb.jpg",130,207,5);thumbnails[5313796]=new thumbnail(5313796,"298798","Snow Leopard","Snow_Leopard_thumb.jpg",130,194,5);thumbnails[5313803]=new thumbnail(5313803,"298798","Macaw","Macaw_thumb.jpg",130,177,5);thumbnails[5312765]=new thumbnail(5312765,"298798","Iguana ","Iguana_thumb.jpg",130,176,5);thumbnails[5313819]=new thumbnail(5313819,"298798","White Tiger","White_Tiger_thumb.jpg",130,166,5);thumbnails[5313811]=new thumbnail(5313811,"298798","Orangutan","Orangutan_thumb.jpg",130,160,5);thumbnails[5310453]=new thumbnail(5310453,"298798","Cat's Eyes","Cats_Eyes_thumb.jpg",130,91,5);thumbnails[5313806]=new thumbnail(5313806,"298798","Jaguar","Jaguar_thumb.jpg",130,87,5);thumbnails[5409030]=new thumbnail(5409030,"298798","Bumble Bee","bumble_bee_thumb.jpg",130,96,5);thumbnails[5409060]=new thumbnail(5409060,"298798","Chelmsford Swans","chelmsford_swans_thumb.jpg",130,94,5);thumbnails[5409062]=new thumbnail(5409062,"298798","Peacock Butterfly","peacock_butterfly_thumb.jpg",130,95,5);thumbnails[5470061]=new thumbnail(5470061,"298798","Fritillary Butterfly","fritillary_thumb.jpg",130,179,5);thumbnails[5470059]=new thumbnail(5470059,"298798","Cotton Top Tamarinds","cotton_top_tamarins_thumb.jpg",130,178,5);thumbnails[5470064]=new thumbnail(5470064,"298798","Great White Egret","great_white_egret_thumb.jpg",130,176,5);thumbnails[5470066]=new thumbnail(5470066,"298798","Lion","lion_thumb.jpg",130,176,5);thumbnails[5470070]=new thumbnail(5470070,"298798","Woodmouse","woodmouse_thumb.jpg",130,175,5);thumbnails[5310459]=new thumbnail(5310459,"298796","Boreham Village, Essex","Boreham-Village-Essex_thumb.jpg",130,102,5);thumbnails[5312770]=new thumbnail(5312770,"298796","Stoke-by-Clare, Suffolk.","Stoke-by-Clare-Suffolk_thumb.jpg",130,101,5);thumbnails[5312800]=new thumbnail(5312800,"298796","King's Head. Landermere, Essex.","The-Kings-Head-Landermere_thumb.jpg",130,102,5);thumbnails[5312817]=new thumbnail(5312817,"298796","Landermere Cottage, Essex.","Landermere-Cottage-Essex_thumb.jpg",130,99,5);thumbnails[5313895]=new thumbnail(5313895,"298796","Lavender Fields, Norfolk. ","Lavender-Fields_thumb.jpg",130,103,5);thumbnails[5409088]=new thumbnail(5409088,"298796","Ishams Lane, Witham, Essex","ishams_lane_witham_essex_thumb.jpg",130,95,5);thumbnails[5409090]=new thumbnail(5409090,"298796","River Chelmer at Papermill Lock","river_chelmer_at_papermill_lock_thumb.jpg",130,94,5);thumbnails[5409086]=new thumbnail(5409086,"298796","Castle View","castle_view_thumb.jpg",130,95,5);thumbnails[5470217]=new thumbnail(5470217,"298796","Scottish Loch","scottish_loch_thumb.jpg",130,95,5);thumbnails[5313880]=new thumbnail(5313880,"298796","Wivenhoe Quay, Essex.","Wivenhoe-Quay-Essex-Sold_thumb.jpg",130,56,5);thumbnails[5470213]=new thumbnail(5470213,"298796","Row boat","row_boat_thumb.jpg",130,93,5);thumbnails[5470232]=new thumbnail(5470232,"298796","The Old Studio","the_old_studio_thumb.jpg",130,175,5);thumbnails[5470226]=new thumbnail(5470226,"298796","Woodbridge, Suffolk","woodbridge_suffolk_thumb.jpg",130,172,5);thumbnails[5470221]=new thumbnail(5470221,"298796","Thaxted, Essex.","thaxted_from_the_west_essex_thumb.jpg",130,178,5);thumbnails[5313890]=new thumbnail(5313890,"298796","Pastures New, Norfolk.","Pastures-New_thumb.jpg",130,169,5);thumbnails[5287315]=new thumbnail(5287315,"297311","A bit of R & R","A_bit_of_R__R1_thumb.jpg",130,175,5);thumbnails[5287336]=new thumbnail(5287336,"297311","Fisherman","Fisherman1_thumb.jpg",130,173,5);thumbnails[5287341]=new thumbnail(5287341,"297311","Skipper","Skipper_thumb.jpg",130,173,5);var galleries=new Object();galleries[298799]=new gallery(298799,"5313942","Flowers","gallery",[5313936,5312773,5310461,5313948,5313942,5436827,5436828,5436829,5436831,5436832,5470100,5470084,5470087,5470094,5470111]);galleries[297310]=new gallery(297310,"5290905,5290902,5290899,5290892,5290891,5290888,5290887,5290877,5288771,5288749,5285768,5285732","Sailing Ships","gallery",[5285768,5288749,5285732,5288771,5290905,5288795,5288862,5288866,5288865,5288867,5290877,5290887,5290888,5290891,5290892,5290899,5290902,5288772,5290900,5290906]);galleries[338425]=new gallery(338425,"6012822,6012819,6012812,6012748,6012673","Frank's Photopics","gallery",[6012673,6012812,6012748,6012819,6012822,6027021,6027026,6027028,6027020,6027017,6028378,6027014,6027024,6027031,6027029]);galleries[298795]=new gallery(298795,"5310281,5310271","Still Life","gallery",[5310271,5310281,5310261,5310295,5310276]);galleries[298798]=new gallery(298798,"5409062,5409060,5409030,5313806,5310453","Animals and Birds","gallery",[5313796,5313803,5312765,5313819,5313811,5310453,5313806,5409030,5409060,5409062,5470061,5470059,5470064,5470066,5470070]);galleries[298796]=new gallery(298796,"5470217,5470213,5409090,5409088,5409086,5312817,5312800,5312770,5310459","Landscape","gallery",[5310459,5312770,5312800,5312817,5313895,5409088,5409090,5409086,5470217,5313880,5470213,5470232,5470226,5470221,5313890]);galleries[297311]=new gallery(297311,"5287341,5287336,5287315","Portraits","gallery",[5287315,5287336,5287341]);var imageSets=new Object();imageSets[1]="5470217,5470213,5313942,5313806,5312800,5310459,5310281,5310271,5290899,5290887,5288771,5288749,5285768,5285732";imageSets[2]="6012822,6012819,6012812,6012748,6012673,5470217,5470213,5409090,5409088,5409086,5409062,5409060,5409030,5313942,5313806,5312817,5312800,5312770,5310459,5310453,5310281,5310271,5290905,5290902,5290899,5290892,5290891,5290888,5290887,5290877,5288771,5288749,5285768,5285732";imageSets[3]="5288772,5287336,5287315,5287222";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/valwebber/images";break}switch(a){case 1:b="http://www1.clikpic.com/valwebber/images";break}switch(a){case 2:b="http://admin.clikpic.com/valwebber/images";break}switch(a){case 24:b="http://tpc15/clikpic/valwebber/images";break}switch(a){case 4:b="http://www.clikchurch.com/valwebber/images";break}switch(a){case 5:b="http://www2.clikpic.com/valwebber/images";break}switch(a){case 22:b="http://tpc5/clikpic/valwebber/images";break}switch(a){case 23:b="http://tpc10/clikpic/valwebber/images";break}switch(a){case 25:b="http://tpc16/clikpic/valwebber/images";break}switch(a){case 15:b="http://www3.clikpic.com/valwebber/images";break}switch(a){case 18:b="http://www4.clikpic.com/valwebber/images";break}switch(a){case 19:b="http://www5.clikpic.com/valwebber/images";break}switch(a){case 31:b="http://www7.clikpic.com/valwebber/images";break}switch(a){case 32:b="http://admin2.clikpic.com/valwebber/images";break}switch(a){case 33:b="http://www8.clikpic.com/valwebber/images";break}switch(a){case 34:b="http://www9.clikpic.com/valwebber/images";break}switch(a){case 35:b="http://admin3.clikpic.com/valwebber/images";break}switch(a){case 37:b="http://admin4.clikpic.com/valwebber/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="The paintings of Val Webber: "+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;resizePhotoInfo();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>Order this painting</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</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="VALWEBBER">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};