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[2993050]=new thumbnail(2993050,"","Yukari Sweeney Handprinted leaf roll-mat","Yukari Sweeney_thumb.jpg",130,54,5);thumbnails[2993055]=new thumbnail(2993055,"","Lee Borthwick Stacked wood roll-mat","Lee Borthwick_thumb.jpg",130,53,5);thumbnails[2993076]=new thumbnail(2993076,"","Ayme Fitzgerald Vibrant floral roll-mat","Ayme Fitzgerald_thumb.jpg",130,56,5);thumbnails[5276096]=new thumbnail(5276096,"","","IMM_thumb.jpg",130,178,5);thumbnails[2201263]=new thumbnail(2201263,"","wood effect","wood print 2jpg_thumb.jpg",130,178,5);thumbnails[2201317]=new thumbnail(2201317,"","Gold Cottage","gold cottagejpg_thumb.jpg",130,87,5);thumbnails[6325550]=new thumbnail(6325550,"350812","Clearance<br>\r\n","PA-LeeBorthwick-3369_thumb.jpg",130,169,5);thumbnails[2201327]=new thumbnail(2201327,"","Wee Shed","profesional pics 007_thumb.jpg",130,195,5);thumbnails[5832943]=new thumbnail(5832943,"","","dulwich_advert_thumb.jpg",130,130,5);thumbnails[6340049]=new thumbnail(6340049,"350812","Drifted<br>\r\n<br>\r\n","PA-LeeBorthwick-3390_thumb.jpg",130,143,5);thumbnails[2201209]=new thumbnail(2201209,"","gold print","gold printjpg_thumb.jpg",130,163,5);thumbnails[2201450]=new thumbnail(2201450,"","Big Shed Mat","Big shedjpg1_thumb.jpg",130,162,5);thumbnails[3433191]=new thumbnail(3433191,"","2","2_thumb.jpg",130,173,5);thumbnails[5832945]=new thumbnail(5832945,"","","tokyo_advert_thumb.jpg",130,146,5);thumbnails[6340057]=new thumbnail(6340057,"350812","Fragments 1 and 2<br>\r\n","PA-LeeBortwick-3399_thumb.jpg",130,92,5);thumbnails[2201332]=new thumbnail(2201332,"","Log mat rolled","log mat rolledjpg_thumb.jpg",130,173,5);thumbnails[6171225]=new thumbnail(6171225,"","","final_wallace_space_thumb.jpg",130,123,5);thumbnails[6339528]=new thumbnail(6339528,"350812","Willow Facade<br>\r\n","PA-LeeBortwick-3384_thumb.jpg",130,132,5);thumbnails[2201337]=new thumbnail(2201337,"","Log Mat","log matjpg_thumb.jpg",130,173,5);thumbnails[3433194]=new thumbnail(3433194,"","prints","shed fabrics_thumb.jpg",130,98,5);thumbnails[6171263]=new thumbnail(6171263,"","","arts_council_logo_for_web_thumb.jpg",130,130,5);thumbnails[6339735]=new thumbnail(6339735,"350812","Segment<br>\r\n","PA-LeeBorthwick-3387_thumb.jpg",130,195,5);thumbnails[2201195]=new thumbnail(2201195,"","wood print","wood printjpg_thumb.jpg",130,218,5);thumbnails[2201342]=new thumbnail(2201342,"","Shed Drawing","shed drawingjpg_thumb.jpg",130,195,5);thumbnails[3433195]=new thumbnail(3433195,"","prints","shed fabric2_thumb.jpg",130,98,5);thumbnails[6339502]=new thumbnail(6339502,"350812","Neglected<br>\r\n","PA-LeeBorthwick-3377_thumb.jpg",130,130,5);thumbnails[2201345]=new thumbnail(2201345,"","Paper Shed 1","paper shed 3jpg_thumb.jpg",130,195,5);thumbnails[6340056]=new thumbnail(6340056,"350812","Preserved<br>\r\n","PA-LeeBortwick-3272_thumb.jpg",130,85,5);thumbnails[2201350]=new thumbnail(2201350,"","Paper Shed 2","paper shed 2jpg_thumb.jpg",130,195,5);thumbnails[2201353]=new thumbnail(2201353,"","Paper Print 1","paper print 3jpg_thumb.jpg",130,196,5);thumbnails[6340061]=new thumbnail(6340061,"350812","Remains<br>\r\n","PA-LeeBortwick-3404_thumb.jpg",130,127,5);thumbnails[2201355]=new thumbnail(2201355,"","Paper Print 2","paper print 4jpg_thumb.jpg",130,218,5);thumbnails[6340066]=new thumbnail(6340066,"350812","Quilt<br>\r\n","PA-LeeBorthwick-3379_thumb.jpg",130,166,5);thumbnails[2361928]=new thumbnail(2361928,"143413","mirror work","mirror 4 copy1_thumb.jpg",130,177,5);thumbnails[2362084]=new thumbnail(2362084,"143413","clear piece","clear piece 2_thumb.jpg",130,176,5);thumbnails[2362110]=new thumbnail(2362110,"143413","white piece","white piece_thumb.jpg",130,124,5);thumbnails[3433222]=new thumbnail(3433222,"209859","","42_thumb.jpg",130,212,5);thumbnails[4986121]=new thumbnail(4986121,"258308","Stacked ","Cyprus_Installation_151_thumb.jpg",130,173,5);thumbnails[3433461]=new thumbnail(3433461,"209869","Couching","couching1_thumb.jpg",130,97,5);thumbnails[3440114]=new thumbnail(3440114,"209807","","Mirror Installation 087_thumb.jpg",130,173,5);thumbnails[4409326]=new thumbnail(4409326,"258309","","sw7_thumb.jpg",130,98,5);thumbnails[4986115]=new thumbnail(4986115,"258308","","Cyprus_Installation_110_thumb.jpg",130,173,5);thumbnails[3433463]=new thumbnail(3433463,"209869","macrame 1","macrameworkshop1_thumb.jpg",130,97,5);thumbnails[3440092]=new thumbnail(3440092,"209807","","21_thumb.jpg",130,174,5);thumbnails[4409315]=new thumbnail(4409315,"258309","","slow_wall_4_thumb.jpg",130,98,5);thumbnails[4986126]=new thumbnail(4986126,"258308","","Cyprus_Installation_119_thumb.jpg",130,173,5);thumbnails[3433466]=new thumbnail(3433466,"209869","macrame 2","macrameworkshop21_thumb.jpg",130,97,5);thumbnails[4409321]=new thumbnail(4409321,"258309","","slow_wall_5_thumb.jpg",130,98,5);thumbnails[4986313]=new thumbnail(4986313,"258308","Sliced ","Cyprus_Installation_184_thumb.jpg",130,173,5);thumbnails[3433473]=new thumbnail(3433473,"209869","Finished- Macrame Bag","Sukmaya1_thumb.jpg",130,174,5);thumbnails[3440125]=new thumbnail(3440125,"209807","","63_thumb.jpg",130,107,5);thumbnails[4986487]=new thumbnail(4986487,"258308","","Cyprus_Installation_201_thumb.jpg",130,173,5);thumbnails[3433476]=new thumbnail(3433476,"209869","Knitted Slippers","slippers1_thumb.jpg",130,97,5);thumbnails[3440100]=new thumbnail(3440100,"209807","","8_thumb.jpg",130,97,5);thumbnails[4409305]=new thumbnail(4409305,"258309","","Slow_wall_thumb.jpg",130,98,5);thumbnails[4986631]=new thumbnail(4986631,"258308","","Cyprus_Installation_186_thumb.jpg",130,173,5);thumbnails[3432854]=new thumbnail(3432854,"209807","Mirrored wood Installation","cologne furniture fair 126_thumb.jpg",130,188,5);thumbnails[4409314]=new thumbnail(4409314,"258309","","slow_wall_3_thumb.jpg",130,98,5);thumbnails[6341186]=new thumbnail(6341186,"258309","","new_slow_wall1_thumb.jpg",130,98,5);thumbnails[3432867]=new thumbnail(3432867,"209807","reverse-wood side","cologne furniture fair 124_thumb.jpg",130,188,5);thumbnails[4409387]=new thumbnail(4409387,"258308","","32_thumb.jpg",130,98,5);thumbnails[6341180]=new thumbnail(6341180,"258309","","new_slow_wall_2_thumb.jpg",130,98,5);thumbnails[4409378]=new thumbnail(4409378,"258308","","10_thumb.jpg",130,173,5);thumbnails[6341185]=new thumbnail(6341185,"258309","","new_slow_wall_3_thumb.jpg",130,98,5);thumbnails[5687514]=new thumbnail(5687514,"258308","Part 3","for_website1_thumb.jpg",130,95,5);thumbnails[2909701]=new thumbnail(2909701,"143413","Yellow stacked seat","Yellow stacked seat_thumb.jpg",130,175,5);thumbnails[5687892]=new thumbnail(5687892,"258308","","for_website2_thumb.jpg",130,98,5);thumbnails[3433180]=new thumbnail(3433180,"209850","sheds","hanging garden 61_thumb.jpg",130,141,5);thumbnails[3433447]=new thumbnail(3433447,"209871","Bamboo blind","nepal1_thumb.jpg",130,95,5);thumbnails[3433157]=new thumbnail(3433157,"209850","containers","Untitled-32_thumb.jpg",130,143,5);thumbnails[3433448]=new thumbnail(3433448,"209871","Close up","bamboo-blind21_thumb.jpg",130,174,5);thumbnails[3433163]=new thumbnail(3433163,"209850","shacks","Untitled-42_thumb.jpg",130,141,5);thumbnails[3433450]=new thumbnail(3433450,"209871","dark background","bamboo-blind1_thumb.jpg",130,174,5);thumbnails[3433167]=new thumbnail(3433167,"209850","dwellings","Untitled-52_thumb.jpg",130,141,5);thumbnails[3433452]=new thumbnail(3433452,"209871","Bamboo Bag","bamboobag1_thumb.jpg",130,159,5);thumbnails[3433172]=new thumbnail(3433172,"209850","dens","Untitled-82_thumb.jpg",130,141,5);thumbnails[3433454]=new thumbnail(3433454,"209871","Bamboo bag reverse","bamboo-reverse1_thumb.jpg",130,172,5);thumbnails[3433482]=new thumbnail(3433482,"209872","Dhaka Weaving","dhaka1_thumb.jpg",130,174,5);thumbnails[3433489]=new thumbnail(3433489,"209872","Dhaka weaving 2","dhaka41_thumb.jpg",130,174,5);thumbnails[3433498]=new thumbnail(3433498,"209872","Dhaka weaving 3","dhaka21_thumb.jpg",130,97,5);var galleries=new Object();galleries[350812]=new gallery(350812,"6340066,6340061,6340057,6340056,6340049,6339735,6339528,6339502,6325550",'The "In the Attic" Series',"section418727",[6325550,6340049,6340057,6339528,6339735,6339502,6340056,6340061,6340066]);galleries[209859]=new gallery(209859,"3433222","Comments","gallery",[3433222]);galleries[258308]=new gallery(258308,"5687892,5687514,4986631,4986487,4986313,4986126,4986121,4986115,4409387,4409378","Limassol Series","section291805",[4986121,4986115,4986126,4986313,4986487,4986631,4409387,4409378,5687514,5687892]);galleries[209807]=new gallery(209807,"3440125,3440114,3440100,3440092,3432867,3432854","Mirror Tapestry","gallery",[3440114,3440092,3440125,3440100,3432854,3432867]);galleries[258309]=new gallery(258309,"6341186,6341185,6341180,4409326,4409321,4409315,4409314,4409305","Slow Wall Progress","section291812",[4409326,4409315,4409321,4409305,4409314,6341186,6341180,6341185]);galleries[143413]=new gallery(143413,"2909701,2362110,2362084,2361928","Tree Pieces","gallery",[2361928,2362084,2362110,2909701]);galleries[209869]=new gallery(209869,"3433476,3433473,3433466,3433463,3433461","workshops","section243348",[3433461,3433463,3433466,3433473,3433476]);galleries[209871]=new gallery(209871,"3433454,3433452,3433450,3433448,3433447","Dhaka Product Prototypes","section243348",[3433447,3433448,3433450,3433452,3433454]);galleries[209850]=new gallery(209850,"3433180,3433172,3433167,3433163,3433157","Hiding places","gallery",[3433180,3433157,3433163,3433167,3433172]);galleries[209682]=new gallery(209682,"3433222,3433180,3433172,3433167,3433163,3433157","Issues-Manor Garden Allotments","gallery",[]);galleries[209872]=new gallery(209872,"3433498,3433489,3433482","Dhaka Production","section243348",[3433482,3433489,3433498]);var imageSets=new Object();imageSets[1]="6340056,6340049,6325550,4986487,4986121";imageSets[2]="5276096";imageSets[3]="3440125,3440114,3440100,3440092";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/leebee/images";break}switch(a){case 1:b="http://www1.clikpic.com/leebee/images";break}switch(a){case 2:b="http://admin.clikpic.com/leebee/images";break}switch(a){case 24:b="http://tpc15/clikpic/leebee/images";break}switch(a){case 4:b="http://www.clikchurch.com/leebee/images";break}switch(a){case 5:b="http://www2.clikpic.com/leebee/images";break}switch(a){case 22:b="http://tpc5/clikpic/leebee/images";break}switch(a){case 23:b="http://tpc10/clikpic/leebee/images";break}switch(a){case 25:b="http://tpc16/clikpic/leebee/images";break}switch(a){case 15:b="http://www3.clikpic.com/leebee/images";break}switch(a){case 18:b="http://www4.clikpic.com/leebee/images";break}switch(a){case 19:b="http://www5.clikpic.com/leebee/images";break}switch(a){case 31:b="http://www7.clikpic.com/leebee/images";break}switch(a){case 32:b="http://admin2.clikpic.com/leebee/images";break}switch(a){case 33:b="http://www8.clikpic.com/leebee/images";break}switch(a){case 34:b="http://www9.clikpic.com/leebee/images";break}switch(a){case 35:b="http://admin3.clikpic.com/leebee/images";break}switch(a){case 37:b="http://admin4.clikpic.com/leebee/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("section418727"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section418727.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("section418727"!=""){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="Lee Borthwick: "+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+'")'})}}};