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[6112398]=new thumbnail(6112398,"342547","TOM AND JACOB WIN A HUGE CUP!","TomandJacob2_thumb.jpg",130,166,1);thumbnails[541162]=new thumbnail(541162,"42016","BIG PRINCE","big prince copy_thumb.jpg",130,166,1);thumbnails[541197]=new thumbnail(541197,"42016","BILLY JOE","billy joe copy_thumb.jpg",130,95,1);thumbnails[541201]=new thumbnail(541201,"42016","BILLY JOE","billy joe 2 copy_thumb.jpg",130,100,1);thumbnails[541206]=new thumbnail(541206,"42016","CONCHI","conchi copy_thumb.jpg",130,152,1);thumbnails[541221]=new thumbnail(541221,"42016","SASSY","sassy copy_thumb.jpg",130,160,1);thumbnails[541223]=new thumbnail(541223,"42016","SPRITZER","spritzer copy_thumb.jpg",130,103,1);thumbnails[541226]=new thumbnail(541226,"42016","LOLLY CHILLS OUT","web stuff 127 copy_thumb.jpg",130,162,1);thumbnails[541230]=new thumbnail(541230,"42016","LITTLE PRINCE, KATIE AND MIKEY","web stuff 134 copy_thumb.jpg",130,156,1);thumbnails[541232]=new thumbnail(541232,"42016","SMUDGE","web stuff 143 copy_thumb.jpg",130,101,1);thumbnails[541234]=new thumbnail(541234,"42016","MIKEY","web stuff 156 copy_thumb.jpg",130,157,1);thumbnails[541235]=new thumbnail(541235,"42016","LITTLE PRINCE & MIKEY","web stuff 157 copy_thumb.jpg",130,94,1);thumbnails[541238]=new thumbnail(541238,"42016","DIXIE","web stuff 163 copy_thumb.jpg",130,103,1);thumbnails[541671]=new thumbnail(541671,"42621","IT`S NOT ALL PLAY","hard work copy_thumb.jpg",130,163,1);thumbnails[541674]=new thumbnail(541674,"42621","HORSES NEED FRESH WATER DAILY","daily chores copy_thumb.jpg",130,176,1);thumbnails[541678]=new thumbnail(541678,"42621","HIDING FROM THE VET!","hiding from the farrier copy_thumb.jpg",130,161,1);thumbnails[541679]=new thumbnail(541679,"42621","THE FARRIER","hot shoeing copy_thumb.jpg",130,161,1);thumbnails[541682]=new thumbnail(541682,"42621","PICKING OUT FEET","picking feet copy_thumb.jpg",130,95,1);thumbnails[541971]=new thumbnail(541971,"42621","GROUND WORK","ground work 1 copy_thumb.jpg",130,162,1);thumbnails[542115]=new thumbnail(542115,"42051","","for sale copy_thumb.jpg",130,158,1);thumbnails[542121]=new thumbnail(542121,"42051","","for sale 2 copy_thumb.jpg",130,120,1);thumbnails[541696]=new thumbnail(541696,"42028","OUR FRIENDLY STAFF","the office copy_thumb.jpg",130,94,1);thumbnails[541390]=new thumbnail(541390,"42028","IMPORTANT INFORMATION ABOUT THE CAR PARK","ashridge and the yard 167 copy_thumb.jpg",130,87,1);thumbnails[541976]=new thumbnail(541976,"42044","GROUP LESSON","out door school 2 copy_thumb.jpg",130,184,1);thumbnails[541825]=new thumbnail(541825,"42028","IMPORTANT NOTICE ABOUT DOGS","ashridge and the yard 091 copy_thumb.jpg",130,163,1);thumbnails[541985]=new thumbnail(541985,"42044","GROUP LESSON","out door school 4 copy_thumb.jpg",130,181,1);thumbnails[541864]=new thumbnail(541864,"42028","THE BRITISH HORSE SOCIETY AND THE PONY CLUB.","rossettes copy1_thumb.jpg",130,87,1);thumbnails[541981]=new thumbnail(541981,"42044","GROUP LESSON","out door school 3 copy_thumb.jpg",130,186,1);thumbnails[575291]=new thumbnail(575291,"42051","","ashridge and the yard 085 copy_thumb.jpg",130,93,1);thumbnails[541974]=new thumbnail(541974,"42044","GROUP LESSON","out door school 1 copy_thumb.jpg",130,188,1);thumbnails[575293]=new thumbnail(575293,"42051","","ashridge and the yard 089 copy_thumb.jpg",130,147,1);thumbnails[541943]=new thumbnail(541943,"42044"," JUMPING LESSONS","jumping  lesson copy_thumb.jpg",130,100,1);thumbnails[541686]=new thumbnail(541686,"42028","LOOK AND LEARN","watch and learn copy_thumb.jpg",130,177,1);thumbnails[581420]=new thumbnail(581420,"42044","STARTING YOUNG","yard and bethan bday 025_thumb.jpg",130,173,1);thumbnails[1161432]=new thumbnail(1161432,"42028","DREAMS CAN COME TRUE","DREAM_thumb.jpg",130,93,1);thumbnails[4372304]=new thumbnail(4372304,"42044","INDOOR SCHOOL","_MG_9493-copy_thumb.jpg",130,195,1);thumbnails[542008]=new thumbnail(542008,"42028","LOLLY TRIES IT ON","lolly tries it on copy_thumb.jpg",130,99,1);thumbnails[581416]=new thumbnail(581416,"42028","WAITING FOR THE LESSON TO BEGIN","ashridge and the yard 007 copy_thumb.jpg",130,95,1);thumbnails[596138]=new thumbnail(596138,"42028","WAITING FOR THE LESSON TO BEGIN","yard and bethan bday 021_thumb.jpg",130,168,1);thumbnails[542053]=new thumbnail(542053,"42028","CROSS COUNTRY FENCE","land2 copy_thumb.jpg",130,81,1);thumbnails[541677]=new thumbnail(541677,"42028","INDOOR SCHOOL","indoor scholl copy_thumb.jpg",130,59,1);thumbnails[542049]=new thumbnail(542049,"42028","THE UPPER FIELD","land_thumb.jpg",130,52,1);thumbnails[542136]=new thumbnail(542136,"42028","THE LOWER FIELD","land 6 copy_thumb.jpg",130,172,1);thumbnails[4372215]=new thumbnail(4372215,"42028","WAITING TO GO","_DSC1483_copy_thumb.jpg",130,195,1);thumbnails[4372267]=new thumbnail(4372267,"42028","WHAT YER DOING ?","_MG_9409-copy_thumb.jpg",130,195,1);thumbnails[4372287]=new thumbnail(4372287,"42028","NA NA N NAA NA.","_MG_9425-copy_thumb.jpg",130,195,1);thumbnails[4372311]=new thumbnail(4372311,"42028","AND THE WINNER IS.....","_DSC1667-copy_thumb.jpg",130,196,1);thumbnails[541527]=new thumbnail(541527,"42028","HACKING OUT","hack out 3 copy_thumb.jpg",130,161,1);thumbnails[541422]=new thumbnail(541422,"42028","HACKING OUT","city and guilds0018 copy_thumb.jpg",130,107,1);thumbnails[581426]=new thumbnail(581426,"42028","HACKING OUT","wills pics 095 copy_thumb.jpg",130,75,1);thumbnails[581435]=new thumbnail(581435,"42028","HACKING OUT","wills pics 100 copy_thumb.jpg",130,92,1);thumbnails[4372363]=new thumbnail(4372363,"42028","LAZY DAYS,SUNDAY AFTERNOONS.","_DSC4567-copy_thumb.jpg",130,87,1);thumbnails[581463]=new thumbnail(581463,"42028","WAITING TO GO","ashridge and the yard 124 copy_thumb.jpg",130,174,1);thumbnails[4372722]=new thumbnail(4372722,"42028","HERE WE GOOOO.....","_DSC1542-copy_thumb.jpg",130,195,1);thumbnails[4372750]=new thumbnail(4372750,"42028","SHOW JUMPING","_DSC1570-copy_thumb.jpg",130,195,1);thumbnails[4372775]=new thumbnail(4372775,"42028","WAITING TO JUMP","_DSC4556-copy_thumb.jpg",130,195,1);thumbnails[4372808]=new thumbnail(4372808,"42028","AM I ON NEXT?","_DSC4558-copy_thumb.jpg",130,195,1);thumbnails[4372822]=new thumbnail(4372822,"42028"," READY TO GO.","_DSC4559-copy_thumb.jpg",130,195,1);thumbnails[4372846]=new thumbnail(4372846,"42028","AND WEARING THE RED FLY FRINGE.....","_DSC4596-copy_thumb.jpg",130,195,1);thumbnails[4372858]=new thumbnail(4372858,"42028","SHOW JUMPING","_DSC4570-copy_thumb.jpg",130,195,1);thumbnails[4372875]=new thumbnail(4372875,"42028","LOOKING FOR THE NEXT FENCE","_DSC4613-copy-copy_thumb.jpg",130,195,1);thumbnails[6037582]=new thumbnail(6037582,"42028","OUR PARTY ROOM","PartyRoom_thumb.jpg",130,115,1);thumbnails[6037594]=new thumbnail(6037594,"42028","ITS PARTY TIME!","PartyRoom2_thumb.jpg",130,173,1);var galleries=new Object();galleries[42028]=new gallery(42028,"541825,541696,541686","ABOUT THE YARD","gallery",[541696,541390,541825,541864,541686,1161432,542008,581416,596138,542053,541677,542049,542136,4372215,4372267,4372287,4372311,541527,541422,581426,581435,4372363,581463,4372722,4372750,4372775,4372808,4372822,4372846,4372858,4372875,6037582,6037594]);galleries[42051]=new gallery(42051,"575293,575291,542121,542115","HORSES AND PONIES FOR SALE","gallery",[542115,542121,575291,575293]);galleries[42044]=new gallery(42044,"4372304,581420,541985,541981,541976,541974,541943","LESSONS","gallery",[541976,541985,541981,541974,541943,581420,4372304]);galleries[42621]=new gallery(42621,"541971,541682,541679,541678,541674,541671","LIVERY","gallery",[541671,541674,541678,541679,541682,541971]);galleries[42016]=new gallery(42016,"541238,541235,541234,541232,541230,541226,541223,541221,541206,541201","MEET THE STAFF","gallery",[541162,541197,541201,541206,541221,541223,541226,541230,541232,541234,541235,541238]);galleries[342547]=new gallery(342547,"6112398","PHOTO NEWS","gallery",[6112398]);var imageSets=new Object();imageSets[1]="1161432";imageSets[2]="541825,541696,541686";imageSets[3]="6112398,6037594,6037582,4372875,4372858,4372846,4372822,4372808,4372775,4372750,4372722,4372363,4372311,4372304,4372287,4372267,4372215,1161432,596138,581463,581435,581426,581420,581416,575293,575291,542136,542121,542115,542053,542049,542008,541985,541981,541976,541974,541971,541943,541864,541825,541696,541686,541682,541679,541678,541677,541674,541671,541527,541422";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/RIDING/images";break}switch(a){case 1:b="http://www1.clikpic.com/RIDING/images";break}switch(a){case 2:b="http://admin.clikpic.com/RIDING/images";break}switch(a){case 24:b="http://tpc15/clikpic/RIDING/images";break}switch(a){case 4:b="http://www.clikchurch.com/RIDING/images";break}switch(a){case 5:b="http://www2.clikpic.com/RIDING/images";break}switch(a){case 22:b="http://tpc5/clikpic/RIDING/images";break}switch(a){case 23:b="http://tpc10/clikpic/RIDING/images";break}switch(a){case 25:b="http://tpc16/clikpic/RIDING/images";break}switch(a){case 15:b="http://www3.clikpic.com/RIDING/images";break}switch(a){case 18:b="http://www4.clikpic.com/RIDING/images";break}switch(a){case 19:b="http://www5.clikpic.com/RIDING/images";break}switch(a){case 31:b="http://www7.clikpic.com/RIDING/images";break}switch(a){case 32:b="http://admin2.clikpic.com/RIDING/images";break}switch(a){case 33:b="http://www8.clikpic.com/RIDING/images";break}switch(a){case 34:b="http://www9.clikpic.com/RIDING/images";break}switch(a){case 35:b="http://admin3.clikpic.com/RIDING/images";break}switch(a){case 37:b="http://admin4.clikpic.com/RIDING/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="HIGH HERTS EQUESTRIAN CENTRE: "+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({centre:true});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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};