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[364491]=new thumbnail(364491,"29469","","SOUP_BOWL___PLATTER_2jpg1_thumb.jpg",130,145,18);thumbnails[369243]=new thumbnail(369243,"30240","","7_POSTS_AND_FOAM_thumb.jpg",130,140,18);thumbnails[369260]=new thumbnail(369260,"29469","","Raku - Tall tuquoise bottlejpg1_thumb.jpg",130,195,18);thumbnails[369275]=new thumbnail(369275,"29469","","Raku - Medium lidded jar_thumb.jpg",130,195,18);thumbnails[370225]=new thumbnail(370225,"29469","","14_STONEWARE_MUGS_10CM_H_thumb.jpg",130,87,18);thumbnails[370427]=new thumbnail(370427,"29469","","White Crackle Trinket bowl_thumb.jpg",130,153,18);thumbnails[370428]=new thumbnail(370428,"29469","","Cream earthenware bowl 250mm_thumb.jpg",130,102,18);thumbnails[370436]=new thumbnail(370436,"29469","","SMALL VASE_thumb.jpg.jpg",130,195,18);thumbnails[370453]=new thumbnail(370453,"29469","","Bowl at the wheel copy_thumb.jpg",130,87,18);thumbnails[370455]=new thumbnail(370455,"29469","","STONEWARE CASSEROLE30cm_thumb.jpg",130,144,18);thumbnails[370893]=new thumbnail(370893,"30240","","6_POST_AND_SHADOW_thumb.jpg",130,130,18);thumbnails[371152]=new thumbnail(371152,"30240","","3 Forecastle Ensign-Mono+colour_thumb.jpg",130,141,18);thumbnails[373190]=new thumbnail(373190,"30240","","Delawarr- Your table is ready_thumb.jpg",130,130,18);thumbnails[378126]=new thumbnail(378126,"30240","","Delawarr- 2005-2-MONO_thumb.jpg",130,98,18);thumbnails[378128]=new thumbnail(378128,"30240","","Delawarr- 2005-5-reflectionsMONO_thumb.jpg",130,95,18);thumbnails[385390]=new thumbnail(385390,"30240","","17_STAIRS_LEGS__ENDLESS_COP_thumb.jpg",130,336,18);thumbnails[386906]=new thumbnail(386906,"29469","","smoked bottle-2_thumb.jpg.jpg",130,238,18);thumbnails[388125]=new thumbnail(388125,"29469","","RAKU_GOURD__thumb.jpg",130,157,18);thumbnails[388133]=new thumbnail(388133,"29469","","Soda glazed Creamer-01_thumb.jpg",130,195,18);thumbnails[784398]=new thumbnail(784398,"29469","","Pit- fired  pots -CLIKPIC copy_thumb.jpg",130,85,18);thumbnails[784453]=new thumbnail(784453,"29469","","Salt glazsed T pot+mug-01 -CLIKPIC_thumb.jpg",130,178,18);thumbnails[1793649]=new thumbnail(1793649,"29469","","HANNA-POT_thumb.jpg",130,195,18);thumbnails[2820755]=new thumbnail(2820755,"29469","","Holey bowl_thumb.jpg",130,184,18);thumbnails[3292770]=new thumbnail(3292770,"30240","","Skerry-01_thumb.jpg",130,87,18);thumbnails[3594869]=new thumbnail(3594869,"29469","","Naked-raku-pair_thumb.jpg",130,173,18);thumbnails[6391452]=new thumbnail(6391452,"29469","","_MG_5875-pair-saggar-bottles2_thumb.jpg",130,187,18);thumbnails[358125]=new thumbnail(358125,"29469","","Turreen + bowls-01jpg_thumb.jpg",130,87,18);thumbnails[358235]=new thumbnail(358235,"29469","","11_STONEWARE_BOTTLE___COPPEjpg_thumb.jpg",130,195,18);thumbnails[377734]=new thumbnail(377734,"30286","","Mick-MONO_thumb.jpg.jpg",130,129,18);thumbnails[377735]=new thumbnail(377735,"30286","","TONIA_thumb.jpg",130,145,18);thumbnails[377749]=new thumbnail(377749,"30286","","Lee -dodgerMono_thumb.jpg",130,101,18);thumbnails[377753]=new thumbnail(377753,"30286","","15 Jim Lieutenant - Mess kit_thumb.jpg",130,130,18);thumbnails[377755]=new thumbnail(377755,"30286","","JEAN_thumb.jpg.jpg",130,120,18);thumbnails[377757]=new thumbnail(377757,"30286","","NICOLA_thumb.jpg.jpg",130,130,18);thumbnails[377765]=new thumbnail(377765,"30286","","COLUMBA-SPANIELS-MARSHALL_thumb.jpg",130,104,18);thumbnails[377767]=new thumbnail(377767,"30286","","Mat-2_thumb.jpg",130,126,18);thumbnails[388184]=new thumbnail(388184,"30286","","12_DORIS_WITH_ROLL_HAT-closer_thumb.jpg",130,130,18);thumbnails[369816]=new thumbnail(369816,"29455","","Rye Harbour-Red Hut_thumb.jpg",130,87,18);thumbnails[370855]=new thumbnail(370855,"29455","","Leading Light 3_thumb.jpg",130,84,18);thumbnails[377246]=new thumbnail(377246,"29455","","West End -Middle beach-to Walton 2005 copy copy_thumb.jpg",130,129,18);thumbnails[378178]=new thumbnail(378178,"29455","","Leading Light -Misty_thumb.jpg",130,85,18);thumbnails[378879]=new thumbnail(378879,"29455","","Red Morning1_thumb.jpg",130,91,18);thumbnails[378956]=new thumbnail(378956,"29455","","1_SNOW_TOWARDS_DEDHAM_CHURC_thumb.jpg",130,68,18);thumbnails[387433]=new thumbnail(387433,"29455","","STOUR-SUNSET-BOAT_thumb.jpg",130,130,18);thumbnails[387434]=new thumbnail(387434,"29455","","STOUR-SUNSET-BOAT-SQUARE_thumb.jpg",130,130,18);thumbnails[387515]=new thumbnail(387515,"29455","","Leading Lt-10-lighting-square_thumb.jpg",130,130,18);thumbnails[387590]=new thumbnail(387590,"29455","","Fochtelochen moor-1_thumb.jpg",130,99,18);thumbnails[456912]=new thumbnail(456912,"29455","","IMG_0611 copy_thumb.jpg",130,87,18);thumbnails[3292591]=new thumbnail(3292591,"29455","","Groynes+translucent-wave_thumb.jpg",130,63,18);thumbnails[3292618]=new thumbnail(3292618,"29455","","Red-Hut-Rye-harbour-square_thumb.jpg",130,130,18);thumbnails[3292654]=new thumbnail(3292654,"29455","","Harbour-Sunset+old-boats_thumb.jpg",130,74,18);thumbnails[3292734]=new thumbnail(3292734,"29455","","Half-penny-Pier-_thumb.jpg",130,104,18);thumbnails[3293380]=new thumbnail(3293380,"29455","","Angel-Gate---sunset_thumb.jpg",130,60,18);thumbnails[3293389]=new thumbnail(3293389,"29455","","Breaker+surfing-gull_thumb.jpg",130,130,18);thumbnails[3293400]=new thumbnail(3293400,"29455","","Ha'penny-pier+jumping-kids_thumb.jpg",130,114,18);thumbnails[3293992]=new thumbnail(3293992,"29455","","Patricia---down-West-St_thumb.jpg",130,147,18);thumbnails[3294005]=new thumbnail(3294005,"29455","","Ramsey---baled-wheat-fields_thumb.jpg",130,130,18);thumbnails[357805]=new thumbnail(357805,"29455","","STOUR_SUNSETjpg_thumb.jpg",130,135,18);thumbnails[357816]=new thumbnail(357816,"29455","","17 Freightliner arrivingjpg_thumb.jpg",130,87,18);thumbnails[357834]=new thumbnail(357834,"29455","","6 Dane arriving-misty+yachtsjpg_thumb.jpg",130,73,18);thumbnails[358094]=new thumbnail(358094,"29455","","2_HARBOUR_CALM_BOATS_Xtra sharpened COPY copyjpg_thumb.jpg",130,90,18);thumbnails[370237]=new thumbnail(370237,"30293","","Gashouse creek-Harwich 2005 +FRAME_thumb.jpg",130,111,18);thumbnails[372559]=new thumbnail(372559,"30293","","HARWICH_HARBOUR_EVENING-Watercolour_thumb.jpg",130,98,18);thumbnails[388127]=new thumbnail(388127,"30293","","Kat en Flessen-01001_thumb.jpg",130,160,18);thumbnails[388130]=new thumbnail(388130,"30293","","West St Harwich Wclr-01001_thumb.jpg",130,110,18);thumbnails[781844]=new thumbnail(781844,"30293","","Gondolas1paintingWeb_thumb.jpg",130,106,18);thumbnails[781898]=new thumbnail(781898,"30293","","Gondolas2paintingWeb_thumb.jpg",130,116,18);thumbnails[1947331]=new thumbnail(1947331,"30293","","Foam & Rocks_thumb.jpg",130,130,18);thumbnails[1947332]=new thumbnail(1947332,"30293","","Aldeburgh-on the wall_thumb.jpg",130,130,18);thumbnails[1947335]=new thumbnail(1947335,"30293","","Sand Sea & Sky-8x8_thumb.jpg",130,130,18);thumbnails[2264223]=new thumbnail(2264223,"30293","","_Aldeburgh+Kite jpg_thumb.jpg",130,96,18);thumbnails[2341438]=new thumbnail(2341438,"30293","","Somersaults-clikpic _thumb.jpg",130,105,18);thumbnails[3500930]=new thumbnail(3500930,"30293","","Pin mill-Web_thumb.jpg",130,128,18);thumbnails[3723991]=new thumbnail(3723991,"30293","","Aldeburgh-promenadeframe_copy_thumb.jpg",130,101,18);thumbnails[4099997]=new thumbnail(4099997,"30293","","Umbrella-harwich_thumb.jpg",130,105,18);thumbnails[6391459]=new thumbnail(6391459,"30293","","_MG_5877-Daisy-Rebecca-2009_thumb.jpg",130,141,18);thumbnails[6428068]=new thumbnail(6428068,"30293","","_MG_5955-SOPHIE-PAINTING_thumb.jpg",130,148,18);var galleries=new Object();galleries[29469]=new gallery(29469,"358125","Ceramics","section48314",[364491,369260,369275,370225,370427,370428,370436,370453,370455,386906,388125,388133,784398,784453,1793649,2820755,3594869,6391452,358125,358235]);galleries[30240]=new gallery(30240,"3292770,385390,378128,378126,373190,371152,370893,369243","PICTORIAL","section48318",[369243,370893,371152,373190,378126,378128,385390,3292770]);galleries[30286]=new gallery(30286,"388184,377767,377765,377757,377755,377753,377749,377735,377734","Portraits","section48313",[377734,377735,377749,377753,377755,377757,377765,377767,388184]);galleries[29455]=new gallery(29455,"357834","Landscapes","section48312",[369816,370855,377246,378178,378879,378956,387433,387434,387515,387590,456912,3292591,3292618,3292654,3292734,3293380,3293389,3293400,3293992,3294005,357805,357816,357834,358094]);galleries[30293]=new gallery(30293,"6428068,6391459,4099997,3723991,3500930,2341438,2264223,1947335,1947332,1947331","Art Works","section48317",[370237,372559,388127,388130,781844,781898,1947331,1947332,1947335,2264223,2341438,3500930,3723991,4099997,6391459,6428068]);var imageSets=new Object();imageSets[1]="357816,357805";imageSets[2]="358125,357834";imageSets[3]="6428068,6391459,6391452,4099997,3723991,3594869,3500930,3294005,3293992,3293400,3293389,3293380,3292770,3292734,3292654,3292618,3292591,2820755,2341438,2264223,1947335,1947332,1947331,1793649,784453,784398,781898,781844,456912,388184,388133,388130,388127,388125,387590,387515,387434,387433,386906,385390,378956,378879,378178,378128,378126,377767,377765,377757,377755,377753";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/robmowle/images";break}switch(a){case 1:b="http://www1.clikpic.com/robmowle/images";break}switch(a){case 2:b="http://admin.clikpic.com/robmowle/images";break}switch(a){case 24:b="http://tpc15/clikpic/robmowle/images";break}switch(a){case 4:b="http://www.clikchurch.com/robmowle/images";break}switch(a){case 5:b="http://www2.clikpic.com/robmowle/images";break}switch(a){case 22:b="http://tpc5/clikpic/robmowle/images";break}switch(a){case 23:b="http://tpc10/clikpic/robmowle/images";break}switch(a){case 25:b="http://tpc16/clikpic/robmowle/images";break}switch(a){case 15:b="http://www3.clikpic.com/robmowle/images";break}switch(a){case 18:b="http://www4.clikpic.com/robmowle/images";break}switch(a){case 19:b="http://www5.clikpic.com/robmowle/images";break}switch(a){case 31:b="http://www7.clikpic.com/robmowle/images";break}switch(a){case 32:b="http://admin2.clikpic.com/robmowle/images";break}switch(a){case 33:b="http://www8.clikpic.com/robmowle/images";break}switch(a){case 34:b="http://www9.clikpic.com/robmowle/images";break}switch(a){case 35:b="http://admin3.clikpic.com/robmowle/images";break}switch(a){case 37:b="http://admin4.clikpic.com/robmowle/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("section48312"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section48312.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("section48312"!=""){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="ROBERT MOWLE Pictures and Pots: "+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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="ROBMOWLE">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};