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[431796]=new thumbnail(431796,"34491","Rhythm Republic<br>\r\nParty On The Hill Festival 2006","Rhythm-Republic-002_thumb.jpg",130,92,15);thumbnails[431797]=new thumbnail(431797,"34491","Rhythm Republic<br>\r\nParty On The Hill Festival 2006","Rhythm-Republic-003_thumb.jpg",130,87,15);thumbnails[431799]=new thumbnail(431799,"34491","Rhythm Republic<br>\r\nParty On The Hill Festival 2006","Rhythm-Republic-005_thumb.jpg",130,164,15);thumbnails[431814]=new thumbnail(431814,"34491","Rhythm Republic<br>\r\nParty On The Hill Festival 2006","Rhythm-Republic-010_thumb.jpg",130,87,15);thumbnails[431820]=new thumbnail(431820,"34491","Rhythm Republic<br>\r\nParty On The Hill Festival 2006","Rhythm-Republic-011_thumb.jpg",130,87,15);thumbnails[431822]=new thumbnail(431822,"34491","Triangulation<br>\r\nBrunel 200 Festival 2006","Triangulation-Brunel-200-1_thumb.jpg",130,87,15);thumbnails[431841]=new thumbnail(431841,"34491","Triangulation<br>\r\nBrunel 200 Festival 2006","Triangulation-Brunel-200-31_thumb.jpg",130,87,15);thumbnails[431788]=new thumbnail(431788,"34491","Finest Little Space<br>\r\nFleece and Firkin, Bristol","Finest-Little-Space-003_thumb.jpg",130,98,15);thumbnails[431940]=new thumbnail(431940,"34492","","Beads_thumb.jpg",130,87,15);thumbnails[431941]=new thumbnail(431941,"34533","Wassenaar Beach Dunes<br>\r\nHolland 2006","Dunes_thumb.jpg",130,87,15);thumbnails[431944]=new thumbnail(431944,"34493","Bicycle<br>\r\nAmsterdam 2006","Bike-&-Tree-Amsterdam_thumb.jpg",130,195,15);thumbnails[431946]=new thumbnail(431946,"34493","Bicycles<br>\r\nAmsterdam 2006","Bikes-Amsterdam_thumb.jpg",130,86,15);thumbnails[431953]=new thumbnail(431953,"34493","Windmill<br>\r\nLeiden 2006","Windmill-Blade-Leiden_thumb.jpg",130,195,15);thumbnails[431954]=new thumbnail(431954,"34493","Windmill<br>\r\nLeiden 2006","Windmill-Leiden_thumb.jpg",130,195,15);thumbnails[693891]=new thumbnail(693891,"34492","","Engagement0031_thumb.jpg",130,195,15);thumbnails[693892]=new thumbnail(693892,"34492","","Engagement0341_thumb.jpg",130,87,15);thumbnails[693893]=new thumbnail(693893,"34492","","Engagement0461_thumb.jpg",130,87,15);thumbnails[693894]=new thumbnail(693894,"34492","","Engagement0501_thumb.jpg",130,87,15);thumbnails[693896]=new thumbnail(693896,"34491","Rhythm Republic, Fleece and Firkin, Bristol","Rhythm-Republic-Fleece0601_thumb.jpg",130,195,15);thumbnails[693897]=new thumbnail(693897,"34491","Rhythm Republic, Fleece and Firkin, Bristol","Rhythm-Republic-Fleece0701_thumb.jpg",130,87,15);thumbnails[693898]=new thumbnail(693898,"34491","Rhythm Republic, Fleece and Firkin, Bristol","Rhythm-Republic-Fleece-0101_thumb.jpg",130,93,15);thumbnails[722124]=new thumbnail(722124,"34493","Bicycle shadows","Nigel-Bayliss-Bike_thumb.jpg",130,106,15);thumbnails[722125]=new thumbnail(722125,"34533","Crop Field","Nigel-Bayliss-Grainy-Crops_thumb.jpg",130,97,15);thumbnails[722126]=new thumbnail(722126,"34493","London underground","Nigel-Bayliss-Tube_thumb.jpg",130,92,15);thumbnails[748408]=new thumbnail(748408,"34533","Wassenaar Beach Dunes Holland 2006","Barbed-Wire-Beach_thumb.jpg",130,195,15);thumbnails[748414]=new thumbnail(748414,"34533","Tree trunk and ladybird","Ladybird-Log_thumb.jpg",130,186,15);thumbnails[748416]=new thumbnail(748416,"34533","Wassenaar Beach Dunes Holland 2006","Shells-Beach_thumb.jpg",130,176,15);thumbnails[748417]=new thumbnail(748417,"34533","Wassenaar Beach Dunes Holland 2006","Tyre-tracks-Beach_thumb.jpg",130,195,15);thumbnails[1445280]=new thumbnail(1445280,"34491","Rhythm Republic, Party On The Hill Festival 2006","Rhythm-Republic-Hill016018_thumb.jpg",130,195,15);thumbnails[1445284]=new thumbnail(1445284,"34491","Rhythm Republic, Fleece and Firkin, Bristol","RRFleece034_thumb.jpg",130,87,15);thumbnails[1517565]=new thumbnail(1517565,"34491","Mr Love and Justice, The Prom, Bristol","MrL&JProm053-ED_thumb.jpg",130,87,15);thumbnails[1517567]=new thumbnail(1517567,"34491","Mr Love and Justice, The Prom, Bristol","MrL&JProm104-ED_thumb.jpg",130,103,15);thumbnails[1517569]=new thumbnail(1517569,"34491","Mr Love and Justice, The Prom, Bristol","MrL&JProm156-ED_thumb.jpg",130,195,15);thumbnails[1517570]=new thumbnail(1517570,"34491","Mr Love and Justice, The Prom, Bristol","MrL&JProm170-ED_thumb.jpg",130,87,15);thumbnails[1574587]=new thumbnail(1574587,"34491","Jazz Up Your Wedding, Priston Mill","Jazz026-ED_thumb.jpg",130,95,15);thumbnails[1574589]=new thumbnail(1574589,"34491","Jazz Up Your Wedding, Priston Mill","Jazz040_thumb.jpg",130,195,15);thumbnails[1574593]=new thumbnail(1574593,"34491","Jazz Up Your Wedding, Priston Mill","Jazz047_thumb.jpg",130,83,15);thumbnails[1574597]=new thumbnail(1574597,"34491","Jazz Up Your Wedding, Priston Mill","Jazz054-ED-2_thumb.jpg",130,195,15);thumbnails[2302617]=new thumbnail(2302617,"34492","","Blaize_thumb.jpg",130,85,15);thumbnails[2302667]=new thumbnail(2302667,"34493","Abbesses metro","Abbesses_thumb.jpg",130,49,15);thumbnails[2305104]=new thumbnail(2305104,"34492","","Door_thumb.jpg",130,98,15);thumbnails[2324338]=new thumbnail(2324338,"151710","CEGC 2008, Bucharest, Romania","CRW_4054_thumb.jpg",130,95,15);thumbnails[2324341]=new thumbnail(2324341,"151710","CEGC 2008, Bucharest, Romania","CRW_4049_thumb.jpg",130,87,15);thumbnails[2324342]=new thumbnail(2324342,"151710","CEGC 2008, Bucharest, Romania","CRW_4065_thumb.jpg",130,91,15);thumbnails[2324344]=new thumbnail(2324344,"151710","CEGC 2008, Bucharest, Romania","CRW_4064_thumb.jpg",130,87,15);thumbnails[2324348]=new thumbnail(2324348,"151710","CEGC 2008, Bucharest, Romania","CRW_4068_thumb.jpg",130,83,15);thumbnails[2324416]=new thumbnail(2324416,"34492","","ed21_thumb.jpg",130,195,15);thumbnails[2690048]=new thumbnail(2690048,"34492","","CRW_4178-ed_thumb.jpg",130,198,15);thumbnails[2690049]=new thumbnail(2690049,"34492","","Megan45-Edit_thumb.jpg",130,87,15);thumbnails[2690050]=new thumbnail(2690050,"34492","","Megan97-Edit_thumb.jpg",130,93,15);thumbnails[2690051]=new thumbnail(2690051,"34492","","Megan5492-Edit_thumb.jpg",130,182,15);thumbnails[3649877]=new thumbnail(3649877,"222888","Apollo Players, Comic Potential","_MG_6889ed_thumb.jpg",130,91,15);thumbnails[3649879]=new thumbnail(3649879,"222888","Apollo Players, Comic Potential","_MG_6899ed_thumb.jpg",130,114,15);thumbnails[3649884]=new thumbnail(3649884,"222888","Apollo Players, Comic Potential","_MG_6909ed_thumb.jpg",130,89,15);thumbnails[3649887]=new thumbnail(3649887,"222888","Apollo Players, Comic Potential","_MG_6917ed_thumb.jpg",130,104,15);thumbnails[3649890]=new thumbnail(3649890,"222888","Apollo Players, Comic Potential","_MG_6923ed_thumb.jpg",130,195,15);thumbnails[3649894]=new thumbnail(3649894,"222888","Apollo Players, Comic Potential","_MG_6924ed_thumb.jpg",130,98,15);thumbnails[3649900]=new thumbnail(3649900,"222888","Apollo Players, Comic Potential","_MG_6942ed1_thumb.jpg",130,126,15);thumbnails[3649903]=new thumbnail(3649903,"222888","Apollo Players, Comic Potential","_MG_6943ed_thumb.jpg",130,121,15);thumbnails[3649905]=new thumbnail(3649905,"222888","Apollo Players, Comic Potential","_MG_6958ed_thumb.jpg",130,127,15);thumbnails[3649918]=new thumbnail(3649918,"222888","Apollo Players, Comic Potential","_MG_6964ed_thumb.jpg",130,156,15);thumbnails[3649920]=new thumbnail(3649920,"222888","Apollo Players, Comic Potential","_MG_6973ed_thumb.jpg",130,161,15);thumbnails[3649929]=new thumbnail(3649929,"222888","Apollo Players, Comic Potential","_MG_6987ed_thumb.jpg",130,106,15);thumbnails[3649934]=new thumbnail(3649934,"222888","Apollo Players, Comic Potential","_MG_6992ed_thumb.jpg",130,92,15);thumbnails[3649935]=new thumbnail(3649935,"222888","Apollo Players, Comic Potential","_MG_7001ed_thumb.jpg",130,89,15);thumbnails[3649938]=new thumbnail(3649938,"222888","Apollo Players, Comic Potential","_MG_7010ed_thumb.jpg",130,218,15);thumbnails[3655452]=new thumbnail(3655452,"151710","Bristol Wine and Food Fair, 2008","CRW_4312_ED_thumb.jpg",130,90,15);thumbnails[3655455]=new thumbnail(3655455,"151710","Bristol Wine and Food Fair, 2008","CRW_5105_ED_thumb.jpg",130,93,15);thumbnails[3655461]=new thumbnail(3655461,"151710","Bristol Wine and Food Fair, 2008","CRW_5198_ED_thumb.jpg",130,98,15);thumbnails[3655463]=new thumbnail(3655463,"151710","Bristol Wine and Food Fair, 2008","WineFood046ed_thumb.jpg",130,87,15);thumbnails[3655466]=new thumbnail(3655466,"151710","Bristol Wine and Food Fair, 2008","WineFood082ed_thumb.jpg",130,76,15);thumbnails[3655468]=new thumbnail(3655468,"151710","Bristol Wine and Food Fair, 2008","WineFood193ed_thumb.jpg",130,104,15);thumbnails[3655470]=new thumbnail(3655470,"151710","Bristol Wine and Food Fair, 2008","WineFood236ed_thumb.jpg",130,81,15);thumbnails[3655471]=new thumbnail(3655471,"151710","Bristol Wine and Food Fair, 2008","WineFood344ed_thumb.jpg",130,87,15);thumbnails[3655472]=new thumbnail(3655472,"151710","Bristol Wine and Food Fair, 2008","WineFood388ed_thumb.jpg",130,220,15);thumbnails[3655475]=new thumbnail(3655475,"151710","Bristol Wine and Food Fair, 2008","WineFood455ed_thumb.jpg",130,87,15);thumbnails[3655476]=new thumbnail(3655476,"151710","Bristol Wine and Food Fair, 2008","WineFood456ed_thumb.jpg",130,92,15);thumbnails[3655480]=new thumbnail(3655480,"151710","Bristol Wine and Food Fair, 2008","WineFood473ed_thumb.jpg",130,195,15);thumbnails[3655482]=new thumbnail(3655482,"151710","Bristol Wine and Food Fair, 2008","WineFood581ed_thumb.jpg",130,59,15);thumbnails[431734]=new thumbnail(431734,"34487","A&H Wedding Church Archway","Andy&Helen-Wedding-001_thumb.jpg",130,217,15);thumbnails[431737]=new thumbnail(431737,"34487","A&H Wedding Flowers","Andy&Helen-Wedding-002_thumb.jpg",130,195,15);thumbnails[431757]=new thumbnail(431757,"34487","A&H Wedding Champagne Celebration","Andy&Helen-Wedding-003_thumb.jpg",130,104,15);thumbnails[431759]=new thumbnail(431759,"34487","A&H Wedding Bride's Shoes","Andy&Helen-Wedding-004_thumb.jpg",130,87,15);thumbnails[431761]=new thumbnail(431761,"34487","A&H Wedding Friends","Andy&Helen-Wedding-005_thumb.jpg",130,87,15);thumbnails[431763]=new thumbnail(431763,"34487","A&H Wedding Vicar, Bride and Father","Andy&Helen-Wedding-006_thumb.jpg",130,104,15);thumbnails[431764]=new thumbnail(431764,"34487","A&H Wedding Father and Mother of the Bride<br>\r\n","Andy&Helen-Wedding--007_thumb.jpg",130,104,15);thumbnails[431766]=new thumbnail(431766,"34487","A&H Wedding Signing the Register","Andy&Helen-Wedding-008_thumb.jpg",130,104,15);thumbnails[431768]=new thumbnail(431768,"34487","A&H Wedding Sister and Vicar","Andy&Helen-Wedding-009_thumb.jpg",130,87,15);thumbnails[5423520]=new thumbnail(5423520,"34487","","Jenkins-038_thumb.jpg",130,195,15);thumbnails[5423522]=new thumbnail(5423522,"34487","","Jenkins-055_thumb.jpg",130,87,15);thumbnails[5423525]=new thumbnail(5423525,"34487","","Jenkins-0561_thumb.jpg",130,195,15);thumbnails[5423527]=new thumbnail(5423527,"34487","","Jenkins-106_thumb.jpg",130,195,15);thumbnails[5423529]=new thumbnail(5423529,"34487","","Jenkins-148_thumb.jpg",130,195,15);thumbnails[5423530]=new thumbnail(5423530,"34487","","Jenkins-160_thumb.jpg",130,87,15);thumbnails[5423532]=new thumbnail(5423532,"34487","","Jenkins-162_thumb.jpg",130,65,15);thumbnails[5423575]=new thumbnail(5423575,"34487","","Jenkins-1661_thumb.jpg",130,87,15);thumbnails[5423582]=new thumbnail(5423582,"34487","","Jenkins-177_thumb.jpg",130,195,15);thumbnails[5423596]=new thumbnail(5423596,"34487","","Jenkins-181_thumb.jpg",130,195,15);thumbnails[5423619]=new thumbnail(5423619,"34487","","Jenkins-227_thumb.jpg",130,87,15);thumbnails[5423648]=new thumbnail(5423648,"34487","","Jenkins-322_thumb.jpg",130,212,15);var galleries=new Object();galleries[34491]=new gallery(34491,"1574593,1574589,1574587,1517570,1517569,1517567,1517565,693898,693897,693896,431841,431820,431814,431799,431796","Bands","gallery",[431796,431797,431799,431814,431820,431822,431841,431788,693896,693897,693898,1445280,1445284,1517565,1517567,1517569,1517570,1574587,1574589,1574593,1574597]);galleries[151710]=new gallery(151710,"3655482,3655472,3655468,3655461,3655455,3655452,2324348,2324342","Corporate & Events","gallery",[2324338,2324341,2324342,2324344,2324348,3655452,3655455,3655461,3655463,3655466,3655468,3655470,3655471,3655472,3655475,3655476,3655480,3655482]);galleries[34533]=new gallery(34533,"748408,722125,431941","Landscapes","gallery",[431941,722125,748408,748414,748416,748417]);galleries[34492]=new gallery(34492,"2690051,2690050,2690049,2690048,2324416,2305104,2302617,693894,693893,693892,693891,431940","Portraits","gallery",[431940,693891,693892,693893,693894,2302617,2305104,2324416,2690048,2690049,2690050,2690051]);galleries[222888]=new gallery(222888,"3649938,3649894,3649879","Theatre","gallery",[3649877,3649879,3649884,3649887,3649890,3649894,3649900,3649903,3649905,3649918,3649920,3649929,3649934,3649935,3649938]);galleries[34493]=new gallery(34493,"2302667,722126,722124,431954,431953,431946,431944","Travel","gallery",[431944,431946,431953,431954,722124,722126,2302667]);galleries[34487]=new gallery(34487,"5423582,5423575,5423532,5423527,5423525,5423522,5423520,431768,431766,431763,431759,431757,431734","Weddings","gallery",[431734,431737,431757,431759,431761,431763,431764,431766,431768,5423520,5423522,5423525,5423527,5423529,5423530,5423532,5423575,5423582,5423596,5423619,5423648]);var imageSets=new Object();imageSets[1]="5423575,5423532,3655482,3655468,3655455,2690051,2690049,2324416,2305104,2302667,2302617,722126,722125,722124,693897,693896,693892,431954,431941,431841,431820,431814,431799,431796,431766,431757,431734";imageSets[2]="5423582,5423575,5423532,5423527,5423525,5423522,5423520,3655482,3655472,3655468,3655461,3655455,3655452,3649938,3649894,3649879,2690051,2690050,2690049,2690048,2324416,2324348,2324342,2305104,2302667,2302617,1574593,1574589,1574587,1517570,1517569,1517567,1517565,748408,722126,722125,722124,693898,693897,693896,693894,693893,693892,693891,431954,431953,431946,431944,431941,431940,431841,431820,431814,431799,431796,431768,431766,431763,431759,431757,431734";imageSets[3]="5423582,5423575,5423532,5423527,5423525,5423522,5423520,3655455,2690048,2324416";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/nigelbayliss/images";break}switch(a){case 1:b="http://www1.clikpic.com/nigelbayliss/images";break}switch(a){case 2:b="http://admin.clikpic.com/nigelbayliss/images";break}switch(a){case 4:b="http://www.clikchurch.com/nigelbayliss/images";break}switch(a){case 5:b="http://www2.clikpic.com/nigelbayliss/images";break}switch(a){case 15:b="http://www3.clikpic.com/nigelbayliss/images";break}switch(a){case 21:b="http://www6.clikpic.com/nigelbayliss/images";break}switch(a){case 18:b="http://www4.clikpic.com/nigelbayliss/images";break}switch(a){case 19:b="http://www5.clikpic.com/nigelbayliss/images";break}switch(a){case 22:b="http://tpc5/clikpic/nigelbayliss/images";break}switch(a){case 23:b="http://tpc10/clikpic/nigelbayliss/images";break}switch(a){case 24:b="http://tpc15/clikpic/nigelbayliss/images";break}switch(a){case 25:b="http://tpc16/clikpic/nigelbayliss/images";break}switch(a){case 31:b="http://www7.clikpic.com/nigelbayliss/images";break}switch(a){case 32:b="http://admin2.clikpic.com/nigelbayliss/images";break}switch(a){case 33:b="http://www8.clikpic.com/nigelbayliss/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="Nigel Bayliss Photography: "+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="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="nigelbayliss@blueyonder.co.uk">';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="nigelbayliss@blueyonder.co.uk">';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(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+'")'})}}};