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[5358454]=new thumbnail(5358454,"301841","2 for Joy - M2","DSC_6296_cropped_for_card_thumb.jpg",130,84,15);thumbnails[5358463]=new thumbnail(5358463,"301841","Waiting to Fly - Code W2","DSC_6472_cropped_for_card12_thumb.jpg",130,84,15);thumbnails[5358467]=new thumbnail(5358467,"301841","3 Sisters - S2","DSC_6269_smaller_for_card_page_thumb.jpg",130,94,15);thumbnails[5358544]=new thumbnail(5358544,"301857","Dove Tales in Graphite","DSC_62682_thumb.jpg",130,49,15);thumbnails[5358550]=new thumbnail(5358550,"301857","2 For Joy","DSC_62962_thumb.jpg",130,49,15);thumbnails[5366273]=new thumbnail(5366273,"302442","Figure 59 - Blue. Code 359-B","Fig_59_with_daisies_-blue_copy123_thumb.jpg",130,87,15);thumbnails[5366286]=new thumbnail(5366286,"302442","Figure 03 - Blue. Code303-B","fig_03_-_blue1_thumb.jpg",130,195,15);thumbnails[5366288]=new thumbnail(5366288,"302442","Figure 03D - Blue. Code 303D-B","Fig_03_with_Daisies_thumb.jpg",130,195,15);thumbnails[5366289]=new thumbnail(5366289,"302442","Figure 25 - Blue. Code 325 - Blue","Fig_25_-_blue_thumb.jpg",130,86,15);thumbnails[5366291]=new thumbnail(5366291,"302442","Figure 35D - Pink. Code 335D - P","Fig_35_with_daisies_-_pink_copy1_thumb.jpg",130,195,15);thumbnails[5366292]=new thumbnail(5366292,"302442","Figure 35D - Purple. Code 335D - PL","Fig_35_with_daisies_-_purple_thumb.jpg",130,195,15);thumbnails[5366294]=new thumbnail(5366294,"302442","Figure 45D- Purple. Code 345D - PL","Fig_45_with_a_daisy_-_purple_thumb.jpg",130,195,15);thumbnails[5366295]=new thumbnail(5366295,"302442","Figure 59 - Blue. Code 59 - B","Fig_59_-_blue_thumb.jpg",130,86,15);thumbnails[5370879]=new thumbnail(5370879,"302788","2 for Joy ","c1smaller_thumb.jpg",130,104,15);thumbnails[5370881]=new thumbnail(5370881,"302788","Waiting to Fly - Blue","c2_smaller_thumb.jpg",130,91,15);thumbnails[5370884]=new thumbnail(5370884,"302788","Waiting to Fly - Purple","c3_smaller_thumb.jpg",130,95,15);thumbnails[5423340]=new thumbnail(5423340,"250368","Returning Home","swallows_small_thumb.jpg",130,47,15);thumbnails[5358215]=new thumbnail(5358215,"301831","2 for Joy -  Code M1","2_for_Joy1_thumb.jpg",130,49,15);thumbnails[6253577]=new thumbnail(6253577,"301831","Blossom - Code B1","Blossom2_thumb.jpg",130,46,15);thumbnails[4221620]=new thumbnail(4221620,"250368","2 for joy","DSC_6296_thumb.jpg",130,49,15);thumbnails[6253579]=new thumbnail(6253579,"301831","Blossom 1 - Code BL1","Blossom11_thumb.jpg",130,46,15);thumbnails[6253664]=new thumbnail(6253664,"301831","Cedar - Code CB1","DSC_6258_88811010-1EC9-D45B-1C69A2AA9B3217B1_thumb.jpg",130,49,15);thumbnails[4221649]=new thumbnail(4221649,"301831","Dove tales 1 -  Code D1","DSC_6268_thumb.jpg",130,49,15);thumbnails[4389039]=new thumbnail(4389039,"250368","Dove Tales","DSC_6473-smaller-600_thumb.jpg",130,52,15);thumbnails[5358374]=new thumbnail(5358374,"301831","Dove Tales - Code DT 1","DSC_6473-smaller-6001_thumb.jpg",130,52,15);thumbnails[6253635]=new thumbnail(6253635,"301831","Lavender Butterflies - Code LB1","Lavender_Butterflies123_thumb.jpg",130,49,15);thumbnails[5358340]=new thumbnail(5358340,"301831","Inky Cedar - Code C1","inky_cedar_thumb.jpg",130,50,15);thumbnails[5358367]=new thumbnail(5358367,"301831","Waiting to Fly - W1","Waiting_to_Fly_thumb.jpg",130,45,15);thumbnails[5358387]=new thumbnail(5358387,"301831","Waiting to Fly 1 - Code WB1","DSC_62661_thumb.jpg",130,45,15);thumbnails[5358440]=new thumbnail(5358440,"301831","Waiting to Fly 1 lilac - Code WL 1 ","DSC_6266_lilac_thumb.jpg",130,45,15);thumbnails[4389042]=new thumbnail(4389042,"250368","Waiting to Fly","DSC_6472-smaller-600_thumb.jpg",130,45,15);thumbnails[4269334]=new thumbnail(4269334,"250368","Waiting to Fly (1)","DSC_6266_thumb.jpg",130,45,15);thumbnails[4221648]=new thumbnail(4221648,"301857","Waiting to Fly - Purple and Silver","DSC_6263_thumb.jpg",130,49,15);thumbnails[4221647]=new thumbnail(4221647,"301857","Waiting to Fly (No3)","DSC_6262_thumb.jpg",130,45,15);thumbnails[6253299]=new thumbnail(6253299,"347735","Lavender Butterflies","Lavender_Butterflies12_thumb.jpg",130,49,15);thumbnails[6253432]=new thumbnail(6253432,"347735","Blossom 1","Blossom1_thumb.jpg",130,46,15);thumbnails[6253400]=new thumbnail(6253400,"347735","Blossom","Blossom_thumb.jpg",130,46,15);thumbnails[4221634]=new thumbnail(4221634,"250363","Cedar at Coombe Dingle","DSC_6258_thumb.jpg",130,49,15);thumbnails[4389041]=new thumbnail(4389041,"250363","Inky Cedar","DSC_6471-smaller-600_thumb.jpg",130,52,15);thumbnails[4221637]=new thumbnail(4221637,"250363","3 Sisters","DSC_6269_thumb.jpg",130,94,15);thumbnails[4269588]=new thumbnail(4269588,"250363","3 Sisters (3 Colours)<br>\r\n","DSC_6261_thumb.jpg",130,103,15);thumbnails[4221639]=new thumbnail(4221639,"250363","3 Sisters (3 Greens)","DSC_6260_thumb.jpg",130,104,15);thumbnails[6253745]=new thumbnail(6253745,"250364","Fig 29 with Butterflis","figure_29_with_butterflies_thumb.jpg",130,195,15);thumbnails[4320077]=new thumbnail(4320077,"250364","fig 59 - into the blue","DSC_6275_thumb.jpg",130,92,15);thumbnails[4221656]=new thumbnail(4221656,"250364","figure 59 with daisies","DSC_62942_thumb.jpg",130,95,15);thumbnails[4221665]=new thumbnail(4221665,"250364","fig 35 with daisies (pink)","DSC_6281_smaller_thumb.jpg",130,179,15);thumbnails[5423481]=new thumbnail(5423481,"250364","Fig 03 purple background","03_-_purple_background1_thumb.jpg",130,186,15);thumbnails[4221660]=new thumbnail(4221660,"250364","figure 45","45_-_purple_background_thumb.jpg",130,184,15);thumbnails[4269604]=new thumbnail(4269604,"250364","fig 35 with daisies (purple)","DSC_6283_smaller_thumb.jpg",130,176,15);thumbnails[4320047]=new thumbnail(4320047,"250364","figure 03","DSC_6280_smaller_thumb.jpg",130,180,15);thumbnails[4389000]=new thumbnail(4389000,"250364","figure 03 with daisies AP","DSC_6474-smaller-500_thumb.jpg",130,186,15);thumbnails[4221672]=new thumbnail(4221672,"250364","View from the Edge 1","DSC_6285_smaller_thumb.jpg",130,184,15);thumbnails[4269585]=new thumbnail(4269585,"250364","A View from the Edge 2","DSC_6287_small_thumb.jpg",130,172,15);thumbnails[5423490]=new thumbnail(5423490,"254718","Fig 25","fig_25_smaller1_thumb.jpg",130,95,15);thumbnails[5423492]=new thumbnail(5423492,"254718","Fig 07","fig_07_cropped_and_smaller_thumb.jpg",130,97,15);thumbnails[4221667]=new thumbnail(4221667,"254718","fig 59","DSC_6331_smaller_591_thumb.jpg",130,99,15);thumbnails[4320099]=new thumbnail(4320099,"254718","fig. 35","DSC_6329_smaller_35_thumb.jpg",130,170,15);thumbnails[4269561]=new thumbnail(4269561,"254718","fig 45","DSC_6330_smaller_45_thumb.jpg",130,173,15);thumbnails[4391640]=new thumbnail(4391640,"254718","figure 03","DSC_6410-fig-03-at-400_thumb.jpg",130,174,15);var galleries=new Object();galleries[250368]=new gallery(250368,"5423340,4389042,4389039,4269334,4221620","Birds","gallery",[5423340,4221620,4389039,4389042,4269334]);galleries[301831]=new gallery(301831,"6253664,6253635,6253579,6253577,5358440,5358387,5358374,5358367,5358340,5358215","Card Size 1 -  7.3cm by 20.3cm","section361057",[5358215,6253577,6253579,6253664,4221649,5358374,6253635,5358340,5358367,5358387,5358440]);galleries[301841]=new gallery(301841,"5358467,5358463,5358454","Card Size 2 - 17.6cm by 12.6cm","section361057",[5358454,5358463,5358467]);galleries[302442]=new gallery(302442,"5366295,5366294,5366292,5366291,5366289,5366288,5366286,5366273","Card size 3 10.2cm by 15.2cm","section361057",[5366273,5366286,5366288,5366289,5366291,5366292,5366294,5366295]);galleries[302788]=new gallery(302788,"5370884,5370881,5370879","Cushions","section361183",[5370879,5370881,5370884]);galleries[301857]=new gallery(301857,"5358550,5358544,4221648,4221647","Giclee Prints 42cm by 15cm","section361190",[5358544,5358550,4221648,4221647]);galleries[347735]=new gallery(347735,"6253432,6253400,6253299","Butterflies and Flowers","gallery",[6253299,6253432,6253400]);galleries[250363]=new gallery(250363,"4389041,4269588,4221639,4221637,4221634","Trees","gallery",[4221634,4389041,4221637,4269588,4221639]);galleries[250364]=new gallery(250364,"6253745,5423481,4389000,4320077,4320047,4269604,4269585,4221672,4221665,4221660","Figures","gallery",[6253745,4320077,4221656,4221665,5423481,4221660,4269604,4320047,4389000,4221672,4269585]);galleries[254718]=new gallery(254718,"5423492,5423490,4391640,4320099,4269561,4221667","Embossed Figures","gallery",[5423490,5423492,4221667,4320099,4269561,4391640]);var imageSets=new Object();imageSets[1]="4221620";imageSets[3]="6253745,6253664,6253635,6253579,6253577,6253432,6253400,6253299,5423492,5423490,5423481,5423340,5370884,5370881,5370879,5366295,5366294,5366292,5366291,5366289,5366288,5366286,5366273,5358550,5358544,5358467,5358463,5358454,5358440,5358387,5358374,5358367,5358340,5358215,4391640,4389042,4389041,4389039,4389000,4320099,4320077,4320047,4269604,4269588,4269585,4269561,4269334,4221672,4221667,4221665";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/cuttsy/images";break}switch(a){case 1:b="http://www1.clikpic.com/cuttsy/images";break}switch(a){case 2:b="http://admin.clikpic.com/cuttsy/images";break}switch(a){case 24:b="http://tpc15/clikpic/cuttsy/images";break}switch(a){case 4:b="http://www.clikchurch.com/cuttsy/images";break}switch(a){case 5:b="http://www2.clikpic.com/cuttsy/images";break}switch(a){case 22:b="http://tpc5/clikpic/cuttsy/images";break}switch(a){case 23:b="http://tpc10/clikpic/cuttsy/images";break}switch(a){case 25:b="http://tpc16/clikpic/cuttsy/images";break}switch(a){case 15:b="http://www3.clikpic.com/cuttsy/images";break}switch(a){case 18:b="http://www4.clikpic.com/cuttsy/images";break}switch(a){case 19:b="http://www5.clikpic.com/cuttsy/images";break}switch(a){case 31:b="http://www7.clikpic.com/cuttsy/images";break}switch(a){case 32:b="http://admin2.clikpic.com/cuttsy/images";break}switch(a){case 33:b="http://www8.clikpic.com/cuttsy/images";break}switch(a){case 34:b="http://www9.clikpic.com/cuttsy/images";break}switch(a){case 35:b="http://admin3.clikpic.com/cuttsy/images";break}switch(a){case 37:b="http://admin4.clikpic.com/cuttsy/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="'+escape(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="Clare Cutts - Printmaker: "+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>Copyright © 2009 Clare Cutts </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>Printmaker </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+'")'})}}};