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[1458692]=new thumbnail(1458692,"","","worlofbaths_4_thumb.jpg",130,142,18);thumbnails[1458585]=new thumbnail(1458585,"","","worldofbaths_2_thumb.jpg",130,83,18);thumbnails[1458558]=new thumbnail(1458558,"","","tent1_thumb.jpg",130,48,18);thumbnails[1227172]=new thumbnail(1227172,"76141","","ffflorence_thumb.jpg",130,89,18);thumbnails[1794933]=new thumbnail(1794933,"86635","","calder_street_thumb.jpg",130,130,18);thumbnails[1646626]=new thumbnail(1646626,"76141","","paris2_thumb.jpg",130,88,18);thumbnails[3153178]=new thumbnail(3153178,"76141","","IMG_0038_edited_thumb.jpg",130,88,18);thumbnails[1227170]=new thumbnail(1227170,"76141","","florence4_thumb.jpg",130,89,18);thumbnails[1919643]=new thumbnail(1919643,"86635","","intak_school_thumb.jpg",130,130,18);thumbnails[3153180]=new thumbnail(3153180,"76141","","florence---03-edited_thumb.jpg",130,88,18);thumbnails[1794932]=new thumbnail(1794932,"76141","","bulgaria-5_1_thumb.jpg",130,88,18);thumbnails[1646666]=new thumbnail(1646666,"86635","","porno_movies_thumb.jpg",130,130,18);thumbnails[1646654]=new thumbnail(1646654,"86635","","wife_beater_thumb.jpg",130,130,18);thumbnails[1919647]=new thumbnail(1919647,"86635","","chicken_poo_thumb.jpg",130,130,18);thumbnails[1919648]=new thumbnail(1919648,"86635","","tesco_thumb.jpg",130,130,18);thumbnails[2068018]=new thumbnail(2068018,"86635","","tizer_thumb.jpg",130,130,18);thumbnails[1040753]=new thumbnail(1040753,"76141","","bulgaria3_thumb.jpg",130,192,18);thumbnails[2068024]=new thumbnail(2068024,"86635","","cockle_over_thumb.jpg",130,130,18);thumbnails[1040747]=new thumbnail(1040747,"76141","","paris_thumb.jpg",130,192,18);thumbnails[2068027]=new thumbnail(2068027,"86635","","dead_german_thumb.jpg",130,130,18);thumbnails[3598222]=new thumbnail(3598222,"181413","","Library---12092web_thumb.jpg",130,88,18);thumbnails[3598224]=new thumbnail(3598224,"181413","","Library---11998web_thumb.jpg",130,88,18);thumbnails[1041296]=new thumbnail(1041296,"76142","","roadclosed2_thumb.jpg",130,88,18);thumbnails[3598226]=new thumbnail(3598226,"181413","","Library---14240web_thumb.jpg",130,88,18);thumbnails[1040582]=new thumbnail(1040582,"76142","","karenandkev_thumb.jpg",130,88,18);thumbnails[1041314]=new thumbnail(1041314,"76142","","younglad_thumb.jpg",130,88,18);thumbnails[3041455]=new thumbnail(3041455,"181413","","IMG_0042_krakow_edited1_thumb.jpg",130,88,18);thumbnails[3041457]=new thumbnail(3041457,"181413","","IMG_0062_gdansk_edited1_thumb.jpg",130,88,18);thumbnails[3597973]=new thumbnail(3597973,"181413","","Library---12592web_thumb.jpg",130,88,18);thumbnails[1040974]=new thumbnail(1040974,"76142","","ste-and-family_final_thumb.jpg",130,193,18);thumbnails[2934963]=new thumbnail(2934963,"181413","","IMG_0055_wroclaw_edited_thumb.jpg",130,192,18);thumbnails[1041287]=new thumbnail(1041287,"76142","","mcdonalds_thumb.jpg",130,192,18);thumbnails[2934968]=new thumbnail(2934968,"181413","","IMG_0918_vilnius_edited_thumb.jpg",130,192,18);thumbnails[3598045]=new thumbnail(3598045,"181413","","Library---13384web_thumb.jpg",130,193,18);thumbnails[1040971]=new thumbnail(1040971,"76142","","newsagentsfinal_thumb.jpg",130,193,18);thumbnails[3598083]=new thumbnail(3598083,"181413","","Library---14129web_thumb.jpg",130,88,18);thumbnails[3598085]=new thumbnail(3598085,"181413","","Library---14170web_thumb.jpg",130,88,18);thumbnails[1040587]=new thumbnail(1040587,"76142","","Bigjimwhite_thumb.jpg",130,88,18);thumbnails[3598087]=new thumbnail(3598087,"181413","","Library---14260web_thumb.jpg",130,88,18);thumbnails[1919601]=new thumbnail(1919601,"76142","","cromwell-VP-A1_thumb.jpg",130,88,18);thumbnails[1646587]=new thumbnail(1646587,"76142","","knocked-down-flats-4_thumb.jpg",130,88,18);thumbnails[1794939]=new thumbnail(1794939,"76142","","EH_19_thumb.jpg",130,88,18);thumbnails[3597995]=new thumbnail(3597995,"181413","","Library---14707web_thumb.jpg",130,88,18);thumbnails[3153170]=new thumbnail(3153170,"181413","","IMG_0108-edited_thumb.jpg",130,88,18);thumbnails[3597999]=new thumbnail(3597999,"181413","","Library---14693web_thumb.jpg",130,88,18);thumbnails[1919588]=new thumbnail(1919588,"76142","","justice_for_georges_thumb.jpg",130,88,18);thumbnails[3598010]=new thumbnail(3598010,"181413","","Library---14304web_thumb.jpg",130,193,18);thumbnails[3598008]=new thumbnail(3598008,"181413","","Library---14294web_thumb.jpg",130,193,18);thumbnails[1790156]=new thumbnail(1790156,"76142","","boyatfence_thumb.jpg",130,88,18);thumbnails[3153162]=new thumbnail(3153162,"181413","","IMG_0452-edited_thumb.jpg",130,193,18);thumbnails[3153163]=new thumbnail(3153163,"181413","","IMG_0485-edited_thumb.jpg",130,88,18);thumbnails[3153164]=new thumbnail(3153164,"181413","","IMG_0450-edited_thumb.jpg",130,88,18);thumbnails[3153166]=new thumbnail(3153166,"181413","","IMG_0472-edited_thumb.jpg",130,88,18);thumbnails[3597828]=new thumbnail(3597828,"181413","","Library---12698web_thumb.jpg",130,88,18);thumbnails[3597830]=new thumbnail(3597830,"181413","","Library---14453web_thumb.jpg",130,88,18);thumbnails[3597837]=new thumbnail(3597837,"181413","","Library---14657web_thumb.jpg",130,88,18);thumbnails[3597843]=new thumbnail(3597843,"181413","","Library---14402web_thumb.jpg",130,193,18);thumbnails[3597844]=new thumbnail(3597844,"181413","","Library---12101web_thumb.jpg",130,193,18);thumbnails[3597846]=new thumbnail(3597846,"181413","","Library---12096web_thumb.jpg",130,193,18);thumbnails[3153174]=new thumbnail(3153174,"181413","","IMG_0724-edited_thumb.jpg",130,88,18);thumbnails[3153177]=new thumbnail(3153177,"181413","","IMG_0737-edited_thumb.jpg",130,88,18);thumbnails[3153176]=new thumbnail(3153176,"181413","","IMG_0712-edited_thumb.jpg",130,88,18);thumbnails[3890082]=new thumbnail(3890082,"181413","","IMG_0056_edited_thumb.jpg",130,193,18);thumbnails[3890087]=new thumbnail(3890087,"181413","","IMG_0066_edited_thumb.jpg",130,193,18);thumbnails[3890089]=new thumbnail(3890089,"181413","","IMG_0091_edited_thumb.jpg",130,193,18);thumbnails[4413263]=new thumbnail(4413263,"258552","","IMG_2301_thumb.gif",130,88,18);thumbnails[4413261]=new thumbnail(4413261,"258552","","IMG_2244_thumb.gif",130,88,18);thumbnails[4413266]=new thumbnail(4413266,"258552","","IMG_2371_thumb.gif",130,88,18);thumbnails[4413295]=new thumbnail(4413295,"258552","","IMG_2223_thumb.gif",130,88,18);thumbnails[4413296]=new thumbnail(4413296,"258552","","IMG_2221_thumb.gif",130,88,18);thumbnails[4413297]=new thumbnail(4413297,"258552","","IMG_2257_thumb.gif",130,88,18);thumbnails[4413300]=new thumbnail(4413300,"258552","","IMG_2222_thumb.gif",130,88,18);thumbnails[4413302]=new thumbnail(4413302,"258552","","IMG_2284_thumb.gif",130,88,18);thumbnails[4413303]=new thumbnail(4413303,"258552","","IMG_2247_thumb.gif",130,88,18);thumbnails[4413311]=new thumbnail(4413311,"258552","","IMG_2263_thumb.gif",130,88,18);thumbnails[4413312]=new thumbnail(4413312,"258552","","IMG_2273_thumb.gif",130,88,18);thumbnails[4413313]=new thumbnail(4413313,"258552","","IMG_2256_thumb.gif",130,88,18);thumbnails[1919635]=new thumbnail(1919635,"173070","","11_33_thumb.jpg",130,193,18);thumbnails[1041662]=new thumbnail(1041662,"181430","","mandummy_thumb.jpg",130,192,18);thumbnails[1041670]=new thumbnail(1041670,"181430","","CNV00014_3_thumb.jpg",130,192,18);thumbnails[1260790]=new thumbnail(1260790,"173070","","IMG_1452_thumb.jpg",130,193,18);thumbnails[1041672]=new thumbnail(1041672,"181430","","CNV00024_thumb.jpg",130,192,18);thumbnails[1260792]=new thumbnail(1260792,"173070","","IMG_1643_thumb.jpg",130,193,18);thumbnails[1260855]=new thumbnail(1260855,"173070","","IMG_2845_thumb.jpg",130,88,18);thumbnails[1919639]=new thumbnail(1919639,"173070","","11_123_thumb.jpg",130,88,18);thumbnails[1041678]=new thumbnail(1041678,"181430","","CNV00019_thumb.jpg",130,192,18);thumbnails[1919620]=new thumbnail(1919620,"173070","","sadie_wedding_thumb.jpg",130,88,18);thumbnails[1919636]=new thumbnail(1919636,"173070","","11_34_thumb.jpg",130,88,18);thumbnails[1041674]=new thumbnail(1041674,"181430","","CNV00013_4_thumb.jpg",130,192,18);thumbnails[1260799]=new thumbnail(1260799,"173070","","IMG_1885_thumb.jpg",130,88,18);thumbnails[1458770]=new thumbnail(1458770,"181430","","army-girl-1_thumb.jpg",130,200,18);thumbnails[1919637]=new thumbnail(1919637,"173070","","11_47_thumb.jpg",130,88,18);var galleries=new Object();galleries[86635]=new gallery(86635,"2068027,2068024,2068018,1919648,1919647,1919643,1794933,1646666,1646654","'Will You Clock Me Out?'","gallery",[1794933,1919643,1646666,1646654,1919647,1919648,2068018,2068024,2068027]);galleries[181410]=new gallery(181410,"3598087,1646626","documentary","gallery",[]);galleries[76141]=new gallery(76141,"1646626","people and places","gallery",[1227172,1646626,3153178,1227170,3153180,1794932,1040753,1040747]);galleries[181413]=new gallery(181413,"3598087","europe 2008","gallery",[3598222,3598224,3598226,3041455,3041457,3597973,2934963,2934968,3598045,3598083,3598085,3598087,3597995,3153170,3597999,3598010,3598008,3153162,3153163,3153164,3153166,3597828,3597830,3597837,3597843,3597844,3597846,3153174,3153177,3153176,3890082,3890087,3890089]);galleries[76142]=new gallery(76142,"1041296,1041287","the changing face of Salford","gallery",[1041296,1040582,1041314,1040974,1041287,1040971,1040587,1919601,1646587,1794939,1919588,1790156]);galleries[258552]=new gallery(258552,"4413263","untitled2","gallery",[4413263,4413261,4413266,4413295,4413296,4413297,4413300,4413302,4413303,4413311,4413312,4413313]);galleries[76143]=new gallery(76143,"4413263,1041296,1041287","projects","gallery",[]);galleries[181429]=new gallery(181429,"1919620","commercial","gallery",[]);galleries[173070]=new gallery(173070,"1919620","events","gallery",[1919635,1260790,1260792,1260855,1919639,1919620,1919636,1260799,1919637]);galleries[181430]=new gallery(181430,"1458770,1041678,1041674,1041672,1041670,1041662","untitled","gallery",[1041662,1041670,1041672,1041678,1041674,1458770]);var imageSets=new Object();imageSets[1]="4413295,4413266,4413263,3598226,3598222,3598087,3598085,3597830,3597828,3153177,3153176,3153174,3153166,3153164,1794939,1790156,1646626,1227172,1227170,1041314,1041296,1040587,1040582";imageSets[2]="4413263,3598087,1919620,1646626,1458585,1041296,1041287";imageSets[3]="4413313,4413312,4413311,4413303,4413302,4413300,4413297,4413296,4413295,4413266,4413263,4413261,3890089,3890087,3890082,3598226,3598224,3598222,3598087,3598085,3598083,3598045,3598010,3598008,3597999,3597995,3597973,3597846,3597844,3597843,3597837,3597830,3597828,3153180,3153178,3153177,3153176,3153174,3153170,3153166,3153164,3153163,3153162,3041457,3041455,2934968,2934963,2068027,2068024,2068018";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/Katefurnell/images";break}switch(a){case 1:b="http://www1.clikpic.com/Katefurnell/images";break}switch(a){case 2:b="http://admin.clikpic.com/Katefurnell/images";break}switch(a){case 24:b="http://tpc15/clikpic/Katefurnell/images";break}switch(a){case 4:b="http://www.clikchurch.com/Katefurnell/images";break}switch(a){case 5:b="http://www2.clikpic.com/Katefurnell/images";break}switch(a){case 22:b="http://tpc5/clikpic/Katefurnell/images";break}switch(a){case 23:b="http://tpc10/clikpic/Katefurnell/images";break}switch(a){case 25:b="http://tpc16/clikpic/Katefurnell/images";break}switch(a){case 15:b="http://www3.clikpic.com/Katefurnell/images";break}switch(a){case 18:b="http://www4.clikpic.com/Katefurnell/images";break}switch(a){case 19:b="http://www5.clikpic.com/Katefurnell/images";break}switch(a){case 31:b="http://www7.clikpic.com/Katefurnell/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Katefurnell/images";break}switch(a){case 33:b="http://www8.clikpic.com/Katefurnell/images";break}switch(a){case 34:b="http://www9.clikpic.com/Katefurnell/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Katefurnell/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Katefurnell/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="Kate Furnell: "+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+'")'})}}};