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[408669]=new thumbnail(408669,"","not for sale","GirlMarketWatercolourLow1_thumb.jpg",83,130,1);thumbnails[1651317]=new thumbnail(1651317,"","","Iain May 2007_thumb.jpg",99,130,1);thumbnails[4620046]=new thumbnail(4620046,"","sold","Cows_1_thumb.jpg",130,108,1);thumbnails[3234142]=new thumbnail(3234142,"349813","sold","IMG_1750_thumb.jpg",103,130,1);thumbnails[5831727]=new thumbnail(5831727,"","","Iain_Vellacott_2_thumb.jpg",130,127,1);thumbnails[6071010]=new thumbnail(6071010,"349813","","DSCF1193_thumb.JPG",130,66,1);thumbnails[5564973]=new thumbnail(5564973,"335200","sold","IMG_9436_MED_thumb.jpg",100,130,1);thumbnails[3825466]=new thumbnail(3825466,"340898","sold","IMG_4113Med_thumb.jpg",130,65,1);thumbnails[5831669]=new thumbnail(5831669,"349813","sold","Kingsgate_Street_South_Med_thumb.jpg",130,64,1);thumbnails[5871672]=new thumbnail(5871672,"349813","sold","OTH_HOT_B2_crop_thumb.jpg",130,65,1);thumbnails[3139848]=new thumbnail(3139848,"340898","sold","IMG_1327Med_thumb.jpg",130,96,1);thumbnails[5564974]=new thumbnail(5564974,"349813","sold","Bogles_on_Kingsgate_Street_MED_thumb.jpg",130,65,1);thumbnails[3486074]=new thumbnail(3486074,"335200","sold","IMG_3014_thumb.jpg",130,98,1);thumbnails[5458292]=new thumbnail(5458292,"349813","sold","IMG_9935bMED_thumb.jpg",130,51,1);thumbnails[4872266]=new thumbnail(4872266,"349813","sold","IMG_9241med_thumb.jpg",130,64,1);thumbnails[1848963]=new thumbnail(1848963,"349813","sold","IMG_1446_thumb.jpg",130,98,1);thumbnails[4872262]=new thumbnail(4872262,"335200","sold","IMG_9400medb_thumb.jpg",130,51,1);thumbnails[2011776]=new thumbnail(2011776,"340898","sold","IMG_1659_thumb.jpg",130,98,1);thumbnails[3139845]=new thumbnail(3139845,"349813","sold","IMG_1288Med_thumb.jpg",130,92,1);thumbnails[3352559]=new thumbnail(3352559,"340898","sold","IMG_2668med_thumb.jpg",130,129,1);thumbnails[5564975]=new thumbnail(5564975,"335200","sold","IMG_0232_MED_thumb.jpg",130,130,1);thumbnails[1911366]=new thumbnail(1911366,"340898","sold","What Next by Iain Vellacott_thumb.jpg",130,96,1);thumbnails[5564977]=new thumbnail(5564977,"335200","sold","IMG_0065_MED_thumb.jpg",130,65,1);thumbnails[5564978]=new thumbnail(5564978,"349813","sold","IMG_9889b_MED_thumb.jpg",130,65,1);thumbnails[3090096]=new thumbnail(3090096,"340898","sold","IMG_1328Med_thumb.jpg",130,100,1);thumbnails[5355373]=new thumbnail(5355373,"335200","sold","Winchester_Football_MED_thumb.jpg",130,65,1);thumbnails[5564980]=new thumbnail(5564980,"335200","sold","IMG_0083_MED_thumb.jpg",130,43,1);thumbnails[5564983]=new thumbnail(5564983,"335200","sold","IMG_0174_MED_thumb.jpg",130,81,1);thumbnails[2928345]=new thumbnail(2928345,"340898","sold","IMG_1301med_thumb.jpg",130,90,1);thumbnails[5564984]=new thumbnail(5564984,"335200","sold","IMG_9870_MED_thumb.jpg",130,130,1);thumbnails[4872272]=new thumbnail(4872272,"335200","sold","IMG_8504med_thumb.jpg",130,93,1);thumbnails[5564986]=new thumbnail(5564986,"335200","sold","IMG_0260b_MED_thumb.jpg",130,80,1);thumbnails[5564987]=new thumbnail(5564987,"335200","sold","IMG_0159_BB_MED_thumb.jpg",130,65,1);thumbnails[5564990]=new thumbnail(5564990,"335200","sold","IMG_9449_MED_thumb.jpg",109,130,1);thumbnails[5458319]=new thumbnail(5458319,"335200","sold","IMG_9923MED_thumb.jpg",130,130,1);thumbnails[4872264]=new thumbnail(4872264,"335200","sold","IMG_0038MED_thumb.jpg",130,64,1);thumbnails[2030941]=new thumbnail(2030941,"","","IMG_1670_thumb.jpg",130,99,1);thumbnails[2507695]=new thumbnail(2507695,"340898","sold","IMG_5251low_thumb.jpg",130,65,1);thumbnails[3934206]=new thumbnail(3934206,"349813","sold","IMG_4630med_thumb.jpg",105,130,1);thumbnails[5457739]=new thumbnail(5457739,"349813","sold","After_Chapel_MED_thumb.jpg",130,130,1);thumbnails[5564992]=new thumbnail(5564992,"335200","sold","IMG_9977_MED_thumb.jpg",130,99,1);thumbnails[2011800]=new thumbnail(2011800,"340898","sold","IMG_3777_thumb.jpg",97,130,1);thumbnails[5564994]=new thumbnail(5564994,"335200","sold","IMG_0118b_MED_thumb.jpg",130,65,1);thumbnails[4872261]=new thumbnail(4872261,"335200","sold","IMG_9411bmed_thumb.jpg",130,65,1);thumbnails[1089870]=new thumbnail(1089870,"340898","sold","fiesta 2 final 3_thumb.jpg",130,93,1);thumbnails[5564999]=new thumbnail(5564999,"335200","sold","IMG_0076b_MED_thumb.jpg",130,43,1);thumbnails[1028271]=new thumbnail(1028271,"349813","sold","Facteur Final 2_thumb.jpg",130,99,1);thumbnails[4141353]=new thumbnail(4141353,"340898","sold","IMG_4130Med_thumb.jpg",130,65,1);thumbnails[5565000]=new thumbnail(5565000,"","sold","IMG_0201_MED_thumb.jpg",130,98,1);thumbnails[3385063]=new thumbnail(3385063,"335200","sold","IMG_2793Med_thumb.jpg",130,65,1);thumbnails[4872263]=new thumbnail(4872263,"335200","sold","IMG_9406med_thumb.jpg",130,65,1);thumbnails[3139846]=new thumbnail(3139846,"","","IMG_1316Med_thumb.jpg",130,90,1);thumbnails[3934544]=new thumbnail(3934544,"335200","sold","IMG_4405Med_thumb.jpg",130,80,1);thumbnails[5565005]=new thumbnail(5565005,"","","AND_ONE_WALL_2_thumb.jpg",130,130,1);thumbnails[1816063]=new thumbnail(1816063,"","","IMG_1157_thumb.jpg",130,64,1);thumbnails[3934202]=new thumbnail(3934202,"349813","sold","IMG_4629Med_thumb.jpg",130,94,1);thumbnails[2507691]=new thumbnail(2507691,"349813","sold","IMG_5242low_thumb.jpg",130,99,1);thumbnails[841560]=new thumbnail(841560,"340898","sold","Potting Shed Working 2_thumb.jpg",130,97,1);thumbnails[1789269]=new thumbnail(1789269,"340898","sold","IMG_1115_thumb.jpg",130,64,1);thumbnails[1825429]=new thumbnail(1825429,"","","IMG_1208_thumb.jpg",130,89,1);thumbnails[5569427]=new thumbnail(5569427,"340898","sold","IMG_3888_MED_thumb.jpg",130,130,1);thumbnails[5658312]=new thumbnail(5658312,"340898","sold","IMG_3276-1_thumb.JPG",130,94,1);thumbnails[1853178]=new thumbnail(1853178,"","","IMG_1464_thumb.jpg",108,130,1);thumbnails[3639813]=new thumbnail(3639813,"340898","sold","IMG_3250Med_thumb.jpg",130,65,1);thumbnails[5569378]=new thumbnail(5569378,"","sold","cows2_MED2_thumb.jpg",130,65,1);thumbnails[1816064]=new thumbnail(1816064,"","","IMG_1151_thumb.jpg",130,89,1);thumbnails[1757778]=new thumbnail(1757778,"","","IMG_0886_thumb.jpg",130,96,1);thumbnails[2030643]=new thumbnail(2030643,"340898","sold","IMG_1688_thumb.jpg",107,130,1);thumbnails[771885]=new thumbnail(771885,"340898","sold","Paella Final 3 Low_thumb.jpg",130,98,1);thumbnails[1772203]=new thumbnail(1772203,"","","IMG_0874_thumb.jpg",130,92,1);thumbnails[1458756]=new thumbnail(1458756,"","","IMG_0896_thumb.jpg",130,96,1);thumbnails[1625744]=new thumbnail(1625744,"","","IMG_0311_NEW_thumb.jpg",130,100,1);thumbnails[964128]=new thumbnail(964128,"340898","sold","Pink boots in the snow_thumb.jpg",130,95,1);thumbnails[951939]=new thumbnail(951939,"","","Umbrella in Market_thumb.jpg",107,130,1);thumbnails[951938]=new thumbnail(951938,"340898","sold","IMG_5113_thumb.JPG",108,130,1);thumbnails[956713]=new thumbnail(956713,"340898","sold","Cockerel Final Med_thumb.jpg",130,86,1);thumbnails[2011771]=new thumbnail(2011771,"340898","sold","IMG_1658_thumb.jpg",130,65,1);thumbnails[936407]=new thumbnail(936407,"340898","sold","IMG_02801_thumb.jpg",130,105,1);thumbnails[2225002]=new thumbnail(2225002,"349813","sold","IMG_3750_thumb.jpg",130,99,1);thumbnails[2225391]=new thumbnail(2225391,"","","IMG_3529_thumb.jpg",130,89,1);thumbnails[2225383]=new thumbnail(2225383,"","","IMG_4140Med_thumb.jpg",130,65,1);thumbnails[2256387]=new thumbnail(2256387,"","","IMG_4119Med_thumb.jpg",130,65,1);thumbnails[5831702]=new thumbnail(5831702,"61203","","IMG_1095med_thumb.jpg",130,65,1);thumbnails[2030633]=new thumbnail(2030633,"61203","","IMG_17001_thumb.jpg",130,65,1);thumbnails[1776070]=new thumbnail(1776070,"61203","sold","IMG_0903_thumb.jpg",130,64,1);thumbnails[736430]=new thumbnail(736430,"61203","sold","Breakfast in the Market Final Low_thumb.jpg",130,103,1);thumbnails[730288]=new thumbnail(730288,"61203","sold","Washing Low_thumb.jpg",130,100,1);thumbnails[637425]=new thumbnail(637425,"61203","sold","Le Journal_thumb.JPG",98,130,1);thumbnails[949835]=new thumbnail(949835,"61203","sold","Cathedral Avenue_thumb.JPG",86,130,1);thumbnails[713407]=new thumbnail(713407,"61203","sold","CafegirlFinal 2_thumb.jpg",108,130,1);thumbnails[1007970]=new thumbnail(1007970,"61203","sold","Playing in Wave_thumb.jpg",130,94,1);thumbnails[2928346]=new thumbnail(2928346,"61203","sold","IMG_8666low_thumb.jpg",130,64,1);thumbnails[2030702]=new thumbnail(2030702,"61203","sold","IMG_1684_thumb.jpg",130,95,1);thumbnails[2130037]=new thumbnail(2130037,"61203","sold","Skimmers_thumb.jpg",130,90,1);thumbnails[713408]=new thumbnail(713408,"61203","sold","Waiter Final 2 Low_thumb.jpg",110,130,1);thumbnails[1757776]=new thumbnail(1757776,"61203","sold","IMG_0906_thumb.jpg",107,130,1);thumbnails[440870]=new thumbnail(440870,"61203","sold","Queenwoodfinal imp_thumb.jpg",130,97,1);thumbnails[390698]=new thumbnail(390698,"61203","sold","FetedelaMusic160_thumb.JPG",130,106,1);thumbnails[390707]=new thumbnail(390707,"61203","sold","Soreze160_thumb.JPG",130,111,1);thumbnails[1625747]=new thumbnail(1625747,"61203","sold","IMG_0295_thumb.jpg",130,89,1);thumbnails[2225404]=new thumbnail(2225404,"61203","sold","IMG_1637_thumb.jpg",130,64,1);thumbnails[2933633]=new thumbnail(2933633,"61203","","IMG_9219low_thumb.jpg",130,94,1);thumbnails[916209]=new thumbnail(916209,"61203","sold","Cows_thumb.jpg",130,108,1);thumbnails[1458765]=new thumbnail(1458765,"61203","sold","IMG_0255_thumb.jpg",130,92,1);thumbnails[390702]=new thumbnail(390702,"61203","sold","Revelcafesociety160_thumb.JPG",130,99,1);thumbnails[1459049]=new thumbnail(1459049,"61203","sold","Uncle Frank 4_thumb.jpg",91,130,1);thumbnails[2225402]=new thumbnail(2225402,"61203","sold","IMG_3772_thumb.jpg",64,130,1);thumbnails[2255657]=new thumbnail(2255657,"61203","sold","IMG_3953low_thumb.jpg",130,80,1);thumbnails[6071027]=new thumbnail(6071027,"335199","","DSCF1186b_Med_thumb.jpg",130,66,1);thumbnails[6070987]=new thumbnail(6070987,"335199","","Boules_Players_by_Iain_Vellacott_Med_thumb.jpg",130,67,1);thumbnails[6286713]=new thumbnail(6286713,"335199","","IMG_0159Med_thumb.jpg",130,90,1);thumbnails[5831699]=new thumbnail(5831699,"335199","","IMG_1083_med_thumb.jpg",104,130,1);thumbnails[5940767]=new thumbnail(5940767,"335199","","IMG_1095med_877121DC-24E8-5EC4-4F20CE377A8A4671_thumb.jpg",130,65,1);thumbnails[3234148]=new thumbnail(3234148,"335199","","IMG_1518Med_thumb.jpg",130,91,1);thumbnails[2182999]=new thumbnail(2182999,"335199","","IMG_3765_thumb.jpg",130,129,1);thumbnails[3090094]=new thumbnail(3090094,"335199","","IMG_1299Med_thumb.jpg",130,84,1);thumbnails[4141368]=new thumbnail(4141368,"335199","","IMG_2893Med_thumb.jpg",107,130,1);thumbnails[2933637]=new thumbnail(2933637,"335199","","IMG_1319Med_thumb.jpg",130,102,1);thumbnails[3294935]=new thumbnail(3294935,"335199","","IMG_2105Med_thumb.jpg",130,85,1);thumbnails[1848966]=new thumbnail(1848966,"335199","","IMG_1447_thumb.jpg",130,107,1);thumbnails[1243292]=new thumbnail(1243292,"335199","","La Revolution 2_thumb.jpg",130,98,1);thumbnails[3825234]=new thumbnail(3825234,"335199","","IMG_4114Med_thumb.jpg",130,64,1);thumbnails[5569390]=new thumbnail(5569390,"335199","","IMG_3948_MED_thumb.jpg",130,94,1);thumbnails[3090092]=new thumbnail(3090092,"335199","","IMG_1311Med_thumb.jpg",130,65,1);thumbnails[3139838]=new thumbnail(3139838,"335199","","IMG_1293low_thumb.jpg",130,129,1);thumbnails[3295036]=new thumbnail(3295036,"335199","","IMG_2132Med_thumb.jpg",103,130,1);thumbnails[2225401]=new thumbnail(2225401,"335199","","IMG_3755_thumb.jpg",130,94,1);thumbnails[1609004]=new thumbnail(1609004,"335199","","IMG_0306_thumb.jpg",97,130,1);thumbnails[5569423]=new thumbnail(5569423,"335199","","IMG_2951_MED_thumb.jpg",130,85,1);thumbnails[4316580]=new thumbnail(4316580,"335199","","IMG_3893_Med_thumb.jpg",97,130,1);thumbnails[3934429]=new thumbnail(3934429,"335199","","IMG_4398Med_thumb.jpg",130,91,1);thumbnails[2225246]=new thumbnail(2225246,"335199","","IMG_3555_thumb.jpg",130,130,1);thumbnails[5940723]=new thumbnail(5940723,"315681","","Chapel_Choir_by_Iain_Vellacott_Med_thumb.jpg",130,98,1);thumbnails[5564972]=new thumbnail(5564972,"315681","","IMG_8496_MED_thumb.jpg",97,130,1);thumbnails[6071016]=new thumbnail(6071016,"315681","","DSCF1182c_thumb.jpg",130,65,1);thumbnails[5871802]=new thumbnail(5871802,"315681","","Up_to_Books_by_Iain_Vellacott_Med_thumb.jpg",130,93,1);thumbnails[4317355]=new thumbnail(4317355,"315681","","IMG_8302_Med_thumb.jpg",130,93,1);thumbnails[5564976]=new thumbnail(5564976,"315681","","IMG_9252_BB_MED_thumb.jpg",130,64,1);thumbnails[5564979]=new thumbnail(5564979,"315681","","IMG_9455_MED_thumb.jpg",130,65,1);thumbnails[5564981]=new thumbnail(5564981,"315681","","IMG_0055_MED_thumb.jpg",130,94,1);thumbnails[5564985]=new thumbnail(5564985,"315681","","IMG_9681b_MED_thumb.jpg",130,85,1);thumbnails[4933451]=new thumbnail(4933451,"315681","","IMG_9461med2_thumb.jpg",130,81,1);thumbnails[4621573]=new thumbnail(4621573,"315681","","IMG_8465_MED_thumb.jpg",92,130,1);thumbnails[5564995]=new thumbnail(5564995,"315681","","IMG_9927_B_MED_thumb.jpg",130,130,1);thumbnails[4889253]=new thumbnail(4889253,"237906","sold","IMG_9241med1_thumb.jpg",130,64,1);thumbnails[5940809]=new thumbnail(5940809,"237906","sold","IMG_1223b_Med_thumb.jpg",130,90,1);thumbnails[6071050]=new thumbnail(6071050,"237906","","DSCF1174_thumb.JPG",130,129,1);thumbnails[2785859]=new thumbnail(2785859,"237906","","IMG_3018_thumb.jpg",130,86,1);thumbnails[1825433]=new thumbnail(1825433,"237906","sold","IMG_1215_thumb.jpg",130,108,1);thumbnails[3555440]=new thumbnail(3555440,"237906","","IMG_3025_thumb.jpg",103,130,1);thumbnails[3555437]=new thumbnail(3555437,"237906","","IMG_3032_thumb.jpg",130,90,1);thumbnails[3295018]=new thumbnail(3295018,"237906","","IMG_2674med_thumb.jpg",100,130,1);thumbnails[855722]=new thumbnail(855722,"237906","","horsesatlake3_thumb.jpg",130,96,1);thumbnails[1331189]=new thumbnail(1331189,"237906","","Icarus_thumb.jpg",130,99,1);thumbnails[1007968]=new thumbnail(1007968,"237906","","IMG_4134Med_thumb.jpg",102,130,1);var galleries=new Object();galleries[247688]=new gallery(247688,"","Galerie Kaye July 2009","section289748",[]);galleries[340898]=new gallery(340898,"964128","General ","section289748",[3825466,3139848,2011776,3352559,1911366,3090096,2928345,2507695,2011800,1089870,4141353,841560,1789269,5569427,5658312,3639813,2030643,771885,964128,951938,956713,2011771,936407]);galleries[349813]=new gallery(349813,"6071010,5871672,5831669,5564978,5564974,5458292,5457739,4872266,3934206,3934202","Recent Sales (selection)","section300256",[3234142,6071010,5831669,5871672,5564974,5458292,4872266,1848963,3139845,5564978,3934206,5457739,1028271,3934202,2507691,2225002]);galleries[146808]=new gallery(146808,"","Revel Exhibition","section188553",[]);galleries[335200]=new gallery(335200,"5564999,5564994,5564992,5564990,5564987,5564986,5564984,5564983,5564980,5564977","Winchester ","section289748",[5564973,3486074,4872262,5564975,5564977,5355373,5564980,5564983,5564984,4872272,5564986,5564987,5564990,5458319,4872264,5564992,5564994,4872261,5564999,3385063,4872263,3934544]);galleries[237076]=new gallery(237076,"","Lincoln Joyce Exhibition","section88980",[]);galleries[61203]=new gallery(61203,"2030633","Gallery","section88979",[5831702,2030633,1776070,736430,730288,637425,949835,713407,1007970,2928346,2030702,2130037,713408,1757776,440870,390698,390707,1625747,2225404,2933633,916209,1458765,390702,1459049,2225402,2255657]);galleries[31667]=new gallery(31667,"","Gallery 2","section188553",[]);galleries[335199]=new gallery(335199,"1848966,1609004","Available Paintings","section401531",[6071027,6070987,6286713,5831699,5940767,3234148,2182999,3090094,4141368,2933637,3294935,1848966,1243292,3825234,5569390,3090092,3139838,3295036,2225401,1609004,5569423,4316580,3934429,2225246]);galleries[238971]=new gallery(238971,"","Winchester College on Canvas","section188553",[]);galleries[315681]=new gallery(315681,"6071016,5940723,5871802,5564995,5564985,5564981,5564979,5564976,5564972,4933451","Winchester College on Canvas","section290947",[5940723,5564972,6071016,5871802,4317355,5564976,5564979,5564981,5564985,4933451,4621573,5564995]);galleries[237906]=new gallery(237906,"6071050,5940809,4889253,3555440,3555437,3295018,2785859,1825433,1331189,1007968","Archive","section289748",[4889253,5940809,6071050,2785859,1825433,3555440,3555437,3295018,855722,1331189,1007968]);var imageSets=new Object();imageSets[1]="6286713,6070987,5831727,5564995,3934544,3295036,3139848,1825433";imageSets[2]="2030633,1848966,1609004,964128";imageSets[3]="4889253,4872266";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/vellacott/images";break}switch(a){case 1:b="http://www1.clikpic.com/vellacott/images";break}switch(a){case 2:b="http://admin.clikpic.com/vellacott/images";break}switch(a){case 24:b="http://tpc15/clikpic/vellacott/images";break}switch(a){case 4:b="http://www.clikchurch.com/vellacott/images";break}switch(a){case 5:b="http://www2.clikpic.com/vellacott/images";break}switch(a){case 22:b="http://tpc5/clikpic/vellacott/images";break}switch(a){case 23:b="http://tpc10/clikpic/vellacott/images";break}switch(a){case 25:b="http://tpc16/clikpic/vellacott/images";break}switch(a){case 15:b="http://www3.clikpic.com/vellacott/images";break}switch(a){case 18:b="http://www4.clikpic.com/vellacott/images";break}switch(a){case 19:b="http://www5.clikpic.com/vellacott/images";break}switch(a){case 31:b="http://www7.clikpic.com/vellacott/images";break}switch(a){case 32:b="http://admin2.clikpic.com/vellacott/images";break}switch(a){case 33:b="http://www8.clikpic.com/vellacott/images";break}switch(a){case 34:b="http://www9.clikpic.com/vellacott/images";break}switch(a){case 35:b="http://admin3.clikpic.com/vellacott/images";break}switch(a){case 37:b="http://admin4.clikpic.com/vellacott/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("section88979"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section88979.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("section88979"!=""){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="Iain Vellacott Paintings: "+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> 				&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="vellacott@wanadoo.fr">';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="vellacott@wanadoo.fr">';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+'")'})}}};