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[2230746]=new thumbnail(2230746,"146992","Passing Time","Passing Time_thumb..jpg",130,86,32);thumbnails[2234369]=new thumbnail(2234369,"147126","Angel","Angel 1_thumb.jpg",130,86,32);thumbnails[2234376]=new thumbnail(2234376,"147126","Twistleton Scar","scar_thumb.jpg",130,67,32);thumbnails[2235332]=new thumbnail(2235332,"147242","","4a_thumb.jpg",130,216,32);thumbnails[2235333]=new thumbnail(2235333,"147242","","5a_thumb.jpg",130,166,32);thumbnails[2235334]=new thumbnail(2235334,"147242","","6a_thumb.jpg",130,195,32);thumbnails[2239427]=new thumbnail(2239427,"","","Cyclone_thumb.jpg",130,86,32);thumbnails[2239432]=new thumbnail(2239432,"147372","Lonley Heart.","DSC_0172a copy_thumb.jpga.jpg",130,83,32);thumbnails[2239449]=new thumbnail(2239449,"","","port0744_thumb.jpg",130,86,32);thumbnails[2270312]=new thumbnail(2270312,"149075","Gamble Gallery St.Helens.","Exhibition 11_thumb.jpg",130,89,32);thumbnails[2284384]=new thumbnail(2284384,"149968","","DSC_2966_thumb.jpg",130,92,32);thumbnails[2284385]=new thumbnail(2284385,"149968","","DSC_2968_thumb.jpg",130,86,32);thumbnails[2284386]=new thumbnail(2284386,"149968","","DSC_2970_thumb.jpg",130,222,32);thumbnails[2284387]=new thumbnail(2284387,"149968","","DSC_2981_thumb.jpg",130,98,32);thumbnails[2284389]=new thumbnail(2284389,"149968","","DSC_3006_thumb.jpg",130,169,32);thumbnails[2284390]=new thumbnail(2284390,"149968","","DSC_3011A_thumb.jpg",130,161,32);thumbnails[2720125]=new thumbnail(2720125,"146992","Let sleeping dogs...","1A_thumb.jpg",130,195,32);thumbnails[2720780]=new thumbnail(2720780,"224132","Please Help","1C1_thumb.jpg",130,196,32);thumbnails[2720783]=new thumbnail(2720783,"224132","Jacko","1D1_thumb.jpg",130,195,32);thumbnails[2720833]=new thumbnail(2720833,"146992","Eleanor","DSC_0985a_thumb.jpg",130,195,32);thumbnails[2720980]=new thumbnail(2720980,"146992","Half Empty","DSC_1021_thumb.jpg",130,195,32);thumbnails[2720984]=new thumbnail(2720984,"146992","Untitled","1F_thumb.jpg",130,195,32);thumbnails[2720987]=new thumbnail(2720987,"146992","Jamaica inn","pennyfarth1139_thumb.jpg",130,195,32);thumbnails[2720995]=new thumbnail(2720995,"146992","Prayer","madrid_0696_thumb.jpg",130,195,32);thumbnails[2724880]=new thumbnail(2724880,"147372","Edge of Eden 1","Edge of eden2 copy1_thumb.jpg",130,192,32);thumbnails[2724883]=new thumbnail(2724883,"147372","Edge of Eden 2","Edge of eden copy1_thumb.jpg",130,195,32);thumbnails[2724939]=new thumbnail(2724939,"147372","Beer Garden","DSC_32861_thumb.jpg",130,202,32);thumbnails[2726061]=new thumbnail(2726061,"147372","Smoking Man","walker32_thumb.jpg",130,195,32);thumbnails[2726991]=new thumbnail(2726991,"147126","Cyclone","Cyclone copy_thumb.jpg",130,195,32);thumbnails[2727321]=new thumbnail(2727321,"147126","Pillars of Hercules","pillars copy_thumb.jpg",130,195,32);thumbnails[2787064]=new thumbnail(2787064,"147372","Lunatics","Lunatics_thumb.jpg",130,195,32);thumbnails[2787075]=new thumbnail(2787075,"147372","Flaming Pie","Flaming Pie_thumb.jpg",130,195,32);thumbnails[2787123]=new thumbnail(2787123,"147126","Castillo Wall","Castillo Wall_thumb.jpg",130,200,32);thumbnails[2787139]=new thumbnail(2787139,"147126","End of The Line","End Of The Line1_thumb.jpg",130,87,32);thumbnails[2873114]=new thumbnail(2873114,"146992","Charlie.","DSC_5050 copy_thumb.jpg",129,195,32);thumbnails[3637613]=new thumbnail(3637613,"147242","em","em_thumb.jpg",130,179,32);thumbnails[3669526]=new thumbnail(3669526,"224132","","DSC_0018-1_copy_thumb.jpg",130,87,32);thumbnails[3669555]=new thumbnail(3669555,"224132","Busker","DSC_0158_copy_copy_thumb.jpg",130,87,32);thumbnails[3669565]=new thumbnail(3669565,"224132","Busker","DSC_0161_copy_thumb.jpg",130,194,32);thumbnails[3673241]=new thumbnail(3673241,"224132","Passing Strangers","DSC_0061_thumb.jpg",130,87,32);thumbnails[3673244]=new thumbnail(3673244,"146992","Sarah & Tash","S__T_4414_thumb.jpg",130,196,32);thumbnails[3673245]=new thumbnail(3673245,"146992","Sarah & Tash","S__T_4415_thumb.jpg",130,196,32);thumbnails[3691797]=new thumbnail(3691797,"147126","The Rock","DSC_3467_copy_thumb.jpg",130,196,32);thumbnails[3691862]=new thumbnail(3691862,"147126","Chrysler","DSC_3526_copy_thumb.jpg",130,244,32);thumbnails[3700023]=new thumbnail(3700023,"147126","Storm Clouds","DSC_3507abjpg_thumb.jpg",130,196,32);thumbnails[3811911]=new thumbnail(3811911,"147372","Low Tied","low_tied_thumb.jpg",130,196,32);thumbnails[3844618]=new thumbnail(3844618,"233937","New Brighton Wirral","Simon_1-08741_thumb.jpg",130,87,32);thumbnails[3844619]=new thumbnail(3844619,"233937","Thornton Hough Wirral","Simon_2-08742_thumb.jpg",130,86,32);thumbnails[3844620]=new thumbnail(3844620,"233937","Birkenhead Park Wirral","Simon_3-08743_thumb.jpg",130,87,32);thumbnails[3844624]=new thumbnail(3844624,"233937","Leasowe Wirral","Simon_4-08745_thumb.jpg",130,87,32);thumbnails[3844628]=new thumbnail(3844628,"233937","Thurstaston Wirral","Simon_5-08746_thumb.jpg",130,86,32);thumbnails[3845591]=new thumbnail(3845591,"233937","Eastham Wirral<br>\r\n<br>\r\n","simonx2-09305_thumb.jpg",130,87,32);thumbnails[3845993]=new thumbnail(3845993,"149075","Chaple Gallery Ormskirk","ormskirk_thumb.jpg",130,104,32);thumbnails[3874169]=new thumbnail(3874169,"235418","","DSC_0036_thumb.jpg",130,206,32);thumbnails[3874172]=new thumbnail(3874172,"235418","","DSC_0088_thumb.jpg",130,179,32);thumbnails[3874177]=new thumbnail(3874177,"235418","","DSC_0104_thumb.jpg",130,174,32);thumbnails[3874181]=new thumbnail(3874181,"235418","","DSC_0115_thumb.jpg",130,194,32);thumbnails[3874183]=new thumbnail(3874183,"235418","","DSC_0137a_copy_thumb.jpg",130,194,32);thumbnails[3874294]=new thumbnail(3874294,"235418","","DSC_0048_thumb.jpg",130,194,32);thumbnails[4415317]=new thumbnail(4415317,"147126","199 steps","199steps_thumb.jpg",130,196,32);thumbnails[4415324]=new thumbnail(4415324,"146992","Buskers","buskers_thumb.jpg",130,204,32);thumbnails[4415351]=new thumbnail(4415351,"146992","train guard","DSC_5708_copy_thumb.jpg",130,196,32);thumbnails[4415355]=new thumbnail(4415355,"146992","fireman 1","DSC_5711aa_copy_thumb.jpg",130,89,32);thumbnails[4415358]=new thumbnail(4415358,"146992","fireman 2","DSC_5716aa_copy_thumb.jpg",130,232,32);thumbnails[4415361]=new thumbnail(4415361,"146992","fireman 3","DSC_5717a_copy_thumb.jpg",130,246,32);thumbnails[4415381]=new thumbnail(4415381,"147372","petunia","DSC_5735_copy_thumb.jpg",130,196,32);thumbnails[4415398]=new thumbnail(4415398,"147372","morris 2","handle_thumb.jpg",130,82,32);thumbnails[4415399]=new thumbnail(4415399,"147372","recovery","Recovery_thumb.jpg",130,89,32);thumbnails[4415659]=new thumbnail(4415659,"147372","morris 3","minor_thumb.jpg",130,87,32);thumbnails[4415661]=new thumbnail(4415661,"147372","morris 1","minor2_thumb.jpg",130,87,32);thumbnails[4415663]=new thumbnail(4415663,"147372","crash","crash_thumb.jpg",130,92,32);thumbnails[5265924]=new thumbnail(5265924,"149075","","DSCF0079a_thumb.jpg",130,173,32);thumbnails[5265927]=new thumbnail(5265927,"149075","","DSCF0080a_thumb.jpg",130,190,32);thumbnails[5265929]=new thumbnail(5265929,"149075","","DSCF0084A_thumb.jpg",130,98,32);thumbnails[6019735]=new thumbnail(6019735,"147126","Glenfidden Viaduct","_black7808_thumb.jpg",130,87,32);thumbnails[6019737]=new thumbnail(6019737,"147126","Buachaille Etive Mor","_blackwhite0129_thumb.jpg",130,87,32);thumbnails[6019739]=new thumbnail(6019739,"147126","Aonach Mor","_POSS0058_thumb.jpg",130,87,32);thumbnails[6019741]=new thumbnail(6019741,"147126","Storm over Aonach Mor","_POSS7785_thumb.jpg",130,94,32);thumbnails[6019760]=new thumbnail(6019760,"147126","Glenfinnan","_POSS7807_copy_thumb.jpg",130,87,32);thumbnails[6081040]=new thumbnail(6081040,"341368","Jim","_MOL00831_thumb.jpg",130,87,32);thumbnails[6081042]=new thumbnail(6081042,"341368","Time out","DSCF0028_thumb.jpg",130,98,32);thumbnails[6081043]=new thumbnail(6081043,"341368","Emos.","DSCF0036_thumb.jpg",130,98,32);thumbnails[6081045]=new thumbnail(6081045,"341368","Callum and his Mates.","DSCF0125_thumb.jpg",130,98,32);thumbnails[6081046]=new thumbnail(6081046,"341368","Callum","DSCF0127_thumb.jpg",130,98,32);thumbnails[6081048]=new thumbnail(6081048,"341368","Gus.","DSCF0272ab_thumb.jpg",130,72,32);thumbnails[6081049]=new thumbnail(6081049,"341368","Nadia.","DSCF0276_thumb.jpg",130,98,32);thumbnails[6081050]=new thumbnail(6081050,"341368","Steve.","DSCF0309_thumb.jpg",130,98,32);thumbnails[6081052]=new thumbnail(6081052,"341368","Steve Hoy Landlord Ye Hole in Ye Wall.","DSCF0340_thumb.jpg",130,98,32);thumbnails[6081053]=new thumbnail(6081053,"341368","Baz.","DSCF0352aa_thumb.jpg",130,92,32);thumbnails[6081055]=new thumbnail(6081055,"341368","Plinthers.","DSCF0456_thumb.jpg",130,98,32);thumbnails[6081056]=new thumbnail(6081056,"341368","Rat catchers.","DSCF0484_thumb.jpg",130,98,32);thumbnails[6161394]=new thumbnail(6161394,"344463","","DSC_7480_thumb.jpg",130,196,32);thumbnails[6161395]=new thumbnail(6161395,"344463","","DSC_7493_thumb.jpg",130,196,32);thumbnails[6161399]=new thumbnail(6161399,"344463","","DSC_7497_thumb.jpg",130,196,32);thumbnails[6161401]=new thumbnail(6161401,"344463","","DSC_7504_thumb.jpg",130,196,32);thumbnails[6161403]=new thumbnail(6161403,"344463","","DSC_7533_thumb.jpg",130,201,32);thumbnails[6161405]=new thumbnail(6161405,"344463","","DSC_7516_thumb.jpg",130,196,32);thumbnails[6172033]=new thumbnail(6172033,"344463","","DSC_7478_thumb.jpg",130,196,32);thumbnails[6172037]=new thumbnail(6172037,"344463","","DSC_7537_thumb.jpg",130,203,32);thumbnails[6172051]=new thumbnail(6172051,"344463","","DSC_7519_thumb.jpg",130,196,32);var galleries=new Object();galleries[147372]=new gallery(147372,"2724880","Abstract","gallery",[2239432,2724880,2724883,2724939,2726061,2787064,2787075,3811911,4415381,4415398,4415399,4415659,4415661,4415663]);galleries[233937]=new gallery(233937,"3845591,3844628,3844624,3844620,3844619,3844618","Commissions","gallery",[3844618,3844619,3844620,3844624,3844628,3845591]);galleries[149075]=new gallery(149075,"3845993","Exhibitions","gallery",[2270312,3845993,5265924,5265927,5265929]);galleries[344463]=new gallery(344463,"6172051,6172037,6172033,6161405,6161403,6161401,6161399,6161395,6161394","IRONSIDE ROAD","gallery",[6161394,6161395,6161399,6161401,6161403,6161405,6172033,6172037,6172051]);galleries[147126]=new gallery(147126,"4415317","Landscapes","gallery",[2234369,2234376,2726991,2727321,2787123,2787139,3691797,3691862,3700023,4415317,6019735,6019737,6019739,6019741,6019760]);galleries[146992]=new gallery(146992,"4415361,4415358,4415355,4415351,4415324,3673245,3673244,2873114,2720995,2720987","Portraits","gallery",[2230746,2720125,2720833,2720980,2720984,2720987,2720995,2873114,3673244,3673245,4415324,4415351,4415355,4415358,4415361]);galleries[149968]=new gallery(149968,"2284386","Royal Visit","gallery",[2284384,2284385,2284386,2284387,2284389,2284390]);galleries[147242]=new gallery(147242,"3637613","Sarah","gallery",[2235332,2235333,2235334,3637613]);galleries[341368]=new gallery(341368,"6081056,6081055,6081053,6081052,6081050,6081049,6081048,6081046,6081045,6081043","Shanghai Expo 2010","gallery",[6081040,6081042,6081043,6081045,6081046,6081048,6081049,6081050,6081052,6081053,6081055,6081056]);galleries[224132]=new gallery(224132,"3669565","Street People","gallery",[2720780,2720783,3669526,3669555,3669565,3673241]);galleries[235418]=new gallery(235418,"3874169","Wedding","gallery",[3874169,3874172,3874177,3874181,3874183,3874294]);var imageSets=new Object();imageSets[1]="2234376";imageSets[2]="4415317,3874169,3845993,3669565,3637613,2724880,2284386";imageSets[3]="6172051,6172037,6172033,6161405,6161403,6161401,6161399,6161395,6161394,6081056,6081055,6081053,6081052,6081050,6081049,6081048,6081046,6081045,6081043,6081042,6081040,6019760,6019741,6019739,6019737,6019735,5265929,5265927,5265924,4415663,4415661,4415659,4415399,4415398,4415381,4415361,4415358,4415355,4415351,4415324,4415317,3874294,3874183,3874181,3874177,3874172,3874169,3845993,3845591,3844628";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/keiths/images";break}switch(a){case 1:b="http://www1.clikpic.com/keiths/images";break}switch(a){case 2:b="http://admin.clikpic.com/keiths/images";break}switch(a){case 24:b="http://tpc15/clikpic/keiths/images";break}switch(a){case 4:b="http://www.clikchurch.com/keiths/images";break}switch(a){case 5:b="http://www2.clikpic.com/keiths/images";break}switch(a){case 22:b="http://tpc5/clikpic/keiths/images";break}switch(a){case 23:b="http://tpc10/clikpic/keiths/images";break}switch(a){case 25:b="http://tpc16/clikpic/keiths/images";break}switch(a){case 15:b="http://www3.clikpic.com/keiths/images";break}switch(a){case 18:b="http://www4.clikpic.com/keiths/images";break}switch(a){case 19:b="http://www5.clikpic.com/keiths/images";break}switch(a){case 31:b="http://www7.clikpic.com/keiths/images";break}switch(a){case 32:b="http://admin2.clikpic.com/keiths/images";break}switch(a){case 33:b="http://www8.clikpic.com/keiths/images";break}switch(a){case 34:b="http://www9.clikpic.com/keiths/images";break}switch(a){case 35:b="http://admin3.clikpic.com/keiths/images";break}switch(a){case 37:b="http://admin4.clikpic.com/keiths/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="Keith Sweeney 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;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 Pay Pal</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="keith.sweeney@tesco.net">';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="keith.sweeney@tesco.net">';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+'")'})}}};