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[2368588]=new thumbnail(2368588,"217488","Towards Poldhu","Landscape-1_thumb.jpg",130,99,32);thumbnails[2371794]=new thumbnail(2371794,"217488","Mullion Cove","Landscape-2_thumb.jpg",130,83,32);thumbnails[2371797]=new thumbnail(2371797,"217488","St Ives","Landscape-3_thumb.jpg",130,96,32);thumbnails[2371802]=new thumbnail(2371802,"217487","Thames in Flood","Landscape-5_thumb.jpg",130,92,32);thumbnails[2371806]=new thumbnail(2371806,"217488","Towards Carbis Bay","Landscape-6_thumb.jpg",130,87,32);thumbnails[2371816]=new thumbnail(2371816,"217488","Towards Polurrian Cove","Landscape-9_thumb.jpg",130,107,32);thumbnails[2371844]=new thumbnail(2371844,"217489","Eynsham Hollyhocks<br>\r\n","Floral-41_thumb.jpg",130,171,32);thumbnails[2371847]=new thumbnail(2371847,"217489","Red Primula","Floral-61_thumb.jpg",130,165,32);thumbnails[2371852]=new thumbnail(2371852,"217489","Red Tulips","Floral-33_thumb.jpg",130,177,32);thumbnails[2371854]=new thumbnail(2371854,"217489","Purple Primula","Floral-51_thumb.jpg",130,146,32);thumbnails[2371857]=new thumbnail(2371857,"217489","Purple Tulips","Floral-23_thumb.jpg",130,130,32);thumbnails[2371893]=new thumbnail(2371893,"217488","Seagull St Ives","Landscape-41_thumb.jpg",130,153,32);thumbnails[2371895]=new thumbnail(2371895,"217488","Lighthouse","Landscape-81_thumb.jpg",130,127,32);thumbnails[2371896]=new thumbnail(2371896,"217488","St Ives Lighthouse","Landscape-101_thumb.jpg",130,130,32);thumbnails[2371899]=new thumbnail(2371899,"217488","Harbour","Abstract-41_thumb.jpg",130,132,32);thumbnails[2466014]=new thumbnail(2466014,"217487","River Autumn","S11_thumb.jpg",130,95,32);thumbnails[2466015]=new thumbnail(2466015,"217487","River Barn","S2_thumb.jpg",130,94,32);thumbnails[2466016]=new thumbnail(2466016,"217488","Polurrian Cove","S3_thumb.jpg",130,121,32);thumbnails[2466020]=new thumbnail(2466020,"217489","Yellow Lillies","S41_thumb.jpg",130,179,32);thumbnails[2466021]=new thumbnail(2466021,"217489","Yellow Primula","S5a_thumb.jpg",130,194,32);thumbnails[2466022]=new thumbnail(2466022,"217489","Azalea in patterned Pot","S5b_thumb.jpg",130,173,32);thumbnails[2466023]=new thumbnail(2466023,"217489","Purple Flowers","S6a_thumb.jpg",130,147,32);thumbnails[2466025]=new thumbnail(2466025,"217487","Spring Tree","S6b_thumb.jpg",130,163,32);thumbnails[2466026]=new thumbnail(2466026,"217489","Yellow Primroses","S7a_thumb.jpg",130,149,32);thumbnails[2466028]=new thumbnail(2466028,"217487","River Spring","S7b_thumb.jpg",130,92,32);thumbnails[2466030]=new thumbnail(2466030,"217487","Two Narrow Boats","S8a_thumb.jpg",130,88,32);thumbnails[2466031]=new thumbnail(2466031,"217489","Purple Primula in Yellow Pot","S8b_thumb.jpg",130,168,32);thumbnails[2466033]=new thumbnail(2466033,"217487","River Tree","S8c_thumb.jpg",130,189,32);thumbnails[2466034]=new thumbnail(2466034,"217489","Purple Tulips in Yellow Vase","S9_thumb.jpg",130,186,32);thumbnails[2466041]=new thumbnail(2466041,"217487","River Trees","S10_thumb.jpg",130,102,32);thumbnails[2466077]=new thumbnail(2466077,"217489","Yellow and Purple Primula","S111_thumb.jpg",130,88,32);thumbnails[2466078]=new thumbnail(2466078,"217487","Bird Tree","S12_thumb.jpg",130,191,32);thumbnails[2466089]=new thumbnail(2466089,"217488","Cornish Tree","S14_thumb.jpg",130,129,32);thumbnails[2466093]=new thumbnail(2466093,"217489","White Lilies","S15_thumb.jpg",130,173,32);thumbnails[2710104]=new thumbnail(2710104,"217488","Boat and Buoy","boat_thumb.jpg",130,84,32);thumbnails[3059799]=new thumbnail(3059799,"217488","From Polurrian Cliff","test-n1_thumb.jpg",130,126,32);thumbnails[3059803]=new thumbnail(3059803,"217488","From Mullion Cove Hotel","test-n2_thumb.jpg",130,100,32);thumbnails[3059807]=new thumbnail(3059807,"217489","Window Sill Flowers","test-n3_thumb.jpg",130,130,32);thumbnails[3059812]=new thumbnail(3059812,"217488","Mullion Cove Harbour","test-n5_thumb.jpg",130,170,32);thumbnails[3059815]=new thumbnail(3059815,"217488","View from Coast Guard Cottage","test-n6_thumb.jpg",130,101,32);thumbnails[3059820]=new thumbnail(3059820,"217488","Coast Guard Cottage View","test-n7_thumb.jpg",130,142,32);thumbnails[3554675]=new thumbnail(3554675,"217489","Red Cyclamen","proof--crop-mont-flowers_thumb.jpg",130,134,32);thumbnails[3560731]=new thumbnail(3560731,"217487","Dutch Barge","dutch-barge_thumb.jpg",130,116,32);thumbnails[5153201]=new thumbnail(5153201,"217488","Predannack","click-Predannack_thumb.jpg",130,119,32);thumbnails[5563861]=new thumbnail(5563861,"217489","Daffodil One","Daffodil-One_thumb.jpg",130,104,32);thumbnails[5563865]=new thumbnail(5563865,"217489","Daffodil Two","Daffodil-Two_thumb.jpg",130,170,32);thumbnails[5563906]=new thumbnail(5563906,"217489","Flowers and Pebbles","Flowers-and-pecbbles_thumb.jpg",130,163,32);thumbnails[5563911]=new thumbnail(5563911,"217488","Carag Luz  (Love Rock)","Caragg-Luv-_thumb.jpg",130,100,32);thumbnails[5563924]=new thumbnail(5563924,"217488","Mullion Cove Hotel","Mullion-Cove-Hotel_thumb.jpg",130,104,32);thumbnails[5563935]=new thumbnail(5563935,"217488","Mullion Cove Hotel 2","tMullion-Cove-Hotel-Two_thumb.jpg",130,170,32);thumbnails[5609103]=new thumbnail(5609103,"217489","Yellow Flowers in Blue Glass","Yellow_Fowers_in_Blue_Glass_thumb.jpg",130,188,32);thumbnails[6236892]=new thumbnail(6236892,"347229","Carnations in Cornish Vase","BLU-WHITE-VASE-2-PEBBLES_thumb.jpg",130,129,32);thumbnails[6236893]=new thumbnail(6236893,"347229","Spring Flowers in Blue Jug","Flowers-blue-vase-pebbles_thumb.jpg",130,131,32);thumbnails[6236894]=new thumbnail(6236894,"347229","Primula in Blue Striped Bowl","Fowers-Red-Background_thumb.jpg",130,129,32);thumbnails[6236896]=new thumbnail(6236896,"347229","White Chrysanthemums","Oide-Daisies-with-pebbles_thumb.jpg",130,158,32);thumbnails[6236903]=new thumbnail(6236903,"347229","Flowers and Pebbles","test-p2_thumb.jpg",130,163,32);thumbnails[6237001]=new thumbnail(6237001,"347229","Mixed Flowers in Yellow Vase","Vase-Flowers_thumb.jpg",130,157,32);thumbnails[6255481]=new thumbnail(6255481,"347229","Green Palm","SMALL_Green_Palm_thumb.jpg",130,129,32);thumbnails[6236897]=new thumbnail(6236897,"347229","Polurrian with Big Clouds","Polurrian-Cove_thumb.jpg",130,102,32);thumbnails[6236902]=new thumbnail(6236902,"347229","Carag Luz (Love Rock)","test-p1_thumb.jpg",130,100,32);thumbnails[6237002]=new thumbnail(6237002,"347229","Cat with Eiderdown","test-Crackers-11_thumb.jpg",130,100,32);thumbnails[6236898]=new thumbnail(6236898,"347229","Cat with Quilt","SUE-CROP-test-Crackers-2_thumb.jpg",130,97,32);thumbnails[6236899]=new thumbnail(6236899,"347229","Cat with Newspaper","test-Crackers-3_thumb.jpg",130,106,32);thumbnails[6236900]=new thumbnail(6236900,"347229","Cat with Pink Stripes","test-Crackers-4_thumb.jpg",130,92,32);thumbnails[2371805]=new thumbnail(2371805,"217488","Carbis Bay","Landscape-6--CROP-3_thumb.jpg",130,107,32);thumbnails[6243801]=new thumbnail(6243801,"347229","Cat with Cushion","test-Nimble_thumb.jpg",130,93,32);thumbnails[2371819]=new thumbnail(2371819,"217488","Sand Ripples 2","Landscape6---Crop-2_thumb.jpg",130,107,32);thumbnails[2371803]=new thumbnail(2371803,"217488","Sand Ripples 1","Landscape-6---CROP-1_thumb.jpg",130,107,32);thumbnails[2371809]=new thumbnail(2371809,"217488","Mullion Island","Landscape-7-crop-2_thumb.jpg",130,104,32);thumbnails[2371808]=new thumbnail(2371808,"217488","Sea and Sand 1","Landscape-7-crop-1_thumb.jpg",130,104,32);thumbnails[2371812]=new thumbnail(2371812,"217488","Sea and Sand 2","Landscape-7-crop-4-_thumb.jpg",130,103,32);thumbnails[2371799]=new thumbnail(2371799,"217488","St Ives<br>\r\nRed Buoy","Landscape-4-cottages-two_thumb.jpg",130,120,32);thumbnails[2371800]=new thumbnail(2371800,"217488","St Ives<br>\r\nDetail","Landscape-4-long-cottages_thumb.jpg",130,55,32);thumbnails[2371810]=new thumbnail(2371810,"217488","Polurrian Detail","Landscape-7-crop-3-_thumb.jpg",130,42,32);thumbnails[2372747]=new thumbnail(2372747,"217490","Bottle & Jug","Abstract-11_thumb.jpg",130,124,32);thumbnails[2466085]=new thumbnail(2466085,"217490","Snowdrops","S13a_thumb.jpg",130,206,32);thumbnails[2466087]=new thumbnail(2466087,"217490","Early Snowdrops","S13b_thumb.jpg",130,134,32);thumbnails[2372751]=new thumbnail(2372751,"217490","Bottle & Jug Blue","Abstract-23_thumb.jpg",130,124,32);var galleries=new Object();galleries[217488]=new gallery(217488,"2371799,2368588","Cornish Sea and Landscapes","section199393",[2368588,2371794,2371797,2371806,2371816,2371893,2371895,2371896,2371899,2466016,2466089,2710104,3059799,3059803,3059812,3059815,3059820,5153201,5563911,5563924,5563935,2371805,2371819,2371803,2371809,2371808,2371812,2371799,2371800,2371810]);galleries[217489]=new gallery(217489,"2371847","Flora","section199393",[2371844,2371847,2371852,2371854,2371857,2466020,2466021,2466022,2466023,2466026,2466031,2466034,2466077,2466093,3059807,3554675,5563861,5563865,5563906,5609103]);galleries[347229]=new gallery(347229,"6255481,6243801,6237002,6237001,6236903,6236902,6236900,6236899,6236898,6236897","New Work","section414524",[6236892,6236893,6236894,6236896,6236903,6237001,6255481,6236897,6236902,6237002,6236898,6236899,6236900,6243801]);galleries[217487]=new gallery(217487,"3560731,2466078,2466041,2466033,2466030,2466028,2466025,2466015,2466014,2371802","River Views","section199393",[2371802,2466014,2466015,2466025,2466028,2466030,2466033,2466041,2466078,3560731]);galleries[217490]=new gallery(217490,"2466087,2466085,2372751,2372747","Other Work","section199393",[2372747,2466085,2466087,2372751]);var imageSets=new Object();imageSets[1]="3554675,2466028,2372751,2368588";imageSets[2]="2371847,2371799,2368588";imageSets[3]="6255481,6243801,6237002,6237001,6236903,6236902,6236900,6236899,6236898,6236897,6236896,6236894,6236893,6236892,5609103,5563935,5563924,5563911,5563906,5563865,5563861,5153201,3560731,3554675,3059820,3059815,3059812,3059807,3059803,3059799,2710104,2466093,2466089,2466087,2466085,2466078,2466077,2466041,2466034,2466033,2466031,2466030,2466028,2466026,2466025,2466023,2466022,2466021,2466020,2466016";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/grendonsue/images";break}switch(a){case 1:b="http://www1.clikpic.com/grendonsue/images";break}switch(a){case 2:b="http://admin.clikpic.com/grendonsue/images";break}switch(a){case 24:b="http://tpc15/clikpic/grendonsue/images";break}switch(a){case 4:b="http://www.clikchurch.com/grendonsue/images";break}switch(a){case 5:b="http://www2.clikpic.com/grendonsue/images";break}switch(a){case 22:b="http://tpc5/clikpic/grendonsue/images";break}switch(a){case 23:b="http://tpc10/clikpic/grendonsue/images";break}switch(a){case 25:b="http://tpc16/clikpic/grendonsue/images";break}switch(a){case 15:b="http://www3.clikpic.com/grendonsue/images";break}switch(a){case 18:b="http://www4.clikpic.com/grendonsue/images";break}switch(a){case 19:b="http://www5.clikpic.com/grendonsue/images";break}switch(a){case 31:b="http://www7.clikpic.com/grendonsue/images";break}switch(a){case 32:b="http://admin2.clikpic.com/grendonsue/images";break}switch(a){case 33:b="http://www8.clikpic.com/grendonsue/images";break}switch(a){case 34:b="http://www9.clikpic.com/grendonsue/images";break}switch(a){case 35:b="http://admin3.clikpic.com/grendonsue/images";break}switch(a){case 37:b="http://admin4.clikpic.com/grendonsue/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("section199393"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section199393.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("section199393"!=""){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="SUE TEMPLEMAN: "+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="GRENDONSUE">';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+'")'})}}};