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[2315396]=new thumbnail(2315396,"","","homepage_thumb.jpg",130,87,32);thumbnails[2315549]=new thumbnail(2315549,"","","homepage21_thumb.jpg",130,87,32);thumbnails[2315800]=new thumbnail(2315800,"","","homepage3_thumb.jpg",130,87,32);thumbnails[2335440]=new thumbnail(2335440,"152731","Family Pet","watercolour3_thumb.jpg",130,177,32);thumbnails[2336263]=new thumbnail(2336263,"152731","Walrus","walrus_thumb.jpg",130,177,32);thumbnails[2336267]=new thumbnail(2336267,"152731","Baby fashion","babies_thumb.jpg",130,177,32);thumbnails[2336283]=new thumbnail(2336283,"152731","Snowy Dartmoor","dartmoor_thumb.jpg",130,177,32);thumbnails[2336284]=new thumbnail(2336284,"152731","Nap time","sleeping_thumb.jpg",130,177,32);thumbnails[2655281]=new thumbnail(2655281,"168124","","JOURNEY1_thumb.jpg",130,87,32);thumbnails[2655294]=new thumbnail(2655294,"168124","","journey2_thumb.jpg",130,87,32);thumbnails[2655406]=new thumbnail(2655406,"168124","","journey4_thumb.jpg",130,87,32);thumbnails[2655415]=new thumbnail(2655415,"168124","","jour5_thumb.jpg",130,87,32);thumbnails[2655444]=new thumbnail(2655444,"168124","","journey5_thumb.jpg",130,87,32);thumbnails[2669156]=new thumbnail(2669156,"168886","","beach-w_thumb.jpg",130,87,32);thumbnails[2669158]=new thumbnail(2669158,"168886","","road-w_thumb.jpg",130,87,32);thumbnails[2669163]=new thumbnail(2669163,"168886","","library-w_thumb.jpg",130,87,32);thumbnails[2655437]=new thumbnail(2655437,"168124","","journey32_thumb.jpg",130,87,32);thumbnails[2655768]=new thumbnail(2655768,"168138","Slip Case for PSP","PSP_thumb.jpg",130,92,32);thumbnails[2687921]=new thumbnail(2687921,"168138","","psp8_thumb.jpg",130,92,32);thumbnails[2687929]=new thumbnail(2687929,"168138","","psp9_thumb.jpg",130,92,32);thumbnails[2687483]=new thumbnail(2687483,"168138","","Psp1_thumb.jpg",130,92,32);thumbnails[2687488]=new thumbnail(2687488,"168138","","psp4_thumb.jpg",130,92,32);thumbnails[2687491]=new thumbnail(2687491,"168138","","psp6_thumb.jpg",130,92,32);thumbnails[2655460]=new thumbnail(2655460,"168124","","jj_thumb.jpg",130,167,32);thumbnails[2687493]=new thumbnail(2687493,"168138","","psp2_thumb.jpg",130,92,32);thumbnails[2655307]=new thumbnail(2655307,"168124","","journe2_thumb.jpg",130,167,32);thumbnails[2326080]=new thumbnail(2326080,"151356","Allen Ginsberg - Linocut","1-print_thumb.jpg",130,177,32);thumbnails[2340476]=new thumbnail(2340476,"151356","Carl Solomen - Linocut","carl_thumb.jpg",130,177,32);thumbnails[2340504]=new thumbnail(2340504,"151356","Herbert Huncke - Linocut","huncke_thumb.jpg",130,177,32);thumbnails[2340521]=new thumbnail(2340521,"151356","Neal Cassady - Linocut","neal_thumb.jpg",130,177,32);thumbnails[2340544]=new thumbnail(2340544,"151356","Marlon Brando - Linocut","brando_thumb.jpg",130,177,32);thumbnails[2340551]=new thumbnail(2340551,"151356","Charlie Parker - Linocut","car_thumb.jpg",130,177,32);thumbnails[2666283]=new thumbnail(2666283,"151356","Naomi Ginsberg","CLOSE UP G_thumb.jpg",130,98,32);thumbnails[2666282]=new thumbnail(2666282,"151356","Naomi Ginsberg - Postcard","FAROUTG_thumb.jpg",130,98,32);thumbnails[2666257]=new thumbnail(2666257,"151356","Hart Crane","SSBOX_thumb.jpg",130,98,32);thumbnails[2666223]=new thumbnail(2666223,"151356","Presentation Box","G-BOX_thumb.jpg",130,179,32);thumbnails[2666238]=new thumbnail(2666238,"151356","Hart Crane","S-BOX_thumb.jpg",130,126,32);thumbnails[2668708]=new thumbnail(2668708,"151356","Postcard Collection","GINS_thumb.jpg",130,126,32);thumbnails[2524288]=new thumbnail(2524288,"151387","Weston Super Mare","weston1_thumb.jpg",130,114,32);thumbnails[2524468]=new thumbnail(2524468,"151387","Model Material","nanphoto_thumb.jpg",130,114,32);thumbnails[2539833]=new thumbnail(2539833,"151387","Nanna's Coats","coatnan_thumb.jpg",130,114,32);thumbnails[2539857]=new thumbnail(2539857,"151387","Collectables","jugsnanna_thumb.jpg",130,114,32);thumbnails[2539873]=new thumbnail(2539873,"151387","Collectable 1","mugsnan_thumb.jpg",130,114,32);thumbnails[2539877]=new thumbnail(2539877,"151387","Collectable 2","jugs_thumb.jpg",130,114,32);thumbnails[2539882]=new thumbnail(2539882,"151387","The Story of the Door","nandoor_thumb.jpg",130,114,32);thumbnails[2539888]=new thumbnail(2539888,"151387","Alison","alisonnan_thumb.jpg",130,114,32);thumbnails[2540129]=new thumbnail(2540129,"151387","Family Photo","familyphoto_thumb.jpg",130,114,32);thumbnails[2554528]=new thumbnail(2554528,"151387","Teddy toys","tedd_thumb.jpg",130,114,32);thumbnails[2554532]=new thumbnail(2554532,"151387","Pets","doggy1_thumb.jpg",130,114,32);thumbnails[2540023]=new thumbnail(2540023,"151387","Nanna and Peter","nan_thumb.jpg",130,114,32);thumbnails[2666469]=new thumbnail(2666469,"151387","My Nan - The Book","MYNAN2_thumb.jpg",130,98,32);thumbnails[2666473]=new thumbnail(2666473,"151387","","MYNAN3_thumb.jpg",130,98,32);thumbnails[2666477]=new thumbnail(2666477,"151387","","MYNAN4_thumb.jpg",130,98,32);thumbnails[2666482]=new thumbnail(2666482,"151387","","MYNAN6_thumb.jpg",130,98,32);thumbnails[2666483]=new thumbnail(2666483,"151387","","MYNAN7_thumb.jpg",130,98,32);thumbnails[2668797]=new thumbnail(2668797,"151387","Front Cover of Book ","mynan1_thumb.jpg",130,98,32);thumbnails[2650740]=new thumbnail(2650740,"167851","Wolf","wolf_thumb.jpg",130,98,32);thumbnails[2650795]=new thumbnail(2650795,"167851","Quail","quail_thumb.jpg",130,96,32);thumbnails[2650794]=new thumbnail(2650794,"167851","Mole","mole_thumb.jpg",130,97,32);thumbnails[2666512]=new thumbnail(2666512,"167851","Umbrella Bird","UMBRELLA BIRD_thumb.jpg",130,96,32);thumbnails[2666538]=new thumbnail(2666538,"167851","Xenopus Frog","FROG_thumb.jpg",130,96,32);thumbnails[2666552]=new thumbnail(2666552,"167851","Hedgehog","hedgehog_thumb.jpg",130,96,32);thumbnails[2666544]=new thumbnail(2666544,"167851","Kangaroo","KANgaroo_thumb.jpg",130,96,32);thumbnails[2650782]=new thumbnail(2650782,"167851","Tortoise","tortoise_thumb.jpg",130,98,32);thumbnails[2668783]=new thumbnail(2668783,"167851","Book A-H - Letterpress example","A-Z51_thumb.jpg",130,98,32);thumbnails[2671823]=new thumbnail(2671823,"167851","Slipcase for Books","a-z32_thumb.jpg",130,96,32);thumbnails[2666559]=new thumbnail(2666559,"167851","Japanese Bookbinding","a-z1_thumb.jpg",130,96,32);thumbnails[2666560]=new thumbnail(2666560,"167851","Primary Colours","a-z2_thumb.jpg",130,96,32);thumbnails[2666617]=new thumbnail(2666617,"167851","","a-z9_thumb.jpg",130,173,32);thumbnails[2666610]=new thumbnail(2666610,"167851","","a-z8_thumb.jpg",130,173,32);thumbnails[2666608]=new thumbnail(2666608,"167851","","a-z7_thumb.jpg",130,173,32);thumbnails[2326331]=new thumbnail(2326331,"151389","A scrabble afternoon","photo_thumb.jpg",130,101,32);thumbnails[2336343]=new thumbnail(2336343,"151389","Scones","cream_thumb.jpg",130,101,32);thumbnails[2336348]=new thumbnail(2336348,"151389","5-a-day","vedge_thumb.jpg",130,101,32);thumbnails[2336350]=new thumbnail(2336350,"151389","Breakfast","salmon_thumb.jpg",130,101,32);thumbnails[2336352]=new thumbnail(2336352,"151389","Bread and Butter Pudding","bread_thumb.jpg",130,101,32);thumbnails[2336354]=new thumbnail(2336354,"151389","Fish and Chips","fish_thumb.jpg",130,101,32);thumbnails[2326278]=new thumbnail(2326278,"151388","Family","sketch2_thumb.jpg",130,237,32);thumbnails[2326288]=new thumbnail(2326288,"151388","Bicycle Bianca","sketchetc_thumb.jpg",130,236,32);thumbnails[2336241]=new thumbnail(2336241,"151388","Feeding the birds","pigeons_thumb.jpg",130,236,32);thumbnails[2336243]=new thumbnail(2336243,"151388","Robbie","robbie_thumb.jpg",130,236,32);thumbnails[2336245]=new thumbnail(2336245,"151388","Sports Day","sportsday_thumb.jpg",130,236,32);thumbnails[2336246]=new thumbnail(2336246,"151388","Violet","violet_thumb.jpg",130,236,32);thumbnails[2336250]=new thumbnail(2336250,"151388","Pepsi","horse3_thumb.jpg",130,236,32);thumbnails[2336257]=new thumbnail(2336257,"151388","Funfair","fun_thumb.jpg",130,237,32);thumbnails[2336287]=new thumbnail(2336287,"151388","Rabbits","rabbits_thumb.jpg",130,236,32);var galleries=new Object();galleries[168124]=new gallery(168124,"2655281","Journey of a Letter","gallery",[2655281,2655294,2655406,2655415,2655444,2655437,2655460,2655307]);galleries[152731]=new gallery(152731,"2335440","My childhood (D&AD)","gallery",[2335440,2336263,2336267,2336283,2336284]);galleries[168138]=new gallery(168138,"2687929,2687921,2687493,2687491,2687488,2687483,2655768","PSP Project","gallery",[2655768,2687921,2687929,2687483,2687488,2687491,2687493]);galleries[168886]=new gallery(168886,"2669163,2669158,2669156","Woofy","gallery",[2669156,2669158,2669163]);galleries[151356]=new gallery(151356,"2326080","Allen Ginsberg & Friends","gallery",[2326080,2340476,2340504,2340521,2340544,2340551,2666283,2666282,2666257,2666223,2666238,2668708]);galleries[151387]=new gallery(151387,"2668797,2666483,2666482,2666477,2666473,2666469,2554532,2554528,2540129,2540023","My Nan","gallery",[2524288,2524468,2539833,2539857,2539873,2539877,2539882,2539888,2540129,2554528,2554532,2540023,2666469,2666473,2666477,2666482,2666483,2668797]);galleries[167850]=new gallery(167850,"2326080","Print - Linocut","gallery",[]);galleries[167851]=new gallery(167851,"2671823,2668783,2666617,2666610,2666608,2666560,2666559,2666552,2666544,2666538","A-Z Encylopedia of Animals","gallery",[2650740,2650795,2650794,2666512,2666538,2666552,2666544,2650782,2668783,2671823,2666559,2666560,2666617,2666610,2666608]);galleries[152730]=new gallery(152730,"2335440","Watercolours","gallery",[]);galleries[168123]=new gallery(168123,"2655281,2326331","Other","gallery",[]);galleries[151389]=new gallery(151389,"2326331","Think of England - British Food","gallery",[2326331,2336343,2336348,2336350,2336352,2336354]);galleries[151388]=new gallery(151388,"2326278","Sketchbook","gallery",[2326278,2326288,2336241,2336243,2336245,2336246,2336250,2336257,2336287]);var imageSets=new Object();imageSets[1]="2315800,2315549,2315396";imageSets[2]="2655281,2335440,2326331,2326278,2326080";imageSets[3]="2687929,2687921,2687493,2687491,2687488,2687483,2671823,2669163,2669158,2669156,2668797,2668783,2668708,2666617,2666610,2666608,2666560,2666559,2666552,2666544,2666538,2666512,2666483,2666482,2666477,2666473,2666469,2666283,2666282,2666257,2666238,2666223,2655768,2655460,2655444,2655437,2655415,2655406,2655307,2655294,2655281,2650795,2650794,2650782,2650740,2554532,2554528,2540129,2540023,2539888";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/zoec/images";break}switch(a){case 1:b="http://www1.clikpic.com/zoec/images";break}switch(a){case 2:b="http://admin.clikpic.com/zoec/images";break}switch(a){case 24:b="http://tpc15/clikpic/zoec/images";break}switch(a){case 4:b="http://www.clikchurch.com/zoec/images";break}switch(a){case 5:b="http://www2.clikpic.com/zoec/images";break}switch(a){case 22:b="http://tpc5/clikpic/zoec/images";break}switch(a){case 23:b="http://tpc10/clikpic/zoec/images";break}switch(a){case 25:b="http://tpc16/clikpic/zoec/images";break}switch(a){case 15:b="http://www3.clikpic.com/zoec/images";break}switch(a){case 18:b="http://www4.clikpic.com/zoec/images";break}switch(a){case 19:b="http://www5.clikpic.com/zoec/images";break}switch(a){case 31:b="http://www7.clikpic.com/zoec/images";break}switch(a){case 32:b="http://admin2.clikpic.com/zoec/images";break}switch(a){case 33:b="http://www8.clikpic.com/zoec/images";break}switch(a){case 34:b="http://www9.clikpic.com/zoec/images";break}switch(a){case 35:b="http://admin3.clikpic.com/zoec/images";break}switch(a){case 37:b="http://admin4.clikpic.com/zoec/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="Illustration, Printmaking & Design by Zoe Cook: "+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> 							"+(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(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+'")'})}}};