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[4442454]=new thumbnail(4442454,"258732","Waters Edge","100_1245_edited_thumb.jpg",130,83,18);thumbnails[4442607]=new thumbnail(4442607,"258732","Sunny Bay","100_1283_thumb.jpg",130,87,18);thumbnails[4442628]=new thumbnail(4442628,"258732","The Path<br>\r\n","100_1144_thumb.jpg",130,87,18);thumbnails[4442640]=new thumbnail(4442640,"258732","Lulworth Bay","100_1315_thumb.jpg",130,87,18);thumbnails[4442642]=new thumbnail(4442642,"258732","Man O War Bay","100_1324_edited_thumb.jpg",130,87,18);thumbnails[4442646]=new thumbnail(4442646,"258732","Durdle Door ","100_1345_edited_thumb.jpg",130,91,18);thumbnails[4442653]=new thumbnail(4442653,"258732","Paradise the Dorset Way","100_1732_edited_thumb.jpg",130,88,18);thumbnails[4449309]=new thumbnail(4449309,"258732","At Rest.....","100_1602_thumb.jpg",87,130,18);thumbnails[4449322]=new thumbnail(4449322,"258732","Weymouth ","100_1715_thumb.jpg",130,87,18);thumbnails[4449332]=new thumbnail(4449332,"258732","Dorset Sat Nav!","100_2069_thumb.jpg",130,87,18);thumbnails[4449339]=new thumbnail(4449339,"258732","West Bay","100_2098_thumb.jpg",130,87,18);thumbnails[4451326]=new thumbnail(4451326,"258732","Paradise","100_1128_533x800_thumb.jpg",87,130,18);thumbnails[4451331]=new thumbnail(4451331,"258732","Lazy Sunday","100_1294_533x800_thumb.jpg",87,130,18);thumbnails[4451332]=new thumbnail(4451332,"258732","Rolling fields....","100_1397_800x533_thumb.jpg",130,87,18);thumbnails[4451334]=new thumbnail(4451334,"258732","Boat Hire","100_1637_533x800_thumb.jpg",87,130,18);thumbnails[4451335]=new thumbnail(4451335,"258732","Red Arrows","100_1787_edited_800x658_thumb.jpg",130,107,18);thumbnails[4451336]=new thumbnail(4451336,"258732","Dorset Sunset","100_1801_533x800_thumb.jpg",87,130,18);thumbnails[4451337]=new thumbnail(4451337,"258732","Old Brewery","100_1850_800x570_thumb.jpg",130,93,18);thumbnails[4451339]=new thumbnail(4451339,"258732","Seating Plan","100_2114_800x533_thumb.jpg",130,87,18);thumbnails[4451340]=new thumbnail(4451340,"258732","Fishing Fleet","100_2214_800x533_thumb.jpg",130,87,18);thumbnails[4451344]=new thumbnail(4451344,"258732","West Bay ","100_2225_800x533_thumb.jpg",130,87,18);thumbnails[4451345]=new thumbnail(4451345,"258732","Hardy's Monument","100_2249_800x533_thumb.jpg",130,87,18);thumbnails[4984967]=new thumbnail(4984967,"258732","Lyme ","DSC01075_552x800_thumb.jpg",90,130,18);thumbnails[6366006]=new thumbnail(6366006,"258732","Harbour ","DSC00520_480x640_thumb.jpg",98,130,18);thumbnails[6366039]=new thumbnail(6366039,"258732","Sunset Sunday","DSC01385_640x480_thumb.jpg",130,98,18);thumbnails[4442615]=new thumbnail(4442615,"258733","Sleeping Beauty","100_1367_thumb.jpg",87,130,18);thumbnails[4442768]=new thumbnail(4442768,"258733","Young Style","DSC00275_edited_thumb.JPG",77,130,18);thumbnails[4449284]=new thumbnail(4449284,"258733","Water Sport !","005_thumb.JPG",130,87,18);thumbnails[4449295]=new thumbnail(4449295,"258733","Hitching a ride !","100_1352_edited_thumb.jpg",94,130,18);thumbnails[4449369]=new thumbnail(4449369,"258733","Cornish Delight","351_800x533_thumb.jpg",130,87,18);thumbnails[4449378]=new thumbnail(4449378,"258733","Mousehole","417_thumb.JPG",130,87,18);thumbnails[4449392]=new thumbnail(4449392,"258733","Sacred Family","100_2864_thumb.jpg",87,130,18);thumbnails[4449459]=new thumbnail(4449459,"258733","Eggs!","100_2945_thumb.jpg",87,130,18);thumbnails[4449529]=new thumbnail(4449529,"258733","Carrots ","100_2946_533x800_thumb.jpg",87,130,18);thumbnails[4449540]=new thumbnail(4449540,"258733","Sunny Days!","100_2981_thumb.jpg",87,130,18);thumbnails[4449551]=new thumbnail(4449551,"258733","Dolphin ","100_3035_thumb.jpg",87,130,18);thumbnails[4449565]=new thumbnail(4449565,"258733","Big Wheel ","100_3234_thumb.jpg",130,87,18);thumbnails[4449578]=new thumbnail(4449578,"258733","Orange Market","100_3290_thumb.jpg",130,87,18);thumbnails[4449590]=new thumbnail(4449590,"258733","Trattoria","florence1_thumb.jpg",130,98,18);thumbnails[4449621]=new thumbnail(4449621,"258733","Helter Skelter","DSC00798_800x600_thumb.jpg",130,98,18);thumbnails[4449628]=new thumbnail(4449628,"258733","Sunny Window","DSC00804_600x800_thumb.jpg",98,130,18);thumbnails[4449646]=new thumbnail(4449646,"258733","Natural Light ","DSC00765_800x600_thumb.jpg",130,98,18);thumbnails[4449658]=new thumbnail(4449658,"258733","The Light of Heaven .......","DSC00766_600x800_thumb.jpg",98,130,18);thumbnails[4449665]=new thumbnail(4449665,"258733","Holy Light","DSC00767_800x600_thumb.jpg",130,98,18);thumbnails[4449671]=new thumbnail(4449671,"258733","Drinks","DSC00718_800x600_thumb.jpg",130,98,18);thumbnails[4449680]=new thumbnail(4449680,"258733","Old Living","DSC00670_600x800_thumb.jpg",98,130,18);thumbnails[4449706]=new thumbnail(4449706,"258733","Sunset Majorca","008_800x600_thumb.jpg",130,98,18);thumbnails[4449718]=new thumbnail(4449718,"258733","Reflecting Times","028_800x600_thumb.jpg",130,98,18);thumbnails[4449725]=new thumbnail(4449725,"258733","Stables","081_800x600_thumb.jpg",130,98,18);thumbnails[4449731]=new thumbnail(4449731,"258733","Field of Dreams","200_600x800_thumb.jpg",98,130,18);thumbnails[4449808]=new thumbnail(4449808,"258733","Cells","321_800x533_thumb.jpg",130,87,18);thumbnails[4449841]=new thumbnail(4449841,"258733","Skyline ","325_800x533_thumb.jpg",130,87,18);thumbnails[4449853]=new thumbnail(4449853,"258733","At Rest","511_533x800_thumb.jpg",87,130,18);thumbnails[4449862]=new thumbnail(4449862,"258733","Boats at Rest","418_533x800_thumb.jpg",87,130,18);thumbnails[4451292]=new thumbnail(4451292,"258733","Juices","100_2936_533x800_thumb.jpg",87,130,18);thumbnails[4451295]=new thumbnail(4451295,"258733","Lemon","100_2955_533x800_thumb.jpg",87,130,18);thumbnails[4451297]=new thumbnail(4451297,"258733","Elephant","100_3125_533x800_thumb.jpg",87,130,18);thumbnails[4451301]=new thumbnail(4451301,"258733","Tongue Tied","100_3135_533x800_thumb.jpg",87,130,18);thumbnails[4451305]=new thumbnail(4451305,"258733","Peachy!","100_3286_533x800_thumb.jpg",87,130,18);thumbnails[4451307]=new thumbnail(4451307,"258733","Window Views ","100_1512_533x800_thumb.jpg",87,130,18);thumbnails[4451313]=new thumbnail(4451313,"258733","Chimney Pots","barca17_480x360_thumb.jpg",130,98,18);thumbnails[4451325]=new thumbnail(4451325,"258733","Disney Magic","100_2564_edited_501x800_thumb.jpg",81,130,18);thumbnails[4451346]=new thumbnail(4451346,"258733","Bridesmaid","100_1942_533x800_thumb.jpg",87,130,18);thumbnails[4451347]=new thumbnail(4451347,"258733","Bride n Groom","100_1974_edited_610x800_thumb.jpg",99,130,18);thumbnails[4451376]=new thumbnail(4451376,"258733","Porthcurno Bay","STA70039_600x800_thumb.jpg",98,130,18);thumbnails[4451379]=new thumbnail(4451379,"258733","Tides Out","STA70025_1024x768_thumb.jpg",130,98,18);thumbnails[4451386]=new thumbnail(4451386,"258733","Mynack Theatre","STA70049_600x800_thumb.jpg",98,130,18);thumbnails[4451392]=new thumbnail(4451392,"258733","St Michaels Mount","STA70038_800x476_thumb.jpg",130,77,18);thumbnails[4984907]=new thumbnail(4984907,"258733","Glorious Dartmoor","DSC01165_800x600_thumb.jpg",130,98,18);thumbnails[4984923]=new thumbnail(4984923,"258733","Life on Mars .....","DSC01119_800x600_thumb.jpg",130,98,18);thumbnails[4984933]=new thumbnail(4984933,"258733","The Beach ","DSC01125_600x800_thumb.jpg",98,130,18);thumbnails[4984946]=new thumbnail(4984946,"258733","Surfers Bay","DSC01123_600x800_thumb.jpg",98,130,18);thumbnails[6365879]=new thumbnail(6365879,"258733","St Ives Tide","DSC00106_640x480_thumb.jpg",130,98,18);thumbnails[6365907]=new thumbnail(6365907,"258733","No Fishing","DSC00108_640x480_thumb.jpg",130,98,18);thumbnails[6365918]=new thumbnail(6365918,"258733","Purple!","DSC00296_480x640_thumb.jpg",98,130,18);thumbnails[6365930]=new thumbnail(6365930,"258733","Flower Pot","DSC00302_640x480_thumb.jpg",130,98,18);thumbnails[6365983]=new thumbnail(6365983,"258733","Plaza de Palma","DSC00399_640x480_thumb.jpg",130,98,18);thumbnails[6365993]=new thumbnail(6365993,"258733","Market Time","DSC00468_640x480_thumb.jpg",130,98,18);thumbnails[6366007]=new thumbnail(6366007,"258733","Beached......","DSC00524_640x480_thumb.jpg",130,98,18);thumbnails[6366011]=new thumbnail(6366011,"258733","Place to rest......","DSC00526_640x480_thumb.jpg",130,98,18);thumbnails[6366022]=new thumbnail(6366022,"258733","Beer in Bloom","DSC00530_640x480_thumb.jpg",130,98,18);var galleries=new Object();galleries[258732]=new gallery(258732,"6366039,6366006,4984967,4451345,4451344,4451340,4451339,4451337,4451336,4451335","Dorset","gallery",[4442454,4442607,4442628,4442640,4442642,4442646,4442653,4449309,4449322,4449332,4449339,4451326,4451331,4451332,4451334,4451335,4451336,4451337,4451339,4451340,4451344,4451345,4984967,6366006,6366039]);galleries[258733]=new gallery(258733,"6366022,6366011,6366007,6365993,6365983,6365930,6365918,6365907,6365879,4984946","People and Places","gallery",[4442615,4442768,4449284,4449295,4449369,4449378,4449392,4449459,4449529,4449540,4449551,4449565,4449578,4449590,4449621,4449628,4449646,4449658,4449665,4449671,4449680,4449706,4449718,4449725,4449731,4449808,4449841,4449853,4449862,4451292,4451295,4451297,4451301,4451305,4451307,4451313,4451325,4451346,4451347,4451376,4451379,4451386,4451392,4984907,4984923,4984933,4984946,6365879,6365907,6365918,6365930,6365983,6365993,6366007,6366011,6366022]);var imageSets=new Object();imageSets[1]="6366039,6366022,6366011,6366007,6366006,6365993,6365983,6365930,6365918,6365907,6365879,4984967,4984946,4984933,4984923,4984907,4451392,4451386,4451379,4451376,4451347,4451346,4451345,4451344,4451340,4451339,4451337,4451336,4451335,4451334,4451332,4451331,4451326,4451325,4451313,4451307,4451305,4451301,4451297,4451295,4451292,4449862,4449853,4449841,4449808,4449731,4449725,4449718,4449706,4449680";imageSets[3]="6366039,6366022,6366011,6366007,6366006,6365993,6365983,6365930,6365918,6365907,6365879,4984967,4984946,4984933,4984923,4984907,4451392,4451386,4451379,4451376,4451347,4451346,4451345,4451344,4451340,4451339,4451337,4451336,4451335,4451334,4451332,4451331,4451326,4451325,4451313,4451307,4451305,4451301,4451297,4451295,4451292,4449862,4449853,4449841,4449808,4449731,4449725,4449718,4449706,4449680";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/domski/images";break}switch(a){case 1:b="http://www1.clikpic.com/domski/images";break}switch(a){case 2:b="http://admin.clikpic.com/domski/images";break}switch(a){case 24:b="http://tpc15/clikpic/domski/images";break}switch(a){case 4:b="http://www.clikchurch.com/domski/images";break}switch(a){case 5:b="http://www2.clikpic.com/domski/images";break}switch(a){case 22:b="http://tpc5/clikpic/domski/images";break}switch(a){case 23:b="http://tpc10/clikpic/domski/images";break}switch(a){case 25:b="http://tpc16/clikpic/domski/images";break}switch(a){case 15:b="http://www3.clikpic.com/domski/images";break}switch(a){case 18:b="http://www4.clikpic.com/domski/images";break}switch(a){case 19:b="http://www5.clikpic.com/domski/images";break}switch(a){case 31:b="http://www7.clikpic.com/domski/images";break}switch(a){case 32:b="http://admin2.clikpic.com/domski/images";break}switch(a){case 33:b="http://www8.clikpic.com/domski/images";break}switch(a){case 34:b="http://www9.clikpic.com/domski/images";break}switch(a){case 35:b="http://admin3.clikpic.com/domski/images";break}switch(a){case 37:b="http://admin4.clikpic.com/domski/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="dominictancock: "+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+'")'})}}};