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[4558884]=new thumbnail(4558884,"","","SPS_Logo_only1_thumb.JPG",130,88,18);thumbnails[4558945]=new thumbnail(4558945,"","","WAV_Logo_thumb.JPG",130,71,18);thumbnails[1677101]=new thumbnail(1677101,"113121","Featherlight","Featherligh_SPL_thumb.jpg",130,74,18);thumbnails[1677324]=new thumbnail(1677324,"113121","In the Winter Sun","In_the_winter_sun_SPL_thumb.jpg",130,85,18);thumbnails[1677326]=new thumbnail(1677326,"113121","Pastel Orchid","Pastel_Orchid_FP_thumb.jpg",130,87,18);thumbnails[1677534]=new thumbnail(1677534,"113121","St. Kilda Pier","St_Kilda_Pier_BP_thumb.jpg",130,91,18);thumbnails[1687181]=new thumbnail(1687181,"113121","Stepping up","Stepping_up_BP1_thumb.jpg",130,99,18);thumbnails[1687187]=new thumbnail(1687187,"113121","Bearded Tit","Bearded_tit_JH1_thumb.jpg",130,96,18);thumbnails[4107288]=new thumbnail(4107288,"113687","Tower of Steel - Royal Armouries, Leeds","Tower_of_Steel_FP_thumb.jpg",130,87,18);thumbnails[4107294]=new thumbnail(4107294,"113687","Eli & Samual, 600mm Dia. Alter Panel","Eli__Samual_-_Alter_Panel_SP_thumb.jpg",130,130,18);thumbnails[4107300]=new thumbnail(4107300,"113687","Ferrari","FerrariI_MB_thumb.jpg",130,93,18);thumbnails[4107318]=new thumbnail(4107318,"113687","Meadow Pipet on Foxglove","Meadow_Pipit_on_Foxglove_JH_thumb.jpg",130,174,18);thumbnails[4107337]=new thumbnail(4107337,"113687","Watch out for crocodiles","Watch_out_for_the_crocodiles_SP_thumb.jpg",130,98,18);thumbnails[4107346]=new thumbnail(4107346,"113687","Venetian Masks","Venitian_Masks_MB_thumb.jpg",130,95,18);thumbnails[4107351]=new thumbnail(4107351,"113687","Gemini 2 Rising","Gemini_2_rising_SM_thumb.jpg",130,51,18);thumbnails[5483749]=new thumbnail(5483749,"113687","Great Grey Owl Swooping on Mouse","Hawk_Owl_Swooping_on_Mouse_thumb.jpg",130,82,18);thumbnails[5483753]=new thumbnail(5483753,"113687","On a Cold and Frosty Morning","On_a_Cold_and_Frosty_Morning_thumb.jpg",130,58,18);thumbnails[5483758]=new thumbnail(5483758,"113687","Death Toll","Death_Toll_thumb.jpg",130,122,18);thumbnails[1677100]=new thumbnail(1677100,"113121","Dales Morning","Dales_Morning_FP_thumb.jpg",130,61,18);thumbnails[2039014]=new thumbnail(2039014,"113121","Pizza Express","Pizza_Express_by_Frank_Page_thumb.jpg",130,85,18);thumbnails[4080930]=new thumbnail(4080930,"113687","RX150 The Stade, Hastings","RX150_The_Stade_Hastings_BW_thumb.jpg",130,194,18);thumbnails[4081289]=new thumbnail(4081289,"113687","Bald Eagle","Bald_Eagle_CC_thumb.jpg",130,92,18);thumbnails[4081298]=new thumbnail(4081298,"113687","Just Dropped In","Just_Dropped_In_BW_thumb.jpg",130,88,18);thumbnails[2039027]=new thumbnail(2039027,"113121","Still Life With Oranges","Still_Life_with_Oranges_by_Frank_Page_thumb.jpg",130,83,18);thumbnails[4081302]=new thumbnail(4081302,"113687","Love at the Lifeboat Station","Love_at_the_Lifeboat_Station_BW_thumb.jpg",130,29,18);thumbnails[4106578]=new thumbnail(4106578,"113687","Lady in Red","Lady_in_Red_MB_thumb.jpg",130,192,18);thumbnails[4107158]=new thumbnail(4107158,"113687","Steve","Steve_FP_thumb.jpg",130,186,18);thumbnails[2039761]=new thumbnail(2039761,"113121","Shades of the High Life","Shades_of_the_High_Life_by_Frank_Page_thumb.jpg",130,88,18);thumbnails[4107204]=new thumbnail(4107204,"113687","My Best Friend","My_Best_Friend_BW_thumb.jpg",130,129,18);thumbnails[4107244]=new thumbnail(4107244,"113687","Mates","Mates_FP_thumb.jpg",130,98,18);thumbnails[2036146]=new thumbnail(2036146,"113687","Homes for Sale","Homes_for_Sale_by_Barbara_Piper_thumb.jpg",130,66,18);thumbnails[2035857]=new thumbnail(2035857,"113687","The Hand Out","The_Hand_Out_by_Carol_Casselden_thumb.jpg",130,98,18);thumbnails[2036105]=new thumbnail(2036105,"113687","Areo Acrobatics","Aero_Acrobatics_by_Swales_Parry_thumb.jpg",130,98,18);thumbnails[2036192]=new thumbnail(2036192,"113687","Le Peloton","Le_Peloton_by_Frank_Page_thumb.jpg",130,98,18);thumbnails[2036278]=new thumbnail(2036278,"113687","Kingfisher with Water Boatman","Kingfisher_with_WAter_Boatman_by_John_Hunt_thumb.jpg",130,98,18);thumbnails[2036294]=new thumbnail(2036294,"113687","Early Light Reflections","Early_Light_Reflections_by_John_Hunt_thumb.jpg",130,98,18);thumbnails[2036311]=new thumbnail(2036311,"113687","We Could Stand Under Cover","We_Could_Stand_Under_Cover_by_Carol_Casselden_thumb.jpg",130,102,18);thumbnails[2036324]=new thumbnail(2036324,"113687","Sunset Reflection","Sunset_Reflection_by_John_Hunt_thumb.jpg",130,87,18);thumbnails[2101782]=new thumbnail(2101782,"113121","Old Smokers","Old Smokers small B & W_thumb.jpg",130,67,18);thumbnails[2049869]=new thumbnail(2049869,"113121","A Break in the Rain - Derwent Water","A_break_in_the_rain_-_Derwent_Water_thumb.jpg",130,84,18);thumbnails[2036686]=new thumbnail(2036686,"113121","Ferrari Reflections","Ferrari_Reflections_by_Frank_Page_thumb.jpg",130,87,18);thumbnails[1677098]=new thumbnail(1677098,"113122","Absolute Flying","Absolutely_Flying_JH_thumb.jpg",130,192,18);thumbnails[1677514]=new thumbnail(1677514,"113122","Vermont Lakeside","Vermont_lakeside_JH_thumb.jpg",130,195,18);thumbnails[1677518]=new thumbnail(1677518,"113122","Young Fox","Young_Fox_SP_thumb.jpg",130,140,18);thumbnails[2191476]=new thumbnail(2191476,"113122","In Fine Feather","In_fine_feather_SPL_thumb.jpg",130,195,18);thumbnails[2191484]=new thumbnail(2191484,"113122","Symphony in Blue","Symphony_in_Blue_BP1_thumb.jpg",130,176,18);thumbnails[4457905]=new thumbnail(4457905,"113692","Dales Fence","Dales_Fence_FP_thumb.jpg",130,87,18);thumbnails[4457906]=new thumbnail(4457906,"113692","Estuary","Estuary_FP_thumb.jpg",130,87,18);thumbnails[4458350]=new thumbnail(4458350,"113692","Fatal Attraction","Fatal_Attraction_thumb.jpg",130,85,18);thumbnails[4458517]=new thumbnail(4458517,"113692","York Quayside - sepia","York_Quayside_-_sepia_thumb.jpg",130,87,18);thumbnails[4541166]=new thumbnail(4541166,"113692","What D'ya Think You're Looking At?","stinky_thumb.jpg",130,92,18);thumbnails[4978167]=new thumbnail(4978167,"113692","Compositers Bench (Sepia)","Compositers_Bench_Sepia_thumb.jpg",130,81,18);thumbnails[4978204]=new thumbnail(4978204,"113692","Dunes Fence","Dunes_Fence_thumb.jpg",130,185,18);thumbnails[1677318]=new thumbnail(1677318,"113122","Huts & Footprints","Huts_&_Footprints_FP_thumb.jpg",130,182,18);thumbnails[2049684]=new thumbnail(2049684,"113122","Low Falls","Vermont_waterfall_by_John_Hunt_thumb.jpg",130,195,18);thumbnails[2049850]=new thumbnail(2049850,"113122","Venitian Masks","Venetian_Mask_by_Carol_Casselden_thumb.jpg",130,178,18);thumbnails[2049857]=new thumbnail(2049857,"113122","Street Performers","Street_Performers_by_Carol_Casselden_thumb.jpg",130,195,18);thumbnails[3335776]=new thumbnail(3335776,"113692","Harsh Beauty","Harsh_Beauty_FP_thumb.jpg",130,185,18);thumbnails[3335782]=new thumbnail(3335782,"113692","Dog Tired","Dog_Tired_SP_thumb.jpg",130,74,18);thumbnails[3335737]=new thumbnail(3335737,"113692","At the De La Ware Pavilion","At_the_De_La_warr_Pavillion_SP_thumb.jpg",130,91,18);thumbnails[2036679]=new thumbnail(2036679,"113122","Coal Heap","Coal_Heap_by_Frank_Page_thumb.jpg",130,195,18);thumbnails[2036677]=new thumbnail(2036677,"113122","Linkage","Linkage_by_Frank_Page_thumb.jpg",130,195,18);thumbnails[4457820]=new thumbnail(4457820,"113693","Curiosity","Curiosity_SP_thumb.jpg",130,70,18);thumbnails[4458353]=new thumbnail(4458353,"113693","Pulpit - Hallgrimskirkja Church Rekyavik","Pulpit_-_Hallgrimskirkja_Church_Rekyavik_thumb.jpg",130,201,18);thumbnails[4458527]=new thumbnail(4458527,"113693","The Old Barn","The_Old_Barn_thumb.jpg",130,75,18);thumbnails[4492378]=new thumbnail(4492378,"113693","Cheetah on the Move","Cheetah_on_the_run_for_web_site_thumb.jpg",130,82,18);thumbnails[4492381]=new thumbnail(4492381,"113693","Martial Eagle with catch of Monitor Lizard","Martial_Eagle__with_catch_of_Monitor_Lizard_for_web_site_thumb.jpg",130,85,18);thumbnails[4492387]=new thumbnail(4492387,"113693","First Cut","First_Cut_for_web_site_thumb.jpg",130,87,18);thumbnails[4492403]=new thumbnail(4492403,"113693","White Tailed Fish Eagle in Norwegiean Fjord","White_Tailed_Fish_Eagle_for_web_site_thumb.jpg",130,84,18);thumbnails[4492405]=new thumbnail(4492405,"113693","Great Grey Owl (Strix Nebulosa) in Flight","GREAT_GREY_OWL_for_web_site_thumb.jpg",130,86,18);thumbnails[4492411]=new thumbnail(4492411,"113693","Goliath Heron (Audea Goliath)","Goliath_Heron_for_web_site_thumb.jpg",130,182,18);thumbnails[4492513]=new thumbnail(4492513,"113693","Tree Reflections at Dawn","Reflections_at_Dawn_for_web_site_thumb.jpg",130,175,18);thumbnails[4492528]=new thumbnail(4492528,"113693","Korean Lady","Korean_Lady_thumb.jpg",130,98,18);thumbnails[4492530]=new thumbnail(4492530,"113693","Street Protesters","Street_Protesters_thumb.jpg",130,98,18);thumbnails[4492534]=new thumbnail(4492534,"113693","White Cliffs","White_Cliffs_thumb.jpg",130,98,18);thumbnails[4502272]=new thumbnail(4502272,"113693","Killer Queen","Killer_Queen_small_file_thumb.jpg",130,170,18);thumbnails[4502279]=new thumbnail(4502279,"113693","Male Large Damsel-fly","Damsel_Fly_small_file_thumb.jpg",130,112,18);thumbnails[4502281]=new thumbnail(4502281,"113693","Bang and Still Alive","Bang_and_still_alive_small_file_thumb.jpg",130,189,18);thumbnails[4978358]=new thumbnail(4978358,"113693","Times Square impression","Times_Square_impression_thumb.jpg",130,166,18);thumbnails[5003352]=new thumbnail(5003352,"113693","Welsh Valley","Welsh_Valley_thumb.jpg",130,81,18);thumbnails[4972161]=new thumbnail(4972161,"282594","Amalfi coast village","Amalfi_coast_village_thumb.jpg",130,87,18);thumbnails[4972198]=new thumbnail(4972198,"282594","Leeds Castle","Leeds_Castle_thumb.jpg",130,89,18);thumbnails[5043981]=new thumbnail(5043981,"282594","Beady eye","Beady_eye_thumb.jpg",130,86,18);thumbnails[5043988]=new thumbnail(5043988,"282594","Evening atmosphere","Evening_at__thumb.jpg",130,86,18);thumbnails[5043994]=new thumbnail(5043994,"282594","Steam at Sandstone","Steam_at_Sandstone_thumb.jpg",130,85,18);thumbnails[5353568]=new thumbnail(5353568,"282594","Folkestone Home Guard","Folkestone_Home_Guard_thumb.jpg",130,195,18);thumbnails[5353612]=new thumbnail(5353612,"282594","Weald in Winter","Weald_in_Winter_thumb.jpg",130,201,18);thumbnails[5483700]=new thumbnail(5483700,"282594","Accros the Bridge","Across_the_Bridge_thumb.jpg",130,86,18);thumbnails[5483705]=new thumbnail(5483705,"282594","Art & Form","Art_Form_thumb.jpg",130,194,18);thumbnails[5483710]=new thumbnail(5483710,"282594","Old Sea Dogs","Old_Sea_Dogs_thumb.jpg",130,64,18);thumbnails[4972183]=new thumbnail(4972183,"282594","Brodomes Eden Project","Brodomes_Eden_Project_thumb.jpg",130,68,18);var galleries=new Object();galleries[113687]=new gallery(113687,"5483758,5483753,5483749,4107351,4107346,4107337,4107318,4107300,4107294,4107288"," \tProjected Digital Image Competitions","gallery",[4107288,4107294,4107300,4107318,4107337,4107346,4107351,5483749,5483753,5483758,4080930,4081289,4081298,4081302,4106578,4107158,4107204,4107244,2036146,2035857,2036105,2036192,2036278,2036294,2036311,2036324]);galleries[113120]=new gallery(113120,"2039761","Members Images","gallery",[]);galleries[113121]=new gallery(113121,"2039761","Members Images 1","gallery",[1677101,1677324,1677326,1677534,1687181,1687187,1677100,2039014,2039027,2039761,2101782,2049869,2036686]);galleries[113686]=new gallery(113686,"3335737","COMPETITIONS","gallery",[]);galleries[113122]=new gallery(113122,"2191484,2191476,2049857,2049850,2049684,2036679,2036677,1677518,1677514,1677318","Members Images 2","gallery",[1677098,1677514,1677518,2191476,2191484,1677318,2049684,2049850,2049857,2036679,2036677]);galleries[113692]=new gallery(113692,"3335737","Monmochrome Print Competitions","gallery",[4457905,4457906,4458350,4458517,4541166,4978167,4978204,3335776,3335782,3335737]);galleries[113693]=new gallery(113693,"5003352,4978358,4502281,4502279,4502272,4492534,4492530,4492528,4492513,4492411","Colour Print Competitions","gallery",[4457820,4458353,4458527,4492378,4492381,4492387,4492403,4492405,4492411,4492513,4492528,4492530,4492534,4502272,4502279,4502281,4978358,5003352]);galleries[282594]=new gallery(282594,"5483710,5483705,5483700,5353612,5353568,5043994,5043988,5043981,4972198,4972183","Slide Competitions","gallery",[4972161,4972198,5043981,5043988,5043994,5353568,5353612,5483700,5483705,5483710,4972183]);var imageSets=new Object();imageSets[1]="2039761,1687187,1687181,1677534,1677326,1677324,1677101,1677100";imageSets[2]="3335737,2039761";imageSets[3]="5483758,5483753,5483749,5483710,5483705,5483700,5353612,5353568,5043994,5043988,5043981,5003352,4978358,4978204,4978167,4972198,4972183,4972161,4558945,4558884,4541166,4502281,4502279,4502272,4492534,4492530,4492528,4492513,4492411,4492405,4492403,4492387,4492381,4492378,4458527,4458517,4458353,4458350,4457906,4457905,4457820,4107351,4107346,4107337,4107318,4107300,4107294,4107288,4107244,4107204";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/FrankSPS/images";break}switch(a){case 1:b="http://www1.clikpic.com/FrankSPS/images";break}switch(a){case 2:b="http://admin.clikpic.com/FrankSPS/images";break}switch(a){case 24:b="http://tpc15/clikpic/FrankSPS/images";break}switch(a){case 4:b="http://www.clikchurch.com/FrankSPS/images";break}switch(a){case 5:b="http://www2.clikpic.com/FrankSPS/images";break}switch(a){case 22:b="http://tpc5/clikpic/FrankSPS/images";break}switch(a){case 23:b="http://tpc10/clikpic/FrankSPS/images";break}switch(a){case 25:b="http://tpc16/clikpic/FrankSPS/images";break}switch(a){case 15:b="http://www3.clikpic.com/FrankSPS/images";break}switch(a){case 18:b="http://www4.clikpic.com/FrankSPS/images";break}switch(a){case 19:b="http://www5.clikpic.com/FrankSPS/images";break}switch(a){case 31:b="http://www7.clikpic.com/FrankSPS/images";break}switch(a){case 32:b="http://admin2.clikpic.com/FrankSPS/images";break}switch(a){case 33:b="http://www8.clikpic.com/FrankSPS/images";break}switch(a){case 34:b="http://www9.clikpic.com/FrankSPS/images";break}switch(a){case 35:b="http://admin3.clikpic.com/FrankSPS/images";break}switch(a){case 37:b="http://admin4.clikpic.com/FrankSPS/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="Staplehurst Photographic Society: "+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+'")'})}}};