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[1469738]=new thumbnail(1469738,"100974","Poppy fairie","DSCN0711_thumb.jpg",130,173,18);thumbnails[1469762]=new thumbnail(1469762,"100974","Waterfall fairies","IMG_3549_thumb.jpg",130,173,18);thumbnails[1469740]=new thumbnail(1469740,"100974","Lily fairie","DSCN1829_thumb.jpg",130,173,18);thumbnails[2427000]=new thumbnail(2427000,"100974","Autumn fairies","Autumn log fairies copy_thumb.jpg",130,195,18);thumbnails[2427010]=new thumbnail(2427010,"100974","Faerie Queen and her helpers","Faerie Queen and her helpers copy_thumb.jpg",130,182,18);thumbnails[2427017]=new thumbnail(2427017,"100974","Tree faerie","Tree faerie copy_thumb.jpg",130,173,18);thumbnails[1469741]=new thumbnail(1469741,"100974","Fairie in thought","DSCN2651_thumb.jpg",130,173,18);thumbnails[1469757]=new thumbnail(1469757,"100974","Lupin fairie","IMG_2377_thumb.jpg",130,173,18);thumbnails[1469743]=new thumbnail(1469743,"100974","Wood Anemone fairie","DSCN4428_thumb.jpg",130,98,18);thumbnails[2427001]=new thumbnail(2427001,"100974","Daffodil faerie","Daffodil faerie_thumb.jpg",130,93,18);thumbnails[1469744]=new thumbnail(1469744,"100974","Water lily nymph","DSCN4820_thumb.jpg",130,98,18);thumbnails[1469751]=new thumbnail(1469751,"100974","Spring fairie amongst the blooms","DSCN8522_thumb.jpg",130,98,18);thumbnails[1469747]=new thumbnail(1469747,"100974","Fairies playing in the giant water lillies","DSCN4914 _thumb.jpg",130,98,18);thumbnails[2427020]=new thumbnail(2427020,"100974","Wizard in the woods","Wizard in the woods copy_thumb.jpg",130,93,18);thumbnails[1469750]=new thumbnail(1469750,"100974","Bluebell fairies","DSCN6096_thumb.jpg",130,98,18);thumbnails[2427015]=new thumbnail(2427015,"100974","Meeting on the Bridge","Meeting on the bridge copy_thumb.jpg",130,93,18);thumbnails[2427004]=new thumbnail(2427004,"100974","Dragon castle and faerie","Dragon castle and the fairy copy_thumb.jpg",130,83,18);thumbnails[1469753]=new thumbnail(1469753,"100974","Midnight fairies","IMG_1701_thumb.jpg",130,87,18);thumbnails[1469752]=new thumbnail(1469752,"100974","White poppy fairie","DSCN8726_thumb.jpg",130,98,18);thumbnails[2427027]=new thumbnail(2427027,"100974","Wizard returns to his cottage","Wizard returns to his cottage copy_thumb.jpg",130,87,18);thumbnails[2427013]=new thumbnail(2427013,"100974","Lady of the lake","Lady of the lake copy_thumb.jpg",130,93,18);thumbnails[1470489]=new thumbnail(1470489,"100973","Teifi Pools","DSCN2192_thumb.jpg",130,98,18);thumbnails[1470501]=new thumbnail(1470501,"100973","Source of the Teifi","DSCN2212_thumb.jpg",130,173,18);thumbnails[1470519]=new thumbnail(1470519,"100973","Bridge over the Teifi at Maesycrugiau","DSCN2482_thumb.jpg",130,84,18);thumbnails[1470516]=new thumbnail(1470516,"100973","Old woollen mill near Llandysul","DSCN2433_thumb.jpg",130,86,18);thumbnails[1470521]=new thumbnail(1470521,"100973","Autumn in Henllan","DSCN2509_thumb.jpg",130,173,18);thumbnails[1470525]=new thumbnail(1470525,"100973","Autumn beech in Henllan","DSCN2519_thumb.jpg",130,173,18);thumbnails[1470536]=new thumbnail(1470536,"100973","The fungi await !","DSCN2565_thumb.jpg",130,173,18);thumbnails[1470531]=new thumbnail(1470531,"100973","Autumn beech next the Teifi","DSCN2530_thumb.jpg",130,194,18);thumbnails[1470508]=new thumbnail(1470508,"100973","River Teifi at Newcastle Emlyn","DSCN2366_thumb.jpg",130,98,18);thumbnails[1470513]=new thumbnail(1470513,"100973","The river walk near Cilgerran","DSCN2426_thumb.jpg",130,98,18);thumbnails[1470510]=new thumbnail(1470510,"100973","Mirror Teifi","DSCN2398_thumb.jpg",130,98,18);thumbnails[1470550]=new thumbnail(1470550,"100973","Cardigan Priory Bridge","DSCN2917_thumb.jpg",130,96,18);thumbnails[1470504]=new thumbnail(1470504,"100973","Gwbert from Poppit beach","DSCN2277_thumb.jpg",130,98,18);thumbnails[1470560]=new thumbnail(1470560,"100973","The beach at Llangranog","DSCN5309_thumb.jpg",130,94,18);thumbnails[1470557]=new thumbnail(1470557,"100973","Surf at Llangranog","DSCN5259_thumb.jpg",130,98,18);thumbnails[1470556]=new thumbnail(1470556,"100973","Evening at Mwnt","DSCN3702_thumb.jpg",130,85,18);thumbnails[1470562]=new thumbnail(1470562,"100973","Stormy seas at Mwnt","IMG_3789_thumb.jpg",130,98,18);thumbnails[1470561]=new thumbnail(1470561,"100973","Estuary swans at Gwbert","IMG_1931_thumb.jpg",130,97,18);thumbnails[1462605]=new thumbnail(1462605,"99552","Seaside swans on the Teifi estuary","IMG_1744_thumb.jpg",130,97,18);thumbnails[1462467]=new thumbnail(1462467,"99552","Sunset over Cemaes Head","DSCN3639_thumb.jpg",130,98,18);thumbnails[1462534]=new thumbnail(1462534,"99552","Evening sky over Cemaes Head","DSCN3663_thumb.jpg",130,98,18);thumbnails[1462608]=new thumbnail(1462608,"99552","Evening at Ceibwr","IMG_2379_thumb.jpg",130,86,18);thumbnails[1462614]=new thumbnail(1462614,"99552","Cwmyreglwys bay","IMG_2713_thumb.jpg",130,98,18);thumbnails[1462426]=new thumbnail(1462426,"99552","Lower Fishguard, early morning","DSCN1486_thumb.jpg",130,98,18);thumbnails[1462432]=new thumbnail(1462432,"99552","Lower Fishguard","DSCN1517_thumb.jpg",130,96,18);thumbnails[1462584]=new thumbnail(1462584,"99552","Strumble Head lighthouse","IMG_1329_thumb.jpg",130,96,18);thumbnails[1462546]=new thumbnail(1462546,"99552","Pwllcrochan near Strumble Head","DSCN6241_thumb.jpg",130,98,18);thumbnails[1462555]=new thumbnail(1462555,"99552","Coast near Caerfai, St David's","DSCN6790_thumb.jpg",130,98,18);thumbnails[1462562]=new thumbnail(1462562,"99552","St Goven's chapel","DSCN8659_thumb.jpg",130,95,18);thumbnails[1462597]=new thumbnail(1462597,"99552","The beach at Broadhaven East","IMG_1422_thumb.jpg",130,87,18);thumbnails[1462578]=new thumbnail(1462578,"99552","The 'Sphinx' at Broadhaven East","IMG_0753_thumb.jpg",130,98,18);thumbnails[1462601]=new thumbnail(1462601,"99552","Bosheston lily pools","IMG_1469_thumb.jpg",130,87,18);thumbnails[1462559]=new thumbnail(1462559,"99552","Autumn in Tycanol","DSCN7105_thumb.jpg",130,98,18);thumbnails[1462571]=new thumbnail(1462571,"99552","Rosebush reservoir and the Preseli hills","IMG_0073_thumb.jpg",130,87,18);thumbnails[1462551]=new thumbnail(1462551,"99552","Misty morning Rosebush","DSCN6639_thumb.jpg",130,98,18);thumbnails[1462594]=new thumbnail(1462594,"99552","Idyllic reflections at Rosebush","IMG_1409_thumb.jpg",130,98,18);thumbnails[1462540]=new thumbnail(1462540,"99552","Llysyfran reservoir in evening","DSCN6001_thumb.jpg",130,98,18);thumbnails[1494002]=new thumbnail(1494002,"102778","Alchemilla ","DSCN6164_thumb.jpg",130,98,18);thumbnails[1494023]=new thumbnail(1494023,"102778","Poppy centre","IMG_2384_thumb.jpg",130,98,18);thumbnails[1494013]=new thumbnail(1494013,"102778","Honeysuckle","DSCN6338_thumb.jpg",130,98,18);thumbnails[1494015]=new thumbnail(1494015,"102778","Rosa Rugosa","DSCN6437_thumb.jpg",130,98,18);thumbnails[1494018]=new thumbnail(1494018,"102778","Seaside thistle","IMG_0770_thumb.jpg",130,96,18);thumbnails[1494016]=new thumbnail(1494016,"102778","Rosebay willow herb","DSCN6655_thumb.jpg",130,173,18);thumbnails[1494022]=new thumbnail(1494022,"102778","Bosherston lily","IMG_1379_thumb.jpg",130,87,18);thumbnails[1494028]=new thumbnail(1494028,"102778","Lily pollen","IMG_1880_thumb.jpg",130,158,18);thumbnails[1494027]=new thumbnail(1494027,"102778","Crocosmea","IMG_2824_thumb.jpg",130,86,18);thumbnails[1494006]=new thumbnail(1494006,"102778","Wild rose","DSCN6328_thumb.jpg",130,100,18);thumbnails[2426255]=new thumbnail(2426255,"156813","Silver sunbeams","IMG_4287 Silver sunbeams_thumb.jpg",130,84,18);thumbnails[2426989]=new thumbnail(2426989,"156813","Flying spray","IMG_8475 Flying spray_thumb.jpg",130,87,18);thumbnails[2426984]=new thumbnail(2426984,"156813","Wave sculpture","IMG_6528 Wave sculpture_thumb.jpg",130,87,18);thumbnails[2426973]=new thumbnail(2426973,"156813","It rose from the deep","IMG_6440 It rose from the deep_thumb.jpg",130,87,18);thumbnails[2426968]=new thumbnail(2426968,"156813","Wave curl","IMG_6436 Wave curl_thumb.jpg",130,87,18);thumbnails[2426264]=new thumbnail(2426264,"156813","Flowing spray","IMG_4537 Flowing spray_thumb.jpg",130,82,18);thumbnails[2426261]=new thumbnail(2426261,"156813","Explosive surf","IMG_4460 Explosive surf_thumb.jpg",130,87,18);thumbnails[2426259]=new thumbnail(2426259,"156813","Twisted surf","IMG_4430 Twisted surf_thumb.jpg",130,87,18);thumbnails[2426258]=new thumbnail(2426258,"156813","Candyfloss wave","IMG_4422 Candyfloss wave_thumb.jpg",130,87,18);thumbnails[2426253]=new thumbnail(2426253,"156813","Llangranog wave","DSCN5257 Llangrannog wave_thumb.jpg",130,98,18);thumbnails[3139252]=new thumbnail(3139252,"156813","Curly waves","IMG_1695a_thumb.jpg",130,87,18);thumbnails[3139254]=new thumbnail(3139254,"156813","Peaks and Troughs","IMG_1712_thumb.jpg",130,87,18);thumbnails[3139256]=new thumbnail(3139256,"156813","Overflow","IMG_1735a_thumb.jpg",130,83,18);thumbnails[3139258]=new thumbnail(3139258,"156813","Heart shaped wave","IMG_1992_thumb.jpg",130,87,18);thumbnails[3139263]=new thumbnail(3139263,"156813","Translucency","IMG_2001_thumb.jpg",130,87,18);thumbnails[3139266]=new thumbnail(3139266,"156813","Wave texture","IMG_2014_thumb.jpg",130,87,18);thumbnails[3139272]=new thumbnail(3139272,"156813","Explosive wave","IMG_3555_thumb.jpg",130,87,18);thumbnails[3139276]=new thumbnail(3139276,"156813","Is it a whale?","IMG_3556_thumb.jpg",130,87,18);thumbnails[3139277]=new thumbnail(3139277,"156813","Peacock wave","IMG_3557_thumb.jpg",130,87,18);thumbnails[3139280]=new thumbnail(3139280,"156813","Gentle curls","IMG_3666_thumb.jpg",130,87,18);thumbnails[3139328]=new thumbnail(3139328,"156813","Sea sprites","IMG_3982_thumb.jpg",130,87,18);thumbnails[3139331]=new thumbnail(3139331,"156813","Dances with waves","IMG_4143_thumb.jpg",130,87,18);thumbnails[3139333]=new thumbnail(3139333,"156813","Curling round","IMG_4188_thumb.jpg",130,87,18);thumbnails[3413563]=new thumbnail(3413563,"156813","Sea bouquet at Mwnt","IMG_30591_thumb.jpg",130,87,18);thumbnails[3413570]=new thumbnail(3413570,"156813","Lacy textured wave","IMG_5650_thumb.jpg",130,87,18);thumbnails[3413573]=new thumbnail(3413573,"156813","Llangranog sea with Mwnt in the distance","IMG_4041_thumb.jpg",130,87,18);thumbnails[3413576]=new thumbnail(3413576,"156813","Is it a sea horse at Llangranog ?","IMG_6038_thumb.jpg",130,83,18);thumbnails[3413582]=new thumbnail(3413582,"156813","Sea fan at Mwnt","IMG_5104_thumb.jpg",130,87,18);thumbnails[3417116]=new thumbnail(3417116,"156813","Is it a whale?","IMG_4540_thumb.jpg",130,87,18);thumbnails[3417126]=new thumbnail(3417126,"156813","Gently twisted wave","IMG_3066_thumb.jpg",130,83,18);thumbnails[3417130]=new thumbnail(3417130,"156813","Blowing surf at Llangranog","IMG_4999_thumb.jpg",130,87,18);thumbnails[3417139]=new thumbnail(3417139,"156813","Envelope wave","IMG_5055_thumb.jpg",130,87,18);thumbnails[3417176]=new thumbnail(3417176,"156813","Contrasts","IMG_5570_thumb.jpg",130,87,18);thumbnails[3417192]=new thumbnail(3417192,"156813","Green hollow","IMG_8208 _thumb.jpg",130,87,18);thumbnails[3417201]=new thumbnail(3417201,"156813","Explosive wave","IMG_4984_thumb.jpg",130,87,18);thumbnails[3417221]=new thumbnail(3417221,"156813","The Twins at Newport","IMG_8511 _thumb.jpg",130,87,18);thumbnails[3131066]=new thumbnail(3131066,"191990","Santa arrives in the night ","Ch1_thumb.jpg",130,98,18);thumbnails[3131071]=new thumbnail(3131071,"191990","Robin in the snow","Ch2_thumb.jpg",130,160,18);thumbnails[3131084]=new thumbnail(3131084,"191990","Robin on post with starry surround","Ch3_thumb.jpg",130,137,18);thumbnails[3131094]=new thumbnail(3131094,"191990","Robin in the bushes with starry surround","Ch4_thumb.jpg",130,108,18);thumbnails[3131099]=new thumbnail(3131099,"191990","Snowy Cardigan Island","Ch5_thumb.jpg",130,98,18);thumbnails[3131103]=new thumbnail(3131103,"191990","Snowy reflections at Rosebush","Ch6_thumb.jpg",130,98,18);thumbnails[3131104]=new thumbnail(3131104,"191990","Preseli Hills from Rosebush","Ch7_thumb.jpg",130,98,18);thumbnails[3131106]=new thumbnail(3131106,"191990","Gateway to Wales","Ch8_thumb.jpg",130,112,18);thumbnails[3131109]=new thumbnail(3131109,"191990","Snowy view","Ch9_thumb.jpg",130,98,18);thumbnails[3131115]=new thumbnail(3131115,"191990","Fairy stars","Ch10_thumb.jpg",130,87,18);thumbnails[3132545]=new thumbnail(3132545,"191990","Anwen's birthday card 2","Anwen card_thumb.jpg",130,182,18);thumbnails[3132546]=new thumbnail(3132546,"191990","Tash's birthday card 4","Tasha card_thumb.jpg",130,187,18);thumbnails[3132549]=new thumbnail(3132549,"191990","Birthday card with flowers","Birthday 1_thumb.jpg",130,93,18);thumbnails[3132550]=new thumbnail(3132550,"191990","Birthday card with pic of Mwnt","Birthday 2_thumb.jpg",130,87,18);thumbnails[3132551]=new thumbnail(3132551,"191990","Birthday waterlily","Birthday lily_thumb.jpg",130,93,18);thumbnails[3132552]=new thumbnail(3132552,"191990","Congrats","Congrats_thumb.jpg",130,93,18);thumbnails[3132553]=new thumbnail(3132553,"191990","Get well with pic of Newgale","Get well 1_thumb.jpg",130,87,18);var galleries=new Object();galleries[100974]=new gallery(100974,"2427027,2427020,2427017,2427015,2427013,2427010,2427004,2427001,2427000,1469762","Fantasy images","gallery",[1469738,1469762,1469740,2427000,2427010,2427017,1469741,1469757,1469743,2427001,1469744,1469751,1469747,2427020,1469750,2427015,2427004,1469753,1469752,2427027,2427013]);galleries[100973]=new gallery(100973,"1470562,1470561,1470560,1470557,1470556,1470550,1470536,1470531,1470525,1470521","Ceredigion photos","gallery",[1470489,1470501,1470519,1470516,1470521,1470525,1470536,1470531,1470508,1470513,1470510,1470550,1470504,1470560,1470557,1470556,1470562,1470561]);galleries[99552]=new gallery(99552,"1462614,1462608,1462605,1462601,1462597,1462594,1462584,1462578,1462571,1462562","Pembrokeshire photos","gallery",[1462605,1462467,1462534,1462608,1462614,1462426,1462432,1462584,1462546,1462555,1462562,1462597,1462578,1462601,1462559,1462571,1462551,1462594,1462540]);galleries[102778]=new gallery(102778,"1494028,1494027,1494023,1494022,1494018,1494016,1494015,1494013,1494006,1494002","Flowers","gallery",[1494002,1494023,1494013,1494015,1494018,1494016,1494022,1494028,1494027,1494006]);galleries[156813]=new gallery(156813,"3417221,3417201,3417192,3417176,3417139,3417130,3417126,3417116,3413582,3413576","Sea Pics","gallery",[2426255,2426989,2426984,2426973,2426968,2426264,2426261,2426259,2426258,2426253,3139252,3139254,3139256,3139258,3139263,3139266,3139272,3139276,3139277,3139280,3139328,3139331,3139333,3413563,3413570,3413573,3413576,3413582,3417116,3417126,3417130,3417139,3417176,3417192,3417201,3417221]);galleries[191990]=new gallery(191990,"3132553,3132552,3132551,3132550,3132549,3132546,3132545,3131115,3131109,3131106","Greeting Cards","gallery",[3131066,3131071,3131084,3131094,3131099,3131103,3131104,3131106,3131109,3131115,3132545,3132546,3132549,3132550,3132551,3132552,3132553]);var imageSets=new Object();imageSets[1]="3417221,3417201,3417192,3417176,3417139,3417130,3417126,3417116,3413582,3413576,3413570,3413563,3139333,3139331,3139328,3139277,3139276,3139272,3139266,3139263,3139258,3139256,3139254,3139252,2426989,2426984,2426973,2426259,2426258,2426253";imageSets[3]="3417221,3417201,3417192,3417176,3417139,3417130,3417126,3417116,3413582,3413576,3413573,3413570,3413563,3139333,3139331,3139328,3139280,3139277,3139276,3139272,3139266,3139263,3139258,3139256,3139254,3139252,3132553,3132552,3132551,3132550,3132549,3132546,3132545,3131115,3131109,3131106,3131104,3131103,3131099,3131094,3131084,3131071,3131066,2427027,2427020,2427017,2427015,2427013,2427010,2427004";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/paulinematthews/images";break}switch(a){case 1:b="http://www1.clikpic.com/paulinematthews/images";break}switch(a){case 2:b="http://admin.clikpic.com/paulinematthews/images";break}switch(a){case 4:b="http://www.clikchurch.com/paulinematthews/images";break}switch(a){case 5:b="http://www2.clikpic.com/paulinematthews/images";break}switch(a){case 15:b="http://www3.clikpic.com/paulinematthews/images";break}switch(a){case 21:b="http://www6.clikpic.com/paulinematthews/images";break}switch(a){case 18:b="http://www4.clikpic.com/paulinematthews/images";break}switch(a){case 19:b="http://www5.clikpic.com/paulinematthews/images";break}switch(a){case 22:b="http://tpc5/clikpic/paulinematthews/images";break}switch(a){case 23:b="http://tpc10/clikpic/paulinematthews/images";break}switch(a){case 24:b="http://tpc15/clikpic/paulinematthews/images";break}switch(a){case 25:b="http://tpc16/clikpic/paulinematthews/images";break}switch(a){case 31:b="http://www7.clikpic.com/paulinematthews/images";break}switch(a){case 32:b="http://admin2.clikpic.com/paulinematthews/images";break}switch(a){case 33:b="http://www8.clikpic.com/paulinematthews/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="MYSTICAL MOMENTS: "+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].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+'")'})}}};