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[1611360]=new thumbnail(1611360,"109630","Old Groyne ","900_91_thumb.jpg",130,87,1);thumbnails[1634097]=new thumbnail(1634097,"109630","Log","900_11_thumb.jpg",130,87,1);thumbnails[1630757]=new thumbnail(1630757,"109630","Lone Gull","900_21_thumb.jpg",130,87,1);thumbnails[1640162]=new thumbnail(1640162,"109630","Stick in the Sand 2","900_81_thumb.jpg",130,87,1);thumbnails[2857080]=new thumbnail(2857080,"109630","Old Groyne At Westward Ho","900_101_thumb.jpg",130,87,1);thumbnails[1645711]=new thumbnail(1645711,"109630","Pebbles in the Sand 2","900_71_thumb.jpg",130,87,1);thumbnails[1640176]=new thumbnail(1640176,"109630","Groyne ","900_51_thumb.jpg",130,87,1);thumbnails[1647392]=new thumbnail(1647392,"109630","Pebble Ridge I","900_131_thumb.jpg",130,87,1);thumbnails[5480676]=new thumbnail(5480676,"109630","walkway","path_2_v2_thumb.jpg",130,87,1);thumbnails[2365616]=new thumbnail(2365616,"109630","Bideford Quay Sunset","900_4_thumb.jpg",130,87,1);thumbnails[3656261]=new thumbnail(3656261,"109630","Waiting !","Pochard_1_thumb.jpg",130,87,1);thumbnails[3055338]=new thumbnail(3055338,"109630","Westward Ho Old Groyne 3","900_111_thumb.jpg",130,87,1);thumbnails[3726972]=new thumbnail(3726972,"109630","Heading Home","900_12_thumb.jpg",130,87,1);thumbnails[3726960]=new thumbnail(3726960,"109630","Waiting 2.","Pochard_2_thumb.jpg",130,87,1);thumbnails[1645739]=new thumbnail(1645739,"109630","Pebble Ridge","900_3_thumb.jpg",130,87,1);thumbnails[2929868]=new thumbnail(2929868,"109630","Instow Sunset","900_thumb.jpg",130,87,1);thumbnails[5474374]=new thumbnail(5474374,"307099","Old Pier Stumps I","stumps_colour_1_thumb.jpg",130,87,1);thumbnails[5474538]=new thumbnail(5474538,"307099","Bideford Bridge at Night","not_sharp_thumb.jpg",130,87,1);thumbnails[5474582]=new thumbnail(5474582,"307099","Old Windmill at Instow","Lookout_tower_thumb.jpg",130,85,1);thumbnails[5474695]=new thumbnail(5474695,"307099","Groyne Long Exposure I","_DSC1640_no_nr_or_sharp_thumb.jpg",130,87,1);thumbnails[5480327]=new thumbnail(5480327,"307099","Old Pier Stumps II","Stumps_2_thumb.jpg",130,87,1);thumbnails[5480359]=new thumbnail(5480359,"307099","Late evening Rocks","Not_sharp_or_NR_thumb.jpg",130,81,1);thumbnails[5480393]=new thumbnail(5480393,"307099","Old Pier Stumps III","_DSC1981_thumb.jpg",130,87,1);thumbnails[5480440]=new thumbnail(5480440,"307099","Groyne Long exposure III","Pebbles_and_groyne_thumb.jpg",130,87,1);thumbnails[5480203]=new thumbnail(5480203,"307099","Groyne Long exposure II","Groyne_1_thumb.jpg",130,87,1);thumbnails[1645703]=new thumbnail(1645703,"111227","Instow Lookout Tower","INSTOW_LOOKOUT_2_vers_2_thumb.jpg",130,87,1);thumbnails[5569974]=new thumbnail(5569974,"111227","Instow Boat","boat_nsharp_thumb.jpg",130,85,1);thumbnails[1645708]=new thumbnail(1645708,"111227","Tawstock Church","church_thumb.jpg",130,87,1);thumbnails[3727033]=new thumbnail(3727033,"111227","Dartmouth Fog I","ww_thumb.jpg",130,87,1);thumbnails[1645704]=new thumbnail(1645704,"111227","Tarr Steps I","Bridge_9_thumb.jpg",130,87,1);thumbnails[3656247]=new thumbnail(3656247,"111227","Bideford in the Mist","Mist_1_thumb.jpg",130,87,1);thumbnails[5570019]=new thumbnail(5570019,"111227","Nassau Court Appartments","Nassau_Court_thumb.jpg",130,87,1);thumbnails[1647395]=new thumbnail(1647395,"111227","Tarr Steps II","Bridge_1_thumb.jpg",130,87,1);thumbnails[2365486]=new thumbnail(2365486,"111227","Bideford Bridge and Quay","bridge_col_fin_thumb.jpg",130,87,1);thumbnails[3727018]=new thumbnail(3727018,"111227","Dartmouth Fog II","dartmouth_finished_thumb.jpg",130,87,1);thumbnails[5570154]=new thumbnail(5570154,"111227","Bull Point Lighthouse","_DSC2219_thumb.jpg",130,87,1);thumbnails[5053461]=new thumbnail(5053461,"111227","Atlantic View Appartments","Atlantic_View_shapened_thumb.jpg",130,87,1);thumbnails[1637356]=new thumbnail(1637356,"110711","Weare Gifford Weir (colour IR)","25_thumb.jpg",123,184,1);thumbnails[1640125]=new thumbnail(1640125,"110711","Weare Gifford Weir I","Finished_1_BW_thumb.jpg",123,184,1);thumbnails[1637349]=new thumbnail(1637349,"110711","Weare Gifford Weir II","3_jpeg_thumb.jpg",123,184,1);thumbnails[1637344]=new thumbnail(1637344,"110711","Weare Gifford Weir III","1_jpeg_thumb.jpg",123,184,1);thumbnails[1877230]=new thumbnail(1877230,"110711","Bucks Mills","IR_bucks_mills_600_thumb.jpg",123,184,1);thumbnails[1637350]=new thumbnail(1637350,"110711","Hollywell School (colour IR)","School_finished_vers_thumb.jpg",130,87,1);thumbnails[1637358]=new thumbnail(1637358,"110711","Hollywell School","school_1_bw_thumb.jpg",130,87,1);thumbnails[5577507]=new thumbnail(5577507,"110711","Bideford Quay I","Quay_1_IR_bw_thumb.jpg",130,87,1);thumbnails[5577523]=new thumbnail(5577523,"110711","Bideford Bridge","Quay_1_IR_2_bw_thumb.jpg",130,87,1);thumbnails[1630789]=new thumbnail(1630789,"227623","Pebbles","pebbles_900_thumb.jpg",130,87,1);thumbnails[3726755]=new thumbnail(3726755,"227623","Rod Tip","_DSC5362_900_thumb.jpg",130,87,1);thumbnails[3726883]=new thumbnail(3726883,"227623","Looking at You","swan_1_900_thumb.jpg",130,87,1);thumbnails[4626450]=new thumbnail(4626450,"227623","Westaward Ho Serenity","_DSC0620_thumb.jpg",130,87,1);thumbnails[5053480]=new thumbnail(5053480,"227623","Rod Tip II","Rod_Tip_thumb.jpg",130,87,1);thumbnails[5058961]=new thumbnail(5058961,"227623","Misty Dawn II","_DSC1280_800_thumb.jpg",130,87,1);thumbnails[3726906]=new thumbnail(3726906,"227623","Footprints","900_snow_thumb.jpg",123,184,1);thumbnails[3769680]=new thumbnail(3769680,"227623","Post's","post_900_thumb.jpg",123,184,1);thumbnails[1743416]=new thumbnail(1743416,"117147","Hartland Slipway","Slipway_thumb.jpg",130,87,1);thumbnails[3055246]=new thumbnail(3055246,"310121","Misty Dawn","_DSC3783_800_thumb.jpg",130,87,1);thumbnails[1760965]=new thumbnail(1760965,"117147","Lone Pebble","sharpened_v2_thumb.jpg",130,87,1);thumbnails[2931089]=new thumbnail(2931089,"117147","Single Rocks","3_fin_thumb.jpg",130,87,1);thumbnails[5480757]=new thumbnail(5480757,"310121","Station Hill Bridge","_DSC1784_thumb.jpg",123,184,1);thumbnails[1647389]=new thumbnail(1647389,"117147","Windmill Ruin ","6_thumb.jpg",130,87,1);thumbnails[5480714]=new thumbnail(5480714,"310121","Beam Weir I","Weir_11_thumb.jpg",123,184,1);thumbnails[1877324]=new thumbnail(1877324,"117147","Steps","steps_thumb.jpg",130,87,1);thumbnails[2365540]=new thumbnail(2365540,"117147","Old Boat Ruin","boat_thumb.jpg",130,87,1);thumbnails[1877406]=new thumbnail(1877406,"117147","Coastpath Sign","sign_800_thumb.jpg",130,87,1);thumbnails[5577789]=new thumbnail(5577789,"117147","Bull Point Lighthouse","_DSC2234_thumb.jpg",130,87,1);thumbnails[3656257]=new thumbnail(3656257,"310121","Footprints","v2_thumb.jpg",123,184,1);thumbnails[1640168]=new thumbnail(1640168,"110515","Stick in the Sand","aa1_thumb.jpg",130,195,1);thumbnails[1647406]=new thumbnail(1647406,"110515","Lone Gull 2","1 (26)_thumb.jpg",130,195,1);thumbnails[1647413]=new thumbnail(1647413,"110515","Rockpool","1 (30)_thumb.jpg",130,195,1);thumbnails[1647409]=new thumbnail(1647409,"110515","Seaweed","1 (28)_thumb.jpg",130,195,1);thumbnails[1630791]=new thumbnail(1630791,"110515","Driftwood ","log 2_thumb.jpg",130,195,1);thumbnails[1648347]=new thumbnail(1648347,"110515","Driftwood 2","24_thumb.jpg",130,194,1);thumbnails[5053512]=new thumbnail(5053512,"110515","Lakeside, after dark.","9_C654A4D4-2219-B5B5-4C704C77C6156B50_thumb.jpg",128,184,1);thumbnails[1645806]=new thumbnail(1645806,"315965","Watersmeet Pool","1 (21)_thumb.jpg",130,195,1);thumbnails[1645802]=new thumbnail(1645802,"315965","Watersmeet Tree","1 (20)_thumb.jpg",130,195,1);thumbnails[1647407]=new thumbnail(1647407,"315965","Tarr Steps","Bridge_thumb.jpg",130,195,1);thumbnails[4282672]=new thumbnail(4282672,"112685","Westward Ho Panoramic","Westward_Ho_Pano__800_thumb.jpg",130,50,1);thumbnails[2365636]=new thumbnail(2365636,"112685","Dartmouth Harbour","dartmouth_pano_finished__800_thumb.jpg",130,50,1);thumbnails[5059005]=new thumbnail(5059005,"112685","Pochard Sunrise","2_CB86D45F-2219-B5B5-4CBB8DFA393EBD18_thumb.jpg",130,50,1);thumbnails[3656236]=new thumbnail(3656236,"112685","Bideford Panoramic I","Bid_pano_800_thumb.jpg",130,50,1);thumbnails[2929802]=new thumbnail(2929802,"112685","Taw/Torridge Estuary Sunset","ins__800_thumb.jpg",130,50,1);thumbnails[1645709]=new thumbnail(1645709,"112685","Instow","instow_pano_Finished__8001_thumb.jpg",130,50,1);thumbnails[4282922]=new thumbnail(4282922,"112685","Bideford Panoramic II","Bideford_Quay_Pano_800_thumb.jpg",130,50,1);thumbnails[1687192]=new thumbnail(1687192,"112685","Wetward Ho Beach","Finished_pano_800_thumb.jpg",130,50,1);thumbnails[2365657]=new thumbnail(2365657,"112685","Bideford Quay Panoramic","Not_quite_fiished_800_thumb.jpg",130,50,1);thumbnails[1700807]=new thumbnail(1700807,"112685","Hartland Cliffs","Hartland_1_com_finished_pano_800_thumb.jpg",130,50,1);thumbnails[2929764]=new thumbnail(2929764,"112685","Bideford Bridge","Pano_finished_not_sharpened_800_thumb.jpg",130,50,1);thumbnails[1700895]=new thumbnail(1700895,"112685","Hartland Quay Panoramic.","Hartland_pano_joine_gone_800_thumb.jpg",130,50,1);thumbnails[4282996]=new thumbnail(4282996,"112685","Westward Ho Sunset.","Pano_sunset_800_thumb.jpg",130,50,1);thumbnails[5059202]=new thumbnail(5059202,"112685","Colours of Autumn","aa_thumb.jpg",130,50,1);thumbnails[5059016]=new thumbnail(5059016,"112685","Lake Pochard","3_CB89EB84-2219-B5B5-4C1F7C993D73895A_thumb.jpg",130,50,1);thumbnails[5053528]=new thumbnail(5053528,"112685","Bideford Panoramic III","1_C65BD856-2219-B5B5-4C2B3B42E39574A9_thumb.jpg",130,50,1);var galleries=new Object();galleries[109630]=new gallery(109630,"1611360","Sunsets Image Gallery 1","gallery",[1611360,1634097,1630757,1640162,2857080,1645711,1640176,1647392,5480676,2365616,3656261,3055338,3726972,3726960,1645739,2929868]);galleries[307099]=new gallery(307099,"5474374","Long exposure Image Gallery","gallery",[5474374,5474538,5474582,5474695,5480327,5480359,5480393,5480440,5480203]);galleries[111227]=new gallery(111227,"2365486","Landscapes Image  Gallery                ","gallery",[1645703,5569974,1645708,3727033,1645704,3656247,5570019,1647395,2365486,3727018,5570154,5053461]);galleries[110711]=new gallery(110711,"1637358","Infra Red Image Gallery","gallery",[1637356,1640125,1637349,1637344,1877230,1637350,1637358,5577507,5577523]);galleries[227623]=new gallery(227623,"3726755,1630789","Abstract and Artistic Image Gallery","gallery",[1630789,3726755,3726883,4626450,5053480,5058961,3726906,3769680]);galleries[117147]=new gallery(117147,"1743416","Black and White Image Gallery","gallery",[1743416,1760965,2931089,1647389,1877324,2365540,1877406,5577789]);galleries[310121]=new gallery(310121,"5480757,5480714,3656257,3055246","Four season's Image Gallery","gallery",[3055246,5480757,5480714,3656257]);galleries[110515]=new gallery(110515,"1640168","Sunsets Image Gallery 2","gallery",[1640168,1647406,1647413,1647409,1630791,1648347,5053512]);galleries[315965]=new gallery(315965,"1647407,1645806,1645802","Landscapes image gallery II","gallery",[1645806,1645802,1647407]);galleries[112685]=new gallery(112685,"5059202,5059016,5059005,5053528,4282996,4282922,4282672,3656236,2929802,2929764","Panoramic Image Gallery","gallery",[4282672,2365636,5059005,3656236,2929802,1645709,4282922,1687192,2365657,1700807,2929764,1700895,4282996,5059202,5059016,5053528]);var imageSets=new Object();imageSets[1]="5474538,5474374";imageSets[2]="5474374,3726755,2365486,1743416,1640168,1637358,1630789,1611360";imageSets[3]="5577789,5577523,5577507,5570154,5570019,5569974,5480757,5480714,5480676,5480440,5480393,5480359,5480327,5480203,5474695,5474582,5474538,5474374,5059202,5059016,5059005,5058961,5053528,5053512,5053480,5053461,4626450,4282996,4282922,4282672,3769680,3727033,3727018,3726972,3726960,3726906,3726883,3726755,3656261,3656257,3656247,3656236,3055338,3055246,2931089,2929868,2929802,2929764,2857080,2365657";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/robkendall/images";break}switch(a){case 1:b="http://www1.clikpic.com/robkendall/images";break}switch(a){case 2:b="http://admin.clikpic.com/robkendall/images";break}switch(a){case 24:b="http://tpc15/clikpic/robkendall/images";break}switch(a){case 4:b="http://www.clikchurch.com/robkendall/images";break}switch(a){case 5:b="http://www2.clikpic.com/robkendall/images";break}switch(a){case 22:b="http://tpc5/clikpic/robkendall/images";break}switch(a){case 23:b="http://tpc10/clikpic/robkendall/images";break}switch(a){case 25:b="http://tpc16/clikpic/robkendall/images";break}switch(a){case 15:b="http://www3.clikpic.com/robkendall/images";break}switch(a){case 18:b="http://www4.clikpic.com/robkendall/images";break}switch(a){case 19:b="http://www5.clikpic.com/robkendall/images";break}switch(a){case 31:b="http://www7.clikpic.com/robkendall/images";break}switch(a){case 32:b="http://admin2.clikpic.com/robkendall/images";break}switch(a){case 33:b="http://www8.clikpic.com/robkendall/images";break}switch(a){case 34:b="http://www9.clikpic.com/robkendall/images";break}switch(a){case 35:b="http://admin3.clikpic.com/robkendall/images";break}switch(a){case 37:b="http://admin4.clikpic.com/robkendall/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="         Robert Kendall Photography: "+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>"}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>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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="rn.hkendall@btinternet.com">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="rn.hkendall@btinternet.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};