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[4286363]=new thumbnail(4286363,"","","home-page_thumb.jpg",130,93,18);thumbnails[4287872]=new thumbnail(4287872,"261281","","web12_thumb.jpg",130,195,18);thumbnails[4287875]=new thumbnail(4287875,"261281","","web13_thumb.jpg",130,179,18);thumbnails[4287877]=new thumbnail(4287877,"261281","","web14_thumb.jpg",130,202,18);thumbnails[4288413]=new thumbnail(4288413,"253126","","web71_thumb.jpg",130,195,18);thumbnails[4288417]=new thumbnail(4288417,"271996","","web72_thumb.jpg",130,195,18);thumbnails[4288418]=new thumbnail(4288418,"271996","","web74_thumb.jpg",130,195,18);thumbnails[4288422]=new thumbnail(4288422,"253126","","web79_thumb.jpg",130,87,18);thumbnails[4288424]=new thumbnail(4288424,"253126","","web80_thumb.jpg",130,195,18);thumbnails[4288426]=new thumbnail(4288426,"253126","","web81_thumb.jpg",130,87,18);thumbnails[4288429]=new thumbnail(4288429,"253126","","web84_thumb.jpg",130,158,18);thumbnails[4288747]=new thumbnail(4288747,"253190","","web91_thumb.jpg",130,195,18);thumbnails[4288751]=new thumbnail(4288751,"253190","","web92_thumb.jpg",130,173,18);thumbnails[4288753]=new thumbnail(4288753,"253190","","web93_thumb.jpg",130,186,18);thumbnails[4288757]=new thumbnail(4288757,"253190","","web96_thumb.jpg",130,195,18);thumbnails[4288774]=new thumbnail(4288774,"253190","","web98_thumb.jpg",130,87,18);thumbnails[4288779]=new thumbnail(4288779,"253190","","web99_thumb.jpg",130,163,18);thumbnails[4480413]=new thumbnail(4480413,"261281","","web102_thumb.jpg",130,150,18);thumbnails[4480415]=new thumbnail(4480415,"261281","","web103_thumb.jpg",130,197,18);thumbnails[4480422]=new thumbnail(4480422,"253190","","web101_thumb.jpg",130,97,18);thumbnails[4741515]=new thumbnail(4741515,"271996","","Fashion_2_thumb.jpg",130,169,18);thumbnails[4741516]=new thumbnail(4741516,"271996","","Fashion_5_thumb.jpg",130,195,18);thumbnails[4741517]=new thumbnail(4741517,"271996","","Fashion_3_thumb.jpg",130,195,18);thumbnails[4741519]=new thumbnail(4741519,"271996","","Fashion_1_thumb.jpg",130,147,18);thumbnails[4287870]=new thumbnail(4287870,"253035","","web11_thumb.jpg",130,165,18);thumbnails[4287880]=new thumbnail(4287880,"253035","","web16_thumb.jpg",130,120,18);thumbnails[4287881]=new thumbnail(4287881,"253035","","web17_thumb.jpg",130,195,18);thumbnails[4287883]=new thumbnail(4287883,"253035","","web18_thumb.jpg",130,195,18);thumbnails[4287885]=new thumbnail(4287885,"253035","","web19_thumb.jpg",130,195,18);thumbnails[4287887]=new thumbnail(4287887,"253035","","web20_thumb.jpg",130,87,18);thumbnails[4288299]=new thumbnail(4288299,"253036","","web50_thumb.jpg",130,173,18);thumbnails[4288301]=new thumbnail(4288301,"253036","","web51_thumb.jpg",130,173,18);thumbnails[4288305]=new thumbnail(4288305,"253036","","web53_thumb.jpg",130,98,18);thumbnails[4288310]=new thumbnail(4288310,"253036","","web54_thumb.jpg",130,209,18);thumbnails[4288313]=new thumbnail(4288313,"253036","","web56_thumb.jpg",130,173,18);thumbnails[4288315]=new thumbnail(4288315,"253036","","web57_thumb.jpg",130,87,18);thumbnails[4288318]=new thumbnail(4288318,"253036","","web59_thumb.jpg",130,92,18);thumbnails[4288320]=new thumbnail(4288320,"253036","","web60_thumb.jpg",130,87,18);thumbnails[4288009]=new thumbnail(4288009,"253046","","web31_thumb.jpg",130,195,18);thumbnails[4288012]=new thumbnail(4288012,"253046","","web32_thumb.jpg",130,173,18);thumbnails[4288015]=new thumbnail(4288015,"253046","","web33_thumb.jpg",130,128,18);thumbnails[4288062]=new thumbnail(4288062,"253046","","web34_thumb.jpg",130,173,18);thumbnails[4288065]=new thumbnail(4288065,"253046","","web35_thumb.jpg",130,86,18);thumbnails[4288068]=new thumbnail(4288068,"253046","","web38_thumb.jpg",130,87,18);thumbnails[4288073]=new thumbnail(4288073,"253046","","web42_thumb.jpg",130,174,18);thumbnails[4288087]=new thumbnail(4288087,"253046","","web44_thumb.jpg",130,215,18);thumbnails[4288116]=new thumbnail(4288116,"253046","","web45_thumb.jpg",130,99,18);thumbnails[4288129]=new thumbnail(4288129,"253046","","web46_thumb.jpg",130,126,18);thumbnails[5372990]=new thumbnail(5372990,"295276","","Wed_2_95_thumb.jpg",130,104,18);thumbnails[5372994]=new thumbnail(5372994,"295276","","Wed_2_183_thumb.jpg",130,196,18);thumbnails[5372996]=new thumbnail(5372996,"295276","","Wed_2_187_thumb.jpg",130,98,18);thumbnails[5372998]=new thumbnail(5372998,"295276","","Wed2_93_thumb.jpg",130,193,18);thumbnails[6133335]=new thumbnail(6133335,"295276","","Wed_2_0001_thumb.jpg",130,87,18);thumbnails[6133337]=new thumbnail(6133337,"295276","","Wed_2_60_thumb.jpg",130,195,18);thumbnails[6133338]=new thumbnail(6133338,"295276","","Wed_2_77_thumb.jpg",130,195,18);thumbnails[6133340]=new thumbnail(6133340,"295276","","Wed_2_87_thumb.jpg",130,180,18);thumbnails[6133344]=new thumbnail(6133344,"295276","","Wed_2_5734_thumb.jpg",130,181,18);thumbnails[6133346]=new thumbnail(6133346,"295276","","Wed_2_5742_thumb.jpg",130,106,18);thumbnails[6133347]=new thumbnail(6133347,"295276","","Wed_2_5787_thumb.jpg",130,87,18);thumbnails[6133378]=new thumbnail(6133378,"295276","","Wed_2_5803_thumb.jpg",130,92,18);thumbnails[5238232]=new thumbnail(5238232,"295276","","Wed_2_4_thumb.jpg",130,183,18);thumbnails[5238237]=new thumbnail(5238237,"295276","","Wed_2_8_thumb.jpg",130,195,18);thumbnails[5238239]=new thumbnail(5238239,"295276","","Wed_2_10_thumb.jpg",130,170,18);thumbnails[5238241]=new thumbnail(5238241,"295276","","Wed_2_12_thumb.jpg",130,87,18);thumbnails[5238243]=new thumbnail(5238243,"295276","","Wed_2_13_thumb.jpg",130,195,18);thumbnails[5238244]=new thumbnail(5238244,"295276","","Wed_2_14_thumb.jpg",130,155,18);thumbnails[6691196]=new thumbnail(6691196,"365411","","_MG_62651_thumb.jpg",130,171,18);thumbnails[6691199]=new thumbnail(6691199,"365411","","_MG_6272_thumb.jpg",130,104,18);thumbnails[6691200]=new thumbnail(6691200,"365411","","_MG_6293_thumb.jpg",130,193,18);thumbnails[6691201]=new thumbnail(6691201,"365411","","_MG_6308_copy_thumb.jpg",130,87,18);thumbnails[6691208]=new thumbnail(6691208,"365411","","_MG_6343_thumb.jpg",130,180,18);thumbnails[6691210]=new thumbnail(6691210,"365411","","_MG_6356_thumb.jpg",130,195,18);thumbnails[6691211]=new thumbnail(6691211,"365411","","_MG_6395_thumb.jpg",130,171,18);thumbnails[6691270]=new thumbnail(6691270,"365411","","_MG_6434_thumb.jpg",130,87,18);thumbnails[6691274]=new thumbnail(6691274,"365411","","_MG_6486_thumb.jpg",130,87,18);thumbnails[4287561]=new thumbnail(4287561,"253060","","web2_thumb.jpg",130,173,18);thumbnails[4287563]=new thumbnail(4287563,"253060","","web3_thumb.jpg",130,87,18);thumbnails[4287565]=new thumbnail(4287565,"253060","","web4_thumb.jpg",130,195,18);thumbnails[4287566]=new thumbnail(4287566,"253060","","web5_thumb.jpg",130,87,18);thumbnails[4287596]=new thumbnail(4287596,"253060","","web7_thumb.jpg",130,87,18);thumbnails[4287599]=new thumbnail(4287599,"253060","","web8_thumb.jpg",130,91,18);thumbnails[4287601]=new thumbnail(4287601,"253060","","web6_thumb.jpg",130,60,18);thumbnails[5011554]=new thumbnail(5011554,"253060","","102810_2807_thumb.jpg",130,87,18);thumbnails[5011556]=new thumbnail(5011556,"253060","","102810_2814_thumb.jpg",130,86,18);thumbnails[5011558]=new thumbnail(5011558,"253060","","102810_2860_thumb.jpg",130,195,18);thumbnails[5011560]=new thumbnail(5011560,"253060","","102810_2854_thumb.jpg",130,167,18);thumbnails[5011561]=new thumbnail(5011561,"253060","","102810_28371_thumb.jpg",130,82,18);thumbnails[6147389]=new thumbnail(6147389,"344128","","Blue_Door_thumb.jpg",130,111,18);thumbnails[6147390]=new thumbnail(6147390,"344128","","Blue_Sky_thumb.jpg",130,274,18);thumbnails[6147391]=new thumbnail(6147391,"344128","","Cross_thumb.jpg",130,195,18);thumbnails[6147394]=new thumbnail(6147394,"344128","","Graffitti_thumb.jpg",130,80,18);thumbnails[6147395]=new thumbnail(6147395,"344128","","Olive_Tree_thumb.jpg",130,193,18);thumbnails[6147396]=new thumbnail(6147396,"344128","","Pathway_thumb.jpg",130,90,18);thumbnails[6147399]=new thumbnail(6147399,"344128","","Peony__thumb.jpg",130,130,18);thumbnails[6147401]=new thumbnail(6147401,"344128","","Photoart_thumb.jpg",130,185,18);thumbnails[6147403]=new thumbnail(6147403,"344128","","Poppy_thumb.jpg",130,124,18);thumbnails[6147405]=new thumbnail(6147405,"344128","","Roof_Tiles_thumb.jpg",130,201,18);thumbnails[6168143]=new thumbnail(6168143,"344128","","Shadows_thumb.jpg",130,98,18);var galleries=new Object();galleries[253126]=new gallery(253126,"4288429,4288426,4288424,4288422,4288413","Portraits - Adults","gallery",[4288413,4288422,4288424,4288426,4288429]);galleries[271996]=new gallery(271996,"4741519,4741517,4741516,4741515,4288418,4288417","Portraits - Fashion & Glamour","gallery",[4288417,4288418,4741515,4741516,4741517,4741519]);galleries[261281]=new gallery(261281,"4480415,4480413,4287877,4287875,4287872","Portraits - Teens","gallery",[4287872,4287875,4287877,4480413,4480415]);galleries[253190]=new gallery(253190,"4480422,4288779,4288774,4288757,4288753,4288751,4288747","Portraits - Working Dogs","gallery",[4288747,4288751,4288753,4288757,4288774,4288779,4480422]);galleries[253035]=new gallery(253035,"4287887,4287885,4287883,4287881,4287880,4287870","Portraits - Children","gallery",[4287870,4287880,4287881,4287883,4287885,4287887]);galleries[253036]=new gallery(253036,"4288320,4288318,4288315,4288313,4288310,4288305,4288301,4288299","Portraits - Families","gallery",[4288299,4288301,4288305,4288310,4288313,4288315,4288318,4288320]);galleries[253046]=new gallery(253046,"4288129,4288116,4288087,4288073,4288068,4288065,4288062,4288015,4288012,4288009","Weddings","section306020",[4288009,4288012,4288015,4288062,4288065,4288068,4288073,4288087,4288116,4288129]);galleries[295276]=new gallery(295276,"6133378,6133347,6133346,6133344,6133340,6133338,6133337,6133335,5372998,5372996","Weddings 2","section306020",[5372990,5372994,5372996,5372998,6133335,6133337,6133338,6133340,6133344,6133346,6133347,6133378,5238232,5238237,5238239,5238241,5238243,5238244]);galleries[365411]=new gallery(365411,"6691274,6691270,6691211,6691210,6691208,6691201,6691200,6691199,6691196","Weddings 3","section306020",[6691196,6691199,6691200,6691201,6691208,6691210,6691211,6691270,6691274]);galleries[253060]=new gallery(253060,"4287566,4287565,4287563,4287561","Commercial","section306029",[4287561,4287563,4287565,4287566,4287596,4287599,4287601,5011554,5011556,5011558,5011560,5011561]);galleries[344128]=new gallery(344128,"6168143,6147405,6147403,6147401,6147399,6147396,6147395,6147394,6147391,6147390","A Pure Eye?","section411051",[6147389,6147390,6147391,6147394,6147395,6147396,6147399,6147401,6147403,6147405,6168143]);var imageSets=new Object();imageSets[1]="4286363";imageSets[2]="4287566,4287565,4287563,4287561";imageSets[3]="6691274,6691270,6691211,6691210,6691208,6691201,6691200,6691199,6691196,6168143,6147405,6147403,6147401,6147399,6147396,6147395,6147394,6147391,6147390,6147389,6133378,6133347,6133346,6133344,6133340,6133338,6133337,6133335,5372998,5372996,5372994,5372990,5238244,5238243,5238241,5238239,5238237,5238232,5011561,5011560,5011558,5011556,5011554,4741519,4741517,4741516,4741515,4480422,4480415,4480413";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/ashfield/images";break}switch(a){case 1:b="http://www1.clikpic.com/ashfield/images";break}switch(a){case 2:b="http://admin.clikpic.com/ashfield/images";break}switch(a){case 24:b="http://tpc15/clikpic/ashfield/images";break}switch(a){case 4:b="http://www.clikchurch.com/ashfield/images";break}switch(a){case 5:b="http://www2.clikpic.com/ashfield/images";break}switch(a){case 22:b="http://tpc5/clikpic/ashfield/images";break}switch(a){case 23:b="http://tpc10/clikpic/ashfield/images";break}switch(a){case 25:b="http://tpc16/clikpic/ashfield/images";break}switch(a){case 15:b="http://www3.clikpic.com/ashfield/images";break}switch(a){case 18:b="http://www4.clikpic.com/ashfield/images";break}switch(a){case 19:b="http://www5.clikpic.com/ashfield/images";break}switch(a){case 31:b="http://www7.clikpic.com/ashfield/images";break}switch(a){case 32:b="http://admin2.clikpic.com/ashfield/images";break}switch(a){case 33:b="http://www8.clikpic.com/ashfield/images";break}switch(a){case 34:b="http://www9.clikpic.com/ashfield/images";break}switch(a){case 35:b="http://admin3.clikpic.com/ashfield/images";break}switch(a){case 37:b="http://admin4.clikpic.com/ashfield/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("section411051"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section411051.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("section411051"!=""){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="Ashfield Images - Tracy Edwards LBIPP LSWPP: "+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+'")'})}}};