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[6304655]=new thumbnail(6304655,"178198","A stunning bracelet with tiny Garnet and green and pink Jade Gemstones.","mel2010-23234_thumb.jpg",130,161,5);thumbnails[5527939]=new thumbnail(5527939,"178198","Porcelain Bead bracelet.","mel1_041_thumb.JPG",130,175,5);thumbnails[5527949]=new thumbnail(5527949,"178198","Doodle daisy bracelet.","mel1_046_thumb.JPG",130,159,5);thumbnails[5527936]=new thumbnail(5527936,"178198","Brazilian Dragon Veins and Agate bead Bracelet.","mel1_040_thumb.JPG",130,151,5);thumbnails[5527941]=new thumbnail(5527941,"178198","Zebra Bracelet","mel1_042_thumb.JPG",130,137,5);thumbnails[5527942]=new thumbnail(5527942,"178198","Black Onyx and red coral bead bracelet.","mel1_043_thumb.JPG",130,136,5);thumbnails[5527944]=new thumbnail(5527944,"178198","Large green foiled glass bead bracelet.","mel1_045_thumb.JPG",130,124,5);thumbnails[5527930]=new thumbnail(5527930,"178198","SOLD","mel1_039_thumb.JPG",130,142,5);thumbnails[5757616]=new thumbnail(5757616,"178198","A lovely Turquoise stone bracelet.","mel2010_0008_thumb.jpg",130,137,5);thumbnails[6295046]=new thumbnail(6295046,"178198","A lovely bracelet with Lampwork Beads.","mel2010-20067_thumb.jpg",130,138,5);thumbnails[5556564]=new thumbnail(5556564,"155648","SOLD.","004_thumb.JPG",130,188,5);thumbnails[5556566]=new thumbnail(5556566,"155648","SOLD","005_thumb.JPG",130,181,5);thumbnails[5556568]=new thumbnail(5556568,"155648","SOLD","006_thumb.JPG",130,196,5);thumbnails[5556569]=new thumbnail(5556569,"155648","A lovely pair of Porcelain bead Sterling Silver earrings. ","008_thumb.JPG",130,172,5);thumbnails[5556570]=new thumbnail(5556570,"155648","A lovely pair of WireBall bead earrings.","009_thumb.JPG",130,157,5);thumbnails[6294990]=new thumbnail(6294990,"155648","A stunning pair of Black Onyx earrings.","mel2010-1099_thumb.jpg",130,134,5);thumbnails[5556572]=new thumbnail(5556572,"155648","A lovely pair of Sterling Silver earrings.","020_thumb.JPG",130,167,5);thumbnails[5557701]=new thumbnail(5557701,"155648","A pair of Swarovski crystal bead earrings.","021_thumb.JPG",130,140,5);thumbnails[5557716]=new thumbnail(5557716,"155648","A lovely pair of Acrylic teardrop earrings.","022_thumb.JPG",130,144,5);thumbnails[5557718]=new thumbnail(5557718,"155648","A lovely flowery pair Lampwork earrings.","023_thumb.JPG",130,143,5);thumbnails[5557721]=new thumbnail(5557721,"155648","A lovely pair of Lampwork bead earrings.","024_thumb.JPG",130,135,5);thumbnails[5557723]=new thumbnail(5557723,"155648","A pair of pretty Acrylic  beads earrings.","025_thumb.JPG",130,133,5);thumbnails[5557725]=new thumbnail(5557725,"155648","A lovely pair of Acrylic teardrop earrings.","026_thumb.JPG",130,139,5);thumbnails[5557726]=new thumbnail(5557726,"155648","A lovely pair of Turquoise Gemstone earrings.","027_thumb.JPG",130,174,5);thumbnails[5557728]=new thumbnail(5557728,"155648","A lovely pair of cute purple lampwork glass round beads, with beautiful hand painted blue flower on the surface.","028_thumb.JPG",130,138,5);thumbnails[5557730]=new thumbnail(5557730,"155648","A lovely pair of heart earrrings.","029_thumb.JPG",130,152,5);thumbnails[6295477]=new thumbnail(6295477,"155648","A lovely pair of Chandelier earrings.","mel2010-0980_thumb.jpg",130,165,5);thumbnails[5557734]=new thumbnail(5557734,"155648","A lovely pair of Black Onyx earrings.","031_thumb.JPG",130,156,5);thumbnails[5557736]=new thumbnail(5557736,"155648","A charming pair of Doodle daisy antique copper earrings.<br>\r\n ","032_thumb.JPG",130,146,5);thumbnails[5557738]=new thumbnail(5557738,"155648","A little pair of Antique copper and Black Onyx earrings.","033_thumb.JPG",130,127,5);thumbnails[5557739]=new thumbnail(5557739,"155648","A lovely pair of cute purple lampwork glass earrings.","034_thumb.JPG",130,130,5);thumbnails[5557741]=new thumbnail(5557741,"155648","SOLD.","036_thumb.JPG",130,132,5);thumbnails[5557768]=new thumbnail(5557768,"155648","A cute pair of black flower handmade lampwork glass and Black Onyx earrings.","035_thumb.JPG",130,120,5);thumbnails[5757399]=new thumbnail(5757399,"155648","Czech Designer : Puff Diamond Silver foil bead earrings. ","mel2010_0006_thumb.jpg",130,157,5);thumbnails[6288156]=new thumbnail(6288156,"155648","SOLD.","mel2010-8_thumb.jpg",130,145,5);thumbnails[5757573]=new thumbnail(5757573,"155648","Cute lampwork glass round beads, with beautiful hand painted Turquoise flower earrings.","mel2010_0002_thumb.jpg",130,129,5);thumbnails[6295846]=new thumbnail(6295846,"155648","A lovely pair of snowdrop earrings.","mel2010-8097_thumb.jpg",130,139,5);thumbnails[6295454]=new thumbnail(6295454,"144769","SOLD.","mel2010-30087_thumb.jpg",130,215,5);thumbnails[6307435]=new thumbnail(6307435,"144769","A lovely chunky necklace with a mix of Czch, Onyx, glass, and large Jasper gemstone.","mel2010-6750_thumb.jpg",130,211,5);thumbnails[6307555]=new thumbnail(6307555,"144769","","mel2010-888777_thumb.jpg",130,170,5);thumbnails[5527733]=new thumbnail(5527733,"144769","A lovely Indian Agate round focal green pendant necklace.","mel1_009_thumb.JPG",130,181,5);thumbnails[5527803]=new thumbnail(5527803,"144769","Indian Agate and Jade bead necklace.","mel1_024_thumb.JPG",130,158,5);thumbnails[5527798]=new thumbnail(5527798,"144769","A lovely Indian Agate Wavy Heart Pendant.  ","mel1_018_thumb.JPG",130,151,5);thumbnails[5528020]=new thumbnail(5528020,"144769","A lovely Glass Pearl necklace and earring set.","mel1_084_thumb.JPG",130,197,5);thumbnails[5527994]=new thumbnail(5527994,"144769","Wooden necklace.","mel1_071_thumb.JPG",130,179,5);thumbnails[6295471]=new thumbnail(6295471,"144769","A lovely long necklace with a cluster of hanging glass beads and charms.","mel2010-9000_thumb.jpg",130,199,5);thumbnails[5527819]=new thumbnail(5527819,"144769","The Amethyst Crystal necklace.","mel1_029_thumb.JPG",130,167,5);thumbnails[5527735]=new thumbnail(5527735,"144769","A lovely Carnelian Agate Heart focal Pendant necklace.","mel1_012_thumb.JPG",130,152,5);thumbnails[5527717]=new thumbnail(5527717,"144769","A lovely Czech Designer Heart necklace.","mel1_003_thumb.JPG",130,148,5);thumbnails[5527676]=new thumbnail(5527676,"144769","A charming Indian Agate round donut Pendant necklace.","mel1_0011_thumb.JPG",130,90,5);thumbnails[5554143]=new thumbnail(5554143,"144769","A lovely necklace and earring set of Swarovski and glass beads,Czech Designer Topaz & Gold heart pentant.","mel2010-4_thumb.jpg",130,207,5);thumbnails[5554155]=new thumbnail(5554155,"144769","A lovely necklace and earring set with Black flower handmade lampwork glass round beads.","mel1_017_00F86DA7-1EC9-D45B-1C15CF91118559C7_thumb.JPG",130,189,5);thumbnails[5757142]=new thumbnail(5757142,"144769","A lovely Indian Agate Round Focal Bead Pendant necklace.","mel2010_0020_thumb.jpg",130,183,5);thumbnails[6295121]=new thumbnail(6295121,"144769","A lovely long necklace with glass Pearl Mix. ","mel2010-70043_thumb.jpg",130,186,5);thumbnails[5757228]=new thumbnail(5757228,"144769","Top Grade Qualty Finest Unique Brazilan Dragon Veins Agate Vase Shape Bead necklace.   <br>\r\n","mel2010_00121_thumb.jpg",130,162,5);thumbnails[5762923]=new thumbnail(5762923,"144769","A lovely floating necklace and earring set.","mel2010_0010_thumb.jpg",130,189,5);thumbnails[5527996]=new thumbnail(5527996,"144770","SOLD.","mel1_072_thumb.JPG",130,182,5);thumbnails[5527812]=new thumbnail(5527812,"144770","A lovely Blue Turquoise Heart necklace.","mel1_034_thumb.JPG",130,162,5);thumbnails[5527986]=new thumbnail(5527986,"144770","A lovely Agate Heaven Eye and Turquoise Gemstone necklace.","mel1_061_thumb.JPG",130,200,5);thumbnails[5528027]=new thumbnail(5528027,"144770","Unique blue dye howlite turquoise and red Coral nacklace.","mel1_086_thumb.JPG",130,204,5);thumbnails[6287628]=new thumbnail(6287628,"144770","SOLD.","mel2010-july2_thumb.jpg",130,182,5);thumbnails[5527989]=new thumbnail(5527989,"144770","Chunky Turquoise Baroque Gemstone necklace.","mel2010-30_thumb.jpg",130,166,5);thumbnails[5527800]=new thumbnail(5527800,"144770","A lovely Turquoise Heart necklace.","mel1_019_thumb.JPG",130,173,5);thumbnails[6288010]=new thumbnail(6288010,"144770","A beautiful Turquoise stone heart pentant necklace and earring set.","mel2010-5_thumb.jpg",130,189,5);thumbnails[5527737]=new thumbnail(5527737,"144770","A lovely Turquoise Gemstone necklace.","mel1_013_thumb.JPG",130,176,5);thumbnails[5757099]=new thumbnail(5757099,"144770","WireBall Bead, french knot necklace.","mel2010_0017_thumb.jpg",130,169,5);thumbnails[5762422]=new thumbnail(5762422,"144770","SOLD.","mel2010_0022_thumb.jpg",130,163,5);thumbnails[5527992]=new thumbnail(5527992,"144770","Red Coral Tube necklace.","mel1_069_thumb.JPG",130,209,5);thumbnails[5527952]=new thumbnail(5527952,"144770","Green/Blue Turquoise floating necklace.","mel1_049_thumb.JPG",130,183,5);thumbnails[5527807]=new thumbnail(5527807,"144770","SOLD.","mel1_032_thumb.JPG",130,182,5);thumbnails[5527814]=new thumbnail(5527814,"144770","A long Blue Turquoise and red coral bead necklace. ","mel1_038_thumb.JPG",130,144,5);thumbnails[5556563]=new thumbnail(5556563,"144770","A lovely long multi colour necklace.","002_thumb.JPG",130,178,5);thumbnails[5527985]=new thumbnail(5527985,"144770","Vintage style Turquoise necklace.","mel1_058_thumb.JPG",130,191,5);thumbnails[5527738]=new thumbnail(5527738,"144770","A lovely Tusquoise hearts and chips necklace.","mel1_016_thumb.JPG",130,169,5);thumbnails[5554132]=new thumbnail(5554132,"144770","A lovely Red Coral pendant with Carnelian Agate Gemstone necklace and earring set.","mel2010-10_thumb.jpg",130,191,5);thumbnails[5554144]=new thumbnail(5554144,"144770","A lovely floating necklace and earring set with Deep red coral and Black Onyx beads.","mel2010-121_thumb.jpg",130,157,5);thumbnails[5554151]=new thumbnail(5554151,"144770","A Unique Turquoise Baroque Pendant necklace and earring set.","mel1_013_00F724BC-1EC9-D45B-1CBD3AE18B6475F4_thumb.JPG",130,188,5);thumbnails[6287924]=new thumbnail(6287924,"144770","A Black & Red Lampwork Glass Heart Pendant necklace and earrings set.","mel2010-3_thumb.jpg",130,165,5);thumbnails[6307558]=new thumbnail(6307558,"148881","A stunning floating necklace with glass flower Lampwork square beads and white Jade gemstones.","mel201-34343_thumb.jpg",130,173,5);thumbnails[5527802]=new thumbnail(5527802,"148881","A lovely Garnet and exquisite Amethyst  crystal with a purple glass flower pendant necklace.","mel1_021_thumb.JPG",130,175,5);thumbnails[6288159]=new thumbnail(6288159,"148881","SOLD.","mel2010-9_thumb.jpg",130,210,5);thumbnails[6288083]=new thumbnail(6288083,"148881","A lovely summer necklace with flower patern Acrylic beads and Czch Fairpolish beads.","mel2010-7_thumb.jpg",130,189,5);thumbnails[5527960]=new thumbnail(5527960,"148881","A lovely necklace with Gorgeous Lapis Lazuli Gemstones and a Black Onyx pendant.","mel1_052_thumb.JPG",130,163,5);thumbnails[5527997]=new thumbnail(5527997,"148881","A lovely Indian Agate Heart with Pink Crazy Lace Agate Gemstone necklace.","mel1_074_thumb.JPG",130,170,5);thumbnails[5528029]=new thumbnail(5528029,"148881","SOLD.","mel1_087_thumb.JPG",130,197,5);thumbnails[5528032]=new thumbnail(5528032,"148881","A lovely Black Onyx,pink mother of pearl, exquisite green lampwork glass silver bead necklace.","mel1_088_thumb.JPG",130,187,5);thumbnails[5528023]=new thumbnail(5528023,"148881","A lovely round pink and green zebra wood and Antique copper bead necklace.","mel1_085_thumb.JPG",130,157,5);thumbnails[5528016]=new thumbnail(5528016,"148881","A lovely necklace and earring set of Black Onyx, silver spacers and an Agate Heaven Eye bead pendant.","mel1_083_thumb.JPG",130,223,5);thumbnails[5554137]=new thumbnail(5554137,"148881","SOLD.","mel2010-444_thumb.jpg",130,228,5);thumbnails[5554138]=new thumbnail(5554138,"148881","A lovely pink Rhodonite square nuggets,Mauve Ocean Jasper and Black Onyx tear drop necklace.","mel1_008_thumb.JPG",130,182,5);thumbnails[5554153]=new thumbnail(5554153,"148881","A lovely floating necklace and earring set with pink Lampwork Glass Square Flowers and Black Onyx.  ","mel1_015_thumb.JPG",130,196,5);thumbnails[5753325]=new thumbnail(5753325,"148881","A lovely bright pink necklace.","mel2010_0025_thumb.jpg",130,181,5);thumbnails[6302608]=new thumbnail(6302608,"148881","SOLD.","mel2010-8675641_thumb.jpg",130,198,5);thumbnails[5762821]=new thumbnail(5762821,"148881","A lovely Indian Agate round pendant and  Jade Stone Bead necklace.","mel2010_0015_thumb.jpg",130,159,5);thumbnails[5594818]=new thumbnail(5594818,"148881","A beautiful Freash Water Pearl necklace and earring set with a Karen Silver Hammered Domed Heart Pendant.<br>\r\n","mel2010-july1_thumb.jpg",130,198,5);thumbnails[5527963]=new thumbnail(5527963,"155419","SOLD.","mel1_056_thumb.JPG",130,163,5);var galleries=new Object();galleries[178198]=new gallery(178198,"5527930","Bracelets","gallery",[6304655,5527939,5527949,5527936,5527941,5527942,5527944,5527930,5757616,6295046]);galleries[155648]=new gallery(155648,"6295846,6295477,6294990,6288156,5757573,5757399,5557768,5557741,5557739,5557738","Earrings","gallery",[5556564,5556566,5556568,5556569,5556570,6294990,5556572,5557701,5557716,5557718,5557721,5557723,5557725,5557726,5557728,5557730,6295477,5557734,5557736,5557738,5557739,5557741,5557768,5757399,6288156,5757573,6295846]);galleries[144769]=new gallery(144769,"5527717","Browns and Greens","gallery",[6295454,6307435,6307555,5527733,5527803,5527798,5528020,5527994,6295471,5527819,5527735,5527717,5527676,5554143,5554155,5757142,6295121,5757228,5762923]);galleries[144770]=new gallery(144770,"6288010,6287924,6287628,5762422,5757099,5556563,5554151,5554144,5554132,5528027","Turquoise and Reds","gallery",[5527996,5527812,5527986,5528027,6287628,5527989,5527800,6288010,5527737,5757099,5762422,5527992,5527952,5527807,5527814,5556563,5527985,5527738,5554132,5554144,5554151,6287924]);galleries[148881]=new gallery(148881,"5527960","Purples and Pinks","gallery",[6307558,5527802,6288159,6288083,5527960,5527997,5528029,5528032,5528023,5528016,5554137,5554138,5554153,5753325,6302608,5762821,5594818]);galleries[155419]=new gallery(155419,"5527963","Lariat Necklaces","gallery",[5527963]);var imageSets=new Object();imageSets[1]="6288159,6288156,6288010,5757616,5594818,5556564,5554144";imageSets[2]="5527963,5527960,5527930,5527717";imageSets[3]="6307558,6307555,6307435,6304655,6302608,6295846,6295477,6295471,6295454,6295121,6295046,6294990,6288159,6288156,6288083,6288010,6287924,6287628,5762923,5762821,5762422,5757616,5757573,5757399,5757228,5757142,5757099,5753325,5594818,5557768,5557741,5557739,5557738,5557736,5557734,5557730,5557728,5557726,5557725,5557723,5557721,5557718,5557716,5557701,5556572,5556570,5556569,5556568,5556566,5556564";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/cmelwills/images";break}switch(a){case 1:b="http://www1.clikpic.com/cmelwills/images";break}switch(a){case 2:b="http://admin.clikpic.com/cmelwills/images";break}switch(a){case 24:b="http://tpc15/clikpic/cmelwills/images";break}switch(a){case 4:b="http://www.clikchurch.com/cmelwills/images";break}switch(a){case 5:b="http://www2.clikpic.com/cmelwills/images";break}switch(a){case 22:b="http://tpc5/clikpic/cmelwills/images";break}switch(a){case 23:b="http://tpc10/clikpic/cmelwills/images";break}switch(a){case 25:b="http://tpc16/clikpic/cmelwills/images";break}switch(a){case 15:b="http://www3.clikpic.com/cmelwills/images";break}switch(a){case 18:b="http://www4.clikpic.com/cmelwills/images";break}switch(a){case 19:b="http://www5.clikpic.com/cmelwills/images";break}switch(a){case 31:b="http://www7.clikpic.com/cmelwills/images";break}switch(a){case 32:b="http://admin2.clikpic.com/cmelwills/images";break}switch(a){case 33:b="http://www8.clikpic.com/cmelwills/images";break}switch(a){case 34:b="http://www9.clikpic.com/cmelwills/images";break}switch(a){case 35:b="http://admin3.clikpic.com/cmelwills/images";break}switch(a){case 37:b="http://admin4.clikpic.com/cmelwills/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="'+escape(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="Melanys Jewellery: "+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="cmelwills@aol.com">';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="cmelwills@aol.com">';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+'")'})}}};