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[65860]=new thumbnail(65860,"6404","Ref:10FRIARS CRAG","Friars  Crag BWJPG_thumb.jpg",130,87,18);thumbnails[65874]=new thumbnail(65874,"6404","Ref:11 FRIARS CRAG","Friars  CragJPG_thumb.jpg",130,87,18);thumbnails[65786]=new thumbnail(65786,"6404","Ref:12 WATERFALLS, STONETHWAITE","CRWStonethwaite_0011JPG_thumb.jpg",130,87,18);thumbnails[65823]=new thumbnail(65823,"6404","Ref:13 LANGSTRATH","CRWStonethwaite_0034JPG_thumb.jpg",130,65,18);thumbnails[65835]=new thumbnail(65835,"6404","Ref:14 CATSTYCAM.","Eastern Fells_0013JPG_thumb.jpg",130,195,18);thumbnails[65845]=new thumbnail(65845,"6404","Ref:15 RED TARN.","Eastern Lakes 2JPG_thumb.jpg",130,87,18);thumbnails[65853]=new thumbnail(65853,"6404","Ref:16 EASTERN FELLS","eastern lakesJPG_thumb.jpg",130,87,18);thumbnails[87728]=new thumbnail(87728,"6381","Ref:M22.Lindisfarne","IMG_0018JPG_thumb.jpg",130,195,18);thumbnails[87732]=new thumbnail(87732,"6381","Ref:M23. Lindisfarne.","IMG_0066JPG_thumb.jpg",130,83,18);thumbnails[65457]=new thumbnail(65457,"6399","Ref:27 ON PARADE.","CRW_Northumberland Coast 0015JPG_thumb.jpg",130,59,18);thumbnails[65561]=new thumbnail(65561,"6381","Ref:M5 AQUALUNG","Aqualung 2JPG_thumb.jpg",130,92,18);thumbnails[65563]=new thumbnail(65563,"6381","Ref:M6 AQUALUNG","Aqualung 3JPG1_thumb.jpg",130,87,18);thumbnails[65567]=new thumbnail(65567,"6381","Ref:M7 AQUALUNG","Aqualung 4JPG_thumb.jpg",130,87,18);thumbnails[65568]=new thumbnail(65568,"6381","Ref:M8 AQUALUNG","AqualungJPG_thumb.jpg",130,87,18);thumbnails[65572]=new thumbnail(65572,"6381","Ref:M9 ART GARFUNKEL","Art Garfunkel 2JPG_thumb.jpg",130,181,18);thumbnails[65573]=new thumbnail(65573,"6381","Ref:M10 ART GARFUNKEL","Art Garfunkel 3JPG_thumb.jpg",130,98,18);thumbnails[65688]=new thumbnail(65688,"6382","Ref01: THE BAY, LAIDE, WESTER ROSS.<br>\r\n<br>\r\n",",The Bay, Laide 2 BWJPG_thumb.jpg",130,86,18);thumbnails[65691]=new thumbnail(65691,"6382","Ref:02 COLD DAY ON HAYSTACKS.<br>\r\n","Cold day on Haystacks BWJPG_thumb.jpg",130,87,18);thumbnails[65695]=new thumbnail(65695,"6382","Ref:03 DUNSTANBURGH CASTLE","Dunstanburgh BWJPG_thumb.jpg",130,195,18);thumbnails[65697]=new thumbnail(65697,"6382","Ref:04 GREAT GABLE","Great Gable A3 BWJPG_thumb.jpg",130,195,18);thumbnails[65699]=new thumbnail(65699,"6382","Ref:05 HERON.","Heron BW A3 JPG_thumb.jpg",130,80,18);thumbnails[65700]=new thumbnail(65700,"6382","Ref:06 KILLHOPE FROM ROBERTS FIELD.","Killhope A3JPG_thumb.jpg",130,97,18);thumbnails[65707]=new thumbnail(65707,"6382","Ref:08 SUNSET,LAIDE.","Laide 4 BWJPG_thumb.jpg",130,60,18);thumbnails[65711]=new thumbnail(65711,"6382","Ref:07 SKAWDALE PASS,","Skawdale Pass BWJPG_thumb.jpg",130,87,18);thumbnails[65713]=new thumbnail(65713,"6382","Ref:09 SKAWDALE PASS.","Skawdall Pass2 BWJPG_thumb.jpg",130,87,18);thumbnails[65716]=new thumbnail(65716,"6399","Ref:25 HEATHER ON THE BYERHOPE MOORS.","CRW Byerhope_0028JPG_thumb.jpg",130,195,18);thumbnails[65729]=new thumbnail(65729,"6399","Ref:26 SPION KOP, ALLENHEADS.","CRW_Byerhope 0024JPG_thumb.jpg",130,87,18);thumbnails[65734]=new thumbnail(65734,"6399","Ref:28 NOTHUMBRIAN COAST","CRW_Northumbrian Coast 00004 BWJPG_thumb.jpg",130,81,18);thumbnails[65754]=new thumbnail(65754,"6399","Ref:29 NORTHUMBRIAN COAST","CRW_Northumbrian Coast 00004JPG_thumb.jpg",130,81,18);thumbnails[65756]=new thumbnail(65756,"6399","Ref:30 OYSTER CATCHERS","CRW_Northumbrian Coast 0014JPG_thumb.jpg",130,40,18);thumbnails[65759]=new thumbnail(65759,"6399","Ref:31 NORTHUMBRIAN COAST","CRW_Northumbrian Coast 0036JPG_thumb.jpg",130,92,18);thumbnails[65830]=new thumbnail(65830,"6404","Ref:18 DOCK TARN","Dock Tarn 2JPG1_thumb.jpg",130,87,18);thumbnails[65914]=new thumbnail(65914,"6408","Ref:45 COTTON GRASS BESIDE LOCH DUBH GEODHACHAN THARAILT","Cotton Grass beside Loch  Dubh Geodhachan Tharailt, Wester RossJPG_thumb.jpg",130,67,18);thumbnails[65925]=new thumbnail(65925,"6408","Ref:32 LAIDE","Laide 6JPG_thumb.jpg",130,85,18);thumbnails[65949]=new thumbnail(65949,"6408","Ref:33 LAIDE SUNRISE","Laide SunriseJPG_thumb.jpg",130,87,18);thumbnails[65951]=new thumbnail(65951,"6408","Ref:34 LOCH DUBH GEODHACHAN THARAILT.","Loch Dubh Geodhachan Tharailt, Wester RossJPG_thumb.jpg",130,87,18);thumbnails[66196]=new thumbnail(66196,"6408","Ref:36 RAINBOW, LAIDE.","Rainbow, Laide 2-1JPG1_thumb.jpg",130,210,18);thumbnails[66201]=new thumbnail(66201,"6408","Ref:35 MELLON BEAG, WESTER ROSS.","Mellon Beag, Wester RossJPG_thumb.jpg",130,72,18);thumbnails[67156]=new thumbnail(67156,"6381","Ref:M11 ART GARFUNKEL","Art Garfunkel 4JPG_thumb.jpg",130,98,18);thumbnails[67158]=new thumbnail(67158,"6381","Ref:M12 ART GARFUNKEL","Art GarfunkelJPG_thumb.jpg",130,173,18);thumbnails[67159]=new thumbnail(67159,"6381","Ref:M13 ARTHUR BROWN","Arthur Brown 2JPG_thumb.jpg",130,128,18);thumbnails[67162]=new thumbnail(67162,"6381","Ref:M14 ARTHUR BROWN","Arthur BrownJPG1_thumb.jpg",130,87,18);thumbnails[67163]=new thumbnail(67163,"6381","Ref:M2 BUDDY GUY","buddy1JPG_thumb.jpg",130,194,18);thumbnails[67164]=new thumbnail(67164,"6381","Ref:M1 BUDDY GUY AND JIMMY VAUGHN","Buddy and JimmyJPG_thumb.jpg",130,100,18);thumbnails[67180]=new thumbnail(67180,"6381","Ref:M3 CHRIS FARLOW","Chris FarlowJPG_thumb.jpg",130,173,18);thumbnails[67181]=new thumbnail(67181,"6381","Ref:M4 CHRISSIE HYNDE","Chrissie Hynde 2JPG_thumb.jpg",130,87,18);thumbnails[84758]=new thumbnail(84758,"8038","Ref: Go1. Anemone in jug","Anemone in JugJPG_thumb.jpg",130,138,18);thumbnails[85256]=new thumbnail(85256,"8077","Ref:M01 Corsican hellebores","att821JPG_thumb.jpg",130,176,18);thumbnails[85261]=new thumbnail(85261,"8077","Ref M02: Sunset over Derwentwater","att823JPG_thumb.jpg",130,95,18);thumbnails[85268]=new thumbnail(85268,"8077","Ref M03: Old barn, Hartsop.","att825JPG_thumb.jpg",130,183,18);thumbnails[85281]=new thumbnail(85281,"8077","Ref M04: Snowdrops","att827JPG_thumb.jpg",130,90,18);thumbnails[85286]=new thumbnail(85286,"8077","Ref M05: Fuschias","att829JPG_thumb.jpg",130,184,18);thumbnails[85292]=new thumbnail(85292,"8077","Ref.M06: The Five Sisters, Alston.","att831JPG_thumb.jpg",130,93,18);thumbnails[85294]=new thumbnail(85294,"8077","Ref.M09: Begonias","att839JPG_thumb.jpg",130,167,18);thumbnails[85295]=new thumbnail(85295,"8077","Ref.M07: Daffs.","att833JPG1_thumb.jpg",130,97,18);thumbnails[85305]=new thumbnail(85305,"8077","Ref.M08: Harvest, Allendale.","att835JPG_thumb.jpg",130,87,18);thumbnails[85309]=new thumbnail(85309,"8077","Ref.M10: Elterwater","att841JPG1_thumb.jpg",130,107,18);thumbnails[85313]=new thumbnail(85313,"8038","Ref.G02: Basket of flowers.","Basket of FlowersJPG_thumb.jpg",130,90,18);thumbnails[85323]=new thumbnail(85323,"8038","Ref.G03 Botanical Tulips after the Rain.","Botanical Tulips after the rainJPG_thumb.jpg",130,114,18);thumbnails[85325]=new thumbnail(85325,"8038","Ref.04: Corsican Hellebore","Corsican HelleboreJPG_thumb.jpg",130,259,18);thumbnails[85330]=new thumbnail(85330,"8038","Ref.G05: Daisies.","Daisies001_thumb.jpg",130,193,18);thumbnails[85332]=new thumbnail(85332,"8038","Ref.G06: Daphne Retusa","Daphne RetusaJPG_thumb.jpg",130,194,18);thumbnails[85336]=new thumbnail(85336,"8038","Ref.G07: Full Blown Tulip.","Full Blown TulipJPG_thumb.jpg",130,203,18);thumbnails[85339]=new thumbnail(85339,"8038","Ref.G08: fuschias with Daisies.","Fuschia with pansiesJPG_thumb.jpg",130,197,18);thumbnails[87685]=new thumbnail(87685,"6381","Ref:M15. Jackson Browne","Jackson Browne 2JPG_thumb.jpg",130,100,18);thumbnails[87718]=new thumbnail(87718,"6381","Ref:M16. Sheryl Crowe","Sheryl Crowe 3JPG_thumb.jpg",130,175,18);thumbnails[87720]=new thumbnail(87720,"6381","Ref:M17. Sheryl Crowe","Sheryl Crowe 4JPG_thumb.jpg",130,95,18);thumbnails[87721]=new thumbnail(87721,"6381","Ref:M18 Sheryl Crowe","sherylJPG_thumb.jpg",130,195,18);thumbnails[87723]=new thumbnail(87723,"6381","Ref:19. Suede.","SuedeJPG_thumb.jpg",130,146,18);thumbnails[87724]=new thumbnail(87724,"6381","Ref:M20. Dr. Feelgood.","Dr FeelgoodJPG_thumb.jpg",130,211,18);thumbnails[87726]=new thumbnail(87726,"6381","Ref:M21. Peter Green.","Peter GreenJPG_thumb.jpg",130,176,18);thumbnails[91840]=new thumbnail(91840,"8038","Ref.G09: Garden still life","Garden Still LifeJPG_thumb.jpg",130,90,18);thumbnails[91852]=new thumbnail(91852,"8038","Ref.G10:Hellebores.","HelleboresJPG_thumb.jpg",130,100,18);thumbnails[91857]=new thumbnail(91857,"8038","Ref.G11:Himalayan Blues.","Himalayan BluesJPG_thumb.jpg",130,181,18);thumbnails[91858]=new thumbnail(91858,"8038","Ref.G12:Iris after the rain.","Iris after the rainJPG_thumb.jpg",130,241,18);thumbnails[91861]=new thumbnail(91861,"8038","Ref.G13:Narcissus.","NarcissusJPG_thumb.jpg",130,58,18);thumbnails[91880]=new thumbnail(91880,"8038","Ref.G14: Pinks by the window.","Pinks by the windowJPG_thumb.jpg",130,90,18);thumbnails[91884]=new thumbnail(91884,"8038","Ref.G15: Skunk lilies","Skunk LiliesJPG_thumb.jpg",130,177,18);thumbnails[91893]=new thumbnail(91893,"8038","Ref.G16: Snowdrops.","SnowdropsJPG_thumb.jpg",130,100,18);thumbnails[91896]=new thumbnail(91896,"8038","Ref.G17: Spring garden.","Spring GardenJPG_thumb.jpg",130,194,18);thumbnails[91905]=new thumbnail(91905,"8038","Ref.G18: Still life with lamp.","Still Life with LampJPG_thumb.jpg",130,94,18);thumbnails[91917]=new thumbnail(91917,"8038","Ref.G19.Still life with trug.","Still Life with TrugJPG_thumb.jpg",130,106,18);thumbnails[91925]=new thumbnail(91925,"8038","Ref.G20: Sunflowers with echinops.","Sunflower with EchinopsJPG_thumb.jpg",130,89,18);thumbnails[607300]=new thumbnail(607300,"","Ref:- Bk1<br>\r\nPhotography Tips.<br>\r\nFree Book...Click photograph for more information<br>\r\n","PHOTOGRAPHY-TIPS-COVER-COMP_thumb.gif",130,98,18);thumbnails[3365803]=new thumbnail(3365803,"205462","STARBUCKS REFLECTIONS<br>\r\nColoured pencil drawing","Starbucks 1A4_thumb.jpg",130,95,18);thumbnails[3365867]=new thumbnail(3365867,"205462","STARBUCKS INTERIOR<br>\r\nColoured pencil drawing","Starbucks 2_thumb.jpg",130,88,18);thumbnails[3365877]=new thumbnail(3365877,"205462","STARBUCKS REFLECTIONS 2<br>\r\nColoured pencil drawing","Starbucks 3_thumb.jpg",130,111,18);thumbnails[3365944]=new thumbnail(3365944,"205462","  ROSES AND APPLES<br>\r\nColoured Pencil drawing","Final Drawing, coloured pencil on mylar_thumb.jpg",130,89,18);thumbnails[3537406]=new thumbnail(3537406,"6399","OLD BARN, ALLENHEADS","old_barn_Allenheads_thumb.jpg",130,55,18);thumbnails[4777191]=new thumbnail(4777191,"","Self Portrait,pencil","Self_Portrait_thumb.jpg",130,144,18);var galleries=new Object();galleries[6382]=new gallery(6382,"65713,65711,65707,65700,65699,65697,65695,65691,65688"," BLACK & WHITE  GALLERY","gallery",[65688,65691,65695,65697,65699,65700,65707,65711,65713]);galleries[8038]=new gallery(8038,"91925,91917,91905,91896,91893,91884,91880,91861,91858,91857","GICLEE FINE ART PRINTS","gallery",[84758,85313,85323,85325,85330,85332,85336,85339,91840,91852,91857,91858,91861,91880,91884,91893,91896,91905,91917,91925]);galleries[6404]=new gallery(6404,"65874,65860,65853,65845,65835,65830,65823,65786","LAKE DISTRICT GALLERY","gallery",[65860,65874,65786,65823,65835,65845,65853,65830]);galleries[8077]=new gallery(8077,"85309,85305,85295,85294,85292,85286,85281,85268,85261,85256","MINIATURE PRINTS","gallery",[85256,85261,85268,85281,85286,85292,85294,85295,85305,85309]);galleries[6381]=new gallery(6381,"87732,87728,87726,87724,87723,87721,87720,87718,87685,67181","MUSIC PERSONALITIES  GALLERY ","gallery",[87728,87732,65561,65563,65567,65568,65572,65573,67156,67158,67159,67162,67163,67164,67180,67181,87685,87718,87720,87721,87723,87724,87726]);galleries[6399]=new gallery(6399,"3537406","NORTHUMBERLAND GALLERY","gallery",[65457,65716,65729,65734,65754,65756,65759,3537406]);galleries[205462]=new gallery(205462,"3365944,3365877,3365867,3365803","ORIGINAL PAINTINGS","gallery",[3365803,3365867,3365877,3365944]);galleries[6408]=new gallery(6408,"66201,66196,65951,65949,65925,65914","SCOTLAND  GALLERY","gallery",[65914,65925,65949,65951,66196,66201]);var imageSets=new Object();imageSets[1]="3537406,3365867,3365803,91905,91896,87721,85323,84758,65695,65688,65457";imageSets[2]="3537406";imageSets[3]="4777191,3537406,3365944,3365877,3365867,3365803,607300,91925,91917,91905,91896,91893,91884,91880,91861,91858,91857,91852,91840,87732,87728,87726,87724,87723,87721,87720,87718,87685,85339,85336,85332,85330,85325,85323,85313,85309,85305,85295,85294,85292,85286,85281,85268,85261,85256,84758,67181,67180,67164,67163";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/rmaddison/images";break}switch(a){case 1:b="http://www1.clikpic.com/rmaddison/images";break}switch(a){case 2:b="http://admin.clikpic.com/rmaddison/images";break}switch(a){case 24:b="http://tpc15/clikpic/rmaddison/images";break}switch(a){case 4:b="http://www.clikchurch.com/rmaddison/images";break}switch(a){case 5:b="http://www2.clikpic.com/rmaddison/images";break}switch(a){case 22:b="http://tpc5/clikpic/rmaddison/images";break}switch(a){case 23:b="http://tpc10/clikpic/rmaddison/images";break}switch(a){case 25:b="http://tpc16/clikpic/rmaddison/images";break}switch(a){case 15:b="http://www3.clikpic.com/rmaddison/images";break}switch(a){case 18:b="http://www4.clikpic.com/rmaddison/images";break}switch(a){case 19:b="http://www5.clikpic.com/rmaddison/images";break}switch(a){case 31:b="http://www7.clikpic.com/rmaddison/images";break}switch(a){case 32:b="http://admin2.clikpic.com/rmaddison/images";break}switch(a){case 33:b="http://www8.clikpic.com/rmaddison/images";break}switch(a){case 34:b="http://www9.clikpic.com/rmaddison/images";break}switch(a){case 35:b="http://admin3.clikpic.com/rmaddison/images";break}switch(a){case 37:b="http://admin4.clikpic.com/rmaddison/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="ROBERT MADDISON, ARTIST & FINE ART PHOTOGRAPHER: "+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> 				$"+(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="maddisonstudios@btinternet.com">';b=b+'<input type="hidden" name="currency_code" value="USD">';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="maddisonstudios@btinternet.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+'")'})}}};