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[5685322]=new thumbnail(5685322,"","Puellae by Jo Pryor","Puellae_thumb.jpg",130,106,18);thumbnails[5637456]=new thumbnail(5637456,"","Mackerel by Rosie Burns","makerel_thumb.jpg",130,90,18);thumbnails[5625591]=new thumbnail(5625591,"","North Devon Arts Logo","NDA_logo_thumb.jpg",130,42,18);thumbnails[5625605]=new thumbnail(5625605,"","British Arts Logo","britishartslogo_thumb.jpg",130,66,18);thumbnails[5626128]=new thumbnail(5626128,"","North Devon UK","northdevonuk_thumb.gif",130,29,18);thumbnails[5578165]=new thumbnail(5578165,"","by Lani Shepherd","dragonfly2_thumb.jpg",130,98,18);thumbnails[5566327]=new thumbnail(5566327,"","by Nicky May","Etruscan45cut_thumb.jpg",130,190,18);thumbnails[5453969]=new thumbnail(5453969,"","by Tony Williams","DSCF1170-1_Large_thumb.JPG",130,99,18);thumbnails[5432281]=new thumbnail(5432281,"","Beach huts by Janet Jopson","beach_huts1_thumb.jpg",130,132,18);thumbnails[5432295]=new thumbnail(5432295,"","The Willow by Sarah Woolfenden","the_willow_final_thumb.jpg",130,69,18);thumbnails[5405690]=new thumbnail(5405690,"","The Art Coop Logo","Gallery39logo_colour_thumb.jpg",130,166,18);thumbnails[5054156]=new thumbnail(5054156,"","Raz's smaller image","Flambeaux_Jewellery_FKN_spirals_C8AAA1DC-1D09-001F-99DEAA3BA0B43FD6_thumb.jpg",130,105,18);thumbnails[4865474]=new thumbnail(4865474,"","Pink collage","Alison_Nicholson_011_photo_by_Dave_Green1_thumb.JPG",130,190,18);thumbnails[5438096]=new thumbnail(5438096,"","Peace by Sarah Woolfenden","Peace_thumb.jpg",130,128,18);thumbnails[5593764]=new thumbnail(5593764,"","Member of North Devon Arts","member_NDA_thumb.jpg",130,42,18);thumbnails[5750812]=new thumbnail(5750812,"","Cosmos by Janet Jopson","cosmos_thumb.jpg",130,103,18);thumbnails[5806943]=new thumbnail(5806943,"","North Devon Festival","North_Devon_Festival_thumb.jpg",130,53,18);thumbnails[5833402]=new thumbnail(5833402,"","Colin Allbrook","Colin_Allbrook_thumb.JPG",130,169,18);thumbnails[6393942]=new thumbnail(6393942,"","flower hanger by Sue Martin","flowerhanger1_thumb.jpg",130,173,18);thumbnails[6529398]=new thumbnail(6529398,"","Hot Chocolate by Alison Nicholson","hot_chocolate_thumb.jpg",130,168,18);thumbnails[6529409]=new thumbnail(6529409,"","Seascape by Alison Nicholson","large_seascape_black_white_thumb.jpg",130,107,18);thumbnails[6554275]=new thumbnail(6554275,"","SueJewelleryLogo","MyLogo2917_thumb.jpg",130,101,18);thumbnails[4864604]=new thumbnail(4864604,"","Flower","JL_hydranglacecap_thumb.jpg",130,86,18);thumbnails[4865509]=new thumbnail(4865509,"328797","","outside_G39_1_thumb.jpg",130,111,18);thumbnails[5807030]=new thumbnail(5807030,"328797","Inside Gallery","Inside_shop1_thumb.jpg",130,135,18);thumbnails[4865773]=new thumbnail(4865773,"328372","Fused glass hearts by Sue Martin","Hearts_004_thumb.JPG",130,194,18);thumbnails[4864623]=new thumbnail(4864623,"328372","Fused green glass by Sue Martin","Sue_Martin_-_glass_thumb.JPG",130,98,18);thumbnails[4865594]=new thumbnail(4865594,"328372","Fused glass blue dish by Sue Martin","bluedish_copy_thumb.jpg",130,82,18);thumbnails[5058878]=new thumbnail(5058878,"328372","'Shades of Pink' fused glass panel by Sue Martin £120","Shades_of_pink_thumb.JPG",130,127,18);thumbnails[5058865]=new thumbnail(5058865,"328372","'Shades of Blue' fused glass hanging panel by Sue Martin £120 ","Shades_of_Blue_thumb.JPG",130,135,18);thumbnails[4889174]=new thumbnail(4889174,"328352","Ceramic Dome Fountain by Helen Bailes","dome_fountain_aqua_w_P1010002_thumb.jpg",130,125,18);thumbnails[4889175]=new thumbnail(4889175,"328352","Ceramic Light Holders by Helen Bailes","light_holders__w_jpeg_thumb.jpg",130,85,18);thumbnails[4864624]=new thumbnail(4864624,"328352","Ceramic flower bowl by Helen Bailes","Gallery14_Helen_Bailes12_thumb.JPG",130,134,18);thumbnails[4865519]=new thumbnail(4865519,"328352","Ceramic tall vase by Helen Bailes","helenbailes-textural2_thumb.gif",130,130,18);thumbnails[4864572]=new thumbnail(4864572,"328371","'Across The Valley' by Ailsa Addicott","Across_the_valley_G39_thumb.jpg",130,98,18);thumbnails[4864580]=new thumbnail(4864580,"328371","'The Beach' by Ailsa Addicott","The_Beach__G39_thumb.jpg",130,130,18);thumbnails[4864590]=new thumbnail(4864590,"328371","'The Hedgerow' by Ailsa Addicott","The_Hedgerow_for_G39Ailsa_thumb.jpg",130,93,18);thumbnails[5918881]=new thumbnail(5918881,"328335","French Kiss     Brecciaeted Jasper & Sterling Silver Heart With French Inscription","French_Kiss_____Brecciaeted_Jasper__Sterling_Silver_Heart_With_French_Inscription1_thumb.jpg",130,195,18);thumbnails[5918891]=new thumbnail(5918891,"328335","French Kiss Sterling Silver Lift Over Pendant with French Inscription","French_Kiss_Sterling_Silver_Lift_Over_Pendant_with_French_Inscription1_thumb.jpg",130,195,18);thumbnails[5625584]=new thumbnail(5625584,"328335","Heart Drop by Razale Scott Olivier","Heart_drop_thumb.jpg",130,98,18);thumbnails[5332298]=new thumbnail(5332298,"328335","Flambeaux jewellery by Razale Scott Olivier","Libellule_Too_025_thumb.JPG",130,99,18);thumbnails[5332320]=new thumbnail(5332320,"328335","Flambeaux jewellery by Raz Scott Olivier","FKB-22b_thumb.JPG",130,84,18);thumbnails[5332341]=new thumbnail(5332341,"328335","Flambeaux jewellery by Razale Scott Olivier","FKB-40a_thumb.JPG",130,78,18);thumbnails[4865367]=new thumbnail(4865367,"328346","Crow Debris by Jenny Smy","Jenny_Crow_debris_thumb.JPG",130,96,18);thumbnails[4865413]=new thumbnail(4865413,"328430","'Brooches' by Bron Harris","Bron_-_embroidered_brooches_thumb.jpg",130,98,18);thumbnails[4865417]=new thumbnail(4865417,"328430","Button bracelet by Bron Harris","Bron_button_bracelet_thumb.jpg",130,173,18);thumbnails[5922704]=new thumbnail(5922704,"277507","Poppies airbrush by Simone Hunt","poppies_airbrush_thumb.jpg",130,127,18);thumbnails[5922705]=new thumbnail(5922705,"277507","River Taw by Simone Hunt","_river_taw_thumb.jpg",130,109,18);thumbnails[5922706]=new thumbnail(5922706,"277507","Smudge tool by Simone Hunt","Smudge_Tool_thumb.jpg",130,98,18);thumbnails[5922707]=new thumbnail(5922707,"277507","After the storm by Simone Hunt","AFTER_THE_STORM_FINAL_thumb.jpg",130,130,18);thumbnails[5922708]=new thumbnail(5922708,"277507","The quay by Simone Hunt","the_quay_5_thumb.jpg",130,114,18);thumbnails[5922709]=new thumbnail(5922709,"277507","Lilac by Simone Hunt","Lilac_thumb.jpg",130,104,18);thumbnails[5922710]=new thumbnail(5922710,"277507","Orange sky by Simone Hunt","airbrush_orange_sky_thumb.jpg",130,129,18);thumbnails[4913926]=new thumbnail(4913926,"277508","'Please Let me sleep' by Ian Hudson","Please_let_me_sleep_thumb.jpg",130,95,18);thumbnails[4864655]=new thumbnail(4864655,"277508","'Boats' by Ian Hudson","Ian_Hudson_Boats_thumb.JPG",130,94,18);thumbnails[4864657]=new thumbnail(4864657,"277508","'Jo' by Ian Hudson","Ian_Hudson_Jo_thumb.JPG",130,93,18);thumbnails[4864658]=new thumbnail(4864658,"277508","'Appledore' by Ian Hudson","Ian_Hudson_Appledore_thumb.JPG",130,95,18);thumbnails[4913942]=new thumbnail(4913942,"277508","'Meadfoot, Torbay' by Ian Hudson","Meadfoot___Torbay_thumb.jpg",130,95,18);var galleries=new Object();galleries[328797]=new gallery(328797,"4865509","Gallery","section393518",[4865509,5807030]);galleries[328372]=new gallery(328372,"5058878,5058865,4865594,4864623","Sue Martin Glass","section393518",[4865773,4864623,4865594,5058878,5058865]);galleries[328352]=new gallery(328352,"4889175,4889174","Helen Bailes","section393518",[4889174,4889175,4864624,4865519]);galleries[328371]=new gallery(328371,"4864590,4864580,4864572","Ailsa Addicott","section393518",[4864572,4864580,4864590]);galleries[328335]=new gallery(328335,"5918891,5918881,5625584,5332341,5332320,5332298","Razale Scott Olivier","section393518",[5918881,5918891,5625584,5332298,5332320,5332341]);galleries[328346]=new gallery(328346,"4865367","Jenny Smy","section393518",[4865367]);galleries[328430]=new gallery(328430,"4865413","Bron Harris","section393518",[4865413,4865417]);galleries[277507]=new gallery(277507,"5922710,5922709,5922708,5922707,5922706,5922705,5922704","Simone Hunt","section393518",[5922704,5922705,5922706,5922707,5922708,5922709,5922710]);galleries[277508]=new gallery(277508,"4913942,4913926,4864655","Ian Hudson","section393518",[4913926,4864655,4864657,4864658,4913942]);var imageSets=new Object();imageSets[1]="5058878,5058865,4913942,4913926,4889175,4889174,4865594,4865509,4865413,4865367,4864655,4864624,4864580";imageSets[2]="5058878,5058865,4913942,4913926,4889175,4889174,4865594,4865509,4865413,4864655,4864623";imageSets[3]="6554275,6529409,6529398,6393942,5922710,5922709,5922708,5922707,5922706,5922705,5922704,5918891,5918881,5833402,5807030,5806943,5750812,5685322,5637456,5626128,5625605,5625591,5625584,5593764,5578165,5566327,5453969,5438096,5432295,5432281,5405690,5332341,5332320,5332298,5058878,5058865,5054156,4913942,4913926,4889175,4889174,4865773,4865594,4865519,4865509,4865474,4865417,4865413,4865367,4864658";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/gallery39/images";break}switch(a){case 1:b="http://www1.clikpic.com/gallery39/images";break}switch(a){case 2:b="http://admin.clikpic.com/gallery39/images";break}switch(a){case 24:b="http://tpc15/clikpic/gallery39/images";break}switch(a){case 4:b="http://www.clikchurch.com/gallery39/images";break}switch(a){case 5:b="http://www2.clikpic.com/gallery39/images";break}switch(a){case 22:b="http://tpc5/clikpic/gallery39/images";break}switch(a){case 23:b="http://tpc10/clikpic/gallery39/images";break}switch(a){case 25:b="http://tpc16/clikpic/gallery39/images";break}switch(a){case 15:b="http://www3.clikpic.com/gallery39/images";break}switch(a){case 18:b="http://www4.clikpic.com/gallery39/images";break}switch(a){case 19:b="http://www5.clikpic.com/gallery39/images";break}switch(a){case 31:b="http://www7.clikpic.com/gallery39/images";break}switch(a){case 32:b="http://admin2.clikpic.com/gallery39/images";break}switch(a){case 33:b="http://www8.clikpic.com/gallery39/images";break}switch(a){case 34:b="http://www9.clikpic.com/gallery39/images";break}switch(a){case 35:b="http://admin3.clikpic.com/gallery39/images";break}switch(a){case 37:b="http://admin4.clikpic.com/gallery39/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("section393518"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section393518.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("section393518"!=""){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="The Art Coop at Gallery 39: "+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+'")'})}}};