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[1454641]=new thumbnail(1454641,"","Portree Harbour","portree_harbour_thumb.jpg",130,54,1);thumbnails[1733243]=new thumbnail(1733243,"","Bregenz House and Bangor Waterfront","Bregenz_House_and_Waterfront_thumb.jpg",130,87,1);thumbnails[1733424]=new thumbnail(1733424,"","Eisenhower Pier","Eisenhower_Pier_thumb.jpg",130,87,1);thumbnails[2427245]=new thumbnail(2427245,"116453","Rathlin Island Sunset","Rathlin_Island_Sunset_thumb.jpg",130,87,1);thumbnails[3896331]=new thumbnail(3896331,"116453","Circular Reflections","Circular_Reflections_thumb.jpg",130,87,1);thumbnails[3896338]=new thumbnail(3896338,"116453","Woodland Views","Woodland_Views_thumb.jpg",130,98,1);thumbnails[4678534]=new thumbnail(4678534,"116453","West from Hen Mountain","West_from_Hen_thumb.jpg",130,87,1);thumbnails[4785304]=new thumbnail(4785304,"116453","Dusk at Ballintoy Harbour","ballintoy_Harbour_Dusk_thumb.jpg",130,87,1);thumbnails[4785305]=new thumbnail(4785305,"116453","Stormy Dunluce Castle","Dunluce_Caslte_Stormy_thumb.jpg",130,87,1);thumbnails[5147764]=new thumbnail(5147764,"116453","Newcastle Waterfront Bridge","Newcastle_Bridge_thumb.jpg",130,87,1);thumbnails[5386788]=new thumbnail(5386788,"116453","The church at Saul","Saul_Church_thumb.jpg",130,87,1);thumbnails[5386827]=new thumbnail(5386827,"116453","Nendrum Monastery","Nendrum_Monastery_thumb.jpg",130,87,1);thumbnails[5386857]=new thumbnail(5386857,"116453","Portrush Surfer","Portrush_East_Strand_Surfer_thumb.jpg",130,88,1);thumbnails[5386881]=new thumbnail(5386881,"116453","Portaferry viewed from Strangford","Portaferry_Pano2_thumb.jpg",130,57,1);thumbnails[5386920]=new thumbnail(5386920,"116453","Ballycastle Marina","Ballycastle_Marina_thumb.jpg",130,87,1);thumbnails[5386927]=new thumbnail(5386927,"116453","Ballycastle Beach and the Sea of Moyle","Ballycastle_Beach_Wash_thumb.jpg",130,87,1);thumbnails[5543879]=new thumbnail(5543879,"116453","Narrow Water Castle","Narrow_Water_Castle_thumb.jpg",130,173,1);thumbnails[5543903]=new thumbnail(5543903,"116453","Carnlough Harbour at Dawn","carnlough_Harbour_Boats_thumb.jpg",130,98,1);thumbnails[5543981]=new thumbnail(5543981,"116453","Nuala with the Hula!","Nuala_with_the_hula_thumb.jpg",130,163,1);thumbnails[5544707]=new thumbnail(5544707,"116453","Spelga Dam and Reservoir","Spelga_Dam_and_Reservoir_thumb.jpg",130,173,1);thumbnails[5544724]=new thumbnail(5544724,"116453","Shimna Stepping Stones","Shimna_Stepping_Stones_thumb.jpg",130,87,1);thumbnails[5625954]=new thumbnail(5625954,"116453","Jetski off Benone Beach","Benone_Jetski_thumb.jpg",130,87,1);thumbnails[5695895]=new thumbnail(5695895,"116453","Murlough Bay looking towards the Mull of Kintyre","Murlough_Bay_Mull_of_Kintyre_thumb.jpg",130,98,1);thumbnails[5695848]=new thumbnail(5695848,"116453","Lough Island Reavy","Lough_Island_Reavy_thumb.jpg",130,87,1);thumbnails[4785317]=new thumbnail(4785317,"116453","Holywood Yacht Club Jetty at Dusk","Holywood_Yacht_Club_Jetty_thumb.jpg",130,87,1);thumbnails[3896336]=new thumbnail(3896336,"116453","Impending Disaster","Impending_Disaster_thumb.jpg",130,98,1);thumbnails[3896339]=new thumbnail(3896339,"116453","Scrabo Sunset","Scrabo_Sunset_thumb.jpg",130,87,1);thumbnails[2135899]=new thumbnail(2135899,"116453","Belfast Lough","Belfast_Lough_thumb.jpg",130,87,1);thumbnails[3082265]=new thumbnail(3082265,"116453","Tollymore and Castlewellan","Tollymore_and_Castlewellan_thumb.jpg",130,87,1);thumbnails[3082272]=new thumbnail(3082272,"116453","Autumn Spray","Autumn_Spray_thumb.jpg",130,87,1);thumbnails[3082303]=new thumbnail(3082303,"116453","The Glen River","glen_river1_thumb.jpg",130,87,1);thumbnails[3681090]=new thumbnail(3681090,"116453","Blackhead Lighthouse","Blackhead_Lighthouse_thumb.jpg",130,87,1);thumbnails[4901064]=new thumbnail(4901064,"116453","Giant's Causeway Sunset","Causeway_Sunset_thumb.jpg",130,87,1);thumbnails[3681156]=new thumbnail(3681156,"116453","Carrickfergus Castle","Carrickfergus_Castle_thumb.jpg",130,87,1);thumbnails[3773689]=new thumbnail(3773689,"116453","Belfast City Hall","Belfast_City_Hall_thumb.jpg",130,73,1);thumbnails[3773691]=new thumbnail(3773691,"116453","Belfast City","Belfast_City_thumb.jpg",130,87,1);thumbnails[3773692]=new thumbnail(3773692,"116453","St John's Lighthouse  at Dawn on Easter Sunday ","St_Johns_Lighthouse_Easter_Sunday_Dawn_thumb.jpg",130,87,1);thumbnails[3896334]=new thumbnail(3896334,"116453","Winter Wild Camp ","Wild_camping_Mournes_thumb.jpg",130,87,1);thumbnails[1733235]=new thumbnail(1733235,"116453","Crawfordsburn Bay","Crawfordsburn_Bay_thumb.jpg",130,87,1);thumbnails[1733967]=new thumbnail(1733967,"116453","Helen's Bay","Helens_Bay_thumb.jpg",130,87,1);thumbnails[1784051]=new thumbnail(1784051,"116453","Abandoned Jetty","Abandoned_Jetty_thumb.jpg",130,87,1);thumbnails[3681201]=new thumbnail(3681201,"116453","Ballycopeland Windmill","Ballycopeland_Windmill_thumb.jpg",130,163,1);thumbnails[3896340]=new thumbnail(3896340,"116453","Autumn Walking","Autumn_Walk_thumb.jpg",130,163,1);thumbnails[5496516]=new thumbnail(5496516,"116453","The Mountains of Mourne","The_Mountains_of_Mourne_thumb.jpg",130,38,1);thumbnails[3896304]=new thumbnail(3896304,"94416","Merkland Wood","Merkland_Wood_thumb.jpg",130,87,1);thumbnails[3896310]=new thumbnail(3896310,"94416","Rum Cuillin and the Bullough Mausoleum","Rum_Cuillin_thumb.jpg",130,87,1);thumbnails[3896314]=new thumbnail(3896314,"94416","Small Isles Sunset","Small_Isles_Sunset_thumb.jpg",130,87,1);thumbnails[3896348]=new thumbnail(3896348,"94416","Belfast Hills Sunset","Belfast_Hills_Sunset_thumb.jpg",130,87,1);thumbnails[1346212]=new thumbnail(1346212,"94416","Saltburn Pier - Winter Dusk","saltburn_pier_winter_dusk_thumb.jpg",130,87,1);thumbnails[1345463]=new thumbnail(1345463,"94416","The Power of the Sea","power_of_the_north_sea_thumb.jpg",130,87,1);thumbnails[2437290]=new thumbnail(2437290,"94416","Pirate's Cove Sunrise","Pirates_Cove_Sunrise_thumb.jpg",130,87,1);thumbnails[1346665]=new thumbnail(1346665,"94416","Rannoch Moor","rannoch_moor_thumb.jpg",130,87,1);thumbnails[1673892]=new thumbnail(1673892,"94416","Eternal Conflict","Eternal_Conflict_thumb.jpg",130,87,1);thumbnails[2437295]=new thumbnail(2437295,"94416","Machrie Moor Sunset","Machrie_Moor_Sunset_thumb.jpg",130,87,1);thumbnails[1348575]=new thumbnail(1348575,"94416","The Cuillin from Elgol","cuillin_from_elgol_thumb.jpg",130,87,1);thumbnails[2437304]=new thumbnail(2437304,"94416","Machrie Moor Standing Stones","Machrie_Standing_Stones_thumb.jpg",130,87,1);thumbnails[1345823]=new thumbnail(1345823,"94416","Going Home at Dusk","canoeist_going_home_dusk_thumb.jpg",130,54,1);thumbnails[1347044]=new thumbnail(1347044,"94416","Castle Tioram","Castle_Tioram_thumb.jpg",130,43,1);thumbnails[3896321]=new thumbnail(3896321,"94416","Portrush Strand","Portrush_Strand_thumb.jpg",130,57,1);thumbnails[1347268]=new thumbnail(1347268,"94416","Saltburn Pier at Night","saltburn_pier_pano_thumb.jpg",130,54,1);thumbnails[1396821]=new thumbnail(1396821,"94416","Happisburgh Cliff Erosion","Happisburgh_cliff_erosion_thumb.jpg",130,195,1);thumbnails[1346704]=new thumbnail(1346704,"94416","Talisker Bay","talisker_bay_late_afternoon_thumb.jpg",130,195,1);thumbnails[1671650]=new thumbnail(1671650,"94416","Cold Wash","Cold_wash_thumb.jpg",130,195,1);thumbnails[1733255]=new thumbnail(1733255,"94416","Verdant Stream","verdant_stream_thumb.jpg",130,195,1);thumbnails[1346064]=new thumbnail(1346064,"94416","Cromer Pier in Winter","cromer_pier_winter_thumb.jpg",130,87,1);thumbnails[1348583]=new thumbnail(1348583,"94416","Western Isles Sunset","western_isles_sunset_thumb.jpg",130,87,1);thumbnails[1347297]=new thumbnail(1347297,"94416","Liathach - The Grey One","liathach_thumb.jpg",130,87,1);thumbnails[1347271]=new thumbnail(1347271,"94416","Southwold Pier","southwold_pier_summer_thumb.jpg",130,87,1);thumbnails[4678540]=new thumbnail(4678540,"94416","Hope for Sailors","Hope-for-sailors_thumb.jpg",130,98,1);thumbnails[4276672]=new thumbnail(4276672,"94420","Common Blue Butterfly","Common_Blue_Butterfly1_thumb.jpg",130,87,1);thumbnails[4276679]=new thumbnail(4276679,"94420","Keeled Skimmer Dragonfly","Keeled_Skimmer_Dragonfly1_thumb.jpg",130,87,1);thumbnails[5543735]=new thumbnail(5543735,"94420","Black Guillemot","Black_guillemot_thumb.jpg",130,98,1);thumbnails[2135898]=new thumbnail(2135898,"94420","Grey Heron","Grey_Heron_thumb.jpg",130,87,1);thumbnails[1348558]=new thumbnail(1348558,"94420","Ah here comes dinner...","ferruginous_hawk_feeding_di_thumb.jpg",130,104,1);thumbnails[2101769]=new thumbnail(2101769,"94420","The Great Tit - Parus Major","The_Great_Tit_parus_major_thumb.jpg",130,195,1);thumbnails[1347864]=new thumbnail(1347864,"94420","Scottish Red Squirrel","scottish_red_squirrel_thumb.jpg",130,163,1);thumbnails[1345471]=new thumbnail(1345471,"94420","What's that over there...?","rabbit_whats_over_there_thumb.jpg",130,195,1);thumbnails[1345707]=new thumbnail(1345707,"94420","Ferruginous Buzzard","ferruginous_hawk_stare_thumb.jpg",130,195,1);thumbnails[1533125]=new thumbnail(1533125,"94420","Robin Collecting Nesting Material","robin_collecting_nesting_material_thumb.jpg",130,87,1);thumbnails[2234725]=new thumbnail(2234725,"94420","Apodemus sylvaticus","Apodemus_sylvaticus_thumb.jpg",130,87,1);thumbnails[1348560]=new thumbnail(1348560,"94420","If I can just run a bit faster...","vulture_take_off_thumb.jpg",130,87,1);thumbnails[1348562]=new thumbnail(1348562,"94420","The Little Bell Ringer","little_bell_ringer_thumb.jpg",130,87,1);thumbnails[1348566]=new thumbnail(1348566,"94420","Look into the Eyes","look_into_eyes_thumb.jpg",130,87,1);thumbnails[2001895]=new thumbnail(2001895,"94420","Red Deer Stag","red_deer_stag_thumb.jpg",130,87,1);thumbnails[2135897]=new thumbnail(2135897,"94420","Stonechat","Stonechat_on_perch_thumb.jpg",130,163,1);thumbnails[1348568]=new thumbnail(1348568,"94420","Where's my mum?","rabbit_wheres_mum_thumb.jpg",130,104,1);thumbnails[1348570]=new thumbnail(1348570,"94420","Tawny Owl","tawny_owl_calling_thumb.jpg",130,104,1);thumbnails[2101763]=new thumbnail(2101763,"94420","A sparrowhawk devouring its prey","Sparrowhawk_devouring_prey_thumb.jpg",130,104,1);thumbnails[2001898]=new thumbnail(2001898,"94420","Erithacus rubecula - The Robin","Red_Robin_thumb.jpg",130,130,1);thumbnails[2234694]=new thumbnail(2234694,"94420","Fulmar in Flight","Rathlin_Island_Fulmar_thumb.jpg",130,87,1);thumbnails[2257100]=new thumbnail(2257100,"94420","Blue Tit","Blue_Tit_thumb.jpg",130,163,1);thumbnails[3155162]=new thumbnail(3155162,"94420","Blue Tit","Blue_Tit_2_thumb.jpg",130,163,1);thumbnails[3896344]=new thumbnail(3896344,"94420","Parent and Child","Parent_and_Child_thumb.jpg",130,163,1);thumbnails[3588580]=new thumbnail(3588580,"94420","Summertime Hoverfly","Hoverfly_thumb.jpg",130,104,1);thumbnails[4678537]=new thumbnail(4678537,"94655","Golden Flow","Golden-Flow_thumb.jpg",130,173,1);thumbnails[4678542]=new thumbnail(4678542,"94655","Wood or Stone?","Wood-or-Stone_thumb.jpg",130,195,1);thumbnails[4678545]=new thumbnail(4678545,"94655","Towards the future?","Towards-the-future_thumb.jpg",130,173,1);thumbnails[5386996]=new thumbnail(5386996,"94655","Sand dune in evening summer sunshine","Sand_dunes_abstract_thumb.jpg",130,87,1);thumbnails[3896341]=new thumbnail(3896341,"94655","Floral Impressions","Floral_Impressions_thumb.jpg",130,195,1);thumbnails[3588759]=new thumbnail(3588759,"94655","Arboreal Impressions","Arboreal_Impressions2_thumb.jpg",130,173,1);thumbnails[3896350]=new thumbnail(3896350,"94655","Garden Flowers","Garden_Flowers_thumb.jpg",130,173,1);thumbnails[3896354]=new thumbnail(3896354,"94655","Tulips","Tulips_thumb.jpg",130,173,1);thumbnails[3134534]=new thumbnail(3134534,"94655","Samurai Detail","Samurai_Detail_thumb.jpg",130,87,1);thumbnails[3134527]=new thumbnail(3134527,"94655","In the beginning...","In_the-_beginning_was_the_word_thumb.jpg",130,87,1);thumbnails[3896343]=new thumbnail(3896343,"94655","Safe Connections","Safe_connections_thumb.jpg",130,87,1);thumbnails[3588574]=new thumbnail(3588574,"94655","Autumn Remains","Autumn_Remains_thumb.jpg",130,98,1);thumbnails[3896346]=new thumbnail(3896346,"94655","Swan form","Swan_form_thumb.jpg",130,163,1);thumbnails[3134524]=new thumbnail(3134524,"94655","From Acorns to Oaks","From_Acorns_to_Oaks_thumb.jpg",130,195,1);thumbnails[3134531]=new thumbnail(3134531,"94655","Golden Maple","golden_maple2_thumb.jpg",130,195,1);thumbnails[1351107]=new thumbnail(1351107,"94655","Patchwork Light","patchwork_light_thumb.jpg",130,195,1);thumbnails[3134533]=new thumbnail(3134533,"94655","Regal Lineup","Regal_Lineup_thumb.jpg",130,163,1);thumbnails[3655816]=new thumbnail(3655816,"94655","Lily in Sepia","Lily_in_Sepia_thumb.jpg",130,130,1);thumbnails[3896352]=new thumbnail(3896352,"94655","Orange Lily","Orange_Lily_thumb.jpg",130,130,1);thumbnails[3134536]=new thumbnail(3134536,"94655","Snuff Cottage","Snuff_Cottage_thumb.jpg",130,163,1);thumbnails[1351110]=new thumbnail(1351110,"94655","Out of your Depth","out_of_your_depth_thumb.jpg",130,195,1);thumbnails[3681191]=new thumbnail(3681191,"94655","Light and Dark","Light_and_Dark_thumb.jpg",130,195,1);thumbnails[3134532]=new thumbnail(3134532,"94655","Light Source","Light_source_thumb.jpg",130,266,1);thumbnails[3588581]=new thumbnail(3588581,"94655","Sun and grass","Sun_and_grass_thumb.jpg",130,173,1);var galleries=new Object();galleries[116453]=new gallery(116453,"5543903,4901064,4678534,3896339,3773692","Northern Ireland","gallery",[2427245,3896331,3896338,4678534,4785304,4785305,5147764,5386788,5386827,5386857,5386881,5386920,5386927,5543879,5543903,5543981,5544707,5544724,5625954,5695895,5695848,4785317,3896336,3896339,2135899,3082265,3082272,3082303,3681090,4901064,3681156,3773689,3773691,3773692,3896334,1733235,1733967,1784051,3681201,3896340,5496516]);galleries[94416]=new gallery(94416,"4678540,2437304,1346212","Travel & Landscapes","gallery",[3896304,3896310,3896314,3896348,1346212,1345463,2437290,1346665,1673892,2437295,1348575,2437304,1345823,1347044,3896321,1347268,1396821,1346704,1671650,1733255,1346064,1348583,1347297,1347271,4678540]);galleries[94420]=new gallery(94420,"5543735,4276672,1348566","Wildlife & Nature","gallery",[4276672,4276679,5543735,2135898,1348558,2101769,1347864,1345471,1345707,1533125,2234725,1348560,1348562,1348566,2001895,2135897,1348568,1348570,2101763,2001898,2234694,2257100,3155162,3896344,3588580]);galleries[94655]=new gallery(94655,"5386996,3896343,3588574","Abstract","gallery",[4678537,4678542,4678545,5386996,3896341,3588759,3896350,3896354,3134534,3134527,3896343,3588574,3896346,3134524,3134531,1351107,3134533,3655816,3896352,3134536,1351110,3681191,3134532,3588581]);var imageSets=new Object();imageSets[1]="5695895,5695848,4901064,4785317,3896343,3896339,3773692,3773689,3588574,1348566,1346212,1345463";imageSets[2]="5543903,5543735,5386996,4901064,4678540,4678534,4276672,3896343,3896339,3773692,3588574,2437304,1348566,1346212";imageSets[3]="4276679,4276672,3896354,3896352,3896350,3896348,3896346,3896344,3896343,3896341,3896340,3896339,3896338,3896336,3896334,3896331,3896321,3896314,3896310,3896304,3773692,3773691,3773689,3681201,3681191,3681156,3681090,3655816,3588759,3588581,3588580,3588574,3155162,3134536,3134534,3134533,3134532,3134531,3134527,3134524,3082303,3082272,3082265,2437304,2437295,2437290,2427245,2257100,2234725,2234694";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/simonw/images";break}switch(a){case 1:b="http://www1.clikpic.com/simonw/images";break}switch(a){case 2:b="http://admin.clikpic.com/simonw/images";break}switch(a){case 24:b="http://tpc15/clikpic/simonw/images";break}switch(a){case 4:b="http://www.clikchurch.com/simonw/images";break}switch(a){case 5:b="http://www2.clikpic.com/simonw/images";break}switch(a){case 22:b="http://tpc5/clikpic/simonw/images";break}switch(a){case 23:b="http://tpc10/clikpic/simonw/images";break}switch(a){case 25:b="http://tpc16/clikpic/simonw/images";break}switch(a){case 15:b="http://www3.clikpic.com/simonw/images";break}switch(a){case 18:b="http://www4.clikpic.com/simonw/images";break}switch(a){case 19:b="http://www5.clikpic.com/simonw/images";break}switch(a){case 31:b="http://www7.clikpic.com/simonw/images";break}switch(a){case 32:b="http://admin2.clikpic.com/simonw/images";break}switch(a){case 33:b="http://www8.clikpic.com/simonw/images";break}switch(a){case 34:b="http://www9.clikpic.com/simonw/images";break}switch(a){case 35:b="http://admin3.clikpic.com/simonw/images";break}switch(a){case 37:b="http://admin4.clikpic.com/simonw/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="Outdoor Photographer & Writer in Northern Ireland: "+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="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="sawatterson@yahoo.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="sawatterson@yahoo.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+'")'})}}};