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[430887]=new thumbnail(430887,"34457","Warm light","image11_thumb.jpg",130,195,1);thumbnails[430888]=new thumbnail(430888,"34457","View from dining area towards kitchen. Note the ceiling edge details and integration of natural light.","image12_thumb.jpg",130,95,1);thumbnails[430889]=new thumbnail(430889,"34457","Natural light<br>\r\n","image13_thumb.jpg",130,170,1);thumbnails[430890]=new thumbnail(430890,"34457","Bathroom","image14_thumb.jpg",130,95,1);thumbnails[430891]=new thumbnail(430891,"34457","Kitchen","image15_thumb.jpg",130,99,1);thumbnails[430892]=new thumbnail(430892,"34457","Night","image16_thumb.jpg",130,119,1);thumbnails[430893]=new thumbnail(430893,"34457","Mood lighting","image17_thumb.jpg",130,91,1);thumbnails[430894]=new thumbnail(430894,"34457","Cool light","image18_thumb.jpg",130,101,1);thumbnails[430903]=new thumbnail(430903,"34460","","image19_thumb.jpg",130,131,1);thumbnails[430906]=new thumbnail(430906,"34460","Inside view from dining area","image20_thumb.jpg",130,90,1);thumbnails[430907]=new thumbnail(430907,"34460","Kitchen island","image21_thumb.jpg",130,104,1);thumbnails[430908]=new thumbnail(430908,"34460","Exterior view","image22_thumb.jpg",130,90,1);thumbnails[430909]=new thumbnail(430909,"34462","Modern house in a conservation area","image23_thumb.jpg",130,73,1);thumbnails[430910]=new thumbnail(430910,"34462","Elevations","image24_thumb.jpg",130,106,1);thumbnails[430911]=new thumbnail(430911,"34462","Upper Ground Floor Plan","image25_thumb.jpg",130,90,1);thumbnails[430912]=new thumbnail(430912,"34462","Lower Ground Floor Plan","image26_thumb.jpg",130,68,1);thumbnails[430913]=new thumbnail(430913,"34463","Access Project, St Anselm's Church","image27_thumb.jpg",130,100,1);thumbnails[430914]=new thumbnail(430914,"34463","A combination of ramps and meeting spaces were incorporated","image28_thumb.jpg",130,91,1);thumbnails[430915]=new thumbnail(430915,"34463","Garaging was included","image29_thumb.jpg",130,86,1);thumbnails[430917]=new thumbnail(430917,"34464","Cafe bar for lawyers at Gray's Inn","image30_thumb.jpg",130,86,1);thumbnails[430918]=new thumbnail(430918,"34464","New starter flats in Wandsworth","image31_thumb.jpg",130,98,1);thumbnails[430919]=new thumbnail(430919,"34465","Listed Building Works and fit out at Onslow Gardens.","image32_thumb.jpg",130,86,1);thumbnails[430920]=new thumbnail(430920,"34464","Office Development Battersea","image33_thumb.jpg",130,195,1);thumbnails[430922]=new thumbnail(430922,"34465","Refurbishment in Notting Hill","image34_thumb.jpg",130,104,1);thumbnails[430925]=new thumbnail(430925,"34466","Kitchen area","image37_thumb.jpg",130,152,1);thumbnails[430926]=new thumbnail(430926,"34466","Sliding/folding doors to garden","image38_thumb.jpg",130,195,1);thumbnails[430927]=new thumbnail(430927,"34466","Stair detail","image39_thumb.jpg",130,172,1);thumbnails[430928]=new thumbnail(430928,"34466","TV behind sliding screen","image40_thumb.jpg",130,90,1);thumbnails[472060]=new thumbnail(472060,"37253","","400-DSC_3396_thumb.jpg",130,87,1);thumbnails[472062]=new thumbnail(472062,"37253","","400-DSC_3391_thumb.jpg",130,87,1);thumbnails[472153]=new thumbnail(472153,"37254","","400-Coniger-5_thumb.jpg",130,86,1);thumbnails[472155]=new thumbnail(472155,"37254","","400-Coniger-6_thumb.jpg",130,86,1);thumbnails[472160]=new thumbnail(472160,"37254","","400-DSC_0003_thumb.jpg",130,86,1);thumbnails[472163]=new thumbnail(472163,"37254","","400-Coniger-7_thumb.jpg",130,196,1);thumbnails[472253]=new thumbnail(472253,"37255","","400_RCB0490_thumb.jpg",130,194,1);thumbnails[472256]=new thumbnail(472256,"37255","","400_RCB0498_thumb.jpg",130,87,1);thumbnails[472259]=new thumbnail(472259,"37255","","400_RCB04861_thumb.jpg",130,87,1);thumbnails[472261]=new thumbnail(472261,"37255","","400_RCB04691_thumb.jpg",130,87,1);thumbnails[472265]=new thumbnail(472265,"37272","","400_NIK00041_thumb.jpg",130,87,1);thumbnails[472266]=new thumbnail(472266,"37272","","400_NIK0010_thumb.jpg",130,194,1);thumbnails[472267]=new thumbnail(472267,"37272","","400_NIK0015_thumb.jpg",130,87,1);thumbnails[472269]=new thumbnail(472269,"37272","","400_NIK0018_thumb.jpg",130,87,1);thumbnails[472355]=new thumbnail(472355,"34465","","Flat-glass-rooflight_thumb.jpg",130,201,1);thumbnails[483979]=new thumbnail(483979,"37896","","400-ouseley-1_thumb.jpg",130,196,1);thumbnails[483981]=new thumbnail(483981,"37896","","400-Ouseley-2_thumb.jpg",130,87,1);thumbnails[483982]=new thumbnail(483982,"37896","","400-Ouseley-3_thumb.jpg",130,86,1);thumbnails[483983]=new thumbnail(483983,"37896","","400-Ouseley-4_thumb.jpg",130,86,1);thumbnails[483984]=new thumbnail(483984,"37896","","400-Ouseley-5_thumb.jpg",130,72,1);thumbnails[483985]=new thumbnail(483985,"37896","","400-Ouseley-under-construct_thumb.jpg",130,100,1);thumbnails[1893682]=new thumbnail(1893682,"126967","","Abb-1_thumb.jpg",130,194,1);thumbnails[1893685]=new thumbnail(1893685,"126967","","Abb-2_thumb.jpg",130,87,1);thumbnails[1893688]=new thumbnail(1893688,"126967","","Abb-3_thumb.jpg",130,87,1);thumbnails[2001268]=new thumbnail(2001268,"134241","","1 Rear Window_thumb.jpg",130,87,1);thumbnails[2001271]=new thumbnail(2001271,"134241","","1 Fishtank_thumb.jpg",130,194,1);thumbnails[2001273]=new thumbnail(2001273,"134241","","1 Rear Draw Room_thumb.jpg",130,87,1);thumbnails[2001281]=new thumbnail(2001281,"134241","","2 Stairs 3_thumb.jpg",130,130,1);thumbnails[2015151]=new thumbnail(2015151,"37253","","1-Herondale-web_thumb.jpg",130,87,1);thumbnails[2032766]=new thumbnail(2032766,"136205","","doors_thumb.jpg",130,86,1);thumbnails[2032776]=new thumbnail(2032776,"136205","","eaves_thumb.jpg",130,86,1);thumbnails[2032782]=new thumbnail(2032782,"136205","","kitch mod_thumb.jpg",130,86,1);thumbnails[2032793]=new thumbnail(2032793,"136205","","rear_thumb.jpg",130,86,1);thumbnails[2032808]=new thumbnail(2032808,"136205","","to garden_thumb.jpg",130,86,1);thumbnails[2032812]=new thumbnail(2032812,"136205","","view to kitch_thumb.jpg",130,214,1);thumbnails[2032861]=new thumbnail(2032861,"136205","","RB%202007_thumb.jpg",130,195,2);thumbnails[2032885]=new thumbnail(2032885,"","","Untitled_thumb.jpg",130,130,1);thumbnails[2038626]=new thumbnail(2038626,"134241","","collage1_thumb.jpg",130,130,1);thumbnails[3189388]=new thumbnail(3189388,"195052","","21 terrapin bay 1_thumb.jpg",130,216,1);thumbnails[3189390]=new thumbnail(3189390,"195052","","21 terrapin bay 2_thumb.jpg",130,196,1);thumbnails[3189393]=new thumbnail(3189393,"195052","","21 terrapin garden 1_thumb.jpg",130,86,1);thumbnails[3189396]=new thumbnail(3189396,"195052","","21 terrapin inside-outside1_thumb.jpg",130,86,1);thumbnails[3189405]=new thumbnail(3189405,"195052","","21 terrapin interior 1_thumb.jpg",130,86,1);thumbnails[3189406]=new thumbnail(3189406,"195052","","21 terrapin kitchen 1_thumb.jpg",130,86,1);thumbnails[3189407]=new thumbnail(3189407,"195052","","21 terrapin multimedia_thumb.jpg",130,86,1);thumbnails[4849953]=new thumbnail(4849953,"276826","Barn conversion","Proposed_1_Glidewell_Barn-Model_thumb.jpg",130,104,1);thumbnails[4849703]=new thumbnail(4849703,"276826","Refurbishment and Extension of traditional Northwich timber framed building.","Proposed_3_17-19_Winnington_Street_Northwich_CW8_1AQ-Model_thumb.jpg",130,104,1);thumbnails[4849735]=new thumbnail(4849735,"276826","Proposed extensions to detached house. ","Proposed_1_Watchfield_Frodsham_WA6_6DT-Model_thumb.jpg",130,104,1);var galleries=new Object();galleries[134241]=new gallery(134241,"2038626","Alterations at Regents Park Road","section54783",[2001268,2001271,2001273,2001281,2038626]);galleries[37896]=new gallery(37896,"483981","Alterations, Ouseley Road, SW12","section54783",[483979,483981,483982,483983,483984,483985]);galleries[37253]=new gallery(37253,"2015151","Extension Private House, Herondale Avenue, SW18","section54783",[472060,472062,2015151]);galleries[136205]=new gallery(136205,"2032793","Extensions at  Private House Kew","section54783",[2032766,2032776,2032782,2032793,2032808,2032812,2032861]);galleries[34466]=new gallery(34466,"430928,430927,430926,430925","House Refurbishment, Blackheath","section54783",[430925,430926,430927,430928]);galleries[34463]=new gallery(34463,"430915,430914,430913","New Access Project, St Anselm's Church","section54783",[430913,430914,430915]);galleries[34462]=new gallery(34462,"430912,430911,430910,430909","New House in Harrow","section54783",[430909,430910,430911,430912]);galleries[34464]=new gallery(34464,"430920,430918,430917","Projects for Commercial Clients","section54783",[430917,430918,430920]);galleries[34465]=new gallery(34465,"472355,430922,430919","Projects for Private Clients ","section54783",[430919,430922,472355]);galleries[126967]=new gallery(126967,"1893682","Refurbishment Abbeville Road Clapham","section54783",[1893682,1893685,1893688]);galleries[37254]=new gallery(37254,"472163,472160,472155,472153","Refurbishment to house, Peterborough Estate, SW6","section54783",[472153,472155,472160,472163]);galleries[34457]=new gallery(34457,"430894,430893,430892,430891,430890,430889,430888,430887","Ritherdon Road Heaver Estate","section54783",[430887,430888,430889,430890,430891,430892,430893,430894]);galleries[37272]=new gallery(37272,"472269,472267,472266,472265","Rutherfords Development, Northcote Road, SW11","section54783",[472265,472266,472267,472269]);galleries[195052]=new gallery(195052,"3189393","Terrapin Road, Heaver Estate, SW17","section54783",[3189388,3189390,3189393,3189396,3189405,3189406,3189407]);galleries[34460]=new gallery(34460,"430908,430907,430906,430903","Works to Grade II Listed House, London SW12","section54783",[430903,430906,430907,430908]);galleries[37255]=new gallery(37255,"472261,472259,472256,472253","Works, Ellerton Road, SW18","section54783",[472253,472256,472259,472261]);galleries[276826]=new gallery(276826,"4849953,4849735,4849703","Cheshire Projects","section54783",[4849953,4849703,4849735]);var imageSets=new Object();imageSets[1]="4849703,3189393,2038626,2032793,2001281,483981,430908";imageSets[2]="3189393,2038626,2032793,2015151,1893682,483981";imageSets[3]="4849953,4849735,4849703,3189407,3189406,3189405,3189396,3189393,3189390,3189388,2038626,2032885,2032861,2032812,2032808,2032793,2032782,2032776,2032766,2015151,2001281,2001273,2001271,2001268,1893688,1893685,1893682,483985,483984,483983,483982,483981,483979,472355,472269,472267,472266,472265,472261,472259,472256,472253,472163,472160,472155,472153,472062,472060,430928,430927";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/rbd/images";break}switch(a){case 1:b="http://www1.clikpic.com/rbd/images";break}switch(a){case 2:b="http://admin.clikpic.com/rbd/images";break}switch(a){case 24:b="http://tpc15/clikpic/rbd/images";break}switch(a){case 4:b="http://www.clikchurch.com/rbd/images";break}switch(a){case 5:b="http://www2.clikpic.com/rbd/images";break}switch(a){case 22:b="http://tpc5/clikpic/rbd/images";break}switch(a){case 23:b="http://tpc10/clikpic/rbd/images";break}switch(a){case 25:b="http://tpc16/clikpic/rbd/images";break}switch(a){case 15:b="http://www3.clikpic.com/rbd/images";break}switch(a){case 18:b="http://www4.clikpic.com/rbd/images";break}switch(a){case 19:b="http://www5.clikpic.com/rbd/images";break}switch(a){case 31:b="http://www7.clikpic.com/rbd/images";break}switch(a){case 32:b="http://admin2.clikpic.com/rbd/images";break}switch(a){case 33:b="http://www8.clikpic.com/rbd/images";break}switch(a){case 34:b="http://www9.clikpic.com/rbd/images";break}switch(a){case 35:b="http://admin3.clikpic.com/rbd/images";break}switch(a){case 37:b="http://admin4.clikpic.com/rbd/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("section54783"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section54783.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("section54783"!=""){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="baxter phillips architects: "+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+'")'})}}};