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[1334013]=new thumbnail(1334013,"94760","Harvest","D2X_0440-nx-copy-2_thumb.jpg",130,76,18);thumbnails[1336104]=new thumbnail(1336104,"94761","Painting The Pub","D2X_2604-sudbury1_thumb.jpg",130,91,18);thumbnails[1336109]=new thumbnail(1336109,"94752","Coffee And A Cigarette","D70_0012-copy-DSO-21_thumb.jpg",130,90,18);thumbnails[1336162]=new thumbnail(1336162,"94752","On The Town","D70_0113-copy-DSO-1_thumb.jpg",130,92,18);thumbnails[1336177]=new thumbnail(1336177,"94752","Over A Pint","DSC_0028-copy-STri-x1_thumb.jpg",130,83,18);thumbnails[1336180]=new thumbnail(1336180,"94752","Upstairs, Downstairs.","_D2C0061-NX-copy-SO3_thumb.jpg",130,84,18);thumbnails[1336201]=new thumbnail(1336201,"94761","Days Gone By","_D2X2861-copy-O-PRplat1_thumb.jpg",130,84,18);thumbnails[1336256]=new thumbnail(1336256,"94761","The Sea","_D2X1885-copy-DSO1_thumb.jpg",130,83,18);thumbnails[1336258]=new thumbnail(1336258,"94761","A Telephone","D2X_2645-copy-SO-PLsilver1_thumb.jpg",130,85,18);thumbnails[1336262]=new thumbnail(1336262,"94761","1950s Sunday","D2X_2649-NX-copy-O-PLplatin1_thumb.jpg",130,86,18);thumbnails[1336317]=new thumbnail(1336317,"94761","The 'Avengers' Bridge","D2X_2720-copy-O-PRplatinium1_thumb.jpg",130,83,18);thumbnails[1336370]=new thumbnail(1336370,"94760","Water Lake","D2X_2725-NX-copy-O-PRplatin1_thumb.jpg",130,86,18);thumbnails[1336417]=new thumbnail(1336417,"94755","A Gothic Mansion","_D2X1558-copy-2-DSO1_thumb.jpg",130,176,18);thumbnails[1336433]=new thumbnail(1336433,"94761","Last Of The Few","_D2X2413-copy-SO-PRplat1_thumb.jpg",130,79,18);thumbnails[1336446]=new thumbnail(1336446,"94761","Antique Ambulance","_D2X2418-copy-SO1_thumb.jpg",130,122,18);thumbnails[1336659]=new thumbnail(1336659,"94761","Lockeepers Gate","DSC_0019-copy-11_thumb.jpg",130,66,18);thumbnails[1336695]=new thumbnail(1336695,"94752","The Bar","D2X_2577-copy-SO-PRlight-pl1_thumb.jpg",130,96,18);thumbnails[1362255]=new thumbnail(1362255,"94752","By The River","D2X_2961-nx_thumb.jpg",130,86,18);thumbnails[1393651]=new thumbnail(1393651,"94752","Chasing Waves","D2X_2985_thumb.jpg",130,85,18);thumbnails[1393662]=new thumbnail(1393662,"94761","The Seaside","D2X_2999_thumb.jpg",130,86,18);thumbnails[1404849]=new thumbnail(1404849,"94760","Country Field","_D2C0199-0202rape_HDR5_thumb.jpg",130,89,18);thumbnails[1414931]=new thumbnail(1414931,"94760","Autumn Scene","B_D2X1280-more-vi-NX-copy-PRsat-Psb-w_thumb.jpg",130,85,18);thumbnails[1417076]=new thumbnail(1417076,"94760","A Sign","D2X_0731_thumb.jpg",130,86,18);thumbnails[1418078]=new thumbnail(1418078,"94760","Grain","D2X_0291_thumb.jpg",130,86,18);thumbnails[1418094]=new thumbnail(1418094,"94760","An English Village","_D2X1830_thumb.jpg",130,86,18);thumbnails[1421180]=new thumbnail(1421180,"94752","A Sea View","D2X_29881_thumb.jpg",130,86,18);thumbnails[1421194]=new thumbnail(1421194,"94755","Lockeepers House","D2X_2970_thumb.jpg",130,84,18);thumbnails[1429749]=new thumbnail(1429749,"94760","Autumn Wood","_D2X1363_thumb.jpg",130,86,18);thumbnails[1432947]=new thumbnail(1432947,"94755","The Shell House","D2X_2736_thumb.jpg",130,79,18);thumbnails[1439339]=new thumbnail(1439339,"94761",'"Wheres Your Driver?"',"D2X_3009-copy-Psb+wbluePRkall_thumb.jpg",130,77,18);thumbnails[1439389]=new thumbnail(1439389,"94761","Passing Through","D2X_3015_thumb.jpg",130,86,18);thumbnails[1470613]=new thumbnail(1470613,"94760","Tree By A Lake","_D2C0097_thumb.jpg",130,87,18);thumbnails[1489998]=new thumbnail(1489998,"94761","The 'Avengers' Bridge No2","D2X_2715-copy-Psb+wPRplat_thumb.jpg",130,82,18);thumbnails[1511624]=new thumbnail(1511624,"94760","Natural Waste","D2X_2761-copyPsb+whiconredPRplat-2_thumb.jpg",130,86,18);thumbnails[1518391]=new thumbnail(1518391,"94755","Bishops Stortford","_D2X1465-copyPsb+wcustPRplat_thumb.jpg",130,89,18);thumbnails[1532903]=new thumbnail(1532903,"94755","Windmill","_D2C00013_thumb.jpg",130,174,18);thumbnails[1569262]=new thumbnail(1569262,"94755","Gt. Hallingbury Church","DSC_0012-copy1_thumb.jpg",130,86,18);thumbnails[1628008]=new thumbnail(1628008,"94755","The Clockhouse","D2X_3029-copyPsb&wcustPRplat_thumb.jpg",130,196,18);thumbnails[1746812]=new thumbnail(1746812,"94755","St Peter-ad-Vincula<br>\r\n","D2X_3042-copyPsb&wcustPRplat1_thumb.jpg",130,86,18);thumbnails[1805155]=new thumbnail(1805155,"94760","A Country Walk","D2X_3086_thumb.jpg",130,168,18);thumbnails[1812712]=new thumbnail(1812712,"94760","Essex Landscape","D2X_3081_thumb.jpg",130,86,18);thumbnails[1964957]=new thumbnail(1964957,"94760","Long And Winding Road","D2X_3080_thumb.jpg",130,86,18);thumbnails[2208156]=new thumbnail(2208156,"94752","Fish & Chip Queue","_D2X3264_thumb.jpg",130,81,18);thumbnails[2364449]=new thumbnail(2364449,"94760","Greenford Green.","_D2X3347_thumb.jpg",130,86,18);thumbnails[2503535]=new thumbnail(2503535,"94760","East Mersea","_D2X3403_thumb.jpg",130,86,18);thumbnails[2625259]=new thumbnail(2625259,"94755","Layer Marney Tower Stables","_D2X3424-nx2-Ps_thumb.jpg",130,86,18);thumbnails[2625486]=new thumbnail(2625486,"94755","Layer Marney Tower","_D2X3432-nx2-Ps_thumb.jpg",130,196,18);thumbnails[2816196]=new thumbnail(2816196,"94760","The Power","_D2X3570_thumb.jpg",130,86,18);thumbnails[3874372]=new thumbnail(3874372,"94760","Willy Lotts Cottage, Flatford Mill, Suffolk","_D2X4079-c_thumb.jpg",130,86,18);thumbnails[3901686]=new thumbnail(3901686,"94755","A Suffolk Cottage","_D2X2823_thumb.jpg",130,86,18);thumbnails[3901689]=new thumbnail(3901689,"94755","Dedham Lock","_D2X3897_thumb.jpg",130,86,18);thumbnails[3901692]=new thumbnail(3901692,"94752","Southwold, Suffolk","_D2X3996_thumb.jpg",130,86,18);thumbnails[3901696]=new thumbnail(3901696,"94755","Workman's Shed","D2X_0735_thumb.jpg",130,86,18);thumbnails[3904024]=new thumbnail(3904024,"94761","A Car","_D2X4060_thumb.jpg",130,165,18);thumbnails[3955812]=new thumbnail(3955812,"94752","Play             Image of the Day Award<br>\r\n                          ","_D2X4101_thumb.jpg",130,82,18);thumbnails[4237599]=new thumbnail(4237599,"94755","Southwold Pier, Suffolk","_D2X4142_thumb.jpg",130,86,18);thumbnails[4251377]=new thumbnail(4251377,"94752","Southwold, Suffolk","_D2X4148_thumb.jpg",130,86,18);thumbnails[5356591]=new thumbnail(5356591,"94760","The Sea from Clacton Pier","_D2X4349_thumb.jpg",130,86,18);var galleries=new Object();galleries[94760]=new gallery(94760,"5356591,3874372,1336370","Gallery 1","gallery",[1334013,1336370,1404849,1414931,1417076,1418078,1418094,1429749,1470613,1511624,1805155,1812712,1964957,2364449,2503535,2816196,3874372,5356591]);galleries[94755]=new gallery(94755,"3901696,1336417","Gallery 2","gallery",[1336417,1421194,1432947,1518391,1532903,1569262,1628008,1746812,2625259,2625486,3901686,3901689,3901696,4237599]);galleries[94752]=new gallery(94752,"4251377,1362255,1336109","Gallery 3","gallery",[1336109,1336162,1336177,1336180,1336695,1362255,1393651,1421180,2208156,3901692,3955812,4251377]);galleries[94761]=new gallery(94761,"1336659","Gallery 4","gallery",[1336104,1336201,1336256,1336258,1336262,1336317,1336433,1336446,1336659,1393662,1439339,1439389,1489998,3904024]);var imageSets=new Object();imageSets[1]="5356591";imageSets[2]="5356591,4251377,3901696,3874372,1362255,1336659,1336417,1336370,1336109";imageSets[3]="5356591,3955812";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/paulharris/images";break}switch(a){case 1:b="http://www1.clikpic.com/paulharris/images";break}switch(a){case 2:b="http://admin.clikpic.com/paulharris/images";break}switch(a){case 24:b="http://tpc15/clikpic/paulharris/images";break}switch(a){case 4:b="http://www.clikchurch.com/paulharris/images";break}switch(a){case 5:b="http://www2.clikpic.com/paulharris/images";break}switch(a){case 22:b="http://tpc5/clikpic/paulharris/images";break}switch(a){case 23:b="http://tpc10/clikpic/paulharris/images";break}switch(a){case 25:b="http://tpc16/clikpic/paulharris/images";break}switch(a){case 15:b="http://www3.clikpic.com/paulharris/images";break}switch(a){case 18:b="http://www4.clikpic.com/paulharris/images";break}switch(a){case 19:b="http://www5.clikpic.com/paulharris/images";break}switch(a){case 31:b="http://www7.clikpic.com/paulharris/images";break}switch(a){case 32:b="http://admin2.clikpic.com/paulharris/images";break}switch(a){case 33:b="http://www8.clikpic.com/paulharris/images";break}switch(a){case 34:b="http://www9.clikpic.com/paulharris/images";break}switch(a){case 35:b="http://admin3.clikpic.com/paulharris/images";break}switch(a){case 37:b="http://admin4.clikpic.com/paulharris/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="Paul Harris Photographer: "+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;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> 				&pound;"+(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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="paulharris6@yahoo.co.uk">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="paulharris6@yahoo.co.uk">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};