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[1939648]=new thumbnail(1939648,"","conquistador of the useless","conquistador of the useless_thumb.jpg",130,162,1);thumbnails[2305205]=new thumbnail(2305205,"150837","","greg_thumb.jpg",130,130,1);thumbnails[2305216]=new thumbnail(2305216,"150837","","hans-barlocher_thumb.jpg",130,132,1);thumbnails[2305217]=new thumbnail(2305217,"150837","","ludo_thumb.jpg",130,126,1);thumbnails[2305218]=new thumbnail(2305218,"150837","","martin_thumb.jpg",130,163,1);thumbnails[2305219]=new thumbnail(2305219,"150837","","P1020020_thumb.jpg",130,131,1);thumbnails[2305222]=new thumbnail(2305222,"150837","","the-harben-boys_thumb.jpg",130,130,1);thumbnails[2305230]=new thumbnail(2305230,"150837","","portrait29_thumb.jpg",130,91,1);thumbnails[1910819]=new thumbnail(1910819,"284731","becca smith","beccasmith_thumb.jpg",130,173,1);thumbnails[1910825]=new thumbnail(1910825,"284731","clare johnson","clarejohnson_thumb.jpg",130,117,1);thumbnails[1910842]=new thumbnail(1910842,"284731","sir peter blake","sirpeterblake_thumb.jpg",130,195,1);thumbnails[1998065]=new thumbnail(1998065,"284731","jonathan anderson","richard with machine gun 1920a_thumb.jpg",130,130,1);thumbnails[3103690]=new thumbnail(3103690,"284731","natalie orme","DSC_0044_thumb.JPG",130,186,1);thumbnails[3103703]=new thumbnail(3103703,"284731","nick romeril","DSC_0033_thumb.JPG",130,132,1);thumbnails[3103717]=new thumbnail(3103717,"284731","marit ammerud","DSC_0053_thumb.JPG",130,134,1);thumbnails[5027611]=new thumbnail(5027611,"284731","","xmas_show_200912_thumb.jpg",130,77,1);thumbnails[5033933]=new thumbnail(5033933,"284731","marit ammerud","marit01_thumb.jpg",130,116,1);thumbnails[5047934]=new thumbnail(5047934,"284731","Ruth Dupre","Ruth_Dupre1_thumb.jpg",130,87,1);thumbnails[5109337]=new thumbnail(5109337,"284731","Paul McNeill","dung_thumb.jpg",130,125,1);thumbnails[5109339]=new thumbnail(5109339,"284731","Hugh Knaggs","hugh_thumb.jpg",130,148,1);thumbnails[5110112]=new thumbnail(5110112,"284731","stuart shearer","stuart_thumb.jpg",130,33,1);thumbnails[5127253]=new thumbnail(5127253,"284731","Paul John Kilshaw","3_CIMG2757_thumb.jpg",130,187,1);thumbnails[5127264]=new thumbnail(5127264,"284731","Graham Tovey","graham_tovey_thumb.jpg",130,125,1);thumbnails[5187453]=new thumbnail(5187453,"284731","ray banks","banks_thumb.jpg",130,101,1);thumbnails[5187456]=new thumbnail(5187456,"284731","jonathan chapman","chapman_thumb.jpg",130,131,1);thumbnails[5187458]=new thumbnail(5187458,"284731","sam gorman","gorman_thumb.jpg",130,179,1);thumbnails[5187461]=new thumbnail(5187461,"284731","susan gunn","gunn_thumb.jpg",130,164,1);thumbnails[5187464]=new thumbnail(5187464,"284731","jane hall","hall_thumb.jpg",130,94,1);thumbnails[5187467]=new thumbnail(5187467,"284731","hilario happisburgh","happisburgh_thumb.jpg",130,129,1);thumbnails[5187470]=new thumbnail(5187470,"284731","natalie lang","lang_thumb.jpg",130,98,1);thumbnails[5187472]=new thumbnail(5187472,"284731","loukas morley","morley_thumb.jpg",130,115,1);thumbnails[5187476]=new thumbnail(5187476,"284731","peter williams","williams_thumb.jpg",130,174,1);thumbnails[3614429]=new thumbnail(3614429,"221153","Dancers with Coloured Checkerboard","jk01_thumb.jpg",130,144,1);thumbnails[3614433]=new thumbnail(3614433,"221153","Dancer with a Boy on a Pedestal","jk03_thumb.jpg",130,138,1);thumbnails[3760661]=new thumbnail(3760661,"221153","Girl with White Horse","jkGirl_with_White_Horse1_thumb.jpg",130,129,1);thumbnails[3760672]=new thumbnail(3760672,"221153","Playful Mind","jkPlayful_Mind_thumb.jpg",130,156,1);thumbnails[1910827]=new thumbnail(1910827,"127989","danielle spelman","daniellespelman1_thumb.jpg",130,194,1);thumbnails[1910832]=new thumbnail(1910832,"127989","duncan reekie","duncanreekie_thumb.JPG",130,130,1);thumbnails[1939686]=new thumbnail(1939686,"127989","solomia zoumaras","cup_thumb.jpg",130,195,1);thumbnails[3103692]=new thumbnail(3103692,"127989","keith webber","DSC_0015_thumb.JPG",130,91,1);thumbnails[3103694]=new thumbnail(3103694,"127989","paul mcneill","DSC_0005_thumb.JPG",130,102,1);thumbnails[3103701]=new thumbnail(3103701,"127989","ty lawer","DSC_0038_thumb.JPG",130,187,1);thumbnails[3103714]=new thumbnail(3103714,"127989","mark jessett","DSC_0052_thumb.JPG",130,127,1);thumbnails[3103726]=new thumbnail(3103726,"127989","","right wall_thumb.jpg",130,87,1);thumbnails[3103728]=new thumbnail(3103728,"127989","","DSC_0055_thumb.JPG",130,87,1);thumbnails[3224339]=new thumbnail(3224339,"127989","gareth hawker","IMG_0099_thumb.jpg",130,195,1);thumbnails[3224353]=new thumbnail(3224353,"127989","leif ahnland","leif_thumb.jpg",130,92,1);thumbnails[2876133]=new thumbnail(2876133,"127991","contemplating eternity","Contemplating Eternity_thumb.jpg",129,151,1);thumbnails[2876134]=new thumbnail(2876134,"127991","beatific nude","Beatific Nude_thumb.jpg",129,79,1);thumbnails[2876136]=new thumbnail(2876136,"127991","mum","Mum_thumb.jpg",130,171,1);thumbnails[2876137]=new thumbnail(2876137,"127991","falling nude","Falling Nude_thumb.jpg",129,119,1);thumbnails[2305568]=new thumbnail(2305568,"128243","white chair - wright","Simon-Wright-3_thumb.jpg",130,174,1);thumbnails[2689304]=new thumbnail(2689304,"128243","insidefrontside 2 - shearer","Insidefrontside 2 (2008)_thumb.JPG",130,132,1);thumbnails[2695564]=new thumbnail(2695564,"128243","machine for living in - wright","'Machine_For_Living_In'_2008_Oil_on_Linen_(61x61cm)_thumb.jpg",130,131,1);thumbnails[3103548]=new thumbnail(3103548,"128243","zugzwang - shearer","Zugzwang_thumb.JPG",130,188,1);thumbnails[2431015]=new thumbnail(2431015,"127987","me and you","me and you web_thumb.jpg",130,161,1);thumbnails[2431016]=new thumbnail(2431016,"127987","other half","other half web_thumb.jpg",130,39,1);thumbnails[2431055]=new thumbnail(2431055,"127987","tree time","tree web1_thumb.jpg",130,183,1);thumbnails[2432422]=new thumbnail(2432422,"127987","tree","tree 2 web_thumb.jpg",130,174,1);thumbnails[2430791]=new thumbnail(2430791,"127976","a suitor giving a bouquet of flowers","Img0020_thumb.jpg",130,203,1);thumbnails[2430904]=new thumbnail(2430904,"127976","a clown with a caramel","DSC_0008_thumb.JPG",130,219,1);thumbnails[2430928]=new thumbnail(2430928,"127976","norwich notes no.10<br>\r\nst martin's at palace church, from the bishop's palace, night-rain","DSC_0014_thumb.JPG",130,95,1);thumbnails[2431003]=new thumbnail(2431003,"127976","owl in the moonlight","Img0012_thumb.jpg",130,177,1);thumbnails[2293771]=new thumbnail(2293771,"128597","a nicer place 100x140cm","A Nicer Place_thumb.JPG",130,87,1);thumbnails[2294247]=new thumbnail(2294247,"128597","cader 70x100cm","cader_thumb.jpg",130,90,1);thumbnails[2308980]=new thumbnail(2308980,"128597","path of neptune 30x30cm","path of neptune_thumb.JPG",130,130,1);thumbnails[2308981]=new thumbnail(2308981,"128597","norfolk location study 20x20cm","norf location study_thumb.JPG",130,131,1);thumbnails[2151730]=new thumbnail(2151730,"127975","busy number","busy number_thumb.JPG",130,113,1);thumbnails[2151738]=new thumbnail(2151738,"127975","holkham","holkham_thumb.JPG",130,105,1);thumbnails[2151773]=new thumbnail(2151773,"127975","yeah","yeah_thumb.JPG",130,111,1);thumbnails[2151775]=new thumbnail(2151775,"127975","you don't know","you dont know_thumb.JPG",130,129,1);thumbnails[1992945]=new thumbnail(1992945,"127972","deck chairs. cole","deck chairs_thumb.jpg",130,100,1);thumbnails[2130222]=new thumbnail(2130222,"127972","primary destination A11. cole","primary destination A11_thumb.jpg",130,99,1);thumbnails[2130228]=new thumbnail(2130228,"127972","rain on the marshes. carter","rain on the marshes_thumb.jpg",130,130,1);thumbnails[2130309]=new thumbnail(2130309,"127972","after constable VI. carter","after constable VI_thumb.jpg",130,108,1);thumbnails[1912098]=new thumbnail(1912098,"127969","this is not a toy","This is not a toy_thumb.jpg",130,200,1);thumbnails[2045918]=new thumbnail(2045918,"127969","firm pressure from the centre","Firm pressure from the centre(103x67cm)_thumb.jpg",130,87,1);thumbnails[2045919]=new thumbnail(2045919,"127969","head right to the bottom","Head right to the bottom(68x104cm)_thumb.jpg",130,197,1);thumbnails[2045932]=new thumbnail(2045932,"127969","the tony blair years (girls fighting)","The Tony Blair years (Girls fighting)(60x66cm)_thumb.jpg",130,141,1);thumbnails[1908600]=new thumbnail(1908600,"127488","endgame - SOLD","Endgame_thumb.JPG",130,87,1);thumbnails[1908613]=new thumbnail(1908613,"127488","third policeman","ThirdPoliceman_thumb.JPG",130,114,1);thumbnails[1908617]=new thumbnail(1908617,"127488","valve","Valve_thumb.JPG",130,161,1);thumbnails[1914088]=new thumbnail(1914088,"127488","thinking out loud","03 thinking out loud a_thumb.jpg",130,79,1);thumbnails[1910872]=new thumbnail(1910872,"127482","conspicuous consumption","conspicuousconsumption120x100aonc_thumb.jpg",130,90,1);thumbnails[1910873]=new thumbnail(1910873,"127482","pedal power","pedalpower120x100aonc_thumb.jpg",130,107,1);thumbnails[1910874]=new thumbnail(1910874,"127482","retirement by the sea","retirementbythesea120x100aonc_thumb.jpg",130,97,1);thumbnails[1910878]=new thumbnail(1910878,"127482","tate trees","tatetrees120x100aonc_thumb.jpg",130,109,1);thumbnails[1910863]=new thumbnail(1910863,"127481","blue black flowers - SOLD","BlueBlackFlowers_thumb.jpg",130,221,1);thumbnails[1910865]=new thumbnail(1910865,"127481","blue man - SOLD","BlueMan_thumb.jpg",130,157,1);thumbnails[1910867]=new thumbnail(1910867,"127481","crazy spot - SOLD","CrazySpot_thumb.jpg",130,124,1);thumbnails[1910869]=new thumbnail(1910869,"127481","first square flowers - SOLD","firstsquareflowers_thumb.jpg",130,128,1);thumbnails[1910837]=new thumbnail(1910837,"127480","matt sellars","mattsellars_thumb.JPG",130,87,1);thumbnails[1910838]=new thumbnail(1910838,"127480","paul mcneill","paulmcneill_thumb.jpg",130,103,1);thumbnails[1910840]=new thumbnail(1910840,"127480","simon carter","simoncarter_thumb.JPG",130,108,1);thumbnails[1910841]=new thumbnail(1910841,"127480","simon m smith","simonmsmith_thumb.JPG",130,163,1);thumbnails[1908874]=new thumbnail(1908874,"127479","blue guitar","BlueGuitar_thumb.jpg",130,183,1);thumbnails[1908879]=new thumbnail(1908879,"127479","king agamemnon's clarion call","kingag_thumb.jpg",130,190,1);thumbnails[1908888]=new thumbnail(1908888,"127479","odyseus the resourceful","OdyseustheResourceful_thumb.jpg",130,183,1);thumbnails[1908897]=new thumbnail(1908897,"127479","the ploughman","ThePloughman_thumb.jpg",130,188,1);thumbnails[1910887]=new thumbnail(1910887,"127478","beach huts","beachhuts2004_thumb.jpg",130,122,1);thumbnails[1910891]=new thumbnail(1910891,"127478","fire and willow","FirandWillow,2005_thumb.Acryliconpaper,90x100cm.jpg",130,115,1);thumbnails[1910893]=new thumbnail(1910893,"127478","sandy hook","sandyhook2005_thumb.JPG",130,110,1);thumbnails[1910897]=new thumbnail(1910897,"127478","trawler","trawler2006_thumb.JPG",130,124,1);thumbnails[1910904]=new thumbnail(1910904,"127483","april storm","Brownno8_thumb.jpg",130,98,1);thumbnails[1910905]=new thumbnail(1910905,"127483","blue eden","IMG_1433_thumb.jpg",130,82,1);thumbnails[1910906]=new thumbnail(1910906,"127483","earth made of chaos and old night","IMG_1437_thumb.jpg",130,48,1);thumbnails[1910908]=new thumbnail(1910908,"127483","forgotten land","IMG_1493_thumb.jpg",130,108,1);thumbnails[1908908]=new thumbnail(1908908,"127487","ship of fools","1_thumb.JPG",130,135,1);thumbnails[1910913]=new thumbnail(1910913,"127487","boxted oak","6_thumb.JPG",130,176,1);thumbnails[1910916]=new thumbnail(1910916,"127487","hollywood bowl","16_thumb.JPG",130,129,1);thumbnails[1910917]=new thumbnail(1910917,"127487","sacre coeur","20_thumb.JPG",130,175,1);thumbnails[1901686]=new thumbnail(1901686,"126845","intersect","intersect_thumb.jpg",130,118,1);thumbnails[1901752]=new thumbnail(1901752,"126845","dissipate","dissipate_thumb.jpg",130,94,1);thumbnails[1901761]=new thumbnail(1901761,"126845","site","site_thumb.jpg",130,104,1);thumbnails[1901763]=new thumbnail(1901763,"126845","vieling","veiling02-03_thumb.JPG",130,95,1);thumbnails[1915215]=new thumbnail(1915215,"126844","rame, cornwall","hh1256_thumb.jpg",130,101,1);thumbnails[1923210]=new thumbnail(1923210,"126844","before the turn","Before the Turn_thumb.jpg",130,104,1);thumbnails[1923211]=new thumbnail(1923211,"126844","flatland","flatland_thumb.jpg",130,97,1);thumbnails[1923212]=new thumbnail(1923212,"126844","then and zen","then and zen_thumb.jpg",130,65,1);var galleries=new Object();galleries[150837]=new gallery(150837,"2305230,2305222,2305219,2305218,2305217,2305216,2305205","portraits by jason butler","section193009",[2305205,2305216,2305217,2305218,2305219,2305222,2305230]);galleries[284731]=new gallery(284731,"5027611","nov & dec 09 xmas show","gallery",[1910819,1910825,1910842,1998065,3103690,3103703,3103717,5027611,5033933,5047934,5109337,5109339,5110112,5127253,5127264,5187453,5187456,5187458,5187461,5187464,5187467,5187470,5187472,5187476]);galleries[221153]=new gallery(221153,"3614429","april & may 09 john kiki","gallery",[3614429,3614433,3760661,3760672]);galleries[127989]=new gallery(127989,"1939686,1910827","nov & dec 08 xmas show","gallery",[1910827,1910832,1939686,3103692,3103694,3103701,3103714,3103726,3103728,3224339,3224353]);galleries[127991]=new gallery(127991,"2876137,2876136,2876134,2876133","oct 08 bruer tidman","gallery",[2876133,2876134,2876136,2876137]);galleries[128243]=new gallery(128243,"2305568","sept 08 s. wright & s. shearer","gallery",[2305568,2689304,2695564,3103548]);galleries[127987]=new gallery(127987,"2431055","aug 08 devi singh","gallery",[2431015,2431016,2431055,2432422]);galleries[127976]=new gallery(127976,"2431003,2430928,2430904,2430791","july 08 colin self","gallery",[2430791,2430904,2430928,2431003]);galleries[128597]=new gallery(128597,"2308981,2308980,2294247,2293771","june 08 garry raymond-pereira","gallery",[2293771,2294247,2308980,2308981]);galleries[127975]=new gallery(127975,"2151773","june 08 derek woolston","gallery",[2151730,2151738,2151773,2151775]);galleries[127972]=new gallery(127972,"2130309,2130228,2130222,1992945","may 08 cole & carter","gallery",[1992945,2130222,2130228,2130309]);galleries[127969]=new gallery(127969,"2045932,2045919,2045918,1912098","april 08 scott poulson","gallery",[1912098,2045918,2045919,2045932]);galleries[127488]=new gallery(127488,"1908600","march 08 jack crampton","gallery",[1908600,1908613,1908617,1914088]);galleries[127482]=new gallery(127482,"1910874","feb 08 rosie greenhalgh","gallery",[1910872,1910873,1910874,1910878]);galleries[127481]=new gallery(127481,"1910865","jan 08 oliver shaw","gallery",[1910863,1910865,1910867,1910869]);galleries[127480]=new gallery(127480,"1910841,1910840,1910838,1910837","dec 07 mixed show","gallery",[1910837,1910838,1910840,1910841]);galleries[127479]=new gallery(127479,"1908879","oct 07 colin self ","gallery",[1908874,1908879,1908888,1908897]);galleries[127478]=new gallery(127478,"1910897,1910893,1910891,1910887","sept 07 simon carter ","gallery",[1910887,1910891,1910893,1910897]);galleries[127483]=new gallery(127483,"1910908","aug 07 katy brown","gallery",[1910904,1910905,1910906,1910908]);galleries[127487]=new gallery(127487,"1908908","july 07 david trenow","gallery",[1908908,1910913,1910916,1910917]);galleries[126845]=new gallery(126845,"1901686","june 07 andrew vass","gallery",[1901686,1901752,1901761,1901763]);galleries[126844]=new gallery(126844,"1923211","may 07 heath hearn","gallery",[1915215,1923210,1923211,1923212]);var imageSets=new Object();imageSets[1]="5027611";imageSets[2]="5027611,3614429,2431055,2305568,2151773,1939686,1923211,1910908,1910874,1910865,1910827,1908908,1908879,1908600,1901686";imageSets[3]="5187476,5187472,5187470,5187467,5187464,5187461,5187458,5187456,5187453,5127264,5127253,5110112,5109339,5109337,5047934,5033933,5027611,3760672,3760661,3614433,3614429,3224353,3224339,3103728,3103726,3103717,3103714,3103703,3103701,3103694,3103692,3103690,3103548,2876137,2876136,2876134,2876133,2695564,2689304,2432422,2431055,2431016,2431015,2431003,2430928,2430904,2430791,2308981,2308980,2305568";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 34:b="http://www9.clikpic.com/horaceblue/images";break}switch(a){case 1:b="http://www1.clikpic.com/horaceblue/images";break}switch(a){case 2:b="http://admin.clikpic.com/horaceblue/images";break}switch(a){case 4:b="http://www.clikchurch.com/horaceblue/images";break}switch(a){case 5:b="http://www2.clikpic.com/horaceblue/images";break}switch(a){case 15:b="http://www3.clikpic.com/horaceblue/images";break}switch(a){case 21:b="http://www6.clikpic.com/horaceblue/images";break}switch(a){case 18:b="http://www4.clikpic.com/horaceblue/images";break}switch(a){case 19:b="http://www5.clikpic.com/horaceblue/images";break}switch(a){case 22:b="http://tpc5/clikpic/horaceblue/images";break}switch(a){case 23:b="http://tpc10/clikpic/horaceblue/images";break}switch(a){case 24:b="http://tpc15/clikpic/horaceblue/images";break}switch(a){case 25:b="http://tpc16/clikpic/horaceblue/images";break}switch(a){case 31:b="http://www7.clikpic.com/horaceblue/images";break}switch(a){case 32:b="http://admin2.clikpic.com/horaceblue/images";break}switch(a){case 33:b="http://www8.clikpic.com/horaceblue/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="horace blue : "+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+'")'})}}};