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[972330]=new thumbnail(972330,"73044","Bodiam Castle - Sussex","Bodiam-Castle-Sussex4_thumb.jpg",130,80,1);thumbnails[972332]=new thumbnail(972332,"73044","Hundertwasser Haus - Vienna Austria","Hundertwasser-Haus-Vienna-Austria_thumb.jpg",130,82,1);thumbnails[972335]=new thumbnail(972335,"73044","Museum of Modern Art - San Francisco USA","Museum-of-Modern-Art-San-Francisco-USA_thumb.jpg",130,79,1);thumbnails[973181]=new thumbnail(973181,"73044","Florence - Italy","Florence-Italy_thumb.jpg",130,80,1);thumbnails[973284]=new thumbnail(973284,"73155","Red Coats - London","Red-Coats_thumb.jpg",130,41,1);thumbnails[973296]=new thumbnail(973296,"73155","London","London_thumb.jpg",130,68,1);thumbnails[973302]=new thumbnail(973302,"73155","The Eye II - London","The-Eye-ll_thumb.jpg",130,90,1);thumbnails[973306]=new thumbnail(973306,"73155","The Eye III - London","The-Eye-lll_thumb.jpg",130,128,1);thumbnails[973312]=new thumbnail(973312,"73155","The Film Cafe - The National Film Theatre","The-Film-Cafe-The-National-Film-Theatre-The-Southbank_thumb.jpg",130,100,1);thumbnails[974713]=new thumbnail(974713,"73044","Sunshine at The Tate Modern lll - London","Sunshine-at-The-Tate-Modern-lll_thumb.jpg",130,215,1);thumbnails[974715]=new thumbnail(974715,"73044","Sunshine at The Tate Modern - London","Sunshine-at-The-Tate-Modern-London_thumb.jpg",130,123,1);thumbnails[974718]=new thumbnail(974718,"73044","Turquoise Shutter - Provence France","Turquoise-Shutter-Provence-France_thumb.jpg",130,81,1);thumbnails[974848]=new thumbnail(974848,"73241","Chihuly - Kew Gardens","Chihuly_thumb.jpg",130,82,1);thumbnails[974856]=new thumbnail(974856,"73241","Chihuly at Kew - Kew Gardens","Chihuly-at-Kew_thumb.jpg",130,69,1);thumbnails[974865]=new thumbnail(974865,"73241","The Fountain - Kew Gardens","The-Fountain_thumb.jpg",130,333,1);thumbnails[974877]=new thumbnail(974877,"73242","Amsterdam ll - Holland","Amsterdam-ll-Holland_thumb.jpg",130,142,1);thumbnails[974910]=new thumbnail(974910,"73242","Hundertwasser Haus - Vienna Austria","Hundertwasser-Haus-Vienna-Austria3_thumb.jpg",130,83,1);thumbnails[974938]=new thumbnail(974938,"73242","Old Town Nice - France","Old-Town-Nice-France_thumb.jpg",130,223,1);thumbnails[974941]=new thumbnail(974941,"73242","Prague - Czech Republic","Prague-Czech-Republic_thumb.jpg",130,96,1);thumbnails[974945]=new thumbnail(974945,"73242","Seville - Spain","Seville-Spain_thumb.jpg",130,190,1);thumbnails[974952]=new thumbnail(974952,"73239","Amsterdam - Holland","Amsterdam-Holland_thumb.jpg",130,129,1);thumbnails[974954]=new thumbnail(974954,"73239","Amsterdam II - Holland","Amsterdam-ll-Holland2_thumb1.jpg",130,142,1);thumbnails[974955]=new thumbnail(974955,"73239","Barcelona - Spain","Barcelona-Spain_thumb.jpg",130,137,1);thumbnails[974956]=new thumbnail(974956,"73239","Cesares - Spain","Cesares-Spain_thumb.jpg",130,90,1);thumbnails[974957]=new thumbnail(974957,"73239","Museum of Modern Art - San Francisco USA","Museum-of-Modern-Art-San-Francisco-USA3_thumb.jpg",130,79,1);thumbnails[974978]=new thumbnail(974978,"73240","Blue Sheep - Community Arts Project","Blue-Sheep-Community-Arts-Project3_thumb.jpg",130,90,1);thumbnails[974982]=new thumbnail(974982,"73240","Albert - The Everglades USA","Albert-The-Everglades-USA_thumb.jpg",130,356,1);thumbnails[974985]=new thumbnail(974985,"73240","Jelly Fish lll - Monterey Aquarium USA","Jelly-Fish-lll-Monterey-Aquarium-USA_thumb.jpg",130,195,1);thumbnails[974987]=new thumbnail(974987,"73240","Jelly Fish ll - Monterey Aquarium USA","Jelly-Fish-ll-Monterey-Aquarium-USA_thumb.jpg",130,87,1);thumbnails[974989]=new thumbnail(974989,"73240","Jelly Fish - Monterey Aquarium USA","Jelly-Fish-Monterey-Aquarium-USA_thumb.jpg",130,195,1);thumbnails[974992]=new thumbnail(974992,"73240","The Poodle","The-Poodle_thumb.jpg",130,64,1);thumbnails[974996]=new thumbnail(974996,"73238","Pink Poppy","Pink-Poppy_thumb.jpg",130,98,1);thumbnails[975004]=new thumbnail(975004,"73238","Poppies In The Wind","Poppies-In-The-Wind_thumb.jpg",130,116,1);thumbnails[975007]=new thumbnail(975007,"73238","Poppy Field","Poppy-Field_thumb.jpg",130,81,1);thumbnails[975009]=new thumbnail(975009,"73238","Two Poppies","Two-Poppies_thumb.jpg",130,122,1);thumbnails[975015]=new thumbnail(975015,"73237","Bike & Bench - Brighton","Bike-&-Bench-Brighton_thumb.jpg",130,53,1);thumbnails[975018]=new thumbnail(975018,"73237","Chillin - Cornwall","Chillin-Cornwall_thumb.jpg",130,40,1);thumbnails[975021]=new thumbnail(975021,"73237","My Kite - The Witterings","My-Kite-The-Witterings_thumb.jpg",130,38,1);thumbnails[975025]=new thumbnail(975025,"73237","Seven Sisters Eight Chimneys - Seaford Sussex","Seven-Sisters-Eight-Chimneys-Seaford-Sussex_thumb.jpg",130,50,1);thumbnails[975026]=new thumbnail(975026,"73237","Wave Breakers - Normandy France","Wave-Breakers-Normandy-France_thumb.jpg",130,46,1);thumbnails[975029]=new thumbnail(975029,"73237","The Witterings","witterings_thumb.jpg",130,36,1);thumbnails[975050]=new thumbnail(975050,"73236","Beach Huts - Hove Sussex","Beach-Huts-Hove-Sussex_thumb.jpg",130,94,1);thumbnails[975052]=new thumbnail(975052,"73236","Bosham - Sussex","Bosham-Sussex_thumb.jpg",130,88,1);thumbnails[975054]=new thumbnail(975054,"73236","Brighton Pier - The West Pier Brighton Sussex","Brighton-Pier-The-West-Pier-Brighton-Sussex_thumb.jpg",130,38,1);thumbnails[975056]=new thumbnail(975056,"73236","Eastbourne Pier - Sussex","Eastbourne-Pier-Sussex_thumb.jpg",130,39,1);thumbnails[975058]=new thumbnail(975058,"73236","Sand Dune - Norfolk","Sand-Dune-Norfolk_thumb.jpg",130,131,1);thumbnails[975061]=new thumbnail(975061,"73235","Ford & Fury Dice - Monterey","Ford-&-Fury-Dice-Monterey_thumb.jpg",130,87,1);thumbnails[975070]=new thumbnail(975070,"73235","Mickey Mouse - Orlando","Mickey-Mouse-Orlando_thumb.jpg",130,81,1);thumbnails[975072]=new thumbnail(975072,"73236","Freedom - Seaview Isle of Wight","Freedom-Seaview-Isle-of-Wight_thumb.jpg",130,187,1);thumbnails[975087]=new thumbnail(975087,"73235","Museum of Modern Art - San Francisco","Museum-of-Modern-Art-San-Francisco_thumb.jpg",130,79,1);thumbnails[975089]=new thumbnail(975089,"73235","Tall Ship - Monterey","Tall-Ship-Monterey_thumb.jpg",130,86,1);thumbnails[975090]=new thumbnail(975090,"73235","The Lone Tree - Carmel USA","The-Lone-Tree-Carmel_thumb.jpg",130,195,1);thumbnails[975092]=new thumbnail(975092,"73235","Yosemite Falls - USA","Yosemite-Falls_thumb.jpg",130,194,1);thumbnails[975093]=new thumbnail(975093,"73234","Burano - Venice","Burano_thumb.jpg",130,180,1);thumbnails[975094]=new thumbnail(975094,"73234","Geraniums - Venice","Geraniums_thumb.jpg",130,195,1);thumbnails[975095]=new thumbnail(975095,"73234","Isabella - Venice","Isabella_thumb.jpg",130,191,1);thumbnails[975096]=new thumbnail(975096,"73234","Knickers - Burano","Knickers_thumb.jpg",130,201,1);thumbnails[975097]=new thumbnail(975097,"73234","Passing Through - Venice","Passing-Through_thumb.jpg",130,86,1);thumbnails[975098]=new thumbnail(975098,"73234","Ponte - Venice","Ponte_thumb.jpg",130,87,1);thumbnails[975099]=new thumbnail(975099,"73234","The Gondola - Venice","The-Gondola_thumb.jpg",130,189,1);thumbnails[975110]=new thumbnail(975110,"73238","Poppies","Poppies_thumb.jpg",130,185,1);thumbnails[976027]=new thumbnail(976027,"73239","New Baby","New-Baby_thumb.jpg",130,136,1);thumbnails[982796]=new thumbnail(982796,"73801","Wedding - Barcelona","wedding-barcelona-colour_thumb.jpg",130,36,1);thumbnails[983041]=new thumbnail(983041,"73801","Seville - Spain","Seville-Spain2_thumb.jpg",130,190,1);thumbnails[983046]=new thumbnail(983046,"73801","Barcelona-Spain","Barcelona-Spain2_thumb.jpg",130,137,1);thumbnails[983050]=new thumbnail(983050,"73801","Casares - Spain","Cesares-Spain3_thumb.jpg",130,90,1);thumbnails[984859]=new thumbnail(984859,"73155","The Eye - London","The-Eye_thumb.jpg",130,266,1);thumbnails[984953]=new thumbnail(984953,"73239","Wedding - Barcelona","Wedding-Barcelona-mono2_thumb.jpg",130,37,1);thumbnails[2470381]=new thumbnail(2470381,"244446","Jammin' ","jammin_thumb.jpg",130,172,1);thumbnails[2470569]=new thumbnail(2470569,"244446","Smokin' ","Smokin_thumb.jpg",130,97,1);thumbnails[2470590]=new thumbnail(2470590,"244446","Textin' ","Textin_thumb.jpg",130,98,1);thumbnails[4023168]=new thumbnail(4023168,"73234","Walls and Window","Walls__Window_thumb.jpg",130,195,1);thumbnails[4023213]=new thumbnail(4023213,"73155","St Pauls - London","St_Pauls_thumb.jpg",130,88,1);thumbnails[4023218]=new thumbnail(4023218,"73155","St Pauls ll - London","St_Pauls_ll_thumb.jpg",130,71,1);thumbnails[4023226]=new thumbnail(4023226,"73155","The Embankment - London","The_Embankment_thumb.jpg",130,87,1);thumbnails[4029438]=new thumbnail(4029438,"73044","Grand Central - New York","Grand_Central_thumb.jpg",130,82,1);thumbnails[4029474]=new thumbnail(4029474,"73239","Beach Huts ll - Sandbanks","Beach_Huts_ll_thumb.jpg",130,44,1);thumbnails[4029518]=new thumbnail(4029518,"73235","Grand Central - New York","Grand_Central1_thumb.jpg",130,82,1);thumbnails[4029721]=new thumbnail(4029721,"73238","Bluebells","Bluebells_thumb.jpg",130,87,1);thumbnails[4029738]=new thumbnail(4029738,"73238","Snowdrops","Snow_Drop_thumb.jpg",130,192,1);thumbnails[4029752]=new thumbnail(4029752,"73236","Beach Huts ll - Brighton","Beach_Huts_ll1_thumb.jpg",130,44,1);thumbnails[4029795]=new thumbnail(4029795,"73044","Walls and Window - Venice","Walls__Window1_thumb.jpg",130,195,1);thumbnails[4029830]=new thumbnail(4029830,"73235","Scooters - Bermuda","Scooters_thumb.jpg",130,52,1);thumbnails[4029834]=new thumbnail(4029834,"73235","On Broadway - New York","On_Broadway_thumb.jpg",130,87,1);thumbnails[4029861]=new thumbnail(4029861,"73234","Venice At Night","Venice_at_Night_thumb.jpg",130,194,1);thumbnails[4029877]=new thumbnail(4029877,"73234","The Two Gondolas - Venice","The_Two_Gondolas_thumb.jpg",130,87,1);thumbnails[4029905]=new thumbnail(4029905,"242765","Crossing - Havana","Crossing__thumb.jpg",130,194,1);thumbnails[4029925]=new thumbnail(4029925,"242765","The Cyclist - Havana","The_Cyclist_thumb.jpg",130,290,1);thumbnails[4029946]=new thumbnail(4029946,"242765","Red Ones - Havana","Red_Ones_thumb.jpg",130,209,1);thumbnails[4045691]=new thumbnail(4045691,"242763","Guinness Brewery - Dublin","Guinness_Brewery_Dublin_thumb.jpg",130,93,1);thumbnails[4045729]=new thumbnail(4045729,"242763","O'Donoghues - Dublin","ODonoghues_thumb.jpg",130,93,1);thumbnails[4045752]=new thumbnail(4045752,"242763","Galloping - Curracloe","Galloping_Curracloe_thumb.jpg",130,44,1);thumbnails[4045759]=new thumbnail(4045759,"242762","East Side Gallery","East_Side_Gallery_thumb.jpg",130,195,1);thumbnails[4045773]=new thumbnail(4045773,"242762","East Side Gallery ll","East_Side_Gallery_ll_thumb.jpg",130,170,1);thumbnails[4063137]=new thumbnail(4063137,"244446","O'Donoghues - Dublin","ODonoghues1_thumb.jpg",130,93,1);thumbnails[4136605]=new thumbnail(4136605,"73237","The Witterings ll","The_Witterings_ll_thumb.jpg",130,52,1);thumbnails[4136610]=new thumbnail(4136610,"73237","The Witterings lll","The_Witterings_lll_thumb.jpg",130,34,1);thumbnails[4030056]=new thumbnail(4030056,"242764","Carcasonne","Carcasonne_thumb.jpg",130,45,1);thumbnails[4117190]=new thumbnail(4117190,"242764","Carcassonne ll","_MG_1105a_Caccassonne_at_Night_ll_thumb.jpg",130,65,1);thumbnails[4117186]=new thumbnail(4117186,"242764","Les Arbres de Minervois","_MG_1087w_Trees_thumb.jpg",130,41,1);thumbnails[4117183]=new thumbnail(4117183,"242764","Lagrasse","_MG_1049w_Washing_thumb.jpg",130,52,1);thumbnails[4117206]=new thumbnail(4117206,"242764","Castres ll","_MG_1183w_Castres_ll_thumb.jpg",130,87,1);thumbnails[4117171]=new thumbnail(4117171,"242764","les vignes de Minervois","_MG_0704asq-Vines_thumb.jpg",130,129,1);thumbnails[4030039]=new thumbnail(4030039,"242764","Yellow Door ","Yellow_Door_thumb.jpg",130,130,1);thumbnails[4045757]=new thumbnail(4045757,"242764","Musee d'Orsay - Paris","Musee_dOrsay_thumb.jpg",130,195,1);thumbnails[4117180]=new thumbnail(4117180,"242764","Montagne Noire","_MG_0921a_thumb.jpg",130,195,1);thumbnails[4117194]=new thumbnail(4117194,"242764","Castres","_MG_1171a_Castres_thumb.jpg",130,195,1);thumbnails[4117216]=new thumbnail(4117216,"242764","Castres lll","_MG_1197a_Castres_lll_thumb.jpg",130,195,1);thumbnails[4029980]=new thumbnail(4029980,"242764","Dancing - Castres","Dancing_Castres_thumb.jpg",130,241,1);thumbnails[4117178]=new thumbnail(4117178,"242764","Neuf Ecluses","_MG_0876a_Ecluses_de_Fonseranes123_thumb.jpg",130,503,1);var galleries=new Object();galleries[73044]=new gallery(73044,"4029795,4029438,974718,974715,974713,973181,972335,972332,972330","Architecture","gallery",[972330,972332,972335,973181,974713,974715,974718,4029438,4029795]);galleries[242762]=new gallery(242762,"4045759","Berlin","gallery",[4045759,4045773]);galleries[73241]=new gallery(73241,"974848","Chihuly at Kew","gallery",[974848,974856,974865]);galleries[242765]=new gallery(242765,"4029905","Cuba","gallery",[4029905,4029925,4029946]);galleries[73242]=new gallery(73242,"974910","Europe","gallery",[974877,974910,974938,974941,974945]);galleries[73238]=new gallery(73238,"974996","Flowers","gallery",[974996,975004,975007,975009,975110,4029721,4029738]);galleries[242764]=new gallery(242764,"4029980","France","gallery",[4030056,4117190,4117186,4117183,4117206,4117171,4030039,4045757,4117180,4117194,4117216,4029980,4117178]);galleries[242763]=new gallery(242763,"4045729","Ireland","gallery",[4045691,4045729,4045752]);galleries[73240]=new gallery(73240,"974978","Living Things","gallery",[974978,974982,974985,974987,974989,974992]);galleries[73155]=new gallery(73155,"973302","London","gallery",[973284,973296,973302,973306,973312,984859,4023213,4023218,4023226]);galleries[73239]=new gallery(73239,"974955","Monochrome","gallery",[974952,974954,974955,974956,974957,976027,984953,4029474]);galleries[244446]=new gallery(244446,"2470381","Music","gallery",[2470381,2470569,2470590,4063137]);galleries[73237]=new gallery(73237,"975025","Sea Scapes","gallery",[975015,975018,975021,975025,975026,975029,4136605,4136610]);galleries[73236]=new gallery(73236,"975050","Seaside","gallery",[975050,975052,975054,975056,975058,975072,4029752]);galleries[73801]=new gallery(73801,"983041","Spain","gallery",[982796,983041,983046,983050]);galleries[73235]=new gallery(73235,"975061","USA","gallery",[975061,975070,975087,975089,975090,975092,4029518,4029830,4029834]);galleries[73234]=new gallery(73234,"975093","Venice","gallery",[975093,975094,975095,975096,975097,975098,975099,4023168,4029861,4029877]);var imageSets=new Object();imageSets[1]="4045729,4029438,4023213,975097,975096,975095,974978,973312,972335";imageSets[2]="4045759,4045729,4029980,4029905,2470381,983041,975093,975061,975050,975025,974996,974978,974955,974910,974848,973302";imageSets[3]="4136610,4136605,4117216,4117206,4117194,4117190,4117186,4117183,4117180,4117178,4117171,4063137,4045773,4045759,4045757,4045752,4045729,4045691,4030056,4030039,4029980,4029946,4029925,4029905,4029877,4029861,4029834,4029830,4029795,4029752,4029738,4029721,4029518,4029474,4029438,4023226,4023218,4023213,4023168,2470590,2470569,2470381,984953,984859,983050,983046,983041,982796,976027,975110";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/sueroach/images";break}switch(a){case 1:b="http://www1.clikpic.com/sueroach/images";break}switch(a){case 2:b="http://admin.clikpic.com/sueroach/images";break}switch(a){case 24:b="http://tpc15/clikpic/sueroach/images";break}switch(a){case 4:b="http://www.clikchurch.com/sueroach/images";break}switch(a){case 5:b="http://www2.clikpic.com/sueroach/images";break}switch(a){case 22:b="http://tpc5/clikpic/sueroach/images";break}switch(a){case 23:b="http://tpc10/clikpic/sueroach/images";break}switch(a){case 25:b="http://tpc16/clikpic/sueroach/images";break}switch(a){case 15:b="http://www3.clikpic.com/sueroach/images";break}switch(a){case 18:b="http://www4.clikpic.com/sueroach/images";break}switch(a){case 19:b="http://www5.clikpic.com/sueroach/images";break}switch(a){case 31:b="http://www7.clikpic.com/sueroach/images";break}switch(a){case 32:b="http://admin2.clikpic.com/sueroach/images";break}switch(a){case 33:b="http://www8.clikpic.com/sueroach/images";break}switch(a){case 34:b="http://www9.clikpic.com/sueroach/images";break}switch(a){case 35:b="http://admin3.clikpic.com/sueroach/images";break}switch(a){case 37:b="http://admin4.clikpic.com/sueroach/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="slrphotographic: "+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>Select an option below to buy 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="accounts@slrphotographic.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="accounts@slrphotographic.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+'")'})}}};