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[5679405]=new thumbnail(5679405,"210944","Autumn Waterfall","Autumn_Waterfall_800_thumb.jpg",130,195,18);thumbnails[6426400]=new thumbnail(6426400,"210944","Early Morning Light","Norwich_Early_Morning_Light_800_thumb.jpg",130,195,18);thumbnails[5958016]=new thumbnail(5958016,"210944","Bamford Edge View","Dead_Moth_800_thumb.jpg",130,195,18);thumbnails[5466547]=new thumbnail(5466547,"210944","Clouds over a Cornfield","Clouds_over_a_Cornfield_800_thumb.jpg",130,195,18);thumbnails[5679641]=new thumbnail(5679641,"210944","Cogwheels and Chains","Cogwheels_and_Chains_800_thumb.jpg",130,195,18);thumbnails[6183721]=new thumbnail(6183721,"210944","Evening Jet Trails","Evening_Jet_Trails_800_thumb.jpg",130,87,18);thumbnails[5957922]=new thumbnail(5957922,"210944","Bamford Edge Rockface","Bamford_Edge_Rockface_800_thumb.jpg",130,87,18);thumbnails[6672785]=new thumbnail(6672785,"210944","Sunlight and Heather","Sunlight_and_Heather_800_thumb.jpg",130,87,18);thumbnails[5826668]=new thumbnail(5826668,"210944","Late Afternoon Sunlight","Late_Afternoon_Sunlight_Stanage_800_thumb.jpg",130,87,18);thumbnails[5936050]=new thumbnail(5936050,"210944","Last Rays of Daylight","Last_Rays_of_Daylight_800_thumb.jpg",130,87,18);thumbnails[5997241]=new thumbnail(5997241,"210944","Barrow Hill Roundhouse","Roundhouse_800_thumb.jpg",130,87,18);thumbnails[5997253]=new thumbnail(5997253,"210944","A Time Gone By","Front_Room_Beamish_800_thumb.jpg",130,87,18);thumbnails[1751064]=new thumbnail(1751064,"117589","Longshaw Mist","Longshaw Mist 800_thumb.jpg",130,87,18);thumbnails[1751071]=new thumbnail(1751071,"117589","Sun through Fog","Sunshine Through Fog 800_thumb.jpg",130,87,18);thumbnails[1751005]=new thumbnail(1751005,"117589","Sunshine and Shadow","Copy of Sunshine and Shadow 800_thumb.jpg",130,87,18);thumbnails[5679630]=new thumbnail(5679630,"117589","Woodland in Autumn","Woodland_in_Autumn_800_thumb.jpg",130,87,18);thumbnails[2873281]=new thumbnail(2873281,"117589","Autumn Morning","Autumn Morning Border 800_thumb.jpg",130,87,18);thumbnails[5059967]=new thumbnail(5059967,"117589","The Remains of the Day","Remains_of_the_Day_800_thumb.jpg",130,195,18);thumbnails[2250753]=new thumbnail(2250753,"117589","Snowy Churchyard View","Hathersage Parish Churchyard II 800_thumb.jpg",130,195,18);thumbnails[5394205]=new thumbnail(5394205,"117589","Dry Stone Wall","Ladybower_Wall_800_thumb.jpg",130,195,18);thumbnails[2376645]=new thumbnail(2376645,"117589","Breaking Through","Surprise View Snow 800_thumb.jpg",130,195,18);thumbnails[2376642]=new thumbnail(2376642,"117589","Over the Top","Over the Top 800_thumb.jpg",130,195,18);thumbnails[5529691]=new thumbnail(5529691,"228047","Rock Pools","Robin_Hoods_Bay_Beachcombers_800_thumb.jpg",130,87,18);thumbnails[2726182]=new thumbnail(2726182,"228047","Over the Top II","Over the Top II 800_thumb.jpg",130,87,18);thumbnails[4966552]=new thumbnail(4966552,"228047","Climbers and Millstones","Climbers_800_thumb.jpg",130,87,18);thumbnails[2250749]=new thumbnail(2250749,"228047","Higger Tor Rocks","Higger Tor Rocks 800_thumb.jpg",130,87,18);thumbnails[4966572]=new thumbnail(4966572,"228047","Early Morning Light","Early_Morning_Light_Bamford_Edge_800_thumb.jpg",130,87,18);thumbnails[4890514]=new thumbnail(4890514,"228047","Old Posts","Derwent_Reservoir_II_800_thumb.jpg",130,195,18);thumbnails[5291354]=new thumbnail(5291354,"228047","Snowfields","Snowy_Fields_800_thumb.jpg",130,195,18);thumbnails[3449120]=new thumbnail(3449120,"228047","When the snow lay round about . . .","Hathersage Snow Lamps 800_thumb.jpg",130,195,18);thumbnails[5561014]=new thumbnail(5561014,"228047","Catching the Light","Catching_the_Light_800123456_thumb.jpg",130,195,18);thumbnails[5466918]=new thumbnail(5466918,"228047","Tide's Out","Tides_Out_800_thumb.jpg",130,195,18);thumbnails[2068752]=new thumbnail(2068752,"334971","A Dusting of Snow","A Dusting of Snow 800_thumb.jpg",130,87,18);thumbnails[5561095]=new thumbnail(5561095,"334971","Winter Sunrise","Sunrise_over_Hathersage_800_thumb.jpg",130,87,18);thumbnails[3449150]=new thumbnail(3449150,"334971","Anyone for a swim?","Hathersage Swimming Pool 800_thumb.jpg",130,87,18);thumbnails[5394123]=new thumbnail(5394123,"334971","Snow Sculptures","Snow_Sculptures_800_thumb.jpg",130,87,18);thumbnails[5291360]=new thumbnail(5291360,"334971","Snowy Edge","Snowy_Stanage_Edge_800_thumb.jpg",130,87,18);thumbnails[5394119]=new thumbnail(5394119,"334971","Lone Tree","Lone_Tree_in_the_Snow_800_thumb.jpg",130,195,18);thumbnails[5561062]=new thumbnail(5561062,"334971","Winter Dawn","Winter_Morning_80012345678910_thumb.jpg",130,195,18);thumbnails[5563447]=new thumbnail(5563447,"334971","More Snow Threatened","More_Snow_Threatened_800_thumb.jpg",130,195,18);thumbnails[1012478]=new thumbnail(1012478,"74471","Mushroom Cluster","Mushroom Cluster 800_thumb.jpg",130,195,18);thumbnails[1012462]=new thumbnail(1012462,"74471","Early Morning Dew","Early Morning Dew 800_thumb.jpg",130,195,18);thumbnails[1012829]=new thumbnail(1012829,"74471","A Touch of Autumn","Colours of Autumn 800a_thumb.jpg",130,195,18);thumbnails[1432049]=new thumbnail(1432049,"74471","Eagle Owl","Eagle Owl Close Up 800_thumb.jpg",130,195,18);thumbnails[4383478]=new thumbnail(4383478,"74471","Late Evening Sunshine","Late_Evening_Shadows_800_thumb.jpg",130,195,18);thumbnails[2066964]=new thumbnail(2066964,"72621","The Word","Great Longstone Parish Church 800_thumb.jpg",130,87,18);thumbnails[3950082]=new thumbnail(3950082,"72621","The Nursery","Beamish_Nursery_800_thumb.jpg",130,87,18);thumbnails[2376655]=new thumbnail(2376655,"72621","A Record of History","A Record of History 800_thumb.jpg",130,87,18);thumbnails[2376651]=new thumbnail(2376651,"72621","Fishing Huts","Fishing Huts 800_thumb.jpg",130,87,18);thumbnails[2250787]=new thumbnail(2250787,"72621","Let there be light","Let there be Light 800_thumb.jpg",130,87,18);thumbnails[2557863]=new thumbnail(2557863,"72621","Newcastle Bridges","Newcastle Bridges II 800_thumb.jpg",130,87,18);thumbnails[3950074]=new thumbnail(3950074,"72621","Light and Shadows","Light_and_Shadows_Ashford_800_thumb.jpg",130,87,18);thumbnails[3453529]=new thumbnail(3453529,"72621","Early Morning in Bruges","Bruges Early Morning 800_thumb.jpg",130,87,18);thumbnails[3735968]=new thumbnail(3735968,"72621","In the beginning . .","Bradfield_Church_800_thumb.jpg",130,87,18);thumbnails[3453139]=new thumbnail(3453139,"72621","Castle View","Castle View 800_thumb.jpg",130,87,18);thumbnails[2066968]=new thumbnail(2066968,"72621","Aisle View","Hathersage Parish Church III 800_thumb.jpg",130,195,18);thumbnails[2066967]=new thumbnail(2066967,"72621","Ripon Cathedral","Ripon Cathedral 800_thumb.jpg",130,195,18);thumbnails[4966528]=new thumbnail(4966528,"72621","Wheeeee!","City_Wheel_800_thumb.jpg",130,195,18);thumbnails[2534765]=new thumbnail(2534765,"72621","Tynemouth Priory Ruins","Tynemouth Priory Ruin 800_thumb.jpg",130,195,18);thumbnails[2250774]=new thumbnail(2250774,"72621","Through the Arch","Through the Archway Tideswell 800_thumb.jpg",130,195,18);thumbnails[2682405]=new thumbnail(2682405,"228030","Ironwork","Ironwork II 800_thumb.jpg",130,195,18);thumbnails[2534745]=new thumbnail(2534745,"228030","View from the Font","Newcastle Cathedral II 800_thumb.jpg",130,195,18);thumbnails[3453277]=new thumbnail(3453277,"228030","Light","Great Longstone Parish Church II 800_thumb.jpg",130,195,18);thumbnails[6426474]=new thumbnail(6426474,"228030","Chancel Light","Hartington_Chancel_Light_800_thumb.jpg",130,195,18);thumbnails[4383929]=new thumbnail(4383929,"228030","Majestic","Majestic_800_thumb.jpg",130,195,18);thumbnails[4384015]=new thumbnail(4384015,"228030","Nave and East Window","High_Bradfield_Nave_and_East_Window_800_thumb.jpg",130,195,18);thumbnails[6426489]=new thumbnail(6426489,"228030","Iron Gates","Hartington_Iron_Gates_800_thumb.jpg",130,195,18);thumbnails[3735979]=new thumbnail(3735979,"228030","Framed","Posts_800_thumb.jpg",130,195,18);thumbnails[3453382]=new thumbnail(3453382,"228030","Choir Stall View","Choir Stall View 800_thumb.jpg",130,195,18);thumbnails[5394176]=new thumbnail(5394176,"228030","Across the Thames","St_Pauls_Bridge_800_thumb.jpg",130,195,18);thumbnails[5681837]=new thumbnail(5681837,"336196","Reaching Upwards","Reaching_Upwards_800_thumb.jpg",130,195,18);thumbnails[4383419]=new thumbnail(4383419,"336196","Dublin Bridge","Dublin_Bridge_800_thumb.jpg",130,195,18);thumbnails[4383429]=new thumbnail(4383429,"117626","Pottering About","Harry_Potter_Engine_800_thumb.jpg",130,87,18);thumbnails[3452993]=new thumbnail(3452993,"117626","Streamlined","Streamlined 800_thumb.jpg",130,87,18);thumbnails[2140230]=new thumbnail(2140230,"117626","In the Roundhouse","In the Roundhouse 800_thumb.jpg",130,87,18);thumbnails[5936380]=new thumbnail(5936380,"117626","Timeless","Timeless_800_thumb.jpg",130,87,18);thumbnails[3453652]=new thumbnail(3453652,"117626","Rust in Peace","Rust in Peace 800_thumb.jpg",130,87,18);thumbnails[2068912]=new thumbnail(2068912,"117626","In the Workshop","In the Workshop 800_thumb.jpg",130,195,18);thumbnails[2250872]=new thumbnail(2250872,"117626","Gather Round","Gather Round 800_thumb.jpg",130,195,18);thumbnails[3950092]=new thumbnail(3950092,"117626","Loco Shed","Loco_Shed_II_800_thumb.jpg",130,195,18);thumbnails[2557439]=new thumbnail(2557439,"117626","Ready and Waiting","Ready_and_Waiting_New_800_thumb.jpg",130,195,18);thumbnails[3448853]=new thumbnail(3448853,"117626","Early Morning Sunshine","Early Morning Sunshine 800_thumb.jpg",130,195,18);thumbnails[4384060]=new thumbnail(4384060,"228031","Old Fire Engine","Old_Fire_Engine_800_thumb.jpg",130,87,18);thumbnails[4569162]=new thumbnail(4569162,"228031","Platform 1 Arrival","Platform_1_Arrival_800_thumb.jpg",130,87,18);thumbnails[3449143]=new thumbnail(3449143,"228031","Old 'Arrow'","Red Arrow 800_thumb.jpg",130,87,18);thumbnails[3735981]=new thumbnail(3735981,"228031","Tractor and Plane","Tractor_and_DC3_800_thumb.jpg",130,87,18);thumbnails[4383404]=new thumbnail(4383404,"228031","Carnforth Engine Shed","Carnforth_Engine_Shed_800_thumb.jpg",130,87,18);thumbnails[3735956]=new thumbnail(3735956,"228031","Old Engine","Old_Engine_800_thumb.jpg",130,195,18);thumbnails[4569140]=new thumbnail(4569140,"228031","Sir Nigel","A4_Sir_Nigel_1_800_thumb.jpg",130,195,18);thumbnails[5958031]=new thumbnail(5958031,"228031","In the Shed","In_the_Shed_800_thumb.jpg",130,195,18);thumbnails[1021838]=new thumbnail(1021838,"72624","Austin 7 Box Saloon","Austin 7 Box Saloon CompleteJPG1.jpg",130,87,18);thumbnails[1022187]=new thumbnail(1022187,"72624","Austin 7, 2 Seater Tourer","Austin 7 2 Seater Sports CompleteJPG1.jpg",130,87,18);thumbnails[1031179]=new thumbnail(1031179,"72624","1934 MG Sports Car","1934 MG SportsJPG1.jpg",130,87,18);thumbnails[1075425]=new thumbnail(1075425,"72624","1973 E-Type Jaguar V12","1973 E Type Jaguar BlueJPG1.jpg",130,87,18);thumbnails[1069799]=new thumbnail(1069799,"72624","Rolls Royce Silver Ghost","RR Silver Ghost Maroon0021.jpg",130,87,18);thumbnails[1012333]=new thumbnail(1012333,"72624","Standard 5 Steam Locomotive 73129","Standard 5 Steam Locomotive 73129 newJPG1.jpg",130,195,18);thumbnails[1084496]=new thumbnail(1084496,"72624","1936 Morgan 3 Wheeler","1936 Morgan0011.jpg",130,87,18);thumbnails[1020590]=new thumbnail(1020590,"72624","Fiat 500","Fiat 500JPG5.jpg",130,87,18);thumbnails[1504398]=new thumbnail(1504398,"72624","Dairy Farm Montage","Hall Farm Low ResolutionJPG1.jpg",130,87,18);thumbnails[1012274]=new thumbnail(1012274,"72624","A1X Terrier 662","A1X Terrier DetailedJPG1.jpg",130,195,18);var galleries=new Object();galleries[210944]=new gallery(210944,"6672785,6426400,5997253,5826668,5679641,5679405,5466547","RECENTLY ADDED","gallery",[5679405,6426400,5958016,5466547,5679641,6183721,5957922,6672785,5826668,5936050,5997241,5997253]);galleries[117589]=new gallery(117589,"5394205,2873281,2376645,2250753,1751071,1751064,1751005","LANDSCAPES I","gallery",[1751064,1751071,1751005,5679630,2873281,5059967,2250753,5394205,2376645,2376642]);galleries[228047]=new gallery(228047,"5529691,5466918,5291354,4966572,4966552,3449120,2250749","LANDSCAPES II","gallery",[5529691,2726182,4966552,2250749,4966572,4890514,5291354,3449120,5561014,5466918]);galleries[334971]=new gallery(334971,"5563447,5394123,5394119,5291360,3449150","LANDSCAPES III","gallery",[2068752,5561095,3449150,5394123,5291360,5394119,5561062,5563447]);galleries[74471]=new gallery(74471,"1012829,1012462","NATURAL WORLD","gallery",[1012478,1012462,1012829,1432049,4383478]);galleries[72621]=new gallery(72621,"4966528,3453139,2376655,2376651,2066964","ARCHITECTURE I","gallery",[2066964,3950082,2376655,2376651,2250787,2557863,3950074,3453529,3735968,3453139,2066968,2066967,4966528,2534765,2250774]);galleries[228030]=new gallery(228030,"6426489,6426474,5394176,4383929,3735979,2534745","ARCHITECTURE II","gallery",[2682405,2534745,3453277,6426474,4383929,4384015,6426489,3735979,3453382,5394176]);galleries[336196]=new gallery(336196,"5681837","ARCHITECTURE III","gallery",[5681837,4383419]);galleries[117626]=new gallery(117626,"3453652,3448853,2557439,2140230,2068912","TRANSPORT I","gallery",[4383429,3452993,2140230,5936380,3453652,2068912,2250872,3950092,2557439,3448853]);galleries[228031]=new gallery(228031,"4569140,3735956","TRANSPORT II","gallery",[4384060,4569162,3449143,3735981,4383404,3735956,4569140,5958031]);galleries[72624]=new gallery(72624,"1022187,1021838,1012333,1012274","PHOTO MONTAGE","gallery",[1021838,1022187,1031179,1075425,1069799,1012333,1084496,1020590,1504398,1012274]);var imageSets=new Object();imageSets[1]="6672785,6183721,5997241,5957922,5936380,5936050,5826668,5679630,5561095,5529691,4966572,4966552,4569162,4383429,4383404,3950082,3950074,3453139,3449150,2873281,2726182,2376655,2376651,2250787,2250749,2068752,2066964,1751064,1751005";imageSets[2]="6672785,6426489,6426474,6426400,5997253,5826668,5681837,5679641,5679405,5563447,5529691,5466918,5466547,5394205,5394176,5394123,5394119,5291360,5291354,4966572,4966552,4966528,4569140,4383929,3735979,3735956,3453652,3453139,3449150,3449120,3448853,2873281,2557439,2534745,2376655,2376651,2376645,2250753,2250749,2140230,2068912,2066964,1751071,1751064,1751005,1022187,1021838,1012829,1012462,1012333,1012274";imageSets[3]="4383478,4383419,3950092,3950082,3449143,3449120";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/simonbull/images";break}switch(a){case 1:b="http://www1.clikpic.com/simonbull/images";break}switch(a){case 2:b="http://admin.clikpic.com/simonbull/images";break}switch(a){case 24:b="http://tpc15/clikpic/simonbull/images";break}switch(a){case 4:b="http://www.clikchurch.com/simonbull/images";break}switch(a){case 5:b="http://www2.clikpic.com/simonbull/images";break}switch(a){case 22:b="http://tpc5/clikpic/simonbull/images";break}switch(a){case 23:b="http://tpc10/clikpic/simonbull/images";break}switch(a){case 25:b="http://tpc16/clikpic/simonbull/images";break}switch(a){case 15:b="http://www3.clikpic.com/simonbull/images";break}switch(a){case 18:b="http://www4.clikpic.com/simonbull/images";break}switch(a){case 19:b="http://www5.clikpic.com/simonbull/images";break}switch(a){case 31:b="http://www7.clikpic.com/simonbull/images";break}switch(a){case 32:b="http://admin2.clikpic.com/simonbull/images";break}switch(a){case 33:b="http://www8.clikpic.com/simonbull/images";break}switch(a){case 34:b="http://www9.clikpic.com/simonbull/images";break}switch(a){case 35:b="http://admin3.clikpic.com/simonbull/images";break}switch(a){case 37:b="http://admin4.clikpic.com/simonbull/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="Simon Bull 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;resizePhotoInfo();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="simonbullimages@hotmail.co.uk">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="simonbullimages@hotmail.co.uk">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};