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[1814741]=new thumbnail(1814741,"217257","Buttermere","WEBButtermere_thumb.jpg",130,48,15);thumbnails[2192138]=new thumbnail(2192138,"121564","Stepping Stones","Steppingstones_thumb.jpg",128,130,15);thumbnails[2192143]=new thumbnail(2192143,"121564","Middleton woods","woodlandfloor_thumb.jpg",128,130,15);thumbnails[2192147]=new thumbnail(2192147,"121564","Resting Place","BAbench_thumb.jpg",130,130,15);thumbnails[3528191]=new thumbnail(3528191,"217268","Snow on Pickering Tor","PickeringTor_thumb.jpg",42,130,15);thumbnails[3548401]=new thumbnail(3548401,"217268","Winter sun on Stanage Edge","Stanedge1_thumb.jpg",130,42,15);thumbnails[3559606]=new thumbnail(3559606,"217268","Hope Valley","Hopevalley_thumb.jpg",130,42,15);thumbnails[3559633]=new thumbnail(3559633,"217268","Hope Valley, sunset","HopevalleySunset_thumb.jpg",130,42,15);thumbnails[3565372]=new thumbnail(3565372,"217268","Winter storm, Hope Valley","RainbowApproachingstorm_thumb.jpg",130,42,15);thumbnails[3577156]=new thumbnail(3577156,"217268","Back Tor","Backtor_thumb.jpg",130,42,15);thumbnails[3590313]=new thumbnail(3590313,"214712","Low Petergate","LowPetergate_thumb.jpg",42,130,15);thumbnails[3747236]=new thumbnail(3747236,"214712","Constantine the Great","ConstantineandMinster_thumb.jpg",130,42,15);thumbnails[3747264]=new thumbnail(3747264,"214712","Royal Theatre","RoyalTheatre_thumb.jpg",130,43,15);thumbnails[3764793]=new thumbnail(3764793,"217267","Roseberry Topping, April dawn","AprilMorningRoseberry_thumb.jpg",130,42,15);thumbnails[3770224]=new thumbnail(3770224,"217267","Roseberry Topping from Newton Moor","AprilRoseberryandwall_thumb.jpg",130,43,15);thumbnails[3774064]=new thumbnail(3774064,"217267","From Little Roseberry","fromlittleroseberry_thumb.jpg",130,43,15);thumbnails[4059863]=new thumbnail(4059863,"121564","Bluebells at Middleton Woods","Bluebellsandpath_thumb.jpg",130,42,15);thumbnails[5586182]=new thumbnail(5586182,"217268","Stanage Edge, winter vista","SpotlitStanageedge_thumb.jpg",130,43,15);thumbnails[5586203]=new thumbnail(5586203,"217268","Over Owler Tor to Higger Tor, sunrise","Higgertorfromsurpriseview_thumb.jpg",130,43,15);thumbnails[5586231]=new thumbnail(5586231,"217268","Moonset over Mother Cap","Moonsetmothercap_thumb.jpg",130,43,15);thumbnails[5586312]=new thumbnail(5586312,"217268","Vista from Higger Tor, sunrise","Higgertormothercap_thumb.jpg",130,43,15);thumbnails[5587436]=new thumbnail(5587436,"217268","Moonset over Hope Valley","MoonsetoverHopevalley_thumb.jpg",130,42,15);thumbnails[5587450]=new thumbnail(5587450,"217268","To High Neb","StanageedgeVert_thumb.jpg",43,130,15);thumbnails[5591118]=new thumbnail(5591118,"217268","Abandoned Millstones, winter","Snowcoveredmillstones_thumb.jpg",130,43,15);thumbnails[1814847]=new thumbnail(1814847,"217266","Scaleber Force","WEBScaleberForce_thumb.jpg",48,130,15);thumbnails[3510714]=new thumbnail(3510714,"214712","Shambles","YoShambles1_thumb.jpg",42,130,15);thumbnails[3510498]=new thumbnail(3510498,"214712","Little Shambles","YoShambles_thumb.jpg",42,130,15);thumbnails[4026470]=new thumbnail(4026470,"217266","Scaleber Force, Spring","Scaleberforcevertical_thumb.jpg",43,130,15);thumbnails[4026475]=new thumbnail(4026475,"217266","Scaleber Force","ScaleberforceHorizontal_thumb.jpg",130,42,15);thumbnails[3513565]=new thumbnail(3513565,"214712","York Minster","MinsterAngle_thumb.jpg",43,130,15);thumbnails[1814883]=new thumbnail(1814883,"217266","Upper Aysgarth Falls","UpperAysgarth_thumb.jpg",130,42,15);thumbnails[3513757]=new thumbnail(3513757,"214712","Abbey of St Mary","YorkAbbey_thumb.jpg",130,43,15);thumbnails[1816278]=new thumbnail(1816278,"121885","New City Hall ","WEBNewcityhall_thumb.jpg",47,130,15);thumbnails[3752686]=new thumbnail(3752686,"217267","Roseberry Topping and Tree","Roseberryandtree_thumb.jpg",130,42,15);thumbnails[4023061]=new thumbnail(4023061,"217266","Malham Cove, dawn","Malhamcovedawn_thumb.jpg",130,43,15);thumbnails[3546685]=new thumbnail(3546685,"217267","Cleveland Hills, dawn","ClayBank2_thumb.jpg",130,42,15);thumbnails[4023069]=new thumbnail(4023069,"217266","Tree and Limestone Pavement","LonetreeMalhamdawn2_thumb.jpg",130,42,15);thumbnails[3546852]=new thumbnail(3546852,"217266","Road to Malham","RoadtoMalham_thumb.jpg",130,43,15);thumbnails[4026463]=new thumbnail(4026463,"217266","Airton Copse","Airtontrees_thumb.jpg",130,42,15);thumbnails[1816280]=new thumbnail(1816280,"121885","New City Hall II","WEBnewcityhall2_thumb.jpg",50,130,15);thumbnails[1816428]=new thumbnail(1816428,"121885","Free ","WEBFreeads_thumb.jpg",130,48,15);thumbnails[3821738]=new thumbnail(3821738,"217266","Dawn, Brimham Rocks","DawnBR_thumb.jpg",130,43,15);thumbnails[3504723]=new thumbnail(3504723,"217266","Brimham Rocks Study I","BRlonetree_thumb.jpg",127,130,15);thumbnails[3748491]=new thumbnail(3748491,"217266","Brimham Rocks Study II","BRmist_thumb.jpg",130,42,15);thumbnails[3752588]=new thumbnail(3752588,"217266","Brimham Rocks Study III","BRrocktreemist_thumb.jpg",130,43,15);thumbnails[3748505]=new thumbnail(3748505,"217266","Brimham Moor","BRtreemist_thumb.jpg",130,42,15);thumbnails[1816279]=new thumbnail(1816279,"121885","Low light","WEBLowlight_thumb.jpg",48,130,15);thumbnails[4026464]=new thumbnail(4026464,"217266","River Twiss ","RiverTwiss_thumb.jpg",130,42,15);thumbnails[4026467]=new thumbnail(4026467,"217266","Thornton Force","Thorntonforce_thumb.jpg",130,43,15);thumbnails[4031163]=new thumbnail(4031163,"217266","Baxenghyll Gorge","BaxenghyllGorge_thumb.jpg",42,130,15);thumbnails[4031187]=new thumbnail(4031187,"217266","River Doe at Ingleton Falls, Spring","RiverDoe_thumb.jpg",42,130,15);thumbnails[4031191]=new thumbnail(4031191,"217266","River Doe at Ingleton Falls","RiverDoeIngletonfalls_thumb.jpg",130,42,15);thumbnails[4119536]=new thumbnail(4119536,"217266","Beezley Falls, River Doe","Beezleyfalls1_thumb.jpg",130,42,15);thumbnails[1816889]=new thumbnail(1816889,"121885","Royal Ontario Museum","ROM_thumb.jpg",130,48,15);thumbnails[1818635]=new thumbnail(1818635,"121885","Observation Deck, CN Tower","WEBViewer_thumb.jpg",130,48,15);thumbnails[1816891]=new thumbnail(1816891,"121885","Scaffold and Skyline","Scaffolding_thumb.jpg",130,48,15);thumbnails[1818334]=new thumbnail(1818334,"121885","Financial district","WEBVertview-1_thumb.jpg",48,130,15);thumbnails[1818428]=new thumbnail(1818428,"121885","Shadow Study","WEBShadow_thumb.jpg",130,47,15);thumbnails[1818543]=new thumbnail(1818543,"121885","Shadow Study II","WEBShadowII_thumb.jpg",130,47,15);thumbnails[1987881]=new thumbnail(1987881,"121885","Shadow study III","SQShadow_thumb.jpg",127,130,15);thumbnails[1988037]=new thumbnail(1988037,"121885","Bay and Wellesley ","Bayandwellesley_thumb.jpg",130,130,15);thumbnails[1837319]=new thumbnail(1837319,"214456","Whitby Harbour","WEBWhitby_thumb.jpg",130,48,15);thumbnails[1837321]=new thumbnail(1837321,"214456","Whitby Sunset ","WEBWhitby-Sunset_thumb.jpg",130,48,15);thumbnails[3507899]=new thumbnail(3507899,"214456","Staithes Beck","StaithesBeck_thumb.jpg",130,42,15);thumbnails[3508191]=new thumbnail(3508191,"214456","Overlooking Staithes","OverlookingStaithes_thumb.jpg",130,43,15);thumbnails[3586478]=new thumbnail(3586478,"214456","Dusk Sandsend Ness","DuskSandsend_thumb.jpg",130,42,15);thumbnails[3505717]=new thumbnail(3505717,"214456","Sandsend Groynes","SandsendP1_thumb.jpg",130,42,15);thumbnails[3578639]=new thumbnail(3578639,"214456","Sandsend Groynes II","SandsendGroynesLight_thumb.jpg",130,42,15);thumbnails[3506568]=new thumbnail(3506568,"214456","Incoming Tide","incomingtide_thumb.jpg",130,42,15);thumbnails[2192123]=new thumbnail(2192123,"123589","Waterfall Bridge","RipleyLake_thumb.jpg",128,130,15);thumbnails[2215641]=new thumbnail(2215641,"123589","Wood Shed","Woodshed_thumb.jpg",130,48,15);thumbnails[2190052]=new thumbnail(2190052,"123589","Drax Power Station","Drax1_thumb.jpg",128,130,15);thumbnails[2190068]=new thumbnail(2190068,"123589","Eggborough Power Station","Eggborough_thumb.jpg",129,130,15);thumbnails[2216016]=new thumbnail(2216016,"121830","Outstretched","branches_thumb.jpg",129,130,15);thumbnails[2253521]=new thumbnail(2253521,"121830","Woodland Shadows","Woodlandshadows_thumb.jpg",129,130,15);thumbnails[2586963]=new thumbnail(2586963,"121830","Oxley Bank","OxleyBankweb_thumb.jpg",130,47,15);thumbnails[2586972]=new thumbnail(2586972,"121830","Lower Lake","YSPlowerlakeweb_thumb.jpg",130,47,15);thumbnails[3504783]=new thumbnail(3504783,"121830","Brimham Rocks","BRstudyIII1_thumb.jpg",128,130,15);thumbnails[3504825]=new thumbnail(3504825,"121830","Brimham Rocks Study II","BRstudyIV_thumb.jpg",127,130,15);thumbnails[3507467]=new thumbnail(3507467,"121830","Brimham Rocks Study III","BRlonetree2_thumb.jpg",129,130,15);thumbnails[3753442]=new thumbnail(3753442,"121830","High Intake Plantation","Highintakeplantation_thumb.jpg",130,42,15);thumbnails[3753446]=new thumbnail(3753446,"121830","Hanging Stone Woods","HangingStonewoods_thumb.jpg",130,42,15);thumbnails[3759352]=new thumbnail(3759352,"121830","Slacks Wood","Highintakeplantation2_thumb.jpg",130,42,15);thumbnails[2238669]=new thumbnail(2238669,"121830","Hebden Water","SplitTree_thumb.jpg",128,130,15);thumbnails[2586957]=new thumbnail(2586957,"121830","Hardcastle Crags","Trees_thumb.jpg",129,130,15);thumbnails[1814738]=new thumbnail(1814738,"121830","Exposed Roots, River Ure","WEBAysgarthroots_thumb.jpg",48,130,15);thumbnails[1814795]=new thumbnail(1814795,"121830","Scaleber Copse","WEBReach_thumb.jpg",46,130,15);thumbnails[1881189]=new thumbnail(1881189,"126339","Half Dome","WEBHalfdome_thumb.jpg",86,130,15);thumbnails[1880769]=new thumbnail(1880769,"126339","Tenaya Canyon","tenayacreek_thumb.jpg",86,130,15);thumbnails[1881186]=new thumbnail(1881186,"126339","North Dome","northsouthdome_thumb.jpg",130,86,15);thumbnails[1882577]=new thumbnail(1882577,"126339","Half Dome study II","HalfdomeII_thumb.jpg",130,86,15);thumbnails[1883175]=new thumbnail(1883175,"126339","Upper Yosemite Falls","Yosemitefalls_thumb.jpg",130,85,15);thumbnails[1904388]=new thumbnail(1904388,"126339","Merced Reflections","UpperYosemiteMercedref_thumb.jpg",130,86,15);thumbnails[2006821]=new thumbnail(2006821,"126339","Upper Yosemite Falls ","UpperYosemiteFalls_thumb.jpg",85,130,15);thumbnails[1934752]=new thumbnail(1934752,"126339","Bryce Canyon Sunrise","treesunset_thumb.jpg",130,86,15);thumbnails[2007122]=new thumbnail(2007122,"126339","Dead Tree","Brycedeadtree_thumb.jpg",86,130,15);thumbnails[1950620]=new thumbnail(1950620,"126339","Slot Canyon","AntelopeDetail_thumb.jpg",87,130,15);thumbnails[1982592]=new thumbnail(1982592,"126339","South Rim ","GCsunset_thumb.jpg",88,130,15);thumbnails[2007078]=new thumbnail(2007078,"126339","Last light ","Archeslastlight_thumb.jpg",90,130,15);var galleries=new Object();galleries[217248]=new gallery(217248,"1988037,1987881","Cityscape","gallery",[]);galleries[217257]=new gallery(217257,"1814741","Lake District","gallery",[1814741]);galleries[217267]=new gallery(217267,"3770224,3546685","North Yorkshire Moors","gallery",[3764793,3770224,3774064,3752686,3546685]);galleries[217268]=new gallery(217268,"5591118,5586312,5586231,5586203,5586182,3577156,3559633","Peak District","gallery",[3528191,3548401,3559606,3559633,3565372,3577156,5586182,5586203,5586231,5586312,5587436,5587450,5591118]);galleries[121885]=new gallery(121885,"1988037,1987881","Toronto","gallery",[1816278,1816280,1816428,1816279,1816889,1818635,1816891,1818334,1818428,1818543,1987881,1988037]);galleries[214712]=new gallery(214712,"3747264,3747236,3590313,3513757,3513565,3510714,3510498","York ","gallery",[3590313,3747236,3747264,3510714,3510498,3513565,3513757]);galleries[121564]=new gallery(121564,"4059863,2192147,2192143,2192138","Yorkshire","gallery",[2192138,2192143,2192147,4059863]);galleries[217266]=new gallery(217266,"4119536,4031191,4031187,4026475,4023069,4023061,1814883,1814847","Yorkshire Dales","gallery",[1814847,4026470,4026475,1814883,4023061,4023069,3546852,4026463,3821738,3504723,3748491,3752588,3748505,4026464,4026467,4031163,4031187,4031191,4119536]);galleries[214456]=new gallery(214456,"3586478,1837321,1837319","Coast","gallery",[1837319,1837321,3507899,3508191,3586478,3505717,3578639,3506568]);galleries[123589]=new gallery(123589,"2215641,2192123,2190068,2190052","Urban","gallery",[2192123,2215641,2190052,2190068]);galleries[121830]=new gallery(121830,"2586972,2586963,2586957,2253521,1814795,1814738","Trees","gallery",[2216016,2253521,2586963,2586972,3504783,3504825,3507467,3753442,3753446,3759352,2238669,2586957,1814738,1814795]);galleries[132485]=new gallery(132485,"5591118,5586312,5586231,5586203,5586182,4119536,4059863,4031191,4031187,4026475,4023069,4023061,3770224,3577156,3559633,3546685,2192147,2192143,2192138,2007122,2007078,2006821,1982592,1950620,1934752,1904388,1881189,1880769,1814883,1814847","Landscape","gallery",[]);galleries[126339]=new gallery(126339,"2007122,2007078,2006821,1982592,1950620,1934752,1904388,1881189,1880769","USA","gallery",[1881189,1880769,1881186,1882577,1883175,1904388,2006821,1934752,2007122,1950620,1982592,2007078]);var imageSets=new Object();imageSets[1]="5591118,5587436,5586312,5586231,5586203,5586182,4023069,3770224,3586478,3546685";imageSets[2]="5591118,5586312,5586231,5586203,5586182,4119536,4059863,4031191,4031187,4026475,4023069,4023061,3770224,3586478,3577156,3559633,3546685,2586972,2586963,2586957,2253521,2215641,2192147,2192143,2192138,2192123,2190068,2190052,2007122,2007078,2006821,1988037,1987881,1982592,1950620,1934752,1904388,1881189,1880769,1837321,1837319,1814883,1814847,1814795,1814738";imageSets[3]="5591118,5587450,5587436,5586312,5586231,5586203,5586182,4119536,4059863,4031191,4031187,4031163,4026475,4026470,4026467,4026464,4026463,4023069,4023061,3821738,3774064,3770224,3764793,3759352,3753446,3753442,3752686,3752588,3748505,3748491,3747264,3747236,3590313,3586478,3578639,3577156,3565372,3559633,3559606,3548401,3546852,3546685,3528191,3513757,3513565,3510714,3510498,3508191,3507899,3507467";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/Brocklesby/images";break}switch(a){case 1:b="http://www1.clikpic.com/Brocklesby/images";break}switch(a){case 2:b="http://admin.clikpic.com/Brocklesby/images";break}switch(a){case 24:b="http://tpc15/clikpic/Brocklesby/images";break}switch(a){case 4:b="http://www.clikchurch.com/Brocklesby/images";break}switch(a){case 5:b="http://www2.clikpic.com/Brocklesby/images";break}switch(a){case 22:b="http://tpc5/clikpic/Brocklesby/images";break}switch(a){case 23:b="http://tpc10/clikpic/Brocklesby/images";break}switch(a){case 25:b="http://tpc16/clikpic/Brocklesby/images";break}switch(a){case 15:b="http://www3.clikpic.com/Brocklesby/images";break}switch(a){case 18:b="http://www4.clikpic.com/Brocklesby/images";break}switch(a){case 19:b="http://www5.clikpic.com/Brocklesby/images";break}switch(a){case 31:b="http://www7.clikpic.com/Brocklesby/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Brocklesby/images";break}switch(a){case 33:b="http://www8.clikpic.com/Brocklesby/images";break}switch(a){case 34:b="http://www9.clikpic.com/Brocklesby/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Brocklesby/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Brocklesby/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="RICHARD BROCKLESBY panoramic 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>Edition Type: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Print: </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>Type: </strong>'+photos[b].photographer+"</p>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 							"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};