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[387793]=new thumbnail(387793,"","","a_thumb.jpg",130,57,18);thumbnails[387800]=new thumbnail(387800,"","","UKALA Colour name JPEG_thumb.jpg",130,63,18);thumbnails[5823646]=new thumbnail(5823646,"","click for details","UN20PHOTO_thumb1_thumb.jpg",130,182,18);thumbnails[2398693]=new thumbnail(2398693,"155485","Click for details","lHPP0306401_thumb.jpg",130,86,18);thumbnails[4354413]=new thumbnail(4354413,"255950","Click for details","IMG_thumb.jpg",130,94,18);thumbnails[5628906]=new thumbnail(5628906,"319114","Click for details","Frnt_Door_block_thumb.jpg",130,98,18);thumbnails[2398631]=new thumbnail(2398631,"155485","","lHPP0306403_thumb.jpg",130,86,18);thumbnails[4354620]=new thumbnail(4354620,"255950","","IMG_0001_thumb.jpg",130,94,18);thumbnails[5628901]=new thumbnail(5628901,"319114","","Bathroom1_thumb.jpg",130,173,18);thumbnails[2398690]=new thumbnail(2398690,"155485","","lHPP0306404_thumb.jpg",130,86,18);thumbnails[4354624]=new thumbnail(4354624,"255950","","IMG_0002_thumb.jpg",130,94,18);thumbnails[5628907]=new thumbnail(5628907,"319114","","Kit1_thumb.jpg",130,173,18);thumbnails[2398682]=new thumbnail(2398682,"155485","","lHPP0306402_thumb.jpg",130,86,18);thumbnails[4354673]=new thumbnail(4354673,"255950","","IMG_0004_thumb.jpg",130,96,18);thumbnails[5628908]=new thumbnail(5628908,"319114","","Kit2_thumb.jpg",130,173,18);thumbnails[4354666]=new thumbnail(4354666,"255950","","IMG_0003_thumb.jpg",130,94,18);thumbnails[5628902]=new thumbnail(5628902,"319114","","Ensuite1_thumb.jpg",130,173,18);thumbnails[2398700]=new thumbnail(2398700,"155485","","lHPP0306406_thumb.jpg",130,86,18);thumbnails[4354752]=new thumbnail(4354752,"255950","","IMG_0006_thumb.jpg",130,92,18);thumbnails[5628910]=new thumbnail(5628910,"319114","","Kit_3_thumb.jpg",130,173,18);thumbnails[4354755]=new thumbnail(4354755,"255950","","IMG_0007_thumb.jpg",130,93,18);thumbnails[5628911]=new thumbnail(5628911,"319114","","Liv_4_thumb.jpg",130,98,18);thumbnails[5628912]=new thumbnail(5628912,"319114","","Mstr_Bed1_thumb.jpg",130,98,18);thumbnails[5628913]=new thumbnail(5628913,"319114","","Mstr_Bed2_thumb.jpg",130,173,18);thumbnails[757678]=new thumbnail(757678,"58590","Click for details","100_0514_thumb.jpg",130,98,18);thumbnails[757712]=new thumbnail(757712,"58590","","100_0526_thumb.jpg",130,98,18);thumbnails[757716]=new thumbnail(757716,"58590","","100_0528_thumb.jpg",130,98,18);thumbnails[1625960]=new thumbnail(1625960,"110223","Click for details","100_0845_thumb.jpg",130,98,18);thumbnails[1625969]=new thumbnail(1625969,"110223","","100_0847_thumb.jpg",130,98,18);thumbnails[1625972]=new thumbnail(1625972,"110223","","100_0834_thumb.jpg",130,98,18);thumbnails[1764466]=new thumbnail(1764466,"117403","Click for details","100_0868_thumb.JPG",130,98,18);thumbnails[1764476]=new thumbnail(1764476,"117403","","100_0871_thumb.JPG",130,98,18);thumbnails[1764480]=new thumbnail(1764480,"117403","","100_0872_thumb.JPG",130,173,18);thumbnails[1764488]=new thumbnail(1764488,"117403","","100_0875_thumb.JPG",130,98,18);thumbnails[1764491]=new thumbnail(1764491,"117403","","100_0877_thumb.JPG",130,98,18);thumbnails[757698]=new thumbnail(757698,"58590","","100_0523_thumb.jpg",130,98,18);thumbnails[3539268]=new thumbnail(3539268,"216665","Click for details","6_thumb.jpg",130,98,18);thumbnails[3849737]=new thumbnail(3849737,"234243","click for details","100_1050_thumb.jpg",130,173,18);thumbnails[3539263]=new thumbnail(3539263,"216665","","1_1_thumb.jpg",130,173,18);thumbnails[3539269]=new thumbnail(3539269,"216665","","7_1_thumb.jpg",130,173,18);thumbnails[3849740]=new thumbnail(3849740,"234243","","100_1046_thumb.jpg",130,98,18);thumbnails[796028]=new thumbnail(796028,"61823","click for details","se7_thumb.jpg",130,98,18);thumbnails[3539264]=new thumbnail(3539264,"216665","","2_thumb.jpg",130,98,18);thumbnails[3849746]=new thumbnail(3849746,"234243","","100_1045_thumb.jpg",130,98,18);thumbnails[3539265]=new thumbnail(3539265,"216665","","3_thumb.jpg",130,173,18);thumbnails[3849750]=new thumbnail(3849750,"234243","","100_1049_thumb.jpg",130,98,18);thumbnails[3849753]=new thumbnail(3849753,"234243","","100_1048_thumb.jpg",130,173,18);thumbnails[3539266]=new thumbnail(3539266,"216665","","4_thumb.jpg",130,173,18);thumbnails[3849759]=new thumbnail(3849759,"234243","","100_1053_thumb.jpg",130,98,18);thumbnails[3539267]=new thumbnail(3539267,"216665","","5_thumb.jpg",130,98,18);thumbnails[3539270]=new thumbnail(3539270,"216665","","8_thumb.jpg",130,173,18);thumbnails[3539271]=new thumbnail(3539271,"216665","","9_thumb.jpg",130,173,18);thumbnails[3539272]=new thumbnail(3539272,"216665","","10_thumb.jpg",130,98,18);thumbnails[3539274]=new thumbnail(3539274,"216665","","11_thumb.jpg",130,98,18);thumbnails[3539277]=new thumbnail(3539277,"216665","","12_1_thumb.jpg",130,98,18);thumbnails[3539281]=new thumbnail(3539281,"216665","","13_thumb.jpg",130,173,18);thumbnails[796018]=new thumbnail(796018,"61823","","se3_thumb.jpg",130,173,18);thumbnails[1049603]=new thumbnail(1049603,"77776","Click for details","1_thumb.jpg",130,173,18);thumbnails[1049620]=new thumbnail(1049620,"77776","","7_thumb.jpg",130,173,18);thumbnails[1049628]=new thumbnail(1049628,"77776","","12_thumb.jpg",130,173,18);thumbnails[1049631]=new thumbnail(1049631,"77776","","15_thumb.jpg",130,98,18);thumbnails[1414103]=new thumbnail(1414103,"97260","Click for details","100_0791_thumb.jpg",130,173,18);thumbnails[1414106]=new thumbnail(1414106,"97260","","100_0792_thumb.jpg",130,173,18);thumbnails[1414110]=new thumbnail(1414110,"97260","","100_0794_thumb.jpg",130,98,18);thumbnails[1581708]=new thumbnail(1581708,"105828","Click for details","100_0831_thumb.jpg",130,173,18);thumbnails[3105930]=new thumbnail(3105930,"190597","Click for details","EA1_thumb.jpg",130,98,18);thumbnails[3105931]=new thumbnail(3105931,"190597","","EA2_thumb.jpg",130,98,18);thumbnails[3105932]=new thumbnail(3105932,"190597","","EA3_thumb.jpg",130,98,18);thumbnails[3105935]=new thumbnail(3105935,"190597","","EA4_thumb.jpg",130,173,18);thumbnails[960649]=new thumbnail(960649,"72034","","UN PHOTO_thumb.jpg",130,182,18);thumbnails[2755908]=new thumbnail(2755908,"172952","Click for details","AWAITING copy2_thumb.jpg",130,130,18);var galleries=new Object();galleries[319114]=new gallery(319114,"5628913,5628912,5628911,5628910,5628908,5628907,5628906,5628902,5628901","Conisborough Way, Hems' SORRY, LET AGREED!","gallery",[5628906,5628901,5628907,5628908,5628902,5628910,5628911,5628912,5628913]);galleries[255950]=new gallery(255950,"4354755,4354752,4354673,4354666,4354624,4354620,4354413","Granville St, Barnsley £450 pcm SORRY, LET AGREED!","gallery",[4354413,4354620,4354624,4354673,4354666,4354752,4354755]);galleries[155485]=new gallery(155485,"2398700,2398693,2398690,2398682,2398631","Hall Court, Brotherton SORRY, LET AGREED!","gallery",[2398693,2398631,2398690,2398682,2398700]);galleries[110223]=new gallery(110223,"1625972,1625969,1625960","Ashleigh Avenue, Pontefract SORRY, LET AGREED!","gallery",[1625960,1625969,1625972]);galleries[58590]=new gallery(58590,"757716,757712,757698,757678","Aston Chase, Hemsworth (Furn) £445 pcm LET AGREED!","gallery",[757678,757712,757716,757698]);galleries[117403]=new gallery(117403,"1764491,1764488,1764480,1764476,1764466","Glebe Street, Castleford SORRY, LET AGREED!","gallery",[1764466,1764476,1764480,1764488,1764491]);galleries[61823]=new gallery(61823,"796028,796018","Mallard Mews, South Elmsall SORRY, LET AGREED!","gallery",[796028,796018]);galleries[216665]=new gallery(216665,"3539281,3539277,3539274,3539272,3539271,3539270,3539269,3539268,3539267,3539266","Park View Apts, South Kirkby SORRY, LET AGREED!","gallery",[3539268,3539263,3539269,3539264,3539265,3539266,3539267,3539270,3539271,3539272,3539274,3539277,3539281]);galleries[234243]=new gallery(234243,"3849759,3849753,3849750,3849746,3849740,3849737","Pontefract Road, Featherstone SORRY, LET AGREED!","gallery",[3849737,3849740,3849746,3849750,3849753,3849759]);galleries[77776]=new gallery(77776,"1049631,1049628,1049620,1049603","Clayton Avenue, Upton £495 pcm AVAILABLE NOW!","gallery",[1049603,1049620,1049628,1049631]);galleries[105828]=new gallery(105828,"1581708","Northfield Grange, South Kirkby SORRY, LET AGREED!","gallery",[1581708]);galleries[97260]=new gallery(97260,"1414110,1414106,1414103","Victoria Crescent West, Barnsley SORRY, LET AGREED","gallery",[1414103,1414106,1414110]);galleries[24332]=new gallery(24332,"5628913,5628912,5628911,5628910,5628908,5628907,5628906,5628902,5628901,3539281","Apartments/Flats","gallery",[]);galleries[72034]=new gallery(72034,"960649","Burton Street, South Elmsall SORRY, LET AGREED!","gallery",[960649]);galleries[190597]=new gallery(190597,"3105935,3105932,3105931,3105930","Empire House, South Elmsall SORRY, LET AGREED!","gallery",[3105930,3105931,3105932,3105935]);galleries[172952]=new gallery(172952,"2755908","Harrow Street, South Elmsall SORRY, LET AGREED!","gallery",[2755908]);galleries[20704]=new gallery(20704,"1764491,1764488,1764480,1764476,1764466,1414110,1414106,1414103,1049631,1049628","2 Bed Houses","gallery",[]);galleries[20926]=new gallery(20926,"4354755,4354752,4354673,4354666,4354624,4354620,4354413,3849759,3849753,3849750","3 Bed Houses","gallery",[]);galleries[20927]=new gallery(20927,"","4 Bed Houses","gallery",[]);var imageSets=new Object();imageSets[1]="387793";imageSets[3]="5823646,5628913,5628912,5628911,5628910,5628908,5628907,5628906,5628902,5628901,4354755,4354752,4354673,4354666,4354624,4354620,4354413,3849759,3849753,3849750,3849746,3849740,3849737,3539281,3539277,3539274,3539272,3539271,3539270,3539269,3539268,3539267,3539266,3539265,3539264,3539263,3105935,3105932,3105931,3105930,2755908,2398700,2398693,2398690,2398682,2398631,1764491,1764488,1764480,1764476";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/simwilko/images";break}switch(a){case 1:b="http://www1.clikpic.com/simwilko/images";break}switch(a){case 2:b="http://admin.clikpic.com/simwilko/images";break}switch(a){case 24:b="http://tpc15/clikpic/simwilko/images";break}switch(a){case 4:b="http://www.clikchurch.com/simwilko/images";break}switch(a){case 5:b="http://www2.clikpic.com/simwilko/images";break}switch(a){case 22:b="http://tpc5/clikpic/simwilko/images";break}switch(a){case 23:b="http://tpc10/clikpic/simwilko/images";break}switch(a){case 25:b="http://tpc16/clikpic/simwilko/images";break}switch(a){case 15:b="http://www3.clikpic.com/simwilko/images";break}switch(a){case 18:b="http://www4.clikpic.com/simwilko/images";break}switch(a){case 19:b="http://www5.clikpic.com/simwilko/images";break}switch(a){case 31:b="http://www7.clikpic.com/simwilko/images";break}switch(a){case 32:b="http://admin2.clikpic.com/simwilko/images";break}switch(a){case 33:b="http://www8.clikpic.com/simwilko/images";break}switch(a){case 34:b="http://www9.clikpic.com/simwilko/images";break}switch(a){case 35:b="http://admin3.clikpic.com/simwilko/images";break}switch(a){case 37:b="http://admin4.clikpic.com/simwilko/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="Wilkinson Property Management: "+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+'")'})}}};