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[518523]=new thumbnail(518523,"","Robin Feeding","Robin feeding_thumb.jpg",130,196,18);thumbnails[174953]=new thumbnail(174953,"15830","River Avon Dawn","Dawn over the Avon_thumb.jpg",130,98,18);thumbnails[177173]=new thumbnail(177173,"15830","Old Wardour Castle","Wardour Castle_thumb.jpg",130,81,18);thumbnails[170288]=new thumbnail(170288,"15830","A303 Dawn","A303 Dawn Mists_thumb.jpg",130,55,18);thumbnails[5056494]=new thumbnail(5056494,"15830","The Poultry Cross at night.","Poultry_X_at_night_thumb.jpg",130,130,18);thumbnails[174956]=new thumbnail(174956,"15830","Salisbury Funfair","Salisbury Fair_thumb.jpg",130,93,18);thumbnails[1592328]=new thumbnail(1592328,"15830","I can Drive A tractor","I can drive a tractor_thumb.jpg",130,90,18);thumbnails[3806338]=new thumbnail(3806338,"15830","Salisbury Cathedral, Cloisters","Cathedral_Cloisters_thumb.jpg",130,92,18);thumbnails[2732312]=new thumbnail(2732312,"15830","Red Dawn","Red Dawn (Poppies)_thumb.jpg",130,92,18);thumbnails[3302091]=new thumbnail(3302091,"15830","An Extreme Frost, Odstock Meadows","Odstock Extreme Frost_thumb.jpg",130,87,18);thumbnails[819524]=new thumbnail(819524,"15830","Snowy Treeline","Snowy Morning 021_thumb.jpg",130,87,18);thumbnails[5596474]=new thumbnail(5596474,"15830","WinterSunset, South Wilts Golf Course","Snowy_Sunset_V2_thumb.jpg",130,92,18);thumbnails[4164670]=new thumbnail(4164670,"15830","The Eel House, Britford, Salisbury","The_Eel_House_thumb.jpg",130,92,18);thumbnails[1654186]=new thumbnail(1654186,"15830","Ballooning over Salisbury Cathedral","Balloon over the Cathedral_thumb.jpg",130,87,18);thumbnails[5056528]=new thumbnail(5056528,"15830","Twin Trees","Twin_Trees_Wiltshire_Downs_thumb.jpg",130,87,18);thumbnails[573599]=new thumbnail(573599,"15830","Winters Dawn, Langford Lakes","Winters Dawn, Langford Lakes_thumb.jpg",130,87,18);thumbnails[4259774]=new thumbnail(4259774,"15830","Salisbury Cathedral in the snow","Salisbury_Cathedral_in_the_Snow_thumb.jpg",130,92,18);thumbnails[5635895]=new thumbnail(5635895,"15830","Let There be light","Salisbury_Cathedral_Dawn_thumb.jpg",130,92,18);thumbnails[764293]=new thumbnail(764293,"15830","Golden Dawn","Lakeside Dwn_thumb.jpg",130,87,18);thumbnails[5472968]=new thumbnail(5472968,"15830","Dawn Fishing in the mist","Dawn_Fishing_thumb.jpg",130,92,18);thumbnails[5056518]=new thumbnail(5056518,"15830","Salisbury Cathdral from South Wilts Golf Course","SW_Golf_Course_055_thumb.jpg",130,94,18);thumbnails[5056508]=new thumbnail(5056508,"15830","Autumn reflections, Stourhead","Stourhead_thumb.jpg",130,87,18);thumbnails[170278]=new thumbnail(170278,"15830","Wylye Down ","Wylye Down_thumb.jpg",130,98,18);thumbnails[170241]=new thumbnail(170241,"15830","River Horses at Odstock","River Horses at Odstock_thumb.jpg",130,98,18);thumbnails[1784158]=new thumbnail(1784158,"15830","Frosty Dawn looking towards Stratford sub Castle","Stratford Dawn_thumb.jpg",130,92,18);thumbnails[819521]=new thumbnail(819521,"15830","Stonehenge Skyscape","Stonehenge Skyscape_thumb.jpg",130,87,18);thumbnails[752437]=new thumbnail(752437,"15830","Stonehenge Mood","Stonhenge mood_thumb.jpg",130,43,18);thumbnails[1784174]=new thumbnail(1784174,"15830","Redlynch Wood Bluebells","Redlynch Woods_thumb.jpg",130,87,18);thumbnails[250618]=new thumbnail(250618,"15830","Bluebell Woods, Redlynch","Bluebell Wood_thumb.jpg",130,73,18);thumbnails[3103204]=new thumbnail(3103204,"15830","Autumn Golf, South Wilts Golf Course","Autumn Golf_thumb.2.jpg",130,92,18);thumbnails[1592309]=new thumbnail(1592309,"15830","Stourhead Reflection","Stourhead Reflection_thumb.jpg",130,184,18);thumbnails[4259784]=new thumbnail(4259784,"15830","The Cathedrals Express","The_Cathedrals_Express_thumb.jpg",130,184,18);thumbnails[752435]=new thumbnail(752435,"15830","Stonehenge from the Avenue","Stonehenge Avenue_thumb.jpg",130,195,18);thumbnails[5056484]=new thumbnail(5056484,"15830","The glorious Cathedrals","Cathedrals_thumb.jpg",130,184,18);thumbnails[5635889]=new thumbnail(5635889,"15830","Broken Bridges, Salisbury","Broken_Bridges_thumb.jpg",130,184,18);thumbnails[1832849]=new thumbnail(1832849,"15830","Lone Tree","Lone Tree_thumb.jpg",130,195,18);thumbnails[273683]=new thumbnail(273683,"15830","Salisbury Daffodils","Salisbury Daffodils_thumb.jpg",130,195,18);thumbnails[3806360]=new thumbnail(3806360,"15830","Cathedral Trinity","Cathedral_Sculptures_thumb.jpg",130,195,18);thumbnails[3806383]=new thumbnail(3806383,"15830","A Snowy Journey","Town_Path_Snow_Scene2_thumb.jpg",130,184,18);thumbnails[209878]=new thumbnail(209878,"15830","Byway above Great Yews, Nr Salisbury","Wiltshire Byway_thumb.jpg",130,195,18);thumbnails[2329250]=new thumbnail(2329250,"15830","Wardour Castle, late afternoon","Wardour21_thumb.jpg",130,184,18);thumbnails[4454669]=new thumbnail(4454669,"15832","Vineyards, Samos","Samos_Vineyards2_thumb.jpg",130,92,18);thumbnails[4454689]=new thumbnail(4454689,"15832","Samos Steps","Samos_Steps2jpg_thumb.jpg",130,92,18);thumbnails[4454700]=new thumbnail(4454700,"15832","Marathakambos View","Marathokambos_Samos_thumb.jpg",130,92,18);thumbnails[4454707]=new thumbnail(4454707,"15832","Olive Grove and Grasses","Olive_Grove_thumb.jpg",130,92,18);thumbnails[992936]=new thumbnail(992936,"15832","Reflections Of Paris","Reflections of Paris_thumb.jpg",130,87,18);thumbnails[2329228]=new thumbnail(2329228,"15832","Portrait Sitting, Montmarte, Paris","Portrait Sitting_thumb.jpg",130,92,18);thumbnails[5056461]=new thumbnail(5056461,"15832","Artist at Work","Artist_at_Work_thumb.jpg",130,94,18);thumbnails[518514]=new thumbnail(518514,"15832","One Rotten apple","Apples_thumb.jpg",130,87,18);thumbnails[5056471]=new thumbnail(5056471,"15832","The Boat Ring","Boat_Ring_thumb.jpg",130,87,18);thumbnails[3806452]=new thumbnail(3806452,"15832","Fishy Business","Fishy_Business_thumb.jpg",130,87,18);thumbnails[518519]=new thumbnail(518519,"15832","Epidaurus Steps","Epidauros Steps_thumb.jpg",130,78,18);thumbnails[5900768]=new thumbnail(5900768,"15832","Bexhill Architecture","Bexhill_Architecture_thumb.jpg",130,90,18);thumbnails[5900774]=new thumbnail(5900774,"15832","Bexhill Evening","Bexhill_Evening_thumb.jpg",130,92,18);thumbnails[5900852]=new thumbnail(5900852,"15832","Desolate Dungeness","Dungeness_1_thumb.jpg",130,92,18);thumbnails[5900865]=new thumbnail(5900865,"15832","Lone Canoe","Lone_Canoe_thumb.jpg",130,92,18);thumbnails[518508]=new thumbnail(518508,"15832","Moonrise at AcroCorinth, Greece","AcroCorinth moonrise_thumb.jpg",130,87,18);thumbnails[4164733]=new thumbnail(4164733,"15832","Morning Paper","Morning_Paper_thumb.jpg",130,87,18);thumbnails[170303]=new thumbnail(170303,"15832","Prague Rooftops","Prague Rooftops_thumb.jpg",130,94,18);thumbnails[3806483]=new thumbnail(3806483,"15832","Cape Sounion, Greece","Sounion_thumb.jpg",130,92,18);thumbnails[172496]=new thumbnail(172496,"15832","Temple of Poseidon, Cape Sounion, in the Spring","Cape Sounion in spring_thumb.jpg",130,87,18);thumbnails[171243]=new thumbnail(171243,"15832","Fishing at Sunrise","Fishing at Sunrise_thumb.jpg",130,105,18);thumbnails[171241]=new thumbnail(171241,"15832","Burgh Island, Devon","Burgh Island rainbow_thumb.jpg",130,87,18);thumbnails[4940081]=new thumbnail(4940081,"15832","Knight of the sky","Knight_of_the_sky_thumb.jpg",130,87,18);thumbnails[4939951]=new thumbnail(4939951,"15832","Durdle Door under a stormy sky","Durdle_Door_thumb.jpg",130,184,18);thumbnails[5056501]=new thumbnail(5056501,"15832","Samos Derelict","Samos_Derelict__thumb.jpg",130,184,18);thumbnails[1253806]=new thumbnail(1253806,"15832","Greek Steps","greek steps 2_thumb.jpg",130,195,18);thumbnails[4940077]=new thumbnail(4940077,"15832","Flora and Fauna","Poppy_and_Bee_thumb.jpg",130,184,18);thumbnails[2329231]=new thumbnail(2329231,"15832","Greek boatdeck","BoatDeck_thumb.jpg",130,184,18);thumbnails[2732301]=new thumbnail(2732301,"15832","Montreal Cityscape","Montreal Contrast_thumb.jpg",130,184,18);thumbnails[992931]=new thumbnail(992931,"15832","River Seine Arches","Paris River Arches_thumb.jpg",130,195,18);thumbnails[2732320]=new thumbnail(2732320,"15832","Mohawk","Mohawk4_thumb.jpg",130,184,18);thumbnails[4940084]=new thumbnail(4940084,"15832","Robin Feeding","Robin_feeding_thumb.jpg",130,196,18);thumbnails[518521]=new thumbnail(518521,"15832","Reflections of bygone motoring","Old car lamp_thumb.jpg",130,195,18);thumbnails[752444]=new thumbnail(752444,"15832","Alexandra","Alexandra_thumb.jpg",130,195,18);thumbnails[518524]=new thumbnail(518524,"15832","The Thinker","The Thinker !_thumb.jpg",130,178,18);thumbnails[3302094]=new thumbnail(3302094,"15832","Bembridge Windmill, Isle Of Wight","Bembridge Windmill1_thumb.jpg",130,190,18);thumbnails[5900879]=new thumbnail(5900879,"15832","Fairfield Church","Fairfield_Church_thumb.jpg",130,184,18);thumbnails[1592284]=new thumbnail(1592284,"15832","Gorey Harbour, Jersey","Gorey Harbour_thumb.jpg",130,184,18);thumbnails[5472986]=new thumbnail(5472986,"108823","A Winters Walk","Snowy_Walk_thumb.jpg",130,92,18);thumbnails[1592330]=new thumbnail(1592330,"108823","Stranger on the shore","Stranger on the shore3_thumb.jpg",130,92,18);thumbnails[992927]=new thumbnail(992927,"108823","Capturing A moment in Time","Capturing a moment in time_thumb.jpg",130,87,18);thumbnails[2732326]=new thumbnail(2732326,"108823","A rainy day in Montreal","Rainy Day Montreal_thumb.jpg",130,92,18);thumbnails[1784190]=new thumbnail(1784190,"108823","Seine Trees, Paris","Sepia Seine_thumb.jpg",130,87,18);thumbnails[1654201]=new thumbnail(1654201,"108823","Through the archway, St. Brelade's Churchyard","Through the arch1_thumb.jpg",130,195,18);thumbnails[5473003]=new thumbnail(5473003,"108823","Dorset Coastline","Dorset_Coast_thumb.jpg",130,92,18);thumbnails[4454715]=new thumbnail(4454715,"108823","Joining In","Joining_In2tif_thumb.jpg",130,274,18);var galleries=new Object();galleries[15830]=new gallery(15830,"4164670,174953","Images of Wiltshire","gallery",[174953,177173,170288,5056494,174956,1592328,3806338,2732312,3302091,819524,5596474,4164670,1654186,5056528,573599,4259774,5635895,764293,5472968,5056518,5056508,170278,170241,1784158,819521,752437,1784174,250618,3103204,1592309,4259784,752435,5056484,5635889,1832849,273683,3806360,3806383,209878,2329250]);galleries[15832]=new gallery(15832,"5900768,170303","Other Images","gallery",[4454669,4454689,4454700,4454707,992936,2329228,5056461,518514,5056471,3806452,518519,5900768,5900774,5900852,5900865,518508,4164733,170303,3806483,172496,171243,171241,4940081,4939951,5056501,1253806,4940077,2329231,2732301,992931,2732320,4940084,518521,752444,518524,3302094,5900879,1592284]);galleries[108823]=new gallery(108823,"2732326,1592330","Monochrome Images","gallery",[5472986,1592330,992927,2732326,1784190,1654201,5473003,4454715]);var imageSets=new Object();imageSets[1]="4164670";imageSets[2]="5900768,4164670,2732326,1592330,174953,170303";imageSets[3]="5900879,5900865,5900852,5900774,5900768,5635895,5635889,5596474,5473003,5472986,5472968,5056528,5056518,5056508,5056501,5056494,5056484,5056471,5056461,4940084,4940081,4940077,4939951,4454715,4454707,4454700,4454689,4454669,4259784,4259774,4164733,4164670,3806483,3806452,3806383,3806360,3806338,3302094,3302091,3103204,2732326,2732320,2732312,2732301,2329250,2329231,2329228,1832849,1784190,1784174";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/Oliver/images";break}switch(a){case 1:b="http://www1.clikpic.com/Oliver/images";break}switch(a){case 2:b="http://admin.clikpic.com/Oliver/images";break}switch(a){case 24:b="http://tpc15/clikpic/Oliver/images";break}switch(a){case 4:b="http://www.clikchurch.com/Oliver/images";break}switch(a){case 5:b="http://www2.clikpic.com/Oliver/images";break}switch(a){case 22:b="http://tpc5/clikpic/Oliver/images";break}switch(a){case 23:b="http://tpc10/clikpic/Oliver/images";break}switch(a){case 25:b="http://tpc16/clikpic/Oliver/images";break}switch(a){case 15:b="http://www3.clikpic.com/Oliver/images";break}switch(a){case 18:b="http://www4.clikpic.com/Oliver/images";break}switch(a){case 19:b="http://www5.clikpic.com/Oliver/images";break}switch(a){case 31:b="http://www7.clikpic.com/Oliver/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Oliver/images";break}switch(a){case 33:b="http://www8.clikpic.com/Oliver/images";break}switch(a){case 34:b="http://www9.clikpic.com/Oliver/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Oliver/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Oliver/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="AROPics: "+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+'")'})}}};