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[3780772]=new thumbnail(3780772,"","Shopping in Dawlish","CLIC3_9582_the_lawn__strand_dawlish_thumb.jpg",130,91,5);thumbnails[3780775]=new thumbnail(3780775,"","Relaxing gardens by The Brook","CLIC3_9570_the_brook_dawlish_thumb.jpg",130,87,5);thumbnails[3780777]=new thumbnail(3780777,"","Shops on The Strand","CLIC3_9591_the_strand_dawlish_thumb.jpg",130,87,5);thumbnails[3783398]=new thumbnail(3783398,"","Old fashioned ice cream, with clotted cream, at Gayes Creamery","CLIC3_9583_old_fashioned_devon_ice_cream_thumb.jpg",130,195,5);thumbnails[3783837]=new thumbnail(3783837,"","Manor House Gardens","CLIC3_7507_manor_gardens_dawlish_thumb.jpg",130,88,5);thumbnails[5541782]=new thumbnail(5541782,"","Shipping to USA","USA_Shipping_copy_1_thumb.jpg",130,87,5);thumbnails[3078305]=new thumbnail(3078305,"168576","The way to Coryton's Cove","CLIC_4117te_beach_huts_coryton_cove_dawlish_thumb.jpg",130,87,5);thumbnails[3745873]=new thumbnail(3745873,"168576","Summertime at Boat Cove, Dawlish","CLIC_7410_boat_cove_dawlish_devon_thumb.jpg",130,87,5);thumbnails[4435945]=new thumbnail(4435945,"168576","Over Shell Cove","CLIC_9309_coryton_cove_8x121_thumb.jpg",130,87,5);thumbnails[4435982]=new thumbnail(4435982,"168576","Dawlish Town Pier","CLIC_1775te_dawlish_pier-black_and_white_thumb.jpg",130,91,5);thumbnails[4435988]=new thumbnail(4435988,"168576","Underneath the arches","CLIC_3039te2_pigeon_arches_dawlish_promenade_thumb.jpg",130,87,5);thumbnails[4435993]=new thumbnail(4435993,"168576","Dawlish breakers","CLIC_4606_waves_dawlish_pier_devon_thumb.jpg",130,89,5);thumbnails[4436009]=new thumbnail(4436009,"168576","Waiting for the tide","CLIC_4806_boat_cove_dawlish_devon_thumb.jpg",130,87,5);thumbnails[4436015]=new thumbnail(4436015,"168576","A place for quiet reflection","CLIC_7495_a_place_for_quiet_relection_dawlish_thumb.jpg",130,87,5);thumbnails[4436022]=new thumbnail(4436022,"168576","The legend of the Parson and Clerk","CLIC_5384_parson_and_clerk_dawlish_devon_thumb.jpg",130,87,5);thumbnails[4512196]=new thumbnail(4512196,"168576","Creels at Boat Cove","CLIC_2218te_creels_boat_cove_dawlish_devon_thumb.jpg",130,87,5);thumbnails[4512197]=new thumbnail(4512197,"168576","Boat Cove, Dawlish","CLIC_3065te_seagull_boat_cove_dawlish_devon_thumb.jpg",130,87,5);thumbnails[4512198]=new thumbnail(4512198,"168576","Seaside Dawlish","CLIC_3476_dawlish_sea_front_promenade_devon_thumb.jpg",130,87,5);thumbnails[4512199]=new thumbnail(4512199,"168576","Dawlish Sea Wall","CLIC_4769_dawlish_sea_side_low_tide_devon_thumb.jpg",130,87,5);thumbnails[4512200]=new thumbnail(4512200,"168576","The Brook","CLIC_4776_the_brook_dawlish_devon_thumb.jpg",130,87,5);thumbnails[4512201]=new thumbnail(4512201,"168576","The Brook, Dawlish","CLIC_4780_seagull_over_the_brook_dawlish_devon_thumb.jpg",130,87,5);thumbnails[4512202]=new thumbnail(4512202,"168576","St Gregory's, the Parish Church, Dawlish","CLIC_7465t_st_gregorys_church_dawlish_devon_thumb.jpg",130,87,5);thumbnails[4512204]=new thumbnail(4512204,"168576","Dawlish Sea Wall","CLIC_9315_dawlish_sea_wall_thumb.jpg",130,87,5);thumbnails[4512205]=new thumbnail(4512205,"168576","No bowling today!","CLIC_4252te2_dawlish_bowling_green_snow_seagull_thumb.jpg",130,87,5);thumbnails[4512206]=new thumbnail(4512206,"168576","Ancient yew","CLIC_7470_yew_tree_in_churchyard_thumb.jpg",130,87,5);thumbnails[4512216]=new thumbnail(4512216,"168576","Winter waves","CLIC_3711bw_waves_over_dawlish_pier_storm_thumb.jpg",130,87,5);thumbnails[4512217]=new thumbnail(4512217,"168576","Winter waves over the Town Pier","CLIC_3715tbw_storm_dawlish_pier_black_and_white_thumb.jpg",130,87,5);thumbnails[4512218]=new thumbnail(4512218,"168576","Winter storm on Marine Parade","CLIC_3897te_storm_marine_parade_dawlish_devon_thumb.jpg",130,87,5);thumbnails[4512242]=new thumbnail(4512242,"168576","Cockwood Harbour","CLIC_4037te_thumb.jpg",130,88,5);thumbnails[4567788]=new thumbnail(4567788,"168576","Colourful beach huts at Coryton's Cove","CLIC_4119te_beach_huts_coryton_cove_dawlish_thumb.jpg",130,87,5);thumbnails[5067205]=new thumbnail(5067205,"168576","Take a seat!","CLIC_4987_dawlish_floods_2008_thumb.jpg",130,88,5);thumbnails[5067225]=new thumbnail(5067225,"168576","The Brook in flood","CLIC_5008_dawlish_floods_2008_thumb.jpg",130,193,5);thumbnails[3701538]=new thumbnail(3701538,"259496","6024 King Edward 1 ","CLIC_7945_torbay_express_thumb.jpg",130,87,5);thumbnails[4436024]=new thumbnail(4436024,"259496","6024 King Edward I","CLIC_2132tt_torquay_express_dawlish_railway_line_thumb.jpg",130,87,5);thumbnails[4436045]=new thumbnail(4436045,"259496","The Old 37 - 37038 Rounding Red Rock","CLIC_3474te_thumb.jpg",130,87,5);thumbnails[4436051]=new thumbnail(4436051,"259496","Tangmere fronts the Torquay Express","CLIC_7403_t_tangmere_steam_engine_dawlish_thumb.jpg",130,87,5);thumbnails[4436053]=new thumbnail(4436053,"259496","6024 Christmas Express","CLIC_7945_bw_torbay_express_thumb.jpg",130,87,5);thumbnails[4436055]=new thumbnail(4436055,"259496","6024 King Edward I and Dawlish Station","CLIC_7940_torbay_express_thumb.jpg",130,93,5);thumbnails[4467855]=new thumbnail(4467855,"259496","Tornado 60163","CLIC_0174_thumb.jpg",130,88,5);thumbnails[4512213]=new thumbnail(4512213,"259496","","CLIC_4661te_first_great_western_dawlish_storm_thumb.jpg",130,87,5);thumbnails[4512215]=new thumbnail(4512215,"259496","","CLIC_4001te_breakers_over_dawlish_railway_station_thumb.jpg",130,87,5);thumbnails[4512220]=new thumbnail(4512220,"259496","","CLIC_3939te_thumb.jpg",130,87,5);thumbnails[4512241]=new thumbnail(4512241,"259496","Starcross and the Pump House","CLIC_7623_pump_house_starcross_devon_thumb.jpg",130,87,5);thumbnails[4578043]=new thumbnail(4578043,"259500","Vulcan, Dawlish Airshow 2009","CLIC_0384_thumb.jpg",130,87,5);thumbnails[4584711]=new thumbnail(4584711,"259500","The Red Arrows","CLIC_09_0261_red_arrows_dawlish_2009_thumb.jpg",130,87,5);thumbnails[4584718]=new thumbnail(4584718,"259500","Red Arrows over Dawlish ","CLIC_09_0230_red_arrows_dawlish_2009_thumb.jpg",130,87,5);thumbnails[4592473]=new thumbnail(4592473,"259500","","CLIC_0207_thumb.jpg",130,87,5);thumbnails[4592480]=new thumbnail(4592480,"259500","","CLIC_0236_red_arrows_dawlish_2009_thumb.jpg",130,87,5);thumbnails[4592483]=new thumbnail(4592483,"259500","","CLIC_0298_red_arrows_2009_thumb.jpg",130,87,5);thumbnails[4555679]=new thumbnail(4555679,"259500","Avro Vulcan (G-VLCN) - Vulcan to the Sky Trust","CLIC_0357_vulcan_and_red_arrows_thumb.jpg",130,87,5);thumbnails[4555674]=new thumbnail(4555674,"259500","Avro Vulcan, Dawlish Airshow, Devon 2009","CLIC_0352_vulcan_and_red_arrows_thumb.jpg",130,87,5);thumbnails[4555676]=new thumbnail(4555676,"259500","Avro Vulcan (G-VLCN)","CLIC_0353_vulcan_and_red_arrows_thumb.jpg",130,87,5);thumbnails[4555672]=new thumbnail(4555672,"259500","In formation","CLIC_0330_8x12_vulcan_and_red_arrows_thumb.jpg",130,87,5);thumbnails[4512222]=new thumbnail(4512222,"262477","Exmouth from the Warren Beach","CLIC_004_exmouth_from_dawlish_warren_thumb.jpg",130,88,5);thumbnails[4512226]=new thumbnail(4512226,"262477","The old jetty","CLIC_2677te_thumb.jpg",130,87,5);thumbnails[4512229]=new thumbnail(4512229,"262477","Warren Beach","CLIC_2689_dawlish_warren_beach_devon_thumb.jpg",130,87,5);thumbnails[4512230]=new thumbnail(4512230,"262477","Into the light","CLIC_2707t_into_the_light_beach_at_dawn_thumb.jpg",130,88,5);thumbnails[5092732]=new thumbnail(5092732,"262477","Dawn, Dawlish Warren","CLIC_2666t_dawn_dawlish_warren_devon_thumb.jpg",130,87,5);thumbnails[5092773]=new thumbnail(5092773,"262477","Quiet morning","CLIC_2668t_dawn_over_the_sea_thumb.jpg",130,88,5);thumbnails[5092779]=new thumbnail(5092779,"262477","Remains of the jetty","CLIC_2678te_old_posts_dawlish_warren_thumb.jpg",130,87,5);thumbnails[4436021]=new thumbnail(4436021,"262476","Elegance","CLIC_174te_elegance_dawlish_black_swan_thumb.jpg",130,97,5);thumbnails[4512203]=new thumbnail(4512203,"262476","Brand new cygnet!","CLIC_9265_black_swan_and_cygnet_8x101_thumb.jpg",130,104,5);thumbnails[4512209]=new thumbnail(4512209,"262476","Keep an eye on them!","CLIC_2802te_proud_parents_black_swans_dawlish_thumb.jpg",130,87,5);thumbnails[4512210]=new thumbnail(4512210,"262476","Cygnets on the Brook","CLIC_9672_black_swan__cygnets_dawlish_8x12_thumb.jpg",130,88,5);thumbnails[4512211]=new thumbnail(4512211,"262476","Proud parents","CLIC_9656_black_swans__cygnets_dawlish_thumb.jpg",130,88,5);thumbnails[3701645]=new thumbnail(3701645,"261249","The Parson and Clerk Rocks","CLIC_9624_parson-and_clerkteignmouth_thumb.jpg",130,87,5);thumbnails[4502171]=new thumbnail(4502171,"261249","Teignmouth Pier","CLIC_9199_teignmouth_pier_thumb.jpg",130,88,5);thumbnails[4502172]=new thumbnail(4502172,"261249","Back Beach","CLIC_2958_ship_inn_teignmouth_back_beach__thumb.jpg",130,87,5);thumbnails[4502173]=new thumbnail(4502173,"261249","View over Teignmouth","CLIC_9336_teignmouth_view_with_pier_thumb.jpg",130,87,5);thumbnails[4512214]=new thumbnail(4512214,"261249","River Teign","CLIC_2934te_Teign_Estuary_Shaldon_thumb.jpg",130,87,5);thumbnails[4512233]=new thumbnail(4512233,"262484","Harbour bound","CLIC_7558_sailing_exmouth_devon_thumb.jpg",130,87,5);thumbnails[4512235]=new thumbnail(4512235,"262484","Fishing and sailing","CLIC_7565_sailing_boat_and_fisherman_exmouth_thumb.jpg",130,87,5);thumbnails[4512238]=new thumbnail(4512238,"262484","Exe Estuary","CLIC_7620_boats_moored_on_the_exe_devon_thumb.jpg",130,87,5);thumbnails[4512239]=new thumbnail(4512239,"262484","Starcross Pier","CLIC_3409te_starcross_pier_ferry_thumb.jpg",130,87,5);thumbnails[4512240]=new thumbnail(4512240,"262484","My Queen","CLIC_7538_my_queen_starcross_devon_thumb.jpg",130,87,5);thumbnails[4512243]=new thumbnail(4512243,"262484","Tired","CLIC_7328_old_boat_topsham_devon_thumb.jpg",130,87,5);thumbnails[4512231]=new thumbnail(4512231,"262481","Beachhuts","CLIC_7380_colours_exmouth_beach_huts_devon_thumb.jpg",130,87,5);thumbnails[4512232]=new thumbnail(4512232,"262481","Blue sky crane","CLIC_7553_8x10_abstract_crane_exmouth_devon_thumb.jpg",130,104,5);thumbnails[4512236]=new thumbnail(4512236,"262481","Haven ahead","CLIC_7583_entrance_to_exmouth_harbour_devon_thumb.jpg",130,87,5);thumbnails[4512237]=new thumbnail(4512237,"262481","Exmouth Marina","CLIC_7586_exmouth_harbour_devon_thumb.jpg",130,87,5);var galleries=new Object();galleries[168576]=new gallery(168576,"4435945","Dawlish","section298045",[3078305,3745873,4435945,4435982,4435988,4435993,4436009,4436015,4436022,4512196,4512197,4512198,4512199,4512200,4512201,4512202,4512204,4512205,4512206,4512216,4512217,4512218,4512242,4567788,5067205,5067225]);galleries[259496]=new gallery(259496,"4436024","The Riviera Line","section298045",[3701538,4436024,4436045,4436051,4436053,4436055,4467855,4512213,4512215,4512220,4512241]);galleries[259500]=new gallery(259500,"4584711","Dawlish Air Show","section298045",[4578043,4584711,4584718,4592473,4592480,4592483,4555679,4555674,4555676,4555672]);galleries[262477]=new gallery(262477,"5092732","Dawlish Warren","section298045",[4512222,4512226,4512229,4512230,5092732,5092773,5092779]);galleries[262476]=new gallery(262476,"4436021","Dawlish's Black Swans","section298045",[4436021,4512203,4512209,4512210,4512211]);galleries[261249]=new gallery(261249,"4502171","Teignmouth","section298045",[3701645,4502171,4502172,4502173,4512214]);galleries[262484]=new gallery(262484,"4512243,4512240,4512239,4512238,4512235,4512233","The Exe","section298045",[4512233,4512235,4512238,4512239,4512240,4512243]);galleries[262481]=new gallery(262481,"4512236","Exmouth","section298045",[4512231,4512232,4512236,4512237]);var imageSets=new Object();imageSets[1]="4512216,4512198,4436024,4436009,4435945";imageSets[2]="5092732,4584711,4512236,4502171,4436024,4436021,4435945";imageSets[3]="5541782,5092779,5092773,5092732,5067225,5067205,4592483,4592480,4592473,4584718,4584711,4578043,4567788,4555679,4555676,4555674,4555672,4512243,4512242,4512241,4512240,4512239,4512238,4512237,4512236,4512235,4512233,4512232,4512231,4512230,4512229,4512226,4512222,4512220,4512218,4512217,4512216,4512215,4512214,4512213,4512211,4512210,4512209,4512206,4512205,4512204,4512203,4512202,4512201,4512200";imageSets[235055]="4512204,4512198";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/dawlishblue/images";break}switch(a){case 1:b="http://www1.clikpic.com/dawlishblue/images";break}switch(a){case 2:b="http://admin.clikpic.com/dawlishblue/images";break}switch(a){case 24:b="http://tpc15/clikpic/dawlishblue/images";break}switch(a){case 4:b="http://www.clikchurch.com/dawlishblue/images";break}switch(a){case 5:b="http://www2.clikpic.com/dawlishblue/images";break}switch(a){case 22:b="http://tpc5/clikpic/dawlishblue/images";break}switch(a){case 23:b="http://tpc10/clikpic/dawlishblue/images";break}switch(a){case 25:b="http://tpc16/clikpic/dawlishblue/images";break}switch(a){case 15:b="http://www3.clikpic.com/dawlishblue/images";break}switch(a){case 18:b="http://www4.clikpic.com/dawlishblue/images";break}switch(a){case 19:b="http://www5.clikpic.com/dawlishblue/images";break}switch(a){case 31:b="http://www7.clikpic.com/dawlishblue/images";break}switch(a){case 32:b="http://admin2.clikpic.com/dawlishblue/images";break}switch(a){case 33:b="http://www8.clikpic.com/dawlishblue/images";break}switch(a){case 34:b="http://www9.clikpic.com/dawlishblue/images";break}switch(a){case 35:b="http://admin3.clikpic.com/dawlishblue/images";break}switch(a){case 37:b="http://admin4.clikpic.com/dawlishblue/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("section298045"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section298045.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("section298045"!=""){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="DawlishBlue: "+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 - please 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> </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>Secure payment using PayPal.  Includes UK P&P</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="DAWLISHBLUE">';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(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 e=$("img#gallery"+c);e.parents(".thumbWrap").width(b.width);var a=e.siblings("h3").size()==1?e.siblings("h3"):e.parent(".thumbWrap").siblings("h3");var f=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));a.width(e.outerWidth(true)-f-d)}}}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+'")'})}}};