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[4683681]=new thumbnail(4683681,"269566","Kent Porter Warren Architects' website -  many of the photographs taken by i2image.","kpw_website_multi_full_size_thumb.jpg",130,92,18);thumbnails[4683735]=new thumbnail(4683735,"269567","Architectural photography for Kent Porter Warren's 2009 brochure.","kpw_brochure_multi_TIFF_thumb.jpg",130,92,18);thumbnails[4683695]=new thumbnail(4683695,"269566","Live event photography for Enterprising Motivating Empowering Women (EMEW) business network group launched in January 2009.","emew_website_multi_full_size_thumb.jpg",130,92,18);thumbnails[2432893]=new thumbnail(2432893,"","Children's portrait.","Multi david d_thumb.jpg",130,92,18);thumbnails[2432901]=new thumbnail(2432901,"","Photographs that capture those special moments.","Multi greg_thumb.jpg",130,92,18);thumbnails[2432909]=new thumbnail(2432909,"","Families and children at those important stages in their lives.","Multi jackie ruth_thumb.jpg",130,92,18);thumbnails[4683743]=new thumbnail(4683743,"156997","Live event photography for launch of EMEW - a new networking group for buinesswomen.","emew_people_multi_full_size_thumb.jpg",130,92,18);thumbnails[3463155]=new thumbnail(3463155,"175309","Curve Theatre by night.","curve muti night 1_thumb.jpg",130,92,18);thumbnails[3463145]=new thumbnail(3463145,"156997","Product shots for website.","garrison cutout_thumb.jpg",130,92,18);thumbnails[4683706]=new thumbnail(4683706,"156560","Attractive business portraits of the family management team at BDI Consultants.","sue_langley_multi_full_size_thumb.jpg",130,92,18);thumbnails[4683715]=new thumbnail(4683715,"156560","Attractive business portraits of the family management team at BDI Consultants (2).","sue_langley_multi_2_full_size_thumb.jpg",130,92,18);thumbnails[3463138]=new thumbnail(3463138,"156997","Sportswear shoot.","cheatle cutouts_thumb.jpg",130,92,18);thumbnails[2581212]=new thumbnail(2581212,"164477","Coastal charm.","multistudio 3_thumb.jpg",130,92,18);thumbnails[3463169]=new thumbnail(3463169,"175309","Curve Theatre by day.","curve daytime multi_thumb.jpg",130,92,18);thumbnails[2581423]=new thumbnail(2581423,"164477","Coastal charm (2).","multistudio 4_thumb.jpg",130,92,18);thumbnails[2581860]=new thumbnail(2581860,"164477","Boats and a hut.","multistudio 5_thumb.jpg",130,92,18);thumbnails[2582055]=new thumbnail(2582055,"164477","Boats and a hut (2).","multistudio 6_thumb.jpg",130,92,18);thumbnails[2582124]=new thumbnail(2582124,"31087","Former artist's studio.","multistudio 2_thumb.jpg",130,92,18);thumbnails[2803064]=new thumbnail(2803064,"175309","Highcross 1","highcross multi 1_thumb.jpg",130,92,18);thumbnails[2581200]=new thumbnail(2581200,"31087","Elegant living space.","multistudio 1_thumb.jpg",130,92,18);thumbnails[2431402]=new thumbnail(2431402,"157000","Urban landscape.","Multi bridges_thumb.jpg",130,92,18);thumbnails[2803082]=new thumbnail(2803082,"175311","Garden Open Day 1","woodhouse multi 1_thumb.jpg",130,92,18);thumbnails[2430732]=new thumbnail(2430732,"156999","Portfolio shots for architect.","325 multi_thumb.jpg",130,92,18);thumbnails[2431375]=new thumbnail(2431375,"156560","Portraits","Multi BP_thumb.jpg",130,92,18);thumbnails[2430875]=new thumbnail(2430875,"31087","Portfolio and promotional shots.","Multi interiors 1_thumb.jpg",130,92,18);thumbnails[2803070]=new thumbnail(2803070,"175309","Highcross 2","higncross multi 2_thumb.jpg",130,92,18);thumbnails[2915013]=new thumbnail(2915013,"156560","Portraits","multi A_thumb.jpg",130,91,18);thumbnails[2803083]=new thumbnail(2803083,"175311","Garden Open Day 2","woodhouse multi 2_thumb.jpg",130,92,18);thumbnails[2430790]=new thumbnail(2430790,"156999","Portfolio shots for architect.","Multi jck_thumb.jpg",130,92,18);thumbnails[2430903]=new thumbnail(2430903,"31087","Interiors and bathrooms.","Multi Interiors 2_thumb.jpg",130,92,18);thumbnails[2430926]=new thumbnail(2430926,"156997","Staged shots for new business.","ITmulti_thumb.jpg",130,92,18);thumbnails[2431342]=new thumbnail(2431342,"156997","Short depth of field work.","Multi words_thumb.jpg",130,92,18);thumbnails[2915017]=new thumbnail(2915017,"156560","Portraits","multi B_thumb.jpg",130,91,18);thumbnails[2431354]=new thumbnail(2431354,"156997","Photo essay.","networking multi_thumb.jpg",130,92,18);thumbnails[2803088]=new thumbnail(2803088,"175311","Garden Open Day 3","woodhouse multi 3_thumb.jpg",130,92,18);thumbnails[2430867]=new thumbnail(2430867,"156999","Portfolio shots for architect.","Multi gc_thumb.jpg",130,92,18);thumbnails[2803074]=new thumbnail(2803074,"175309","Highcross 3","highcross multi 3_thumb.jpg",130,92,18);thumbnails[2915019]=new thumbnail(2915019,"156560","Portraits","multi C_thumb.jpg",130,91,18);thumbnails[2915135]=new thumbnail(2915135,"175311","In Print","woodhouse spread_thumb.jpg",130,93,18);thumbnails[2432912]=new thumbnail(2432912,"156999","Portfolio shots for architect.","Multi buildings 2 X_thumb.jpg",130,92,18);thumbnails[2431363]=new thumbnail(2431363,"156997","Photo essay.","tennis multi_thumb.jpg",130,92,18);thumbnails[2915024]=new thumbnail(2915024,"156560","Portraits","multi D_thumb.jpg",130,91,18);thumbnails[2432926]=new thumbnail(2432926,"156999","Portfolio shots for architect.","Multi buildings X_thumb.jpg",130,92,18);var galleries=new Object();galleries[269567]=new gallery(269567,"4683735","Brochures","gallery",[4683735]);galleries[269566]=new gallery(269566,"4683695,4683681","On the Web","gallery",[4683681,4683695]);galleries[156999]=new gallery(156999,"2432926,2432912,2430867,2430790,2430732","Architecture","gallery",[2430732,2430790,2430867,2432912,2432926]);galleries[31087]=new gallery(31087,"2582124,2581200,2430903,2430875","Interiors","gallery",[2582124,2581200,2430875,2430903]);galleries[175309]=new gallery(175309,"3463169,3463155,2803074,2803070,2803064","New Leicester","gallery",[3463155,3463169,2803064,2803070,2803074]);galleries[175311]=new gallery(175311,"2915135,2803088,2803083,2803082","Photojournalism","gallery",[2803082,2803083,2803088,2915135]);galleries[156560]=new gallery(156560,"4683715,4683706,2915024,2915019,2915017,2915013,2431375","Portraits","gallery",[4683706,4683715,2431375,2915013,2915017,2915019,2915024]);galleries[156997]=new gallery(156997,"4683743,3463145,3463138,2431363,2431354,2431342,2430926","Promotional","gallery",[4683743,3463145,3463138,2430926,2431342,2431354,2431363]);galleries[164477]=new gallery(164477,"2582055,2581860,2581423,2581212","Suffolk","gallery",[2581212,2581423,2581860,2582055]);galleries[157000]=new gallery(157000,"2431402","Urban","gallery",[2431402]);var imageSets=new Object();imageSets[1]="3463169,3463155,3463145,3463138,2432912,2431375,2430926,2430875,2430790,2430732";imageSets[3]="4683743,4683735,4683715,4683706,4683695,4683681,3463169,3463155,3463145,3463138,2915135,2915024,2915019,2915017,2915013,2803088,2803083,2803082,2803074,2803070,2803064,2582124,2582055,2581860,2581423,2581212,2581200,2432926,2432912,2432909,2432901,2432893,2431402,2431375,2431363,2431354,2431342,2430926,2430903,2430875,2430867,2430790,2430732";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/lesnick48/images";break}switch(a){case 1:b="http://www1.clikpic.com/lesnick48/images";break}switch(a){case 2:b="http://admin.clikpic.com/lesnick48/images";break}switch(a){case 24:b="http://tpc15/clikpic/lesnick48/images";break}switch(a){case 4:b="http://www.clikchurch.com/lesnick48/images";break}switch(a){case 5:b="http://www2.clikpic.com/lesnick48/images";break}switch(a){case 22:b="http://tpc5/clikpic/lesnick48/images";break}switch(a){case 23:b="http://tpc10/clikpic/lesnick48/images";break}switch(a){case 25:b="http://tpc16/clikpic/lesnick48/images";break}switch(a){case 15:b="http://www3.clikpic.com/lesnick48/images";break}switch(a){case 18:b="http://www4.clikpic.com/lesnick48/images";break}switch(a){case 19:b="http://www5.clikpic.com/lesnick48/images";break}switch(a){case 31:b="http://www7.clikpic.com/lesnick48/images";break}switch(a){case 32:b="http://admin2.clikpic.com/lesnick48/images";break}switch(a){case 33:b="http://www8.clikpic.com/lesnick48/images";break}switch(a){case 34:b="http://www9.clikpic.com/lesnick48/images";break}switch(a){case 35:b="http://admin3.clikpic.com/lesnick48/images";break}switch(a){case 37:b="http://admin4.clikpic.com/lesnick48/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="i2image: "+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>"}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+'")'})}}};