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[2573881]=new thumbnail(2573881,"","Tropical Gardens","Tropical Gardens1_thumb.JPG",130,130,32);thumbnails[2928336]=new thumbnail(2928336,"","Embankment in Snow","riversign-glow_thumb.jpg",130,130,32);thumbnails[2319430]=new thumbnail(2319430,"152512","An Evening of Jazz","An Evening of Jazz1_thumb.JPG",130,130,32);thumbnails[2326495]=new thumbnail(2326495,"152512","Calla Lily","Calla Lily_thumb.jpg",130,130,32);thumbnails[2326498]=new thumbnail(2326498,"152512","Roses","Roses1_thumb.jpg",130,130,32);thumbnails[2336404]=new thumbnail(2336404,"152512","Glowing Branches","Glowing Branches1_thumb.jpg",130,130,32);thumbnails[2342905]=new thumbnail(2342905,"152512","Smoke","Smoke_thumb.jpg",130,130,32);thumbnails[2342906]=new thumbnail(2342906,"152512","Smoke II","Smoke II_thumb.jpg",130,130,32);thumbnails[2342907]=new thumbnail(2342907,"152512","Smoke III","Smoke III_thumb.jpg",130,130,32);thumbnails[2342908]=new thumbnail(2342908,"152512","Candles","Candles_thumb.jpg",130,130,32);thumbnails[2355583]=new thumbnail(2355583,"152512","Flower","Flower2_thumb.JPG",130,130,32);thumbnails[2356172]=new thumbnail(2356172,"152512","Bridge over the River Ouse","Bridge over the River Ouse1_thumb.JPG",130,130,32);thumbnails[2368237]=new thumbnail(2368237,"152512","Purple Haze","IMG_9992_thumb.jpg",130,130,32);thumbnails[2626590]=new thumbnail(2626590,"152512","Lily II","Lily II_thumb.jpg",130,130,32);thumbnails[2626592]=new thumbnail(2626592,"152512","Locks & Latches","Locks & Latches_thumb.jpg",130,130,32);thumbnails[2626596]=new thumbnail(2626596,"152512","Stones","Stones_thumb.jpg",130,130,32);thumbnails[2626598]=new thumbnail(2626598,"152512","Stumps","Stumps_thumb.jpg",130,130,32);thumbnails[2626601]=new thumbnail(2626601,"152512","Telephone II","Telephone II_thumb.jpg",130,130,32);thumbnails[2626603]=new thumbnail(2626603,"152512","Telephone","Telephone_thumb.jpg",130,130,32);thumbnails[5324266]=new thumbnail(5324266,"152512","Creeper","Creeper_thumb.jpg",130,130,32);thumbnails[5324278]=new thumbnail(5324278,"152512","Mono Rose","Mono-Rose_thumb.jpg",130,130,32);thumbnails[5324283]=new thumbnail(5324283,"152512","Golden","Golden1_thumb.jpg",130,130,32);thumbnails[5324288]=new thumbnail(5324288,"152512","Red Roses","Red-Roses_thumb.jpg",130,130,32);thumbnails[2326478]=new thumbnail(2326478,"152583","Piano","piano1_thumb.jpg",130,130,32);thumbnails[2326487]=new thumbnail(2326487,"152583","Talk Over Coffee","coffee_240407_thumb.jpg",130,130,32);thumbnails[2356044]=new thumbnail(2356044,"152583","Bar Stool","barstool1_thumb.jpg",130,130,32);thumbnails[2356078]=new thumbnail(2356078,"152583","Outhouse","outhouse1_thumb.jpg",130,130,32);thumbnails[2372694]=new thumbnail(2372694,"152583","No Cycling","IMG_00971_thumb.jpg",130,130,32);thumbnails[2372704]=new thumbnail(2372704,"152583","The Park Cafe II","IMG_01211_thumb.jpg",130,130,32);thumbnails[2372718]=new thumbnail(2372718,"152583","Tyres","IMG_01791_thumb.jpg",130,130,32);thumbnails[2589393]=new thumbnail(2589393,"152583","Cliff Edge","Cliff-Edge1_thumb.jpg",130,130,32);thumbnails[2626587]=new thumbnail(2626587,"152583","Glider","glider_thumb.jpg",130,130,32);thumbnails[2336402]=new thumbnail(2336402,"154074","Embankment Illuminations","Embankment Illuminations11_thumb.jpg",130,130,32);thumbnails[2355958]=new thumbnail(2355958,"154074","Bluebell Wood","Bluebell Wood1_thumb.JPG",130,130,32);thumbnails[2355960]=new thumbnail(2355960,"154074","Bromham Park","Bromham Park1_thumb.jpg",130,130,32);thumbnails[2355972]=new thumbnail(2355972,"154074","Sunset over Cardington Hangars","Sunset over Cardington Hangars1_thumb.jpg",130,130,32);thumbnails[2368252]=new thumbnail(2368252,"154074","No Cycling","IMG_0097_thumb.jpg",130,130,32);thumbnails[2368261]=new thumbnail(2368261,"154074","The Park Cafe II","IMG_0121_thumb.jpg",130,130,32);thumbnails[2411502]=new thumbnail(2411502,"154074","The Band Stand","IMG_01381_thumb.jpg",130,130,32);thumbnails[2411604]=new thumbnail(2411604,"154074","The Band Stand & Park Cafe","IMG_01512_thumb.jpg",130,130,32);thumbnails[2411708]=new thumbnail(2411708,"154074","The Cricket Pavillion","IMG_01571_thumb.jpg",130,130,32);thumbnails[2573882]=new thumbnail(2573882,"154074","Tropical Night Time","Tropical Night time_thumb.JPG",130,130,32);thumbnails[2572888]=new thumbnail(2572888,"299630","Big Ben & Parliament","Big Ben_Parliament 3_thumb.jpg",130,130,32);thumbnails[2573149]=new thumbnail(2573149,"299630","Westminster Seagulls","Birds_Big Ben_thumb.jpg",130,130,32);thumbnails[2573162]=new thumbnail(2573162,"299630","From the Embankment","From the Embankment_thumb.jpg",130,130,32);thumbnails[2573165]=new thumbnail(2573165,"299630","Jubilee Bridge","Jubilee Bridge_thumb.jpg",130,130,32);thumbnails[2573174]=new thumbnail(2573174,"299630","London Eye II","London Eye II_thumb.jpg",130,130,32);thumbnails[2573182]=new thumbnail(2573182,"299630","London Eye III","London Eye III_thumb.jpg",130,130,32);thumbnails[2573185]=new thumbnail(2573185,"299630","London Eye","London Eye_thumb.jpg",130,130,32);thumbnails[2573199]=new thumbnail(2573199,"299630","Street Lamp at the London Eye","London Eye_Streetlamp_thumb.jpg",130,130,32);thumbnails[2573207]=new thumbnail(2573207,"299630","The Corner II","The Corner II_thumb.jpg",130,130,32);thumbnails[2573231]=new thumbnail(2573231,"299630","Tower Bridge Art II","Tower Bridge Art II_thumb.jpg",130,130,32);thumbnails[2573236]=new thumbnail(2573236,"299630","Tower Bridge Art III","Tower Bridge Art III_thumb.jpg",130,130,32);thumbnails[2573237]=new thumbnail(2573237,"299630","Tower Bridge Art","Tower Bridge Art_thumb.jpg",130,130,32);thumbnails[2732597]=new thumbnail(2732597,"299630","Underneath Cloudgate (The Bean)","IMG_1042_thumb.jpg",130,130,32);thumbnails[2732618]=new thumbnail(2732618,"299630","East Washington Street","IMG_1055_thumb.jpg",130,130,32);thumbnails[2732624]=new thumbnail(2732624,"299630","The Crown Fountains","IMG_1060_thumb.jpg",130,130,32);thumbnails[2732629]=new thumbnail(2732629,"299630","Two Prudential Plaza","IMG_1075_thumb.jpg",130,130,32);thumbnails[2732633]=new thumbnail(2732633,"299630","The BP Bridge","IMG_1105_thumb.jpg",130,130,32);thumbnails[2732642]=new thumbnail(2732642,"299630","Cloudgate (The Bean)","IMG_1109_thumb.jpg",130,130,32);thumbnails[2732644]=new thumbnail(2732644,"299630","Chicago Tribune Building","IMG_1121_thumb.jpg",130,130,32);thumbnails[2732647]=new thumbnail(2732647,"299630","King Lear Statue","IMG_1123_thumb.jpg",130,130,32);thumbnails[2732648]=new thumbnail(2732648,"299630","The John Hancock Center","IMG_1129_thumb.jpg",130,130,32);thumbnails[2732650]=new thumbnail(2732650,"299630","Downtown Chicago ","IMG_1139_thumb.jpg",130,130,32);thumbnails[2732700]=new thumbnail(2732700,"299630","Lakeshore Drive","IMG_1164_thumb.jpg",130,130,32);thumbnails[2732701]=new thumbnail(2732701,"299630","Chicago Skyline","IMG_1203_thumb.jpg",130,130,32);thumbnails[2732704]=new thumbnail(2732704,"299630","Chase Tower","IMG_1265_thumb.jpg",130,130,32);thumbnails[2732705]=new thumbnail(2732705,"299630","The Aon Center","IMG_1301_thumb.jpg",130,130,32);thumbnails[2732707]=new thumbnail(2732707,"299630","No Parking","IMG_1303_thumb.jpg",130,130,32);thumbnails[2732709]=new thumbnail(2732709,"299630","The Chicago Water Tower","IMG_1313_thumb.jpg",130,130,32);thumbnails[2732711]=new thumbnail(2732711,"299630","The John Hancock Center II","IMG_1314_thumb.jpg",130,130,32);thumbnails[2732714]=new thumbnail(2732714,"299630","Downtown Chicago Nightscape","IMG_1331_thumb.jpg",130,130,32);thumbnails[2732715]=new thumbnail(2732715,"299630","Union Station","IMG_1404_thumb.jpg",130,130,32);thumbnails[2732717]=new thumbnail(2732717,"299630","Union Station & the Sears Tower","IMG_1407_thumb.jpg",130,130,32);thumbnails[2732724]=new thumbnail(2732724,"299630","The Sears Tower","IMG_1426_thumb.jpg",130,130,32);thumbnails[2732726]=new thumbnail(2732726,"299630","Chicago Theater","IMG_1492_thumb.jpg",130,130,32);thumbnails[2732728]=new thumbnail(2732728,"299630","Chicago Theater II","IMG_1495_thumb.jpg",130,130,32);thumbnails[2732962]=new thumbnail(2732962,"299630","The Hotel Burnham Reliance Building","IMG_1270_thumb.jpg",130,130,32);thumbnails[2735359]=new thumbnail(2735359,"299630","Welcome to Bronzeville","IMG_1368_thumb.jpg",130,130,32);thumbnails[2388285]=new thumbnail(2388285,"154983","John Bunyan's Statue","IMG_0206_thumb.jpg",130,130,32);thumbnails[2388289]=new thumbnail(2388289,"154983","Sunrise over St Paul's","IMG_0264_thumb.jpg",130,130,32);thumbnails[2388290]=new thumbnail(2388290,"154983","St Paul's Church","IMG_0269_thumb.jpg",130,130,32);thumbnails[2388291]=new thumbnail(2388291,"154983","The Swan Hotel & Embankment","IMG_0292_thumb.jpg",130,130,32);thumbnails[2388293]=new thumbnail(2388293,"154983","Deserted High Street...","IMG_0298_thumb.jpg",130,130,32);thumbnails[2388295]=new thumbnail(2388295,"154983","The River","IMG_0300_thumb.jpg",130,130,32);thumbnails[2388296]=new thumbnail(2388296,"154983","The Corn Exchange","IMG_0309_thumb.jpg",130,130,32);thumbnails[2388297]=new thumbnail(2388297,"154983","The Harpur Centre","IMG_0316_thumb.jpg",130,130,32);thumbnails[2388299]=new thumbnail(2388299,"154983","The Harpur Centre II","IMG_0320_thumb.jpg",130,130,32);thumbnails[2388302]=new thumbnail(2388302,"154983","Midland Road II","IMG_0332_thumb.jpg",130,130,32);thumbnails[2388305]=new thumbnail(2388305,"154983","A Morning by the River","A Morning by the river2_thumb.jpg",130,130,32);thumbnails[2388307]=new thumbnail(2388307,"154983","Embankment in Snow","Embankment in Snow2_thumb.jpg",130,130,32);thumbnails[2388308]=new thumbnail(2388308,"154983","Rowers on the River","Rowers on the River2_thumb.JPG",130,130,32);thumbnails[2388309]=new thumbnail(2388309,"154983","River Crossing","River Crossing2_thumb.jpg",130,130,32);thumbnails[2388310]=new thumbnail(2388310,"154983","Embankment Illuminations","Embankment Illuminations4_thumb.jpg",130,130,32);thumbnails[5324784]=new thumbnail(5324784,"299655","Beach","beach_thumb.jpg",130,130,32);thumbnails[5324799]=new thumbnail(5324799,"299655","Cornish Cliffs","cornish_cliffs_thumb.jpg",130,130,32);thumbnails[5324830]=new thumbnail(5324830,"299655","Hawksbill","Hawksbill_thumb.jpg",130,130,32);thumbnails[2355962]=new thumbnail(2355962,"208248","Early Snowfall","Early Snowfall1_thumb.jpg",130,130,32);thumbnails[2928316]=new thumbnail(2928316,"208248","Don't Feed the Geese","bwgeesesign_thumb.jpg",130,130,32);thumbnails[2928324]=new thumbnail(2928324,"208248","The Lookout","bwriver4_thumb.jpg",130,130,32);thumbnails[2928332]=new thumbnail(2928332,"208248","River View","river2_thumb.jpg",130,130,32);thumbnails[3408491]=new thumbnail(3408491,"208248","From the Butterfly Bridge...","IMG_3168_thumb.jpg",130,130,32);thumbnails[3408503]=new thumbnail(3408503,"208248","Snow on the River I","IMG_3177_thumb.jpg",130,130,32);thumbnails[3408504]=new thumbnail(3408504,"208248","Embankment Bridge in Snow","IMG_3180_thumb.jpg",130,130,32);thumbnails[3408506]=new thumbnail(3408506,"208248","Snow-covered Seats...","IMG_3188_thumb.jpg",130,130,32);thumbnails[3408509]=new thumbnail(3408509,"208248","Snowy Walk","IMG_3189_thumb.jpg",130,130,32);thumbnails[3408511]=new thumbnail(3408511,"208248","Snow Morning","IMG_3191_thumb.jpg",130,130,32);thumbnails[3408515]=new thumbnail(3408515,"208248","Snow on the Embankment II","IMG_3193_thumb.jpg",130,130,32);thumbnails[3408518]=new thumbnail(3408518,"208248","Snow on the Embankment III","IMG_3198_thumb.jpg",130,130,32);thumbnails[3408521]=new thumbnail(3408521,"208248","The Park","IMG_3233_thumb.jpg",130,130,32);thumbnails[3408522]=new thumbnail(3408522,"208248","The West Gate","IMG_3236_thumb.jpg",130,130,32);thumbnails[3408526]=new thumbnail(3408526,"208248","The Pavillion","IMG_3237_thumb.jpg",130,130,32);var galleries=new Object();galleries[152512]=new gallery(152512,"2626603,2368237,2355583","Fine Art","gallery",[2319430,2326495,2326498,2336404,2342905,2342906,2342907,2342908,2355583,2356172,2368237,2626590,2626592,2626596,2626598,2626601,2626603,5324266,5324278,5324283,5324288]);galleries[152583]=new gallery(152583,"2626587","Black & White","gallery",[2326478,2326487,2356044,2356078,2372694,2372704,2372718,2589393,2626587]);galleries[154074]=new gallery(154074,"2355958,2336402","Landscapes","gallery",[2336402,2355958,2355960,2355972,2368252,2368261,2411502,2411604,2411708,2573882]);galleries[299630]=new gallery(299630,"2732726,2732715,2732714,2732648,2732633,2732624","Cityscapes","gallery",[2572888,2573149,2573162,2573165,2573174,2573182,2573185,2573199,2573207,2573231,2573236,2573237,2732597,2732618,2732624,2732629,2732633,2732642,2732644,2732647,2732648,2732650,2732700,2732701,2732704,2732705,2732707,2732709,2732711,2732714,2732715,2732717,2732724,2732726,2732728,2732962,2735359]);galleries[154983]=new gallery(154983,"2388293","Bedford","gallery",[2388285,2388289,2388290,2388291,2388293,2388295,2388296,2388297,2388299,2388302,2388305,2388307,2388308,2388309,2388310]);galleries[299655]=new gallery(299655,"5324830","Panoramics","gallery",[5324784,5324799,5324830]);galleries[208248]=new gallery(208248,"3408506","Seasonal","gallery",[2355962,2928316,2928324,2928332,3408491,3408503,3408504,3408506,3408509,3408511,3408515,3408518,3408521,3408522,3408526]);var imageSets=new Object();imageSets[1]="3408504,2735359,2732715,2732714,2626603,2626592,2626590,2626587,2388293,2368237,2355960,2355583,2336402";imageSets[2]="5324830,3408506,2732726,2732715,2732714,2732648,2732633,2732624,2626603,2626587,2388293,2368237,2355958,2355583,2336402";imageSets[3]="3408511,2732962,2732644,2732642,2732624,2732618,2626603";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/essenceart/images";break}switch(a){case 1:b="http://www1.clikpic.com/essenceart/images";break}switch(a){case 2:b="http://admin.clikpic.com/essenceart/images";break}switch(a){case 24:b="http://tpc15/clikpic/essenceart/images";break}switch(a){case 4:b="http://www.clikchurch.com/essenceart/images";break}switch(a){case 5:b="http://www2.clikpic.com/essenceart/images";break}switch(a){case 22:b="http://tpc5/clikpic/essenceart/images";break}switch(a){case 23:b="http://tpc10/clikpic/essenceart/images";break}switch(a){case 25:b="http://tpc16/clikpic/essenceart/images";break}switch(a){case 15:b="http://www3.clikpic.com/essenceart/images";break}switch(a){case 18:b="http://www4.clikpic.com/essenceart/images";break}switch(a){case 19:b="http://www5.clikpic.com/essenceart/images";break}switch(a){case 31:b="http://www7.clikpic.com/essenceart/images";break}switch(a){case 32:b="http://admin2.clikpic.com/essenceart/images";break}switch(a){case 33:b="http://www8.clikpic.com/essenceart/images";break}switch(a){case 34:b="http://www9.clikpic.com/essenceart/images";break}switch(a){case 35:b="http://admin3.clikpic.com/essenceart/images";break}switch(a){case 37:b="http://admin4.clikpic.com/essenceart/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="Essence Artwork: "+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="ESSENCEART">';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+'")'})}}};