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[841233]=new thumbnail(841233,"177914","Sundial Diptych","Sundialdiptychopen_thumb.JPG",130,173,1);thumbnails[841291]=new thumbnail(841291,"177914","Sundial Diptych, detail","Sundialdiptychopendetail_thumb.JPG",130,173,1);thumbnails[841301]=new thumbnail(841301,"177914","Sundial Diptych, closed","SundialDiptychclosed_thumb.JPG",130,116,1);thumbnails[841342]=new thumbnail(841342,"177914","Indian Book Shrine","bsdoorsopen 2_thumb.JPG",130,211,1);thumbnails[841365]=new thumbnail(841365,"177914","Indian Book Shrine, detail","bsdoorsopendetail2_thumb.JPG",130,173,1);thumbnails[841467]=new thumbnail(841467,"64892","Bejewelled Bags","bejewelledbags_thumb.jpg",130,173,1);thumbnails[841598]=new thumbnail(841598,"64892","Live Life Bag","livelifebag_thumb.jpg",130,173,1);thumbnails[841608]=new thumbnail(841608,"64892","Steamer Boxes","travel_thumb.jpg",130,173,1);thumbnails[841609]=new thumbnail(841609,"64892","Steamer boxes","traveldetail_thumb.jpg",130,98,1);thumbnails[841627]=new thumbnail(841627,"64892","babel detail","Babel detail 11_thumb.jpg",130,197,1);thumbnails[841630]=new thumbnail(841630,"64892","Uriel","uriel_thumb.jpg",130,173,1);thumbnails[841654]=new thumbnail(841654,"64892","Unfolding Word","unfoldingworddetail2_thumb.jpg",130,193,1);thumbnails[841663]=new thumbnail(841663,"64892","Wake Up (The Ledbury Rap)","wakeup_thumb.jpg",130,194,1);thumbnails[841665]=new thumbnail(841665,"64892","Wake Up, detail","Wakeupdetail 1_thumb.jpg",130,197,1);thumbnails[841672]=new thumbnail(841672,"64892","wake up, detail","wakeupdetaila_thumb.jpg",130,87,1);thumbnails[875282]=new thumbnail(875282,"177914","Mixed Media Notebooks","mixedmediabooks_thumb.JPG",130,159,1);thumbnails[875300]=new thumbnail(875300,"177914","Indian Artifact","indianartifact_thumb.JPG",130,200,1);thumbnails[875388]=new thumbnail(875388,"177914","Indian Artifact (detail)","mixed media010_thumb.JPG",130,173,1);thumbnails[886853]=new thumbnail(886853,"68009","Altered book","alteredbook1_thumb.jpg",130,104,1);thumbnails[928507]=new thumbnail(928507,"64892","Three Pod Things","threepodthings2_thumb.jpg",130,173,1);thumbnails[1435088]=new thumbnail(1435088,"64892","","3spikeyflowers_thumb.jpg",130,173,1);thumbnails[1449170]=new thumbnail(1449170,"64892","Night Garden","Hughes, A Night Garden, A 002_thumb.jpg",130,100,1);thumbnails[1722248]=new thumbnail(1722248,"64892","Long purse ","long purse001_thumb.JPG",130,254,1);thumbnails[1722250]=new thumbnail(1722250,"64892","long purse detail","long purse002_thumb.JPG",130,173,1);thumbnails[1722349]=new thumbnail(1722349,"68009","Cosmos bookwrap","cosmosbw2_thumb.jpg",130,177,1);thumbnails[1722351]=new thumbnail(1722351,"68009","Cosmas bookwrap detail","cosmos detail_thumb.jpg",130,144,1);thumbnails[1722354]=new thumbnail(1722354,"68009","Flower Bookwrap","flower1 copy_thumb.jpg",130,191,1);thumbnails[1722358]=new thumbnail(1722358,"68009","Garden Bookwrap","garden copy_thumb.jpg",130,180,1);thumbnails[1722360]=new thumbnail(1722360,"68009","Garden Bookwrap detail","garden detail_thumb.jpg",130,111,1);thumbnails[1722361]=new thumbnail(1722361,"68009","Pebbles Bookwrap","Pebbles copy_thumb.jpg",130,184,1);thumbnails[1722364]=new thumbnail(1722364,"68009","Pebbles bookwrap detail","Pebbles detail_thumb.jpg",130,114,1);thumbnails[1779015]=new thumbnail(1779015,"64892","Trinity","trinity 006_thumb.jpg",130,124,1);thumbnails[1779018]=new thumbnail(1779018,"64892","Trinity detail","trinity 013_thumb.jpg",130,98,1);thumbnails[1779022]=new thumbnail(1779022,"64892","Trinity detail","trinity 015_thumb.jpg",130,173,1);thumbnails[2303523]=new thumbnail(2303523,"64892","Hung with Stars.","hungwithstars_thumb.jpg",130,181,1);thumbnails[2858602]=new thumbnail(2858602,"177914","Stitch Cloth Paper and Paint","Stitch Cloth Paper_thumb.JPG",130,184,1);thumbnails[3300082]=new thumbnail(3300082,"68009","new bookwrap","bookwrap 011_thumb.jpg",130,176,1);thumbnails[3300119]=new thumbnail(3300119,"64892","Seasons Greetings","Image37_thumb.jpg",130,95,1);thumbnails[3426506]=new thumbnail(3426506,"177914","indian artifact by madi","Madi_thumb.JPG",130,173,1);thumbnails[3428316]=new thumbnail(3428316,"177914","Madi's Sundial","madi sundial open_thumb.jpg",130,218,1);thumbnails[3428322]=new thumbnail(3428322,"177914","Madi's sundial closed","madi sundial closed_thumb.jpg",130,113,1);thumbnails[5154253]=new thumbnail(5154253,"68009","House book front cover","house_project_002_thumb.jpg",130,176,1);thumbnails[5154299]=new thumbnail(5154299,"68009","House book, front cover","house_project_001_thumb.jpg",130,209,1);thumbnails[5154303]=new thumbnail(5154303,"68009","House book page 1","house_project_003_thumb.jpg",130,204,1);thumbnails[5247250]=new thumbnail(5247250,"64892","Abstract Bag","abstractbag_thumb.jpg",130,173,1);thumbnails[5247267]=new thumbnail(5247267,"295659","Bubbles Bag","bubblesbag_thumb.jpg",130,173,1);thumbnails[5247268]=new thumbnail(5247268,"64892","Large Klimt Bag","klimtbag_thumb.jpg",130,173,1);thumbnails[5247271]=new thumbnail(5247271,"295659","Landscape Bag","landscapebag_thumb.jpg",130,173,1);thumbnails[5247273]=new thumbnail(5247273,"64892","Small Klimt bag","a4klimtbag_thumb.jpg",130,98,1);thumbnails[5247274]=new thumbnail(5247274,"64892","Hundertwasser Bag","hundertbag_thumb.jpg",130,98,1);thumbnails[5439272]=new thumbnail(5439272,"","Ledbury Artplace is my studio, if you would like to visit please call first i'm not always here.","Artplacemap_thumb.jpg",130,141,1);thumbnails[5864061]=new thumbnail(5864061,"295659","","dvd_thumb.jpg",130,183,1);thumbnails[6268481]=new thumbnail(6268481,"64892","","Copy_of_Chorus_thumb.jpg",130,173,1);thumbnails[6268501]=new thumbnail(6268501,"64892","Chorus","Copy_of_Chorus3_thumb.jpg",130,173,1);thumbnails[6268502]=new thumbnail(6268502,"64892","Straight backed ladies","Copy_of_gardens_002_thumb.jpg",130,173,1);thumbnails[6268504]=new thumbnail(6268504,"64892","Last of Summer","Copy_of_Last_of_Summer1_thumb.jpg",130,173,1);thumbnails[6268506]=new thumbnail(6268506,"64892","Last of Summer","Copy_of_Last_of_Summer2_thumb.jpg",130,179,1);thumbnails[6268509]=new thumbnail(6268509,"64892","Maids of the Garden","Copy_of_Maids1_thumb.jpg",130,173,1);thumbnails[6268513]=new thumbnail(6268513,"64892","Maids of the Garden","Copy_of_Maids2_thumb.jpg",130,173,1);thumbnails[6268515]=new thumbnail(6268515,"64892","Straight Backed Ladies","Copy_of_Sraight3_thumb.jpg",130,173,1);thumbnails[6268517]=new thumbnail(6268517,"64892","We Can Fly","Copy_of_We_Can_Fly1_thumb.jpg",130,180,1);thumbnails[6268522]=new thumbnail(6268522,"64892","We Can Fly","Copy_of_We_Can_Fly3_thumb.jpg",130,173,1);thumbnails[6405680]=new thumbnail(6405680,"353943","","Copy_of_Spain_149_thumb.jpg",130,98,1);thumbnails[6405706]=new thumbnail(6405706,"353943","Granada's Alhambra visit, notes and all","Copy_of_Spain_148_thumb.jpg",130,98,1);thumbnails[6405709]=new thumbnail(6405709,"353943","Alhambra again","Copy_of_Spain_152_thumb.jpg",130,98,1);thumbnails[6405715]=new thumbnail(6405715,"353943","A terrifying journey to the mountain top village of Comares","Copy_of_Spain_147_thumb.jpg",130,98,1);thumbnails[6405718]=new thumbnail(6405718,"353943","Picasso museum Malaga.","Copy_of_Spain_150_thumb.jpg",130,98,1);thumbnails[6405724]=new thumbnail(6405724,"353943","Picasso again, does the last picture look familiar?","Copy_of_Spain_thumb.jpg",130,98,1);thumbnails[6405725]=new thumbnail(6405725,"353943","last day, cockroaches, sun, sand and Paella.","Copy_of_Spain_151_thumb.jpg",130,98,1);thumbnails[841580]=new thumbnail(841580,"64892","Babel","Babel_thumb.JPG",130,198,1);thumbnails[830609]=new thumbnail(830609,"64892","Babel, detail","Babel 2_thumb.JPG",130,199,1);thumbnails[841591]=new thumbnail(841591,"64213","Dream Sampler","dreamsampler_thumb.jpg",130,98,1);thumbnails[1148629]=new thumbnail(1148629,"64213","tulip, mixed media, oil pastel","tulip_thumb.jpg",130,205,1);thumbnails[1722421]=new thumbnail(1722421,"64213","Memory Ship poem by Fiona Sampson","memory ship_thumb.jpg",130,83,1);thumbnails[1722422]=new thumbnail(1722422,"64213","Memory Ship detail","Memory Ship detail 1_thumb.jpg",130,87,1);thumbnails[4646189]=new thumbnail(4646189,"64213","The Young Masefield Goes Forth","go_forth_thumb.jpg",130,192,1);thumbnails[4646226]=new thumbnail(4646226,"64213","Go Forth detail","go_forth_detail_thumb.jpg",130,173,1);thumbnails[4957266]=new thumbnail(4957266,"64213","Mica Amulet","amulets001_thumb.JPG",130,219,1);var galleries=new Object();galleries[68009]=new gallery(68009,"5154303,5154299,5154253,3300082,1722364,1722361,1722360,1722358,1722354,1722351","Books","gallery",[886853,1722349,1722351,1722354,1722358,1722360,1722361,1722364,3300082,5154253,5154299,5154303]);galleries[353943]=new gallery(353943,"6405725,6405724,6405718,6405715,6405709,6405706,6405680","Journaling","gallery",[6405680,6405706,6405709,6405715,6405718,6405724,6405725]);galleries[64892]=new gallery(64892,"6268522,6268517,6268515,6268513,6268509,6268506,6268504,6268502,6268501,6268481","Machine Embroidery","gallery",[841467,841598,841608,841609,841627,841630,841654,841663,841665,841672,928507,1435088,1449170,1722248,1722250,1779015,1779018,1779022,2303523,3300119,5247250,5247268,5247273,5247274,6268481,6268501,6268502,6268504,6268506,6268509,6268513,6268515,6268517,6268522,841580,830609]);galleries[177914]=new gallery(177914,"2858602","Stitch Cloth Paper and Paint","gallery",[841233,841291,841301,841342,841365,875282,875300,875388,2858602,3426506,3428316,3428322]);galleries[267981]=new gallery(267981,"","Tag Book Challenge","gallery",[]);galleries[295659]=new gallery(295659,"5864061","Things for sale","gallery",[5247267,5247271,5864061]);galleries[64213]=new gallery(64213,"4957266,4646226,4646189,1722422,1722421,1148629,841591","Mixed Media","gallery",[841591,1148629,1722421,1722422,4646189,4646226,4957266]);var imageSets=new Object();imageSets[1]="6268522,6268517,6268515,6268513,6268509,6268506,6268504,6268502,6268481";imageSets[2]="5864061,2858602";imageSets[3]="6405725,6405724,6405718,6405715,6405709,6405706,6405680,6268522,6268517,6268515,6268513,6268509,6268506,6268504,6268502,6268501,6268481,5864061,5439272,5247274,5247273,5247271,5247268,5247267,5247250,5154303,5154299,5154253,4957266,4646226,4646189,3428322,3428316,3426506,3300119,3300082,2858602,2303523,1779022,1779018,1779015,1722422,1722421,1722364,1722361,1722360,1722358,1722354,1722351,1722349";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/angieh18b/images";break}switch(a){case 1:b="http://www1.clikpic.com/angieh18b/images";break}switch(a){case 2:b="http://admin.clikpic.com/angieh18b/images";break}switch(a){case 24:b="http://tpc15/clikpic/angieh18b/images";break}switch(a){case 4:b="http://www.clikchurch.com/angieh18b/images";break}switch(a){case 5:b="http://www2.clikpic.com/angieh18b/images";break}switch(a){case 22:b="http://tpc5/clikpic/angieh18b/images";break}switch(a){case 23:b="http://tpc10/clikpic/angieh18b/images";break}switch(a){case 25:b="http://tpc16/clikpic/angieh18b/images";break}switch(a){case 15:b="http://www3.clikpic.com/angieh18b/images";break}switch(a){case 18:b="http://www4.clikpic.com/angieh18b/images";break}switch(a){case 19:b="http://www5.clikpic.com/angieh18b/images";break}switch(a){case 31:b="http://www7.clikpic.com/angieh18b/images";break}switch(a){case 32:b="http://admin2.clikpic.com/angieh18b/images";break}switch(a){case 33:b="http://www8.clikpic.com/angieh18b/images";break}switch(a){case 34:b="http://www9.clikpic.com/angieh18b/images";break}switch(a){case 35:b="http://admin3.clikpic.com/angieh18b/images";break}switch(a){case 37:b="http://admin4.clikpic.com/angieh18b/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="Angie Hughes Embroiderer: "+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>"}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="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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="angie@angiehughes.com">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="angie@angiehughes.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};