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[5562221]=new thumbnail(5562221,"38049","Trawlers from New Fish Quay","New_Fish_Quay_thumb.jpg",130,86,1);thumbnails[1257443]=new thumbnail(1257443,"38049","Inner Harbour, Brixham","DSC_0001JPG1_thumb.jpg",130,86,1);thumbnails[1257490]=new thumbnail(1257490,"38049","Trawlers","DSC_0047JPG_thumb.jpg",130,86,1);thumbnails[1583594]=new thumbnail(1583594,"38049","Trawlers at Fish Quay","DSC_0007-1JPG_thumb.jpg",130,86,1);thumbnails[5562215]=new thumbnail(5562215,"38049","Day Is Done","Day_is_Done_thumb.jpg",130,85,1);thumbnails[1257568]=new thumbnail(1257568,"38049","Brixham's Inner Harbour","DSC_0049JPG_thumb.jpg",130,86,1);thumbnails[5562227]=new thumbnail(5562227,"38049","Over The Rooftops","Over_the_Rooftops_1_thumb.jpg",130,86,1);thumbnails[1583790]=new thumbnail(1583790,"38049","Middle Pier","DSC_0044_edited-2JPG_thumb.jpg",130,85,1);thumbnails[1257621]=new thumbnail(1257621,"38049","Low Tide","DSC_0025JPG_thumb.jpg",130,86,1);thumbnails[1257679]=new thumbnail(1257679,"38049","Golden Hind","DSC_0002_edited-1JPG_thumb.jpg",130,86,1);thumbnails[1708505]=new thumbnail(1708505,"38049","Brixham Harbour at Christmas","DSC_0027_edited-1JPG_thumb.jpg",130,85,1);thumbnails[1257680]=new thumbnail(1257680,"38049","Angling at Dusk","DSC_0034JPG1_thumb.jpg",130,86,1);thumbnails[1257682]=new thumbnail(1257682,"38049","Brixham Harbour","DSC_0018JPG_thumb.jpg",130,86,1);thumbnails[1257683]=new thumbnail(1257683,"38049","Brixham Harbour in Autumn","DSC_0021JPG_thumb.jpg",130,86,1);thumbnails[1257684]=new thumbnail(1257684,"38049","Brixham at Sunset","DSC_0030_edited-1JPG_thumb.jpg",130,86,1);thumbnails[1583817]=new thumbnail(1583817,"38049","Brixham from the Harbour","DSC_0046JPG_thumb.jpg",130,86,1);thumbnails[1257686]=new thumbnail(1257686,"38049","Harbour at Night","DSC_0033_edited-1JPG_thumb.jpg",130,83,1);thumbnails[1288761]=new thumbnail(1288761,"38049","Harbour at Dusk","DSC_0073_edited-1JPG_thumb.jpg",130,86,1);thumbnails[1288767]=new thumbnail(1288767,"38049","Brixham Harbour by Night","DSC_0080_edited-1JPG_thumb.jpg",130,86,1);thumbnails[1288746]=new thumbnail(1288746,"38048","Torbay Lifeboat","DSC_0091_edited-1JPG_thumb.jpg",130,86,1);thumbnails[1583583]=new thumbnail(1583583,"38048","Paignton and Dartmouth Steam Railway","DSC_0007JPG_thumb.jpg",130,86,1);thumbnails[1583587]=new thumbnail(1583587,"38048","Red Arrows","DSC_0030JPG1_thumb.jpg",130,86,1);thumbnails[1708507]=new thumbnail(1708507,"38048","The Vigilance at Christmas","DSC_0031_edited-1JPG_thumb.jpg",130,85,1);thumbnails[2020302]=new thumbnail(2020302,"38048","Brixham Marina","DSC_0023_edited-1-1JPG_thumb.jpg",130,86,1);thumbnails[1257706]=new thumbnail(1257706,"38068","Froward Point","DSC_0017JPG2_thumb.jpg",130,86,1);thumbnails[1257707]=new thumbnail(1257707,"38068","Sharkham Point","DSC_0009JPG1_thumb.jpg",130,86,1);thumbnails[1257709]=new thumbnail(1257709,"38068","St Mary's Bay","DSC_0044_edited-1JPG2_thumb.jpg",130,86,1);thumbnails[5562207]=new thumbnail(5562207,"38068","Breakwater Beach","Breakwater_Beach_lighter_thumb.jpg",130,85,1);thumbnails[1257711]=new thumbnail(1257711,"38068","Sunset from Brixham Breakwater","DSC_0013_edited-1JPG2_thumb.jpg",130,84,1);thumbnails[1257712]=new thumbnail(1257712,"38068","Golden Sunset","DSC_0058_edited-2JPG1_thumb.jpg",130,85,1);thumbnails[2020306]=new thumbnail(2020306,"38068","Battery Gardens, Brixham","DSC_0034_edited-1JPG_1_thumb.jpg",130,86,1);thumbnails[1257713]=new thumbnail(1257713,"38068","Churston Point, Brixham","DSC_0008JPG2_thumb.jpg",130,86,1);thumbnails[1583556]=new thumbnail(1583556,"38068","Berry Head, Brixham","DSC_0036JPG_thumb.jpg",130,86,1);thumbnails[1583553]=new thumbnail(1583553,"38068","Mansands","DSC_0034_edited-1JPG_thumb.jpg",130,86,1);thumbnails[1257722]=new thumbnail(1257722,"41661","Berry Head Lighthouse","DSC_0057_edited-1JPG1_thumb.jpg",130,86,1);thumbnails[1257725]=new thumbnail(1257725,"41661","View South from Berry Head, Brixham","DSC_0064JPG_thumb.jpg",130,86,1);thumbnails[5562235]=new thumbnail(5562235,"41661","View south from Berry Head","South_from_Berry_Head_thumb.jpg",130,84,1);thumbnails[1288749]=new thumbnail(1288749,"41661","Berry Head","DSC_0057_edited-1-1JPG_thumb.jpg",130,86,1);thumbnails[1288751]=new thumbnail(1288751,"41661","Berry Head Fort 1","DSC_0052_edited-1JPG_thumb.jpg",130,86,1);thumbnails[1288756]=new thumbnail(1288756,"41661","Berry Head Southern Fort","DSC_0048_edited-1JPG_thumb.jpg",130,85,1);thumbnails[2123600]=new thumbnail(2123600,"141235","Easterly Gale lashing Brixham Breakwater.","DSC_0062_edited-1JPG_thumb.jpg",130,84,1);thumbnails[2123602]=new thumbnail(2123602,"141235","","DSC_0063_edited-1JPG_thumb.jpg",130,85,1);thumbnails[2123603]=new thumbnail(2123603,"141235","","DSC_0064_edited-3JPG_thumb.jpg",130,83,1);thumbnails[2123604]=new thumbnail(2123604,"141235","","DSC_0065_edited-1JPG_thumb.jpg",130,85,1);thumbnails[2123606]=new thumbnail(2123606,"141235","","DSC_0066_edited-1JPG_thumb.jpg",130,85,1);thumbnails[2123608]=new thumbnail(2123608,"141235","","DSC_0067_edited-1JPG_thumb.jpg",130,84,1);thumbnails[2123611]=new thumbnail(2123611,"141235","Rainbow over the Breakwater","DSC_0005_edited-2JPG_thumb.jpg",130,84,1);thumbnails[5455880]=new thumbnail(5455880,"308341","Broadsands","Broadsands_thumb.jpg",130,86,1);thumbnails[5455885]=new thumbnail(5455885,"308341","Goodrington","Goodrington_thumb.jpg",130,85,1);thumbnails[5455888]=new thumbnail(5455888,"308341","Oyster Cove","Oyster_Cove_thumb.jpg",130,86,1);thumbnails[5455891]=new thumbnail(5455891,"308341","Paignton Harbour","Paignton_Harbour_straight_thumb.jpg",130,85,1);thumbnails[5455898]=new thumbnail(5455898,"308341","Paignton Harbour","Paignton_Harbour_2_thumb.jpg",130,86,1);thumbnails[1583638]=new thumbnail(1583638,"108203","Dartmoor Pony","DSC_0025JPG2_thumb.jpg",130,86,1);thumbnails[1583644]=new thumbnail(1583644,"108203","Dartmoor Pony","DSC_0026JPG_thumb.jpg",130,86,1);thumbnails[2020304]=new thumbnail(2020304,"108203","Cut-Throat Finch","DSC_0024_edited-2JPG_thumb.jpg",130,96,1);thumbnails[2020308]=new thumbnail(2020308,"108203","Red Panda","DSC_0037_edited-1JPG_thumb.jpg",130,86,1);thumbnails[2020314]=new thumbnail(2020314,"108203","Golden Ringed Dragonfly","DSC_0054_edited-1JPG_thumb.jpg",130,102,1);thumbnails[5516884]=new thumbnail(5516884,"310113","Kingswear Castle","Kingswear_Castle_Straight_thumb.jpg",130,86,1);thumbnails[5516917]=new thumbnail(5516917,"310113","Coleton Fishacre","Coleton_Fishacre_thumb.jpg",130,86,1);thumbnails[5516879]=new thumbnail(5516879,"310115","Eiger, Monch & Jungfrau","Eiger_Monch__Jungfrau_thumb.jpg",130,86,1);thumbnails[5516868]=new thumbnail(5516868,"310115","Top of Europe","Jungfraujoch_thumb.jpg",130,86,1);thumbnails[5516844]=new thumbnail(5516844,"310115","Aletsch Glacier","Aletsch_Glacier_thumb.jpg",130,86,1);thumbnails[5516882]=new thumbnail(5516882,"310115","St Beatus Caves","St_Beatus_Caves_thumb.jpg",130,86,1);var galleries=new Object();galleries[38049]=new gallery(38049,"5562227,5562221,5562215,1257682","Brixham Harbour","gallery",[5562221,1257443,1257490,1583594,5562215,1257568,5562227,1583790,1257621,1257679,1708505,1257680,1257682,1257683,1257684,1583817,1257686,1288761,1288767]);galleries[38048]=new gallery(38048,"2020302,1708507,1583587,1583583,1288746","Planes, Trains and Boats","gallery",[1288746,1583583,1583587,1708507,2020302]);galleries[38068]=new gallery(38068,"5562207,1257711","Coast","gallery",[1257706,1257707,1257709,5562207,1257711,1257712,2020306,1257713,1583556,1583553]);galleries[41661]=new gallery(41661,"5562235,1257725","Berry Head National Nature Reserve","gallery",[1257722,1257725,5562235,1288749,1288751,1288756]);galleries[141235]=new gallery(141235,"2123611,2123608,2123606,2123604,2123603,2123602,2123600","Stormy Waters","gallery",[2123600,2123602,2123603,2123604,2123606,2123608,2123611]);galleries[308341]=new gallery(308341,"5455898,5455891,5455888,5455885,5455880","Paignton","gallery",[5455880,5455885,5455888,5455891,5455898]);galleries[108203]=new gallery(108203,"2020314,2020308,2020304,1583644,1583638","Wildlife","gallery",[1583638,1583644,2020304,2020308,2020314]);galleries[310113]=new gallery(310113,"5516884","Kingswear","gallery",[5516884,5516917]);galleries[310115]=new gallery(310115,"5516882,5516879,5516868","Switzerland","gallery",[5516879,5516868,5516844,5516882]);var imageSets=new Object();imageSets[1]="5562227,5562207,1257711,1257682";imageSets[2]="5562235,5562227,5562221,5562215,5562207,5516884,5516882,5516879,5516868,1257725,1257711,1257682";imageSets[3]="5562235,5562227,5562221,5562215,5562207,5516917,5516884,5516882,5516879,5516868,5516844,5455898,5455891,5455888,5455885,5455880,2123611,2123608,2123606,2123604,2123603,2123602,2123600,2020314,2020308,2020306,2020304,2020302,1708507,1708505,1583817,1583790,1583644,1583638,1583594,1583587,1583583,1583556,1583553,1288767,1288761,1288756,1288751,1288749,1288746,1257725,1257722,1257713,1257712,1257711";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/Simon_H/images";break}switch(a){case 1:b="http://www1.clikpic.com/Simon_H/images";break}switch(a){case 2:b="http://admin.clikpic.com/Simon_H/images";break}switch(a){case 24:b="http://tpc15/clikpic/Simon_H/images";break}switch(a){case 4:b="http://www.clikchurch.com/Simon_H/images";break}switch(a){case 5:b="http://www2.clikpic.com/Simon_H/images";break}switch(a){case 22:b="http://tpc5/clikpic/Simon_H/images";break}switch(a){case 23:b="http://tpc10/clikpic/Simon_H/images";break}switch(a){case 25:b="http://tpc16/clikpic/Simon_H/images";break}switch(a){case 15:b="http://www3.clikpic.com/Simon_H/images";break}switch(a){case 18:b="http://www4.clikpic.com/Simon_H/images";break}switch(a){case 19:b="http://www5.clikpic.com/Simon_H/images";break}switch(a){case 31:b="http://www7.clikpic.com/Simon_H/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Simon_H/images";break}switch(a){case 33:b="http://www8.clikpic.com/Simon_H/images";break}switch(a){case 34:b="http://www9.clikpic.com/Simon_H/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Simon_H/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Simon_H/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="'+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="Images of the English Riviera: "+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(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+'")'})}}};