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[308635]=new thumbnail(308635,"","Aerial-Tresco","Aerial-Tresco1_thumb.jpg",130,99,18);thumbnails[308636]=new thumbnail(308636,"","Aerial-Tresco1","Aerial-Tresco11_thumb.jpg",130,99,18);thumbnails[308637]=new thumbnail(308637,"","Aerial-Tresco2","Aerial-Tresco2_thumb.jpg",130,99,18);thumbnails[308638]=new thumbnail(308638,"","bannana%20leaf","bannana%20leaf_thumb.jpg",130,206,18);thumbnails[308639]=new thumbnail(308639,"","beak%20close%20up","beak%20close%20up_thumb.jpg",130,158,18);thumbnails[308640]=new thumbnail(308640,"","beak","beak1_thumb.jpg",130,94,18);thumbnails[308641]=new thumbnail(308641,"","boat","boat1_thumb.jpg",130,77,18);thumbnails[308642]=new thumbnail(308642,"","brollies","brollies1_thumb.jpg",130,88,18);thumbnails[308643]=new thumbnail(308643,"","bw%20woman","bw%20woman_thumb.jpg",130,175,18);thumbnails[308644]=new thumbnail(308644,"","Oakwoods","Oakwoods1_thumb.jpg",130,73,18);thumbnails[13737]=new thumbnail(13737,"1718","Tucan","beak_thumb.jpg",130,94,18);thumbnails[13738]=new thumbnail(13738,"1718","Banana Leaf","bannana leaf_thumb.jpg",130,206,18);thumbnails[13739]=new thumbnail(13739,"1718","Tucan eye","beak close up_thumb.jpg",130,158,18);thumbnails[13740]=new thumbnail(13740,"1718","Dawn movement on the Amazon","boat_thumb.jpg",130,77,18);thumbnails[13742]=new thumbnail(13742,"1718","Beach Umbrella's","brollies_thumb.jpg",130,88,18);thumbnails[13743]=new thumbnail(13743,"1718","Face of the Amazon","bw woman_thumb.jpg",130,175,18);thumbnails[13772]=new thumbnail(13772,"1718","chairs in water","chairs_thumb.jpg",130,101,18);thumbnails[13773]=new thumbnail(13773,"1718","Alligator","croc comp_thumb.jpg",130,205,18);thumbnails[13774]=new thumbnail(13774,"1718","Traffic at dawn","dawn_thumb.jpg",130,86,18);thumbnails[13775]=new thumbnail(13775,"1718","Dragonfly","dragon fly_thumb.jpg",130,88,18);thumbnails[13776]=new thumbnail(13776,"1718","Festival at Parintins","festival_thumb.jpg",130,98,18);thumbnails[13777]=new thumbnail(13777,"1718","Devils Island","dev2_thumb.jpg",130,85,18);thumbnails[13778]=new thumbnail(13778,"1718","Boy playing in the rain","DSCF6578_thumb.jpg",130,101,18);thumbnails[13779]=new thumbnail(13779,"1718","Lizard","DSCF6948_thumb.jpg",130,92,18);thumbnails[13780]=new thumbnail(13780,"1718","colourful people","festival2_thumb.jpg",130,135,18);thumbnails[13782]=new thumbnail(13782,"1718","Home on the Amazon","house_thumb.jpg",130,87,18);thumbnails[13783]=new thumbnail(13783,"1718","Residents of Boca De Valeria","people_thumb.jpg",130,87,18);thumbnails[13784]=new thumbnail(13784,"1718","Inside Opera House","opera house1_thumb.jpg",130,89,18);thumbnails[13785]=new thumbnail(13785,"1718","All the kids want is a pen!","people2_thumb.jpg",130,86,18);thumbnails[13786]=new thumbnail(13786,"1718","The rain Forest","rain forest 2_thumb.jpg",130,86,18);thumbnails[13787]=new thumbnail(13787,"1718","Dawn on The Amazon","sky_thumb.jpg",130,81,18);thumbnails[572900]=new thumbnail(572900,"43321","sky and mountains in Norway","DSCF2638_thumb.jpg",130,85,18);thumbnails[572912]=new thumbnail(572912,"43321","Fjord in Norway","DSCF2751_thumb.jpg",130,76,18);thumbnails[572919]=new thumbnail(572919,"43321","boat cruising down the fjord","DSCF2647_thumb.jpg",130,83,18);thumbnails[572981]=new thumbnail(572981,"43321","Arty Rocks","DSCF2749_thumb.jpg",130,87,18);thumbnails[572988]=new thumbnail(572988,"43321","lighthouse close up","DSCF2777_thumb.jpg",130,204,18);thumbnails[572993]=new thumbnail(572993,"43321","flowers with distant lighthouse","DSCF2805_thumb.jpg",130,179,18);thumbnails[572997]=new thumbnail(572997,"43321","Side of lighthouse","DSCF2820_thumb.jpg",130,177,18);thumbnails[573001]=new thumbnail(573001,"43321","Buildings of Norway","DSCF2848_thumb.jpg",130,87,18);thumbnails[573005]=new thumbnail(573005,"43321","Building with bcakgroung fjord","DSCF2850_thumb.jpg",130,85,18);thumbnails[573006]=new thumbnail(573006,"43321","Fjord with mirror reflection","DSCF2859_thumb.jpg",130,87,18);thumbnails[573008]=new thumbnail(573008,"43321","reflection 2","DSCF2872_thumb.jpg",130,87,18);thumbnails[573012]=new thumbnail(573012,"43321","Glacier","DSCF2994_thumb.jpg",130,183,18);thumbnails[573015]=new thumbnail(573015,"43321","Ice from the glacier","DSCF2996_thumb.jpg",130,87,18);thumbnails[573020]=new thumbnail(573020,"43321","Close up of glacier","DSCF3002_thumb.jpg",130,87,18);thumbnails[573026]=new thumbnail(573026,"43321","Bottom of glacier joining with the water","DSCF3006_thumb.jpg",130,85,18);thumbnails[573029]=new thumbnail(573029,"43321","Through a crack in the glacier","DSCF3040_thumb.jpg",130,195,18);thumbnails[573032]=new thumbnail(573032,"43321","Stream of fresh water in Norway","DSCF3130_thumb.jpg",130,89,18);thumbnails[573036]=new thumbnail(573036,"43321","Grassy meadow","DSCF3149_thumb.jpg",130,83,18);thumbnails[573040]=new thumbnail(573040,"43321","Building in a rural fjord","DSCF3177_thumb.jpg",130,89,18);thumbnails[559]=new thumbnail(559,"87","Snowdrops","snowdrops_thumb.jpg",130,91,18);thumbnails[585]=new thumbnail(585,"87","Flower drops","Flower-drops_thumb.jpg",130,84,18);thumbnails[586]=new thumbnail(586,"87","Foxgloves","foxgloves-2_thumb.jpg",130,86,18);thumbnails[600]=new thumbnail(600,"87","Nomocharis Aperta","Nomocharis-Aperta_thumb.jpg",130,93,18);thumbnails[604]=new thumbnail(604,"87","Poppy Platties Plum","Poppy-Patties-plum_thumb.jpg",130,93,18);thumbnails[610]=new thumbnail(610,"87","Tropical water lilly","Tropical-Water-lilly_thumb.jpg",130,93,18);thumbnails[574]=new thumbnail(574,"87","Acer Japonica Aconitifolium","Acer-joponica-Aconitifolium_thumb.jpg",130,86,18);thumbnails[578]=new thumbnail(578,"87","Anemone coronaria decaen","Anemone-coronaria-De-caen_thumb.jpg",130,104,18);thumbnails[602]=new thumbnail(602,"87","Ostoepermum","osteospermum_thumb.jpg",130,132,18);thumbnails[605]=new thumbnail(605,"87","Primula denticulata","Primula-denticulata_thumb.jpg",130,138,18);thumbnails[596]=new thumbnail(596,"87","Lilly","lilly_thumb.jpg",130,180,18);thumbnails[613]=new thumbnail(613,"87","Tulipa oxford","Tulipa-Oxford_thumb.jpg",130,179,18);thumbnails[577]=new thumbnail(577,"87","Allium","Allium_thumb.jpg",130,188,18);thumbnails[587]=new thumbnail(587,"87","Foxgloves II","Foxgloves_thumb.jpg",130,204,18);thumbnails[612]=new thumbnail(612,"87","Tulip ballerina","Tulipa-Ballerina_thumb.jpg",130,250,18);thumbnails[566]=new thumbnail(566,"92","Clematis","Clematis_thumb.jpg",130,100,18);thumbnails[567]=new thumbnail(567,"92","Floribunda rose pink abundance","Floribunda-rose-pink-Abund_thumb.jpg",130,124,18);thumbnails[576]=new thumbnail(576,"92","Agave","Agave_thumb.jpg",130,157,18);thumbnails[579]=new thumbnail(579,"92","Cliva minata","Cliva-minata_thumb.jpg",130,96,18);thumbnails[583]=new thumbnail(583,"92","Dhalia so dainty","Dahlia-So-Dainty_thumb.jpg",130,151,18);thumbnails[590]=new thumbnail(590,"92","HT Rose 'Summer lady' tanyd","HT-rose-summer-lady-'tanyd_thumb.jpg",130,110,18);thumbnails[598]=new thumbnail(598,"92","Narcissus Tahiti","Narcissus-Tahiti_thumb.jpg",130,117,18);thumbnails[603]=new thumbnail(603,"92","Paphiopedilum Winston Churchill","Paphiopedilum-winston-chur_thumb.jpg",130,127,18);thumbnails[611]=new thumbnail(611,"92","Tulip","Tulip_thumb.jpg",130,118,18);thumbnails[615]=new thumbnail(615,"92","Water lilly","Water-lilly-_thumb.jpg",130,102,18);thumbnails[2452492]=new thumbnail(2452492,"92","Diarama","Diarama_thumb.jpg",130,194,18);thumbnails[569]=new thumbnail(569,"93","Drift of tulips","Drift-of-tulips_thumb.jpg",130,75,18);thumbnails[570]=new thumbnail(570,"93","Leaves and light","Leaves-and-light_thumb.jpg",130,53,18);thumbnails[582]=new thumbnail(582,"93","Crocus","Crocus-_thumb.jpg",130,84,18);thumbnails[588]=new thumbnail(588,"93","Gunnera","Gunnera_thumb.jpg",130,87,18);thumbnails[589]=new thumbnail(589,"93","Hamamelis","Hamamelis-_thumb.jpg",130,97,18);thumbnails[594]=new thumbnail(594,"93","Leaves as a backdrop","Leaves-_thumb.jpg",130,90,18);thumbnails[595]=new thumbnail(595,"93","Lettuce backdrop","Lettuce_thumb.jpg",130,101,18);thumbnails[584]=new thumbnail(584,"93","Fern","Fern_thumb.jpg",130,155,18);thumbnails[571]=new thumbnail(571,"89","Snow ","snow_thumb.jpg",130,105,18);thumbnails[575]=new thumbnail(575,"89","An aerial shot of Tresco","Aerial-Tresco_thumb.jpg",130,99,18);thumbnails[601]=new thumbnail(601,"89","Oak woods","Oakwoods_thumb.jpg",130,73,18);thumbnails[608]=new thumbnail(608,"89","Snow scene","snow-pic_thumb.jpg",130,92,18);thumbnails[609]=new thumbnail(609,"89","Christmas tree ","snowtree1_thumb.jpg",130,194,18);thumbnails[572984]=new thumbnail(572984,"89","Lighthouse","DSCF2775_thumb.jpg",130,188,18);thumbnails[591]=new thumbnail(591,"90","Japanese garden","Jap-garden_thumb.jpg",130,97,18);thumbnails[592]=new thumbnail(592,"90","French chateau (La Manoir)","La-manoir_thumb.jpg",130,95,18);thumbnails[593]=new thumbnail(593,"90","Leaning tower of Pisa","Leaning-tower_thumb.jpg",130,204,18);thumbnails[606]=new thumbnail(606,"90","Sandringham","sandringham-_thumb.jpg",130,89,18);thumbnails[560]=new thumbnail(560,"91","Mushroom","Mushroom_thumb.jpg",130,112,18);thumbnails[565]=new thumbnail(565,"91","Robin","NNRobin-2_thumb.jpg",130,214,18);thumbnails[581]=new thumbnail(581,"91","Cornflower, poppy and daisy","cornflower-poppy-and-daisy1_thumb.jpg",130,196,18);thumbnails[597]=new thumbnail(597,"91","Moths","Moths-_thumb.jpg",130,92,18);thumbnails[599]=new thumbnail(599,"91","Robin on branch","NNRobin1_thumb.jpg",130,97,18);thumbnails[561]=new thumbnail(561,"88","Queen Mum","Queenmum_thumb.jpg",130,183,18);thumbnails[562]=new thumbnail(562,"88","Queen Mum II","Queenmum2_thumb.jpg",130,187,18);thumbnails[563]=new thumbnail(563,"88","The Queen","Queen_thumb.jpg",130,195,18);thumbnails[564]=new thumbnail(564,"88","Prince Charles","HRH-Prince-Charles_thumb.jpg",130,162,18);thumbnails[568]=new thumbnail(568,"88","Charlie and Charlie","charlie+charlie_thumb.jpg",130,161,18);var galleries=new Object();galleries[43321]=new gallery(43321,"572912","NORWAY","gallery",[572900,572912,572919,572981,572988,572993,572997,573001,573005,573006,573008,573012,573015,573020,573026,573029,573032,573036,573040]);galleries[1718]=new gallery(1718,"13787,13783,13779,13777,13776,13775,13743,13742,13739","The Amazon ","gallery",[13737,13738,13739,13740,13742,13743,13772,13773,13774,13775,13776,13777,13778,13779,13780,13782,13783,13784,13785,13786,13787]);galleries[87]=new gallery(87,"602,586,559","Popular flowers","gallery",[559,585,586,600,604,610,574,578,602,605,596,613,577,587,612]);galleries[92]=new gallery(92,"2452492,611","Flower close-ups","gallery",[566,567,576,579,583,590,598,603,611,615,2452492]);galleries[93]=new gallery(93,"589","Abstracts","gallery",[569,570,582,588,589,594,595,584]);galleries[89]=new gallery(89,"601","Landscapes","gallery",[571,575,601,608,609,572984]);galleries[90]=new gallery(90,"591","Buildings & gardens","gallery",[591,592,593,606]);galleries[91]=new gallery(91,"599","In the wild","gallery",[560,565,581,597,599]);galleries[88]=new gallery(88,"564,562","The Royal Family","gallery",[561,562,563,564,568]);var imageSets=new Object();imageSets[1]="2452492,13787,13779,13777,13776,13775,13743,13739,13737,615,585,569,559";imageSets[2]="2452492,572912,13787,13783,13779,13777,13776,13775,13743,13742,13739,611,602,601,599,591,589,586,564,562,559";imageSets[3]="2452492,573040,573036,573032,573029,573026,573020,573015,573012,573008,573006,573005,573001,572997,572993,572988,572984,572981,572919,572912,572900,308644,308643,308642,308641,308640,308639,308638,308637,308636,308635,13787,13786,13785,13784,13783,13782,13780,13779,13778,13777,13776,13775,13774,13773,13772,13743,13742,13740,13739";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 34:b="http://www9.clikpic.com/timothys/images";break}switch(a){case 1:b="http://www1.clikpic.com/timothys/images";break}switch(a){case 2:b="http://admin.clikpic.com/timothys/images";break}switch(a){case 4:b="http://www.clikchurch.com/timothys/images";break}switch(a){case 5:b="http://www2.clikpic.com/timothys/images";break}switch(a){case 15:b="http://www3.clikpic.com/timothys/images";break}switch(a){case 21:b="http://www6.clikpic.com/timothys/images";break}switch(a){case 18:b="http://www4.clikpic.com/timothys/images";break}switch(a){case 19:b="http://www5.clikpic.com/timothys/images";break}switch(a){case 22:b="http://tpc5/clikpic/timothys/images";break}switch(a){case 23:b="http://tpc10/clikpic/timothys/images";break}switch(a){case 24:b="http://tpc15/clikpic/timothys/images";break}switch(a){case 25:b="http://tpc16/clikpic/timothys/images";break}switch(a){case 31:b="http://www7.clikpic.com/timothys/images";break}switch(a){case 32:b="http://admin2.clikpic.com/timothys/images";break}switch(a){case 33:b="http://www8.clikpic.com/timothys/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="'+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="Tim Sandall Photographer: "+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+'")'})}}};
