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[610047]=new thumbnail(610047,"46302","Holkham Sands","Holkham_Sands_(BW)_thumb.jpg",130,92,15);thumbnails[615570]=new thumbnail(615570,"46302","Melincourt falls","Melincourt_(BW)_thumb.jpg",92,130,15);thumbnails[727225]=new thumbnail(727225,"46302","Knap cloudscape","Knap_beach_cloudscape1_thumb.jpg",130,88,15);thumbnails[727234]=new thumbnail(727234,"46302","The Old Harbour","The_Old_Harbour_Barry_thumb.jpg",130,92,15);thumbnails[754706]=new thumbnail(754706,"46302","Broken Fence","Broken_Fence_thumb.jpg",130,85,15);thumbnails[1656048]=new thumbnail(1656048,"46302","Boxgrove Priory","Boxgrove Priory 2 (BW)1_thumb.jpg",130,89,15);thumbnails[1656052]=new thumbnail(1656052,"46302","Nash Point, south Wales ","Nash Point 4 (BW)_thumb.jpg",130,95,15);thumbnails[1745845]=new thumbnail(1745845,"46302","Spinnaker Tower","Spinaker Tower 2 (BW)_thumb.jpg",86,130,15);thumbnails[1802503]=new thumbnail(1802503,"46302","Regents Canal","Camden Lock (tone)_thumb.jpg",94,130,15);thumbnails[1813221]=new thumbnail(1813221,"46302","Battle Abbey","Battle abbey_thumb.jpg",130,83,15);thumbnails[613977]=new thumbnail(613977,"46338","Aberdulais Falls","Aberdulais1_thumb.jpg",86,130,15);thumbnails[722807]=new thumbnail(722807,"46338","Rhondda Heritage Park","Rhondda_Heritage_Park_thumb.jpg",130,92,15);thumbnails[733194]=new thumbnail(733194,"46338","Sgwd Isaf Clun Gwyn","Sgwd_Isaf_Clungwyn_5 (BW)_thumb.jpg",130,80,15);thumbnails[1666402]=new thumbnail(1666402,"46338","Stairwell","De La Warr Interior 3_thumb.jpg",130,97,15);thumbnails[1742233]=new thumbnail(1742233,"46338","Three Cliffs Bay","Three Cliffs Bay 4 (BW)_thumb.jpg",130,95,15);thumbnails[1781796]=new thumbnail(1781796,"46338","Neath Abbey","Neath Abbey 5_thumb.jpg",130,74,15);thumbnails[1813328]=new thumbnail(1813328,"46338","Reculver Towers","Reculver Towers (BW) 2_thumb.jpg",130,91,15);thumbnails[1826383]=new thumbnail(1826383,"46338","Summer cloudscape","Summer cloudscape IOW_thumb.jpg",130,75,15);thumbnails[1875722]=new thumbnail(1875722,"46338","Royal Crescent","Royal Crescent 2 (BW)_thumb.jpg",130,62,15);thumbnails[649137]=new thumbnail(649137,"109941","Mumbles Head","Mumbles_Head_&_Lighthouse_2 (BW)_ Lith_thumb.jpg",130,92,15);thumbnails[1656066]=new thumbnail(1656066,"109941","Nash Point Lighthouse","Nash_Point_rocks_&_lighthouse_thumb.jpg",130,84,15);thumbnails[1666403]=new thumbnail(1666403,"109941","South Downs","Straw_Bales_South_Downs_thumb.jpg",130,81,15);thumbnails[1767206]=new thumbnail(1767206,"109941","Castell Coch","Castell Coch 3 (BW-tone)_thumb.jpg",130,92,15);thumbnails[1781767]=new thumbnail(1781767,"109941","Pulpit Rock","Pulpit Rock 4 (BW-Lith)_thumb.jpg",130,86,15);thumbnails[1805163]=new thumbnail(1805163,"109941","Rhossili Bay","Rhossilli Bay Gower  South Wales 4_thumb.jpg",130,85,15);thumbnails[1813325]=new thumbnail(1813325,"109941","Abandoned ","Dungeness Boats (BW) 2_thumb.jpg",130,83,15);thumbnails[1813335]=new thumbnail(1813335,"109941","Wilton's Music Hall","Wilton's 2 (BW)_thumb.jpg",99,130,15);thumbnails[1814715]=new thumbnail(1814715,"109941","Hampstead Heath ","Winter Hampstead Heath (tone)_thumb.jpg",86,130,15);thumbnails[1937317]=new thumbnail(1937317,"109941","Great Court","British Museum Great Court_thumb.jpg",130,90,15);thumbnails[615406]=new thumbnail(615406,"109942","The Norweigian Church","Norweigian_Church_(Sepia)_thumb.jpg",130,92,15);thumbnails[722809]=new thumbnail(722809,"109942","St. Catherine's Oratory","St_Catherines_Oratory_(BW)_2_thumb.jpg",130,92,15);thumbnails[1747575]=new thumbnail(1747575,"109942","Disused Chapel","Abney Park Chapel 3 (BW-tone)_thumb.jpg",130,91,15);thumbnails[1781783]=new thumbnail(1781783,"109942","Whiteford Lighthouse","Whiteford Lighthouse_thumb.jpg",130,92,15);thumbnails[1813300]=new thumbnail(1813300,"109942","Enchanted tree","Wakehurst Tree 3 (IR-Tone)_thumb.jpg",88,130,15);thumbnails[1859830]=new thumbnail(1859830,"109942","Hampstead Heath","Mike Howell - Winter Hampstead Heath_thumb.jpg",86,130,15);thumbnails[1875629]=new thumbnail(1875629,"109942","Mewslade Bay","Mewslade Bay (BW-IR)_thumb.jpg",130,66,15);thumbnails[1875674]=new thumbnail(1875674,"109942","Pulteney bridge","Pulteney Bridge 3 (BW-Sel)_thumb.jpg",83,130,15);thumbnails[1937355]=new thumbnail(1937355,"109942","Cabot Square","Cabot Square (Lith)_thumb.jpg",130,85,15);thumbnails[1944926]=new thumbnail(1944926,"109942","Little Venice","Little Venice (tone)_thumb.jpg",130,82,15);thumbnails[1673816]=new thumbnail(1673816,"109943","Abandoned chapel","Abney Park Chapel 2 (BW tone)_thumb.jpg",130,87,15);thumbnails[1813317]=new thumbnail(1813317,"109943","Tintern Abbey","Tintern Abbey (IR Gold)_thumb.jpg",130,85,15);thumbnails[1846804]=new thumbnail(1846804,"109943","Candleston castle","Candleston Castle (BW-IR)-tone 7_thumb.jpg",130,90,15);thumbnails[2029255]=new thumbnail(2029255,"109943","Candleston Castle","Candleston Castle (BW-IR) tone 8_thumb.jpg",130,87,15);thumbnails[2059025]=new thumbnail(2059025,"109943","New Forest Meadow","New Forest Meadow_thumb.jpg",130,88,15);thumbnails[2086763]=new thumbnail(2086763,"109943","Bembridge Windmill","Bembridge Windmill_thumb.jpg",130,92,15);thumbnails[2123685]=new thumbnail(2123685,"109943","Battle Abbey","Battle Abbey 2_thumb.jpg",130,88,15);thumbnails[2185668]=new thumbnail(2185668,"109943","Cowdray House","Cowdray Park 3_thumb.jpg",130,87,15);thumbnails[2185676]=new thumbnail(2185676,"109943","Stourhead","Stourhead_thumb.jpg",130,88,15);thumbnails[2735813]=new thumbnail(2735813,"109943","Usk Castle","Usk Castle 2_thumb.jpg",130,89,15);thumbnails[619036]=new thumbnail(619036,"46300","Rhossili Down","Rhossili_Down_thumb.jpg",130,79,15);thumbnails[648451]=new thumbnail(648451,"46300","Worms Head","Worms_Head_31_thumb.jpg",130,92,15);thumbnails[716632]=new thumbnail(716632,"46300","Mumbles Head","Mumbles_Head_&_Lighthouse_3_thumb.jpg",130,79,15);thumbnails[721904]=new thumbnail(721904,"46300","Bracelet Bay","Bracelet_Bay_thumb.jpg",130,70,15);thumbnails[721906]=new thumbnail(721906,"46300","Rhossili Bay","Rhossilli_Bay_Gower_South_Wales_thumb.jpg",130,92,15);thumbnails[1929783]=new thumbnail(1929783,"46300","Tor bay & Great Tor","Tor Bay & Great Tor_thumb.jpg",130,86,15);thumbnails[610028]=new thumbnail(610028,"46301","Cardiff Bay","Cardiff_Bay_Pierhead_buildings_thumb.jpg",130,77,15);thumbnails[610041]=new thumbnail(610041,"46301","Nash Point","Nash_Point_44_thumb.jpg",130,88,15);thumbnails[612251]=new thumbnail(612251,"46301","Craig-Y-LLyn","Craig_Y_Llyn_3_thumb.jpg",130,92,15);thumbnails[612291]=new thumbnail(612291,"46301","Dunraven Bay","Dunraven_Bay_Dramatic_Sunset_2_thumb.jpg",130,70,15);thumbnails[612308]=new thumbnail(612308,"46301","Rest Bay","Rest_Bay_Porthcawl_4_thumb.jpg",130,92,15);thumbnails[613643]=new thumbnail(613643,"46301","Tenby harbour","Tenby_Harbour_thumb.jpg",130,92,15);thumbnails[614077]=new thumbnail(614077,"46301","Sgwd (Uchaf) Clun-Gwyn","Sgwd_(Uchaf)_Clungwyn_2_thumb.jpg",92,130,15);thumbnails[614110]=new thumbnail(614110,"46301","Sgwd Gwladys","Sgwd_Gwladys_6_thumb.jpg",87,130,15);thumbnails[705529]=new thumbnail(705529,"46301","Dunraven Bay","Dunraven_Bay_at_Sunset_14_thumb.jpg",130,92,15);thumbnails[1666399]=new thumbnail(1666399,"46301","St. David's Hotel","St David's Hotel_thumb.jpg",85,130,15);thumbnails[609982]=new thumbnail(609982,"46296","Charmouth","Charmouth_Dorset_7_thumb.jpg",130,92,15);thumbnails[609993]=new thumbnail(609993,"46296","Bat's Head & Durdle Door","Bats_Head_&_Durdle Door_4_thumb.jpg",130,80,15);thumbnails[610099]=new thumbnail(610099,"46296","West Bay","West_Bay_Cliffs1_thumb.jpg",130,92,15);thumbnails[611435]=new thumbnail(611435,"46296","Kimmeridge Bay","Kimmeridge_Bay_thumb.jpg",130,92,15);thumbnails[611439]=new thumbnail(611439,"46296","Chapman's Pool","Chapmans_Pool_thumb.jpg",130,92,15);thumbnails[611511]=new thumbnail(611511,"46296","Durdle Door","Durdle_Door_Profile_at_Sunset_thumb.jpg",130,92,15);thumbnails[613603]=new thumbnail(613603,"46296","Near Orcombe Point","Nr_Orcombe_Point_3_thumb.jpg",130,92,15);thumbnails[613609]=new thumbnail(613609,"46296","Portland Bill","Portland_Bill_Lighthouse_3_thumb.jpg",130,92,15);thumbnails[615408]=new thumbnail(615408,"46296","Studland ","Studland_at_Sunset_thumb.jpg",130,83,15);thumbnails[636262]=new thumbnail(636262,"46296","Pulpit Rock","Pulpit_Rock_8_thumb.jpg",130,92,15);thumbnails[611524]=new thumbnail(611524,"46298","Brighton, West pier","Brighton_West_Pier_Sunset_&_Birds_thumb.jpg",130,92,15);thumbnails[611526]=new thumbnail(611526,"46298","River Cuckmere","River_Cuckmere_3_thumb.jpg",130,92,15);thumbnails[612259]=new thumbnail(612259,"46298","Leigh Creek","Leigh_Creek_3_thumb.jpg",130,71,15);thumbnails[613597]=new thumbnail(613597,"46298","Camber Sands","Camber_Sands_thumb.jpg",130,78,15);thumbnails[615413]=new thumbnail(615413,"46298","Leigh Creek","Leigh_Creek_3A_thumb.jpg",130,92,15);thumbnails[627411]=new thumbnail(627411,"46298","The Needles","The_Needles_at_sunset_5_thumb.jpg",130,70,15);thumbnails[692505]=new thumbnail(692505,"46298","Corfe Castle","Corfe_Castle_2_thumb.jpg",87,130,15);thumbnails[714990]=new thumbnail(714990,"46298","Leigh Creek","Leigh_Creek_5_thumb.jpg",130,87,15);thumbnails[1933897]=new thumbnail(1933897,"46298","Sunset at Birling Gap","Sunset Birling Gap_thumb.jpg",130,81,15);thumbnails[1933907]=new thumbnail(1933907,"46298","Halnaker Windmill","Halnaker Windmill 3_thumb.jpg",130,86,15);thumbnails[610075]=new thumbnail(610075,"54858","Thames-side","Thames_side_view1_thumb.jpg",130,92,15);thumbnails[625360]=new thumbnail(625360,"54858","Westminster","Westminster_thumb.jpg",130,104,15);thumbnails[640748]=new thumbnail(640748,"54858","Bettersea Power Station","Battersea Sunset_thumb.jpg",86,130,15);thumbnails[640750]=new thumbnail(640750,"54858","The London Eye","The_London_Eye_&_river_view_thumb.jpg",130,93,15);thumbnails[692515]=new thumbnail(692515,"54858","The Houses of Parliament","Houses_of_Parliament_thumb.jpg",130,78,15);thumbnails[1823417]=new thumbnail(1823417,"54858","The Thames Barrier & Canary Wharf","Thames barrier & Canary Wharf 2_thumb.jpg",130,70,15);thumbnails[1823492]=new thumbnail(1823492,"54858","Churchill Statue & Big Ben","Churchill & Big Ben 2_thumb.jpg",89,130,15);thumbnails[1929755]=new thumbnail(1929755,"54858","Tower Bridge","Tower Bridge at Dusk 4_thumb.jpg",130,92,15);thumbnails[1929771]=new thumbnail(1929771,"54858","Canary Wharf","Canary Wharf & O2 2_thumb.jpg",89,130,15);thumbnails[1937304]=new thumbnail(1937304,"54858","Lloyds","Lloyds_thumb.jpg",87,130,15);var galleries=new Object();galleries[46302]=new gallery(46302,"1656052,1656048,610047","Black & White 1","gallery",[610047,615570,727225,727234,754706,1656048,1656052,1745845,1802503,1813221]);galleries[46338]=new gallery(46338,"1875722,1826383,1813328,1781796,1742233,1666402,733194,722807,613977","Black & White 2 ","gallery",[613977,722807,733194,1666402,1742233,1781796,1813328,1826383,1875722]);galleries[109941]=new gallery(109941,"1937317,1656066","Toned Images 1","gallery",[649137,1656066,1666403,1767206,1781767,1805163,1813325,1813335,1814715,1937317]);galleries[109942]=new gallery(109942,"722809","Toned Images 2","gallery",[615406,722809,1747575,1781783,1813300,1859830,1875629,1875674,1937355,1944926]);galleries[109943]=new gallery(109943,"2185668,2029255","Infrared","gallery",[1673816,1813317,1846804,2029255,2059025,2086763,2123685,2185668,2185676,2735813]);galleries[46300]=new gallery(46300,"716632","The Gower","gallery",[619036,648451,716632,721904,721906,1929783]);galleries[46301]=new gallery(46301,"1666399,610028","South & West Wales","gallery",[610028,610041,612251,612291,612308,613643,614077,614110,705529,1666399]);galleries[46296]=new gallery(46296,"609993,609982","Jurassic Coast ","gallery",[609982,609993,610099,611435,611439,611511,613603,613609,615408,636262]);galleries[46298]=new gallery(46298,"1933897","Southern & Eastern England","gallery",[611524,611526,612259,613597,615413,627411,692505,714990,1933897,1933907]);galleries[54858]=new gallery(54858,"1929755,625360","London","gallery",[610075,625360,640748,640750,692515,1823417,1823492,1929755,1929771,1937304]);var imageSets=new Object();imageSets[1]="2185676,1813325,1813300,1742233";imageSets[2]="2185668,2029255,1937317,1933897,1929755,1666399,1656066,1656052,1656048,722809,716632,625360,610047,610028,609993,609982";imageSets[3]="2735813,2185676,2185668,2123685,2086763,2059025,2029255,1944926,1937355,1937317,1937304,1933907,1933897,1929783,1929771,1929755,1875722,1875674,1875629,1859830,1846804,1826383,1823492,1823417,1814715,1813335,1813328,1813325,1813317,1813300,1813221,1805163,1802503,1781796,1781783,1781767,1767206,1747575,1745845,1742233,1673816,1666403,1666402,1666399,1656066,1656052,1656048,754706,733194,727234";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/mdhowell/images";break}switch(a){case 1:b="http://www1.clikpic.com/mdhowell/images";break}switch(a){case 2:b="http://admin.clikpic.com/mdhowell/images";break}switch(a){case 24:b="http://tpc15/clikpic/mdhowell/images";break}switch(a){case 4:b="http://www.clikchurch.com/mdhowell/images";break}switch(a){case 5:b="http://www2.clikpic.com/mdhowell/images";break}switch(a){case 22:b="http://tpc5/clikpic/mdhowell/images";break}switch(a){case 23:b="http://tpc10/clikpic/mdhowell/images";break}switch(a){case 25:b="http://tpc16/clikpic/mdhowell/images";break}switch(a){case 15:b="http://www3.clikpic.com/mdhowell/images";break}switch(a){case 18:b="http://www4.clikpic.com/mdhowell/images";break}switch(a){case 19:b="http://www5.clikpic.com/mdhowell/images";break}switch(a){case 31:b="http://www7.clikpic.com/mdhowell/images";break}switch(a){case 32:b="http://admin2.clikpic.com/mdhowell/images";break}switch(a){case 33:b="http://www8.clikpic.com/mdhowell/images";break}switch(a){case 34:b="http://www9.clikpic.com/mdhowell/images";break}switch(a){case 35:b="http://admin3.clikpic.com/mdhowell/images";break}switch(a){case 37:b="http://admin4.clikpic.com/mdhowell/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="Mike Howell Photographic Artist: "+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+'")'})}}};