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[2861078]=new thumbnail(2861078,"177941","River Nymph","rivernymphweb_thumb.JPG",129,166,32);thumbnails[2861102]=new thumbnail(2861102,"177941","Autumn Light","autumnlight_thumb.JPG",130,157,32);thumbnails[2861126]=new thumbnail(2861126,"177941","The Nymph","nymphweb_thumb.JPG",130,165,32);thumbnails[2861295]=new thumbnail(2861295,"","Keepsake box","boxweb_thumb.JPG",130,97,32);thumbnails[2861355]=new thumbnail(2861355,"177942","","graphicweb_thumb.JPG",129,158,32);thumbnails[2873351]=new thumbnail(2873351,"","large butterfly logo bag","butterflybaglg_thumb.JPG",129,176,32);thumbnails[2873352]=new thumbnail(2873352,"177941","Celtica","celtica1_thumb.JPG",130,179,32);thumbnails[2873353]=new thumbnail(2873353,"177941","Dark matter1","darkmatter1_thumb.JPG",130,171,32);thumbnails[2873412]=new thumbnail(2873412,"177941","Spellbound1","spellbound1web_thumb.JPG",129,168,32);thumbnails[2873414]=new thumbnail(2873414,"177941","Spellbound2","spellbound2web_thumb.JPG",129,177,32);thumbnails[2885261]=new thumbnail(2885261,"","","fishcommissionweb_thumb.JPG",129,564,32);thumbnails[2885263]=new thumbnail(2885263,"179086","Goldfish mini canvas","goldfishmini_thumb.JPG",129,199,32);thumbnails[2885267]=new thumbnail(2885267,"","","gwenweb_thumb.jpg",130,409,32);thumbnails[2885268]=new thumbnail(2885268,"177941","Gwen","gwenweb1_thumb.jpg",130,409,32);thumbnails[2885269]=new thumbnail(2885269,"179086","Mini canvas","minicanvasweb_thumb.JPG",130,180,32);thumbnails[2885273]=new thumbnail(2885273,"","","minifish1_thumb.JPG",130,191,32);thumbnails[2885290]=new thumbnail(2885290,"179086","Sold Commission","minifish2_thumb.JPG",130,193,32);thumbnails[2885291]=new thumbnail(2885291,"179086","Sold Commission.","minifish3_thumb.JPG",129,196,32);thumbnails[2885292]=new thumbnail(2885292,"179086","Peace lily","peacelily_thumb.JPG",130,196,32);thumbnails[2885293]=new thumbnail(2885293,"177941","Untitled","untitledweb_thumb.jpg",130,112,32);thumbnails[2885297]=new thumbnail(2885297,"179086","Sold commission","minifish11_thumb.JPG",130,191,32);thumbnails[2886419]=new thumbnail(2886419,"179086","Blue butterfly mini canvas.1<br>\r\n","butterflymini1_thumb.JPG",130,200,32);thumbnails[2886420]=new thumbnail(2886420,"","","butterflymini2_thumb.JPG",130,195,32);thumbnails[2886421]=new thumbnail(2886421,"179086","blue butterfly mini canvas.2","butterflymini21_thumb.JPG",130,195,32);thumbnails[2886424]=new thumbnail(2886424,"179086","Blue butterfly mini canvas 3","butterflymini3_thumb.JPG",129,194,32);thumbnails[2886426]=new thumbnail(2886426,"","","carddragonflyweb_thumb.JPG",130,173,32);thumbnails[2886427]=new thumbnail(2886427,"","","cardssparrowweb_thumb.JPG",129,173,32);thumbnails[2886428]=new thumbnail(2886428,"179459","SOLD","goldflowerdecweb_thumb.JPG",130,408,32);thumbnails[2886429]=new thumbnail(2886429,"179459","SOLD","goldleafdecweb_thumb.JPG",129,399,32);thumbnails[2886432]=new thumbnail(2886432,"179086","Gold leaf mini canvas","leafmini_thumb.JPG",129,200,32);thumbnails[2886433]=new thumbnail(2886433,"","Printed cards","printedcardsweb_thumb.JPG",130,92,32);thumbnails[2886435]=new thumbnail(2886435,"177941","Born To The wilderness","wilderweb1_thumb.JPG",130,149,32);thumbnails[2893843]=new thumbnail(2893843,"","","logo_thumb.jpg",130,31,32);thumbnails[3214655]=new thumbnail(3214655,"178755","book keepsake box<br>\r\nSOLD","brownbookweb_thumb.JPG",130,105,32);thumbnails[3214680]=new thumbnail(3214680,"","","butterflyprintcards_thumb.JPG",130,84,32);thumbnails[3214681]=new thumbnail(3214681,"","","butterflyprintcards1_thumb.JPG",130,84,32);thumbnails[3214682]=new thumbnail(3214682,"","","candlesticksweb_thumb.JPG",130,211,32);thumbnails[3214685]=new thumbnail(3214685,"178755","medium dark blue celestial keepsake box<br>\r\nSOLD","darkbluemediumcelestial_thumb.JPG",130,114,32);thumbnails[3214687]=new thumbnail(3214687,"","","etherealcards1_thumb.JPG",130,81,32);thumbnails[3214689]=new thumbnail(3214689,"179459","finch wall clock","finchclock_thumb.JPG",130,123,32);thumbnails[3214690]=new thumbnail(3214690,"","","fishcardsprinted_thumb.JPG",130,80,32);thumbnails[3214691]=new thumbnail(3214691,"","","jaycommission_thumb.JPG",130,185,32);thumbnails[3214695]=new thumbnail(3214695,"178755","large fish box","largefishbox_thumb.JPG",130,109,32);thumbnails[3214697]=new thumbnail(3214697,"178755","large aqua and vine jewellery box<br>\r\nSOLD ","largejewellerybluevine_thumb.JPG",130,111,32);thumbnails[3214699]=new thumbnail(3214699,"178755","medium aqua fish keepsake box","mediumaquafishbox_thumb.JPG",130,109,32);thumbnails[3214702]=new thumbnail(3214702,"178755","dragonfly chest<br>\r\nSOLD","mediumchestaquadragonfly_thumb.JPG",130,105,32);thumbnails[3214705]=new thumbnail(3214705,"178755","medium vine chest","mediumchestrosevine_thumb.JPG",130,103,32);thumbnails[3214706]=new thumbnail(3214706,"178755","hinged keepsake box with symbol<br>\r\nSOLD","mediumsymbolbox_thumb.JPG",130,114,32);thumbnails[3214708]=new thumbnail(3214708,"179086","gold butterfly mini canvas ","minibutterflygold_thumb.JPG",130,184,32);thumbnails[3214712]=new thumbnail(3214712,"179086","gold and aqua  butterfly mini canvas","minicanvasbuttaquagold_thumb.JPG",130,188,32);thumbnails[3214713]=new thumbnail(3214713,"179086","gold and green celtic knot mini canvas","minicelticknot_thumb.JPG",130,186,32);thumbnails[3214716]=new thumbnail(3214716,"179086","gold and aqua dragonfly mini canvas<br>\r\nSOLD","minidragonflyaquagold_thumb.JPG",130,180,32);thumbnails[3214719]=new thumbnail(3214719,"179086","Gold and purple fish min canvas","minigoldfishpurple_thumb.JPG",130,202,32);thumbnails[3214721]=new thumbnail(3214721,"","","misccards1_thumb.JPG",130,83,32);thumbnails[3214723]=new thumbnail(3214723,"178755","Book keepsake box<br>\r\nSOLD","purplebook_thumb.JPG",130,124,32);thumbnails[3214725]=new thumbnail(3214725,"178755","medium purple and silver vine keepsake box","purplemediumsilvervine_thumb.JPG",130,115,32);thumbnails[3214727]=new thumbnail(3214727,"178755","moon cube keepsake box","purplemoonmedium_thumb.JPG",130,121,32);thumbnails[3214730]=new thumbnail(3214730,"","","robincommission_thumb.JPG",130,175,32);thumbnails[3214731]=new thumbnail(3214731,"178755","round celtic keepsake box<br>\r\nSOLD","roundcelticbox_thumb.JPG",130,108,32);thumbnails[3214732]=new thumbnail(3214732,"178755","Wooden sewing box","sewingboxbluebraivy_thumb.JPG",130,162,32);thumbnails[3214736]=new thumbnail(3214736,"178755","mini aqua fish keepsake box<br>\r\nSOLD","smallaquafishbox_thumb.JPG",130,120,32);thumbnails[3214738]=new thumbnail(3214738,"178755","mini brown butterfly keepsake box<br>\r\nSOLD","smallbrownbutterflybox_thumb.JPG",130,119,32);thumbnails[3214745]=new thumbnail(3214745,"178755","mini celtic keepsake box","smallbrowncelticbox_thumb.JPG",130,119,32);thumbnails[3214747]=new thumbnail(3214747,"","","smallcelticnatural_thumb.JPG",130,138,32);thumbnails[3214749]=new thumbnail(3214749,"178755","mini aqua dragonfly chest<br>\r\nSOLD","smallchestaquadragonfl_thumb.JPG",130,124,32);thumbnails[3214751]=new thumbnail(3214751,"","","smallchestnaturalbutterfly_thumb.JPG",130,114,32);thumbnails[3214752]=new thumbnail(3214752,"178755","mini dark blue fish keepsake box","smalldarkbluefishbox_thumb.JPG",130,120,32);thumbnails[3214755]=new thumbnail(3214755,"178755","mini dark blue moon keepsake box","smalldarkbluemoonbox_thumb.JPG",130,109,32);thumbnails[3214759]=new thumbnail(3214759,"178755","mini jade fish keepsake box<br>\r\nSOLD","smalljadefishbox_thumb.JPG",130,119,32);thumbnails[3214762]=new thumbnail(3214762,"178755","mini purple dragonfly keepsake box<br>\r\nSOLD","smallpurpledragonflybox_thumb.JPG",130,116,32);thumbnails[3214765]=new thumbnail(3214765,"178755","mini natural symbol keepsake box","smallsymbolnaturalbox_thumb.JPG",130,122,32);thumbnails[3214766]=new thumbnail(3214766,"179459","vine wall clock","vineclock_thumb.JPG",130,125,32);thumbnails[3526036]=new thumbnail(3526036,"179144","Sparrow greetings card","sparrow card web_thumb.JPG",130,171,32);thumbnails[3981964]=new thumbnail(3981964,"","","2nd_class_rec_thumb.JPG",130,56,32);thumbnails[3981965]=new thumbnail(3981965,"240925","","air_world_thumb.JPG",130,56,32);thumbnails[3981966]=new thumbnail(3981966,"","","airmail_eur_thumb.JPG",130,56,32);thumbnails[3981968]=new thumbnail(3981968,"","","int_signed_thumb.JPG",130,56,32);thumbnails[3981970]=new thumbnail(3981970,"240923","","special_del_thumb.JPG",130,56,32);thumbnails[3981971]=new thumbnail(3981971,"242818","Butterfly bookmark","butterfly_bookmark_web_thumb.JPG",130,173,32);thumbnails[3981972]=new thumbnail(3981972,"242818","Dark matter bookmark","dark_matter_bookmark_web_thumb.JPG",130,173,32);thumbnails[3981974]=new thumbnail(3981974,"242818","Grace bookmark","grace_bookmarkweb_thumb.JPG",130,173,32);thumbnails[3981975]=new thumbnail(3981975,"242818","Koi bookmark","koi_bookmarkweb_thumb.JPG",130,173,32);thumbnails[3981977]=new thumbnail(3981977,"242818","Sparrows bookmark","sparrow_bookmark_thumb.JPG",130,173,32);thumbnails[3982050]=new thumbnail(3982050,"243569","Butterfly1 mounted print.","butterfly1_mini_thumb.JPG",130,174,32);thumbnails[3982051]=new thumbnail(3982051,"243569","Butterflyrose2 mounted print","butterfly2_mini_thumb.JPG",130,178,32);thumbnails[3982052]=new thumbnail(3982052,"243569","Butterfly rose 3 mounted print","butterfly3_mini_thumb.JPG",130,173,32);thumbnails[3982053]=new thumbnail(3982053,"243569","Dragonfly mounted print","dragonflymini_thumb.JPG",130,178,32);thumbnails[3982055]=new thumbnail(3982055,"243569","Finches mounted print","finchesmini_thumb.JPG",130,104,32);thumbnails[3982056]=new thumbnail(3982056,"243569","Grace mounted print","gracemini_thumb.JPG",130,184,32);thumbnails[3982057]=new thumbnail(3982057,"243569","Graphic organic mounted print","graphicorgmini_thumb.JPG",130,185,32);thumbnails[3982059]=new thumbnail(3982059,"243569","Koi 1 mounted print","koi1mini_thumb.JPG",130,182,32);thumbnails[3982061]=new thumbnail(3982061,"243569","Koi 2 mounted print","koi2mini_thumb.JPG",130,178,32);thumbnails[3982064]=new thumbnail(3982064,"243569","Koi 3 mounted print","koi3mini_thumb.JPG",130,176,32);thumbnails[3982067]=new thumbnail(3982067,"243569","River Nymph mounted print","river_nymph_mini_thumb.JPG",130,173,32);thumbnails[3982068]=new thumbnail(3982068,"243569","Sparrows mounted print","sparrowsmini_thumb.JPG",130,180,32);thumbnails[3982070]=new thumbnail(3982070,"243569","Spellbound 1 mounted print","spellbound1_mini_thumb.JPG",130,173,32);thumbnails[3982072]=new thumbnail(3982072,"243569","Spellbound 2 mounted print","spellbound_mini_2_thumb.JPG",130,178,32);thumbnails[3475410]=new thumbnail(3475410,"179144","Dragonfly card","mixed and webshop 049_thumb.JPG",130,173,32);thumbnails[3475428]=new thumbnail(3475428,"178754","Purple butterfly bag","mixed and webshop 079_thumb.JPG",130,162,32);thumbnails[3475412]=new thumbnail(3475412,"179144","Rose butterfly card ","mixed and webshop 051_thumb.JPG",130,173,32);thumbnails[3475429]=new thumbnail(3475429,"178754","Canvas dragonfly shoulder bag","mixed and webshop 081_thumb.JPG",130,146,32);thumbnails[3475413]=new thumbnail(3475413,"179144","Rose butterfly card","mixed and webshop 053_thumb.JPG",130,173,32);thumbnails[3475431]=new thumbnail(3475431,"178754","Graphic canvas shoulder bag","mixed and webshop 083_thumb.JPG",130,168,32);thumbnails[3475414]=new thumbnail(3475414,"179144","Rose Butterfly card","mixed and webshop 055_thumb.JPG",130,173,32);thumbnails[3475421]=new thumbnail(3475421,"179144","Koi card","mixed and webshop 066_thumb.JPG",130,173,32);thumbnails[3475422]=new thumbnail(3475422,"179144","Koi card","mixed and webshop 068_thumb.JPG",130,173,32);thumbnails[3475424]=new thumbnail(3475424,"179144","Koi card","mixed and webshop 071_thumb.JPG",130,173,32);thumbnails[3475415]=new thumbnail(3475415,"179144","The River Nymph card","mixed and webshop 057_thumb.JPG",130,173,32);thumbnails[3475419]=new thumbnail(3475419,"179144","Spellbound 1 card","mixed and webshop 064_thumb.JPG",130,173,32);thumbnails[3475418]=new thumbnail(3475418,"179144","Spellbound 2 Card","mixed and webshop 061_thumb.JPG",130,173,32);thumbnails[3475417]=new thumbnail(3475417,"179144","The Nymph","mixed and webshop 059_thumb.JPG",130,173,32);thumbnails[3475425]=new thumbnail(3475425,"179144","Grace card","mixed and webshop 072_thumb.JPG",130,173,32);thumbnails[3475426]=new thumbnail(3475426,"179144","Finches card","mixed and webshop 074_thumb.JPG",130,98,32);thumbnails[3475427]=new thumbnail(3475427,"179144","Graphic organic 1 card","mixed and webshop 076_thumb.JPG",130,173,32);thumbnails[2861299]=new thumbnail(2861299,"175707","Butterfly Garden 1 (Rose)","butterflygarden1web_thumb.JPG",129,159,32);thumbnails[2861304]=new thumbnail(2861304,"175707","Butterfly Garden 2 (Rose)","butterflygarden2web_thumb.JPG",129,163,32);thumbnails[2861311]=new thumbnail(2861311,"175707","Butterfly Garden 3 (Rose)","butterflygarden3web_thumb.JPG",130,161,32);thumbnails[2861322]=new thumbnail(2861322,"175707","Dragonfly","dragonflyweb_thumb.JPG",129,164,32);thumbnails[2861361]=new thumbnail(2861361,"175707","koi pond 1","smallkoi1aweb_thumb.JPG",129,165,32);thumbnails[2861378]=new thumbnail(2861378,"175707","koi pond small 2","smallkoi2a_thumb.JPG",130,163,32);thumbnails[2861383]=new thumbnail(2861383,"175707","koi pond small 3","smallkoi3web3_thumb.JPG",129,163,32);thumbnails[2861387]=new thumbnail(2861387,"175707","sparrows","sparrowsweb_thumb.JPG",130,165,32);thumbnails[2873403]=new thumbnail(2873403,"175707","Elephant","elephant_thumb.JPG",129,363,32);thumbnails[2873406]=new thumbnail(2873406,"175707","large koi pond 1","largekoipond1_thumb.JPG",129,102,32);thumbnails[2873407]=new thumbnail(2873407,"175707","large koi pond 2","largekoipond2_thumb.JPG",129,104,32);thumbnails[2861287]=new thumbnail(2861287,"175708","Untitled","drawingweb_thumb.JPG",130,173,32);thumbnails[2861324]=new thumbnail(2861324,"175708","Flower","goldflower1web_thumb.JPG",130,163,32);thumbnails[2861346]=new thumbnail(2861346,"175708","Leaves","goldleavesweb_thumb.JPG",130,164,32);thumbnails[2861350]=new thumbnail(2861350,"175708","Grace","graceweb_thumb.JPG",130,158,32);thumbnails[2873404]=new thumbnail(2873404,"175708","Finches","finches_thumb.JPG",130,97,32);thumbnails[2873410]=new thumbnail(2873410,"175708","sparrow","sparrow2_thumb.JPG",129,171,32);var galleries=new Object();galleries[178754]=new gallery(178754,"3475431,3475429,3475428","Bags","gallery",[3475428,3475429,3475431]);galleries[242818]=new gallery(242818,"3981977,3981975,3981974,3981972,3981971","Bookmarks","gallery",[3981971,3981972,3981974,3981975,3981977]);galleries[178755]=new gallery(178755,"3214702","boxes","gallery",[3214655,3214685,3214695,3214697,3214699,3214702,3214705,3214706,3214723,3214725,3214727,3214731,3214732,3214736,3214738,3214745,3214749,3214752,3214755,3214759,3214762,3214765]);galleries[179459]=new gallery(179459,"3214766,3214689,2886429,2886428","Decorative Art","gallery",[2886428,2886429,3214689,3214766]);galleries[177941]=new gallery(177941,"2861078","Ethereal","gallery",[2861078,2861102,2861126,2873352,2873353,2873412,2873414,2885268,2885293,2886435]);galleries[177942]=new gallery(177942,"2861355","Graphic organic","gallery",[2861355]);galleries[179144]=new gallery(179144,"3526036,3475427,3475426,3475425,3475424,3475422,3475421,3475419,3475418,3475417","Greetings cards","gallery",[3526036,3475410,3475412,3475413,3475414,3475421,3475422,3475424,3475415,3475419,3475418,3475417,3475425,3475426,3475427]);galleries[179086]=new gallery(179086,"2885269","Mini canvas","gallery",[2885263,2885269,2885290,2885291,2885292,2885297,2886419,2886421,2886424,2886432,3214708,3214712,3214713,3214716,3214719]);galleries[243569]=new gallery(243569,"3982072,3982070,3982068,3982067,3982064,3982061,3982059,3982057,3982056,3982055","Mini Prints","gallery",[3982050,3982051,3982052,3982053,3982055,3982056,3982057,3982059,3982061,3982064,3982067,3982068,3982070,3982072]);galleries[261952]=new gallery(261952,"3982072,3982070,3982068,3982067,3982064,3982061,3982059,3982057,3982056,3982055","Online shop","gallery",[]);galleries[240925]=new gallery(240925,"3981965","Postage airmail worldwide","gallery",[3981965]);galleries[240923]=new gallery(240923,"3981970","postage special delivery","gallery",[3981970]);galleries[175707]=new gallery(175707,"2861387","Natural form","gallery",[2861299,2861304,2861311,2861322,2861361,2861378,2861383,2861387,2873403,2873406,2873407]);galleries[175708]=new gallery(175708,"2861350","Drawings","gallery",[2861287,2861324,2861346,2861350,2873404,2873410]);galleries[177930]=new gallery(177930,"3214702","Design,interiors and gifts","gallery",[]);var imageSets=new Object();imageSets[1]="3214731,3214727,3214713,3214708,3214706,3214702,3214697,3214655,2886435,2886428,2885293,2885269,2873414,2873412,2873410,2873406,2873353,2873351,2861355,2861350,2861322,2861287,2861126,2861102,2861078";imageSets[2]="3214702,2885269,2861387,2861350,2861078";imageSets[3]="3982072,3982070,3982068,3982067,3982064,3982061,3982059,3982057,3982056,3982055,3982053,3982052,3982051,3982050,3981977,3981975,3981974,3981972,3981971,3981970,3981968,3981966,3981965,3981964,3526036,3475431,3475429,3475428,3475427,3475426,3475425,3475424,3475422,3475421,3475419,3475418,3475417,3475415,3475414,3475413,3475412,3475410,3214766,3214765,3214762,3214759,3214755,3214752,3214751,3214749";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/amandanield/images";break}switch(a){case 1:b="http://www1.clikpic.com/amandanield/images";break}switch(a){case 2:b="http://admin.clikpic.com/amandanield/images";break}switch(a){case 24:b="http://tpc15/clikpic/amandanield/images";break}switch(a){case 4:b="http://www.clikchurch.com/amandanield/images";break}switch(a){case 5:b="http://www2.clikpic.com/amandanield/images";break}switch(a){case 22:b="http://tpc5/clikpic/amandanield/images";break}switch(a){case 23:b="http://tpc10/clikpic/amandanield/images";break}switch(a){case 25:b="http://tpc16/clikpic/amandanield/images";break}switch(a){case 15:b="http://www3.clikpic.com/amandanield/images";break}switch(a){case 18:b="http://www4.clikpic.com/amandanield/images";break}switch(a){case 19:b="http://www5.clikpic.com/amandanield/images";break}switch(a){case 31:b="http://www7.clikpic.com/amandanield/images";break}switch(a){case 32:b="http://admin2.clikpic.com/amandanield/images";break}switch(a){case 33:b="http://www8.clikpic.com/amandanield/images";break}switch(a){case 34:b="http://www9.clikpic.com/amandanield/images";break}switch(a){case 35:b="http://admin3.clikpic.com/amandanield/images";break}switch(a){case 37:b="http://admin4.clikpic.com/amandanield/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="amandanield.co.uk: "+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="AMANDANIELD">';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+'")'})}}};