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[1605437]=new thumbnail(1605437,"","","prints_thumb.jpg",130,92,1);thumbnails[5242569]=new thumbnail(5242569,"","Greetings Cards","Greetings_Cards_ws_thumb.jpg",130,105,1);thumbnails[5746014]=new thumbnail(5746014,"","","paypal_logo_thumb.gif",130,33,1);thumbnails[5669406]=new thumbnail(5669406,"321153","Wharfedale Fieldbarns","Wharfedale_fieldbarns_thumb.jpg",130,87,1);thumbnails[5669485]=new thumbnail(5669485,"321153","Pen-y-ghent pimple","pen-y-ghent_thumb.jpg",130,87,1);thumbnails[5669504]=new thumbnail(5669504,"321153","Robin Hoods Bay Mist","Robin_Hoods_Bay_mist_thumb.jpg",130,87,1);thumbnails[5669678]=new thumbnail(5669678,"321153","Sutton Bank","sutton_bank_hz_thumb.jpg",130,87,1);thumbnails[5669881]=new thumbnail(5669881,"321153","Littondale","littondale_snow_sunset_thumb.jpg",130,87,1);thumbnails[5845848]=new thumbnail(5845848,"321153","Wharfedale Sunset","conistone_no_1_thumb.jpg",130,95,1);thumbnails[5845856]=new thumbnail(5845856,"321153","Pen Y Ghent Hill and The Pennine Way footpath","Pennine_Way_Pen-Y-Ghent_thumb.jpg",130,87,1);thumbnails[5933886]=new thumbnail(5933886,"321153","Roseberry Topping","Roseberry_spring_thumb.jpg",130,87,1);thumbnails[4531774]=new thumbnail(4531774,"106162","River Ure after a hard overnight Frost","river_ure_thumb.jpg",87,130,1);thumbnails[4518435]=new thumbnail(4518435,"106162","The bridestone, Low Staindale","bridestone_wisp_thumb.jpg",87,130,1);thumbnails[4518483]=new thumbnail(4518483,"106162","Glacial Erratic and Limestone Pavement.","erratic_thumb.jpg",93,130,1);thumbnails[4518497]=new thumbnail(4518497,"106162","Ingleborough from White scars","Ingleborough_from_White_Scars_thumb.jpg",92,130,1);thumbnails[4518446]=new thumbnail(4518446,"106162","Frosted Limestone and Hawthorn tree","conistone_tree_thumb.jpg",87,130,1);thumbnails[5242760]=new thumbnail(5242760,"106162","Two Trees, Conistone","two_trees_thumb.jpg",87,130,1);thumbnails[4531761]=new thumbnail(4531761,"106162","Stone Fieldbarn & Hay Meadow, Muker, Swaledale.","muker_fieldbarn_thumb.jpg",92,130,1);thumbnails[5536620]=new thumbnail(5536620,"106162","Lone Tree, Cray, Upper Wharfedale.","Lone_Hawthorn_Yockenthwaite_thumb.jpg",87,130,1);thumbnails[4951426]=new thumbnail(4951426,"281670","Dunraven Sands","Dunraven_Bay_southerndown_thumb.jpg",130,92,1);thumbnails[4951441]=new thumbnail(4951441,"281670","Selwick Bay","selwick_bay_thumb.jpg",130,90,1);thumbnails[4968264]=new thumbnail(4968264,"281670","Thornwick Bay","Thornwick_Bay_Low_Light_thumb.jpg",130,87,1);thumbnails[4968465]=new thumbnail(4968465,"281670","Whitby Pier Sunrise","Whitby_Pier_thumb.jpg",130,87,1);thumbnails[5134922]=new thumbnail(5134922,"281670","Saltwick Bay","von_tromp_dark_sky_thumb.jpg",130,87,1);thumbnails[5536443]=new thumbnail(5536443,"281670","Dunraven Bay","Dunraven_Bay_thumb.jpg",130,87,1);thumbnails[5699683]=new thumbnail(5699683,"281670","Boggle Hole","boggle_hole_thumb.jpg",130,87,1);thumbnails[5699684]=new thumbnail(5699684,"281670","Monknash","monknash_96BF3A58-1EC9-D45B-1C53ADF2A5AC2781_thumb.jpg",130,87,1);thumbnails[5699688]=new thumbnail(5699688,"281670","Fall Bay","fall_bay_96BFDE88-1EC9-D45B-1C94DD2A3BC15695_thumb.jpg",130,87,1);thumbnails[5699691]=new thumbnail(5699691,"281670","Nash Point","nash_point_thumb.jpg",130,87,1);thumbnails[5699693]=new thumbnail(5699693,"281670","Black Nab","Black_Nab_thumb.jpg",130,87,1);thumbnails[4521914]=new thumbnail(4521914,"106238","Saltwick Bay with a view towards the Black Nab seastack","saltwick_pebbles_thumb.jpg",87,130,1);thumbnails[4521931]=new thumbnail(4521931,"106238","Selwick Bay","selwick_sun_thumb.jpg",87,130,1);thumbnails[4521941]=new thumbnail(4521941,"106238","Spurn Point","spurn_beach_thumb.jpg",88,130,1);thumbnails[4521942]=new thumbnail(4521942,"106238","Thornwick Bay","thornwick_thumb.jpg",87,130,1);thumbnails[4521948]=new thumbnail(4521948,"106238","Thornwick Bay Pebbles ","Thornwick_Bay_pebbles_thumb.jpg",87,130,1);thumbnails[4521903]=new thumbnail(4521903,"106238","Spurn Lighthouse and reflection","Old_Spurn_Lighthouse_thumb.jpg",87,130,1);thumbnails[4951318]=new thumbnail(4951318,"106238","Monknash Beach","monknash_thumb.jpg",92,130,1);thumbnails[4967927]=new thumbnail(4967927,"106238","North Sea Sunrise","north_seaws_thumb.jpg",87,130,1);thumbnails[4968004]=new thumbnail(4968004,"106238","Saltwick Bay Surf","Saltwick_Surf_thumb.jpg",87,130,1);thumbnails[5536756]=new thumbnail(5536756,"106238","Selwick Bay","Selwick_Bay_F06FEA4E-1EC9-D45B-1C30F6058E950CCD_thumb.jpg",87,130,1);thumbnails[4951304]=new thumbnail(4951304,"106238","Moonlit Dunraven Bay","moonlit_Dunraven_thumb.jpg",92,130,1);thumbnails[5670261]=new thumbnail(5670261,"106238","Sunset at Fall Bay","fall_bay_thumb.jpg",86,130,1);thumbnails[5698276]=new thumbnail(5698276,"106238","Three Cliffs Bay Sunrise","three_cliffs_bay_thumb.jpg",87,130,1);thumbnails[5698369]=new thumbnail(5698369,"106238","Rhossili Bay","rhossili_Bay_thumb.jpg",87,130,1);thumbnails[5698491]=new thumbnail(5698491,"106238","Mewslade Bay","Mewslade_Bay_thumb.jpg",87,130,1);thumbnails[5101258]=new thumbnail(5101258,"288354","Red Dawn at Buttermere","red_buttermere_ws_thumb.jpg",130,87,1);thumbnails[5102276]=new thumbnail(5102276,"288354","Buttermere and High Stile","buttermere_pikews_thumb.jpg",130,87,1);thumbnails[5102312]=new thumbnail(5102312,"288354","Blea Tarn","blea_tarn_thumb.jpg",130,87,1);thumbnails[5103292]=new thumbnail(5103292,"288354","The Langdale Pikes","side_pike_thumb.jpg",130,87,1);thumbnails[5103825]=new thumbnail(5103825,"288354","Derwentwater","derwent_jettyws_thumb.jpg",130,87,1);thumbnails[5103844]=new thumbnail(5103844,"288354","Rydal Smoke","rydal_smoke_ws_thumb.jpg",130,87,1);thumbnails[5536460]=new thumbnail(5536460,"288354","Derwentwater and Blencathra","Derwentwater_Sunrise_thumb.jpg",130,87,1);thumbnails[4520990]=new thumbnail(4520990,"238210","View of Upper Eskdale and the Scafell Pikes ","border_end_thumb.jpg",87,130,1);thumbnails[4967896]=new thumbnail(4967896,"238210","Hell Gill from the summit of Pike of Blisco","hell_gill_thumb.jpg",87,130,1);thumbnails[4521012]=new thumbnail(4521012,"238210","Lone rowing boat on the shore of Derwentwater Lake","derwent_boat_thumb.jpg",87,130,1);thumbnails[4968011]=new thumbnail(4968011,"238210","Birks Rapids","birks_rapids_thumb.jpg",87,130,1);thumbnails[4951256]=new thumbnail(4951256,"281662","The Pennine Way and Peak of Pen-Y-Ghent","pen-y-ghent_bw_thumb.jpg",130,87,1);thumbnails[4951292]=new thumbnail(4951292,"281662","Saltwick bay","saltwick_rock_thumb.jpg",130,87,1);thumbnails[5536009]=new thumbnail(5536009,"281662","Llanddwyn Island  ","llandwynn_island_thumb.jpg",130,87,1);thumbnails[4951235]=new thumbnail(4951235,"106130","Watlowes Dry Dalley, Malham.","Watlowes_thumb.jpg",87,130,1);thumbnails[4968349]=new thumbnail(4968349,"106130","Under The Boardwalk","Under_the_boardwalk_thumb.jpg",87,130,1);thumbnails[4951501]=new thumbnail(4951501,"281671","Buckstones Moss","Marsden_Moor_thumb.jpg",130,87,1);thumbnails[4951506]=new thumbnail(4951506,"281671","Buckstones Sunset","buckstones_thumb.jpg",130,85,1);thumbnails[4951711]=new thumbnail(4951711,"281671","Roman Road, Blackstone Edge","roman_road_thumb.jpg",130,87,1);thumbnails[4967879]=new thumbnail(4967879,"281671","Blackstone Boulder","Blackstone_2_thumb.jpg",130,87,1);thumbnails[4967876]=new thumbnail(4967876,"281671","Blackstone sunrise","Blackstone_1_thumb.jpg",130,87,1);thumbnails[5668371]=new thumbnail(5668371,"281671","Newmillerdam Boathouse","Newmillerdam_Boathouse_thumb.jpg",130,87,1);thumbnails[6189661]=new thumbnail(6189661,"281671","Ferrybridge Power Station","ferrybridge_thumb.jpg",130,87,1);thumbnails[6189720]=new thumbnail(6189720,"281671","Ladybower Pier","ladybower_pier_thumb.jpg",130,87,1);thumbnails[4517952]=new thumbnail(4517952,"267013","Gritstone outcrop on Bridestones Moor","bridestones_moor_thumb.jpg",87,130,1);thumbnails[4517956]=new thumbnail(4517956,"267013","The Bridestone or Kebstone.","kebstone_thumb.jpg",87,130,1);thumbnails[4517962]=new thumbnail(4517962,"267013","Field of Rape and pending storm","rape_field_thumb.jpg",87,130,1);thumbnails[4517978]=new thumbnail(4517978,"267013","Rape Field","rape_field_2_thumb.jpg",87,130,1);thumbnails[4951352]=new thumbnail(4951352,"267013","Stanage Edge","Stanage_vertical_thumb.jpg",92,130,1);thumbnails[4967939]=new thumbnail(4967939,"267013","Hardcastle Crags Footbridge","hardcastle_bridge1_thumb.jpg",87,130,1);thumbnails[5034059]=new thumbnail(5034059,"267013","Autumn colours at Hardcastle Crags","hardcastle_top_falls_thumb.jpg",87,130,1);thumbnails[5670565]=new thumbnail(5670565,"267013","Ladybower Reservoir","ladybower_v_thumb.jpg",87,130,1);thumbnails[5670770]=new thumbnail(5670770,"267013","Castle Hill Jubilee Tower","Castle_Hill_thumb.jpg",87,130,1);thumbnails[5962757]=new thumbnail(5962757,"267013","Bluebells at Hopton Woods","bluebells_4_thumb.jpg",87,130,1);thumbnails[4521051]=new thumbnail(4521051,"198895","Vibrant Spring colours at Falling Foss waterfall","falling_foss_1_thumb.jpg",87,130,1);thumbnails[4521125]=new thumbnail(4521125,"198895","Motion Blurred ferns at Falling Foss","falling_foss_2_thumb.jpg",92,130,1);thumbnails[4521131]=new thumbnail(4521131,"198895","Upper Cauldron Falls in the icy grip of Winter","frozen_falls_thumb.jpg",99,130,1);thumbnails[4521140]=new thumbnail(4521140,"198895","Scaleber Force ","scaleber_1_thumb.jpg",87,130,1);thumbnails[4521156]=new thumbnail(4521156,"198895","Scaleber Force (Autumn)","Scaleber_Force_2_thumb.jpg",81,130,1);thumbnails[4521168]=new thumbnail(4521168,"198895","Upper Cauldron Falls","West_Burton_Falls_1_thumb.jpg",87,130,1);thumbnails[5845623]=new thumbnail(5845623,"198895","Falling foss close up","falling_foss_close_thumb.jpg",87,130,1);thumbnails[5844718]=new thumbnail(5844718,"330690","Wentworth Castle","wentworth_thumb.jpg",120,130,1);thumbnails[5844724]=new thumbnail(5844724,"330690","Oakwell Hall","oakwell_hall_thumb.jpg",87,130,1);thumbnails[5844737]=new thumbnail(5844737,"330690","Ogmore Castle","Ogmore_Castle_thumb.jpg",87,130,1);thumbnails[5849934]=new thumbnail(5849934,"330690","Gibson Mill","gibson_mill_thumb.jpg",87,130,1);thumbnails[5849967]=new thumbnail(5849967,"330690","Nostell Priory","Nostell_Priory_Stairway_thumb.jpg",87,130,1);thumbnails[5850129]=new thumbnail(5850129,"330690","The Carnegie Library","carnegie_library_thumb.jpg",87,130,1);thumbnails[5850152]=new thumbnail(5850152,"330690","Batley War Memorial","war_memorial_thumb.jpg",89,130,1);thumbnails[5895427]=new thumbnail(5895427,"330690","","bolton_abbey_reflection_thumb.jpg",87,130,1);thumbnails[5536873]=new thumbnail(5536873,"313747","Derwentwater and Blencathra","Blencathra_thumb.jpg",130,130,1);thumbnails[5537044]=new thumbnail(5537044,"313747","Hardcastle Crags","Hardcastle_Crags_thumb.jpg",130,130,1);thumbnails[5537151]=new thumbnail(5537151,"313747","Gordale Scar","gordale_scar1_thumb.jpg",130,130,1);var galleries=new Object();galleries[321154]=new gallery(321154,"5536620,5242760,4531761,4518483,4518446,4518435","The Yorkshire Dales and Moors","gallery",[]);galleries[321153]=new gallery(321153,"5933886,5845856,5845848,5669881,5669678,5669504,5669485,5669406","The Yorkshire Dales and Moors (horizontal)","gallery",[5669406,5669485,5669504,5669678,5669881,5845848,5845856,5933886]);galleries[106162]=new gallery(106162,"5536620,5242760,4531761,4518483,4518446,4518435","Yorkshire Dales & Moors (vertical)","gallery",[4531774,4518435,4518483,4518497,4518446,5242760,4531761,5536620]);galleries[281678]=new gallery(281678,"5698491,5698369,5698276,5670261,5536756,4968004,4967927,4951318,4951304,4521948,4521942,4521941,4521931,4521903","Coastal Landscapes","gallery",[]);galleries[281670]=new gallery(281670,"5699693,5699691,5699688,5699684,5699683,5536443,5134922,4968465,4968264,4951441","Coastal Landscapes (horizontal)","gallery",[4951426,4951441,4968264,4968465,5134922,5536443,5699683,5699684,5699688,5699691,5699693]);galleries[106238]=new gallery(106238,"5698491,5698369,5698276,5670261,5536756,4968004,4967927,4951318,4951304,4521948,4521942,4521941,4521931,4521903","Coastal Landscapes (vertical)","gallery",[4521914,4521931,4521941,4521942,4521948,4521903,4951318,4967927,4968004,5536756,4951304,5670261,5698276,5698369,5698491]);galleries[288355]=new gallery(288355,"4968011,4967896,4521012","The Lake District","gallery",[]);galleries[288354]=new gallery(288354,"5536460,5103844,5103825,5103292,5102312,5102276,5101258","The Lake District (horizontal)","gallery",[5101258,5102276,5102312,5103292,5103825,5103844,5536460]);galleries[238210]=new gallery(238210,"4968011,4967896,4521012","Lake District(vertical)","gallery",[4520990,4967896,4521012,4968011]);galleries[281682]=new gallery(281682,"4968349,4951235","Black And White Landscapes","gallery",[]);galleries[281662]=new gallery(281662,"5536009,4951292,4951256","Black and White Landscapes (horizontal)","gallery",[4951256,4951292,5536009]);galleries[106130]=new gallery(106130,"4968349,4951235","Black And White Landscapes (vertical)","gallery",[4951235,4968349]);galleries[281679]=new gallery(281679,"5962757,5670770,5670565,5034059,4951352,4517962,4517956","Local Landscapes","gallery",[]);galleries[281671]=new gallery(281671,"6189720,6189661,5668371,4967879,4967876,4951711,4951506,4951501","The Local Landscape (horizontal)","gallery",[4951501,4951506,4951711,4967879,4967876,5668371,6189661,6189720]);galleries[267013]=new gallery(267013,"5962757,5670770,5670565,5034059,4951352,4517962,4517956","The Local Landscape (vertical)","gallery",[4517952,4517956,4517962,4517978,4951352,4967939,5034059,5670565,5670770,5962757]);galleries[198895]=new gallery(198895,"5845623,4521168,4521156,4521140,4521131,4521125,4521051","Waterfalls","gallery",[4521051,4521125,4521131,4521140,4521156,4521168,5845623]);galleries[330690]=new gallery(330690,"5895427,5850152,5850129,5849967,5849934,5844724","Architecture","gallery",[5844718,5844724,5844737,5849934,5849967,5850129,5850152,5895427]);galleries[313747]=new gallery(313747,"5537151,5537044,5536873","Square Landscapes","gallery",[5536873,5537044,5537151]);var imageSets=new Object();imageSets[1]="6189720,6189661,5962757,5933886,5845856,5845848,5845623,5844737,5844724,5844718,5699688,5699684,5699683,5698491,5698276,5670565,5670261,5669881,5669504,5669485,5668371,5536873,5536756,5536620,5536460,5536443,5134922,5103844,5101258,5034059,4968349,4968264,4967896,4951235,4531761,4521941,4521903,4521131,4521125,4518483,4517956";imageSets[2]="5962757,5895427,5850152,5850129,5849967,5849934,5845623,5844724,5698491,5698369,5698276,5670770,5670565,5670261,5537151,5537044,5536873,5536756,5536620,5242760,5034059,4968349,4968011,4968004,4967927,4967896,4951352,4951318,4951304,4951235,4531761,4521948,4521942,4521941,4521931,4521903,4521168,4521156,4521140,4521131,4521125,4521051,4521012,4518483,4518446,4518435,4517962,4517956";imageSets[3]="6189720,6189661,5962757,5933886,5895427,5850152,5850129,5849967,5849934,5845856,5845848,5845623,5844737,5844724,5844718,5746014,5699693,5699691,5699688,5699684,5699683,5698491,5698369,5698276,5670770,5670565,5670261,5669881,5669678,5669504,5669485,5669406,5668371,5537151,5537044,5536873,5536756,5536620,5536460,5536443,5536009,5242760,5242569,5134922,5103844,5103825,5103292,5102312,5102276,5101258";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/dspeight/images";break}switch(a){case 1:b="http://www1.clikpic.com/dspeight/images";break}switch(a){case 2:b="http://admin.clikpic.com/dspeight/images";break}switch(a){case 24:b="http://tpc15/clikpic/dspeight/images";break}switch(a){case 4:b="http://www.clikchurch.com/dspeight/images";break}switch(a){case 5:b="http://www2.clikpic.com/dspeight/images";break}switch(a){case 22:b="http://tpc5/clikpic/dspeight/images";break}switch(a){case 23:b="http://tpc10/clikpic/dspeight/images";break}switch(a){case 25:b="http://tpc16/clikpic/dspeight/images";break}switch(a){case 15:b="http://www3.clikpic.com/dspeight/images";break}switch(a){case 18:b="http://www4.clikpic.com/dspeight/images";break}switch(a){case 19:b="http://www5.clikpic.com/dspeight/images";break}switch(a){case 31:b="http://www7.clikpic.com/dspeight/images";break}switch(a){case 32:b="http://admin2.clikpic.com/dspeight/images";break}switch(a){case 33:b="http://www8.clikpic.com/dspeight/images";break}switch(a){case 34:b="http://www9.clikpic.com/dspeight/images";break}switch(a){case 35:b="http://admin3.clikpic.com/dspeight/images";break}switch(a){case 37:b="http://admin4.clikpic.com/dspeight/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="David Speight Landscape Images.: "+photos[f].caption;if(photos[f].caption==""){document.getElementById("imageTitle").style.display="none"}else{document.getElementById("imageTitle").style.display="block"}var a=fnGetImageDetails(f);if(a==""){document.getElementById("imageDetails").style.display="none";var c=document.getElementById("infoWrap");var d=document.getElementById("photoInfo");if(photos[f].caption==""){if(c!=null){c.className="empty"}if(d!=null){d.className="empty"}}else{if(c!=null){c.className="noinfo"}if(d!=null){d.className="noinfo"}}}else{document.getElementById("imageDetails").style.display="block";var c=document.getElementById("infoWrap");if(c!=null){c.className="normal"}var d=document.getElementById("photoInfo");if(d!=null){d.className="normal"}}document.getElementById("imageDetails").innerHTML=a;toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#paymentConfirm").hide();$("#paymentAddButton").unbind().click(function(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="DSPEIGHT">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};