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[6397396]=new thumbnail(6397396,"56310","","Sunken_Images_2abc_thumb.jpg",130,96,18);thumbnails[1534559]=new thumbnail(1534559,"56310","David Buckle<br>\r\nUnderwater Photographer","dave1_thumb.jpg",130,199,18);thumbnails[904904]=new thumbnail(904904,"56310","Prop and Rudder on the SS Thistlegorm","march 071_thumb.jpg",130,93,18);thumbnails[904909]=new thumbnail(904909,"56310","Water Tanker and Bollards on the port side of the SS Thistlegorm","march03075_thumb.jpg",130,180,18);thumbnails[732151]=new thumbnail(732151,"56310","Anchor chains & winches on the SS. Thistlegorm","DAVE BUCKLE_00004_thumb.jpg",130,86,18);thumbnails[732160]=new thumbnail(732160,"56310","Locomotive from the wreck of SS.Thistlegorm","DAVE BUCKLE_00010_thumb.jpg",130,87,18);thumbnails[771927]=new thumbnail(771927,"56310","Locomotive rail tender on the SS Thistlegorm","cnv000242_thumb.jpg",130,87,18);thumbnails[1198892]=new thumbnail(1198892,"56310","Diver on the stern section of the Rosalie Moller","tim1_thumb.jpg",130,195,18);thumbnails[732174]=new thumbnail(732174,"56310","SS Ghiannis D shipwreck","DAVE BUCKLE_000021_thumb.jpg",130,195,18);thumbnails[771920]=new thumbnail(771920,"56310","Lion fish at Um Usk reef","cnv000011_thumb.jpg",130,195,18);thumbnails[732157]=new thumbnail(732157,"56310","RMS.Carnatic Shipwreck Red Sea","DAVE BUCKLE_00008_thumb.jpg",130,87,18);thumbnails[732156]=new thumbnail(732156,"56310","SS.Chrisoula K shipwreck in the Red Sea","DAVE BUCKLE_00007_thumb.jpg",130,195,18);thumbnails[771941]=new thumbnail(771941,"56310","SS Kimon M Propeller & Rudder","cnv00010_thumb.jpg",130,87,18);thumbnails[732150]=new thumbnail(732150,"56310","Paravane & Tender on the SS.Thistlegorm","DAVE BUCKLE_00003_thumb.jpg",130,87,18);thumbnails[732139]=new thumbnail(732139,"56310"," SS.Ghiannis D shipwreck.<br>\r\n","DAVE BUCKLE_00001_thumb.jpg",130,195,18);thumbnails[771949]=new thumbnail(771949,"56310","Pair of Clown fish near the Blue Hole Dahab","cnv00007_thumb.jpg",130,87,18);thumbnails[732161]=new thumbnail(732161,"56310","SS.Kingston Shipwreck Red Sea on Shag Rock","DAVE BUCKLE_00011_thumb.jpg",130,195,18);thumbnails[904910]=new thumbnail(904910,"56310","Water tanker and bollards looking for,ard on the port side of the SS Thistlegorm","march03074_thumb.jpg",130,180,18);thumbnails[904907]=new thumbnail(904907,"56310","Spare Prop on the SS Kingston","march030706_thumb.jpg",130,93,18);thumbnails[1917761]=new thumbnail(1917761,"56310","SS. KINGSTON","king1_thumb.jpg",130,181,18);thumbnails[3642123]=new thumbnail(3642123,"56310","Paravane on the Thistlegorm","img017_thumb.jpg",130,132,18);thumbnails[3642129]=new thumbnail(3642129,"56310","Bow of the Thistlegorm","img019_thumb.jpg",130,132,18);thumbnails[771930]=new thumbnail(771930,"56310","SS Thistlegorm No4 hold remains of bombs and truck wreckage","cnv00008_thumb.jpg",130,87,18);thumbnails[771921]=new thumbnail(771921,"56310","Motocycles in the hold on the SS Thistlegorm","cnv00018_thumb.jpg",130,87,18);thumbnails[771957]=new thumbnail(771957,"56310","Puffer fish on the Lighthouse Reef Dahab","cnv00004_thumb.jpg",130,87,18);thumbnails[771922]=new thumbnail(771922,"56310","Trucks in the hold on the SS Thistlegorm","cnv00019_thumb.jpg",130,87,18);thumbnails[771933]=new thumbnail(771933,"56310","Winches on the SS Thistlegorm","cnv00021_thumb.jpg",130,87,18);thumbnails[771928]=new thumbnail(771928,"56310","SS.Thistlegorm Fore deck & workshop ","cnv00023_thumb.jpg",130,87,18);thumbnails[771948]=new thumbnail(771948,"56310","Funnel on the SS Ghiannis D ","cnv00016_thumb.jpg",130,194,18);thumbnails[905105]=new thumbnail(905105,"56310","Starboard side gangway on the SS Ghiannis D","march01_thumb.jpg",130,180,18);thumbnails[771943]=new thumbnail(771943,"56310","SS Chrisoula K rudder & propeller","cnv00012_thumb.jpg",130,194,18);thumbnails[771958]=new thumbnail(771958,"56310","Puffer fish at the Lighthouse Dahab","cnv00005_thumb.jpg",130,87,18);thumbnails[771936]=new thumbnail(771936,"56310","Stern section of the SS Ghiannis D","cnv00015_thumb.jpg",130,194,18);thumbnails[771942]=new thumbnail(771942,"56310","SS Chrisoula K stern section","cnv00011_thumb.jpg",130,194,18);thumbnails[904916]=new thumbnail(904916,"56310","4.7inch anti aircraft gun on the stern of the SS Thistlegorm","march03072_thumb.jpg",130,93,18);thumbnails[771935]=new thumbnail(771935,"56310","SS Thistlegorm midships","cnv00017_thumb.jpg",130,87,18);thumbnails[904912]=new thumbnail(904912,"56310","4.7inch anti aircraft gun on the stern section of the SS Thistlegorm","march03073_thumb.jpg",130,93,18);thumbnails[905107]=new thumbnail(905107,"56310","Gangway on the SS Ghiannis D ","march02_thumb.jpg",130,180,18);thumbnails[905115]=new thumbnail(905115,"56310","Divers on the starboard side of the SS Ghiannis D shipwreck","march06_thumb.jpg",130,180,18);thumbnails[905112]=new thumbnail(905112,"56310","Diver videoing the SS Ghiannis D","march05_thumb.jpg",130,180,18);thumbnails[905110]=new thumbnail(905110,"56310","Propellor starboard side of the SS Ghiannis D","march04_thumb.jpg",130,180,18);thumbnails[771955]=new thumbnail(771955,"56310","Pair of Lionfish at Um Usk","cnv00002_thumb.jpg",130,87,18);thumbnails[771926]=new thumbnail(771926,"56310","Water tanker on deck of the SS Thistlegorm","cnv00022_thumb.jpg",130,87,18);thumbnails[771959]=new thumbnail(771959,"56310","Clownfish at the Lighthouse Dahab","cnv00006_thumb.jpg",130,87,18);thumbnails[771945]=new thumbnail(771945,"56310","RMS Carnatic stern section","cnv00013_thumb.jpg",130,194,18);thumbnails[3583344]=new thumbnail(3583344,"56310",'"Harbour Wreck". Egyptian gun boat sunk during the six day war between Israel and Egypt',"egypt_wreck_thumb.jpg",130,193,18);thumbnails[732154]=new thumbnail(732154,"56310","Paddys Bottlenose Dolphin","DAVE BUCKLE_00006_thumb.jpg",130,87,18);thumbnails[771946]=new thumbnail(771946,"56310","RMS Carnatic stern section","cnv00014_thumb.jpg",130,194,18);thumbnails[771960]=new thumbnail(771960,"56310","Anthias on the reef at the Canyon Dahab","cnv00003_thumb.jpg",130,87,18);thumbnails[3642197]=new thumbnail(3642197,"56310","Diver leaving the Harbour wreck","img016_thumb.jpg",130,133,18);thumbnails[905164]=new thumbnail(905164,"56310","Barge at Bluff Point Red Sea","march031_thumb.jpg",130,180,18);thumbnails[905161]=new thumbnail(905161,"56310","Remains of the Barge at Bluff Point in the Red Sea","march021_thumb.jpg",130,93,18);thumbnails[3642099]=new thumbnail(3642099,"56310","Blue Angel fish on the Thistlegorm","angel2_thumb.jpg",130,134,18);thumbnails[3642143]=new thumbnail(3642143,"56310","Blue Angel fish on the Thistlegorm","img018_thumb.jpg",130,128,18);thumbnails[3642153]=new thumbnail(3642153,"56310","Grouper on the sea bed","img021_thumb.jpg",130,132,18);thumbnails[905160]=new thumbnail(905160,"56310","Diver on the Barge shipwreck at Bluff Point,red Sea","march011_thumb.jpg",130,93,18);thumbnails[905108]=new thumbnail(905108,"56310","SS Ghiannis D","march03_thumb.jpg",130,180,18);thumbnails[4183357]=new thumbnail(4183357,"249158","Cage Diving with the Great White Shark","sa31_thumb.jpg",130,87,18);thumbnails[4183327]=new thumbnail(4183327,"249158","Black Tip Reef Shark","DSC_0896a_thumb.jpg",130,66,18);thumbnails[4182855]=new thumbnail(4182855,"249158","Oceanic Black Reef Shark and Diver","sa25a_thumb.jpg",130,66,18);thumbnails[4184404]=new thumbnail(4184404,"249158","Shark Silhouette","DSC_0908_thumb.jpg",130,85,18);thumbnails[4183347]=new thumbnail(4183347,"249158","Oceanic Black Tip Shark","20090929_10_thumb.jpg",130,79,18);thumbnails[4184192]=new thumbnail(4184192,"249158","Sun Kissed Oceanic Black Tip Reef Shark","DSC_0959a_thumb.jpg",130,73,18);thumbnails[4183419]=new thumbnail(4183419,"249158","Shark Attack","shark4_thumb.jpg",130,63,18);thumbnails[4184073]=new thumbnail(4184073,"249158","Photographing a Great White Shark from a cage","DSC_1343abc_thumb.jpg",130,89,18);thumbnails[4186154]=new thumbnail(4186154,"249158","Breaching Great White Shark","DSC_1100_thumb.jpg",130,94,18);thumbnails[4185161]=new thumbnail(4185161,"249158","Sunburst on Aliwal Shoal","sa24a_thumb.jpg",130,194,18);thumbnails[4187023]=new thumbnail(4187023,"249158","Charge of the Great White Shark","DSC_1326cb_thumb.jpg",130,87,18);thumbnails[4186971]=new thumbnail(4186971,"249158","FULL on ATTACK","DSC_1111_thumb.jpg",130,84,18);thumbnails[4186248]=new thumbnail(4186248,"249158","Jaws","shark6_thumb.jpg",130,75,18);thumbnails[4184153]=new thumbnail(4184153,"249158","Approaching Great White Shark","sa2_thumb.jpg",130,100,18);thumbnails[4189969]=new thumbnail(4189969,"249158","Coming in for the Bait","shark_20_thumb.jpg",130,87,18);thumbnails[4273983]=new thumbnail(4273983,"249158","Look behind you","sa27a_thumb.jpg",130,120,18);thumbnails[6406795]=new thumbnail(6406795,"249158","Black Tip Reef Shark","DSC_0926a_thumb.jpg",130,69,18);thumbnails[6406831]=new thumbnail(6406831,"249158","Behind you","sa21_thumb.jpg",130,90,18);thumbnails[6408020]=new thumbnail(6408020,"249158","Sun Rays","DSC_0928ab_thumb.jpg",130,53,18);thumbnails[4273955]=new thumbnail(4273955,"249158","Awaiting the Bait","2_sharks_thumb.jpg",130,56,18);thumbnails[6406837]=new thumbnail(6406837,"249158","Great White","DSC_1340a_thumb.jpg",130,95,18);thumbnails[6406824]=new thumbnail(6406824,"249158","","DSC_0988a_thumb.jpg",130,129,18);thumbnails[6406820]=new thumbnail(6406820,"249158","Black Tip Reef Shark","DSC_0918a_thumb.jpg",130,84,18);thumbnails[4273980]=new thumbnail(4273980,"249158","Raggie Tooth of Aliwal Shoals","DSC_0654a_thumb.jpg",130,55,18);thumbnails[4966827]=new thumbnail(4966827,"249158","Great White Shark","DSC_1337abc_thumb.jpg",130,88,18);thumbnails[4452468]=new thumbnail(4452468,"249158","Tiger Shark","20090929_11_thumb.jpg",130,77,18);thumbnails[4452356]=new thumbnail(4452356,"249158","Black Tip Shark","DSC_0898_bc1_thumb.jpg",130,81,18);thumbnails[4452363]=new thumbnail(4452363,"249158","Shark penertrating the sun rays","DSC_0792ab_thumb.jpg",130,83,18);thumbnails[4452432]=new thumbnail(4452432,"249158","Shark swim past","DSC_0937ab_thumb.jpg",130,87,18);thumbnails[6404446]=new thumbnail(6404446,"249158","Freshwater Pike laying in wait","DSC_0632a_thumb.jpg",130,84,18);thumbnails[4452453]=new thumbnail(4452453,"249158","Sharks circling the dive boat","sa8_thumb.jpg",130,101,18);var galleries=new Object();galleries[56310]=new gallery(56310,"6397396,3642197,3642153,3642143,3642129,3642123,3642099,3583344,1917761,1534559","SHIPWRECKS","gallery",[6397396,1534559,904904,904909,732151,732160,771927,1198892,732174,771920,732157,732156,771941,732150,732139,771949,732161,904910,904907,1917761,3642123,3642129,771930,771921,771957,771922,771933,771928,771948,905105,771943,771958,771936,771942,904916,771935,904912,905107,905115,905112,905110,771955,771926,771959,771945,3583344,732154,771946,771960,3642197,905164,905161,3642099,3642143,3642153,905160,905108]);galleries[249158]=new gallery(249158,"6408020,6406837,6406831,6406824,6406820,6406795,6404446,4966827,4452468,4452453","Sharks","section301635",[4183357,4183327,4182855,4184404,4183347,4184192,4183419,4184073,4186154,4185161,4187023,4186971,4186248,4184153,4189969,4273983,6406795,6406831,6408020,4273955,6406837,6406824,6406820,4273980,4966827,4452468,4452356,4452363,4452432,6404446,4452453]);var imageSets=new Object();imageSets[1]="6397396";imageSets[3]="6408020,6406837,6406831,6406824,6406820,6406795,6404446,6397396,4966827,4452468,4452453,4452432,4452363,4452356,4273983,4273980,4273955,4189969,4187023,4186971,4186248,4186154,4185161,4184404,4184192,4184153,4184073,4183419,4183357,4183347,4183327,4182855,3642197,3642153,3642143,3642129,3642123,3642099,3583344,1917761,1534559,1198892,905164,905161,905160,905115,905112,905110,905108,905107";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/davidhelmet/images";break}switch(a){case 1:b="http://www1.clikpic.com/davidhelmet/images";break}switch(a){case 2:b="http://admin.clikpic.com/davidhelmet/images";break}switch(a){case 24:b="http://tpc15/clikpic/davidhelmet/images";break}switch(a){case 4:b="http://www.clikchurch.com/davidhelmet/images";break}switch(a){case 5:b="http://www2.clikpic.com/davidhelmet/images";break}switch(a){case 22:b="http://tpc5/clikpic/davidhelmet/images";break}switch(a){case 23:b="http://tpc10/clikpic/davidhelmet/images";break}switch(a){case 25:b="http://tpc16/clikpic/davidhelmet/images";break}switch(a){case 15:b="http://www3.clikpic.com/davidhelmet/images";break}switch(a){case 18:b="http://www4.clikpic.com/davidhelmet/images";break}switch(a){case 19:b="http://www5.clikpic.com/davidhelmet/images";break}switch(a){case 31:b="http://www7.clikpic.com/davidhelmet/images";break}switch(a){case 32:b="http://admin2.clikpic.com/davidhelmet/images";break}switch(a){case 33:b="http://www8.clikpic.com/davidhelmet/images";break}switch(a){case 34:b="http://www9.clikpic.com/davidhelmet/images";break}switch(a){case 35:b="http://admin3.clikpic.com/davidhelmet/images";break}switch(a){case 37:b="http://admin4.clikpic.com/davidhelmet/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=" Sunken Images - David Buckle : "+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>"}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+'")'})}}};