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[775819]=new thumbnail(775819,"","Filming Red Deer UK","me-deer2_thumb.jpg",130,87,18);thumbnails[777859]=new thumbnail(777859,"","","doug-for-web_thumb.jpg",130,121,18);thumbnails[1077133]=new thumbnail(1077133,"120613","Working with Rhinos on an orphaned camp in Zimbabwe","rhino-and-me_thumb.jpg",130,152,18);thumbnails[1077150]=new thumbnail(1077150,"120613","My wife Gillian working with Rhinos","gill-and-rhino_thumb.jpg",130,102,18);thumbnails[1077155]=new thumbnail(1077155,"120613","An Impala we befriended at the camp","me-and-impala_thumb.jpg",130,88,18);thumbnails[1077160]=new thumbnail(1077160,"120613","A baby elephant reared at the camp playing with the 3 legged camp German Shepherd","ele-with-ali_thumb.jpg",130,81,18);thumbnails[1085971]=new thumbnail(1085971,"80115","Wasp building nest. (Achieved by chewing wood in pulp)","wasp_thumb.jpg",130,110,18);thumbnails[1085974]=new thumbnail(1085974,"80115","Owl Moth","owl-moth_thumb.jpg",130,101,18);thumbnails[1085977]=new thumbnail(1085977,"80115","Dansel flies copulating","damsels_thumb.jpg",130,163,18);thumbnails[1085980]=new thumbnail(1085980,"80115","Cricket","cricket_thumb.jpg",130,95,18);thumbnails[1088389]=new thumbnail(1088389,"80115","Worker honey bee","bee_thumb.jpg",130,157,18);thumbnails[1088392]=new thumbnail(1088392,"80115","Caterpillar of the Cinnabar moth feeding on Ragwort","cinnabar_thumb.jpg",130,97,18);thumbnails[1090973]=new thumbnail(1090973,"80115","","web-1_thumb.jpg",130,152,18);thumbnails[1090975]=new thumbnail(1090975,"80115","","web-2_thumb.jpg",130,93,18);thumbnails[1090977]=new thumbnail(1090977,"80115","","web-3_thumb.jpg",130,104,18);thumbnails[1090978]=new thumbnail(1090978,"80115","","web-4_thumb.jpg",130,106,18);thumbnails[1123831]=new thumbnail(1123831,"80115","","1_thumb.jpg",130,103,18);thumbnails[1123832]=new thumbnail(1123832,"80115","","2_thumb.jpg",130,93,18);thumbnails[1123833]=new thumbnail(1123833,"80115","","3_thumb.jpg",130,146,18);thumbnails[1123836]=new thumbnail(1123836,"80115","","5_thumb.jpg",130,168,18);thumbnails[1123862]=new thumbnail(1123862,"80115","","a6_thumb.jpg",130,163,18);thumbnails[1123863]=new thumbnail(1123863,"80115","","b2_thumb.jpg",130,148,18);thumbnails[1123866]=new thumbnail(1123866,"80115","","c1_thumb.jpg",130,83,18);thumbnails[1797336]=new thumbnail(1797336,"120612","Vervet monkey invading the lodge","verevet_thumb.jpg",130,87,18);thumbnails[1797639]=new thumbnail(1797639,"120613","Woman washing fish - Lake Kariba","washing_thumb.jpg",130,87,18);thumbnails[1797642]=new thumbnail(1797642,"120613","The staple diet in the region - fish from Lake Kariba","fish-woman_thumb.jpg",130,87,18);thumbnails[1797645]=new thumbnail(1797645,"120613","A womans'work is never done - repairing mud huts.","rep-hut_thumb.jpg",130,87,18);thumbnails[1797658]=new thumbnail(1797658,"120613","No game boys and I-pods here! Children play the old fashioned way.","kids_thumb.jpg",130,87,18);thumbnails[1797662]=new thumbnail(1797662,"120613","Rastus the camp baby elephant about to swing a chair around and get into even more trouble!","rastus_thumb.jpg",130,87,18);thumbnails[1797666]=new thumbnail(1797666,"120613","Hotel Victoria, Victoria Falls","hotel-vic_thumb.jpg",130,87,18);thumbnails[775821]=new thumbnail(775821,"60096","Alongside the Beeb","scott_thumb.jpg",130,112,18);thumbnails[775824]=new thumbnail(775824,"60096","Honey - star of BBC Big Cat week","honey_thumb.jpg",130,104,18);thumbnails[775836]=new thumbnail(775836,"60096","Honey","honey-head_thumb.jpg",130,98,18);thumbnails[775843]=new thumbnail(775843,"60096","There is always something to film!","me-roof_thumb.jpg",130,86,18);thumbnails[775851]=new thumbnail(775851,"60096","Our guide and freind Douglas showing the path of the coming Wildebeest migration.","pointing_thumb.jpg",130,86,18);thumbnails[775858]=new thumbnail(775858,"60096","Honey with her cubs. One was not to survive.","cheetah-kiss_thumb.jpg",130,98,18);thumbnails[783053]=new thumbnail(783053,"60096","The lodge at Samburu","samburu-serena_thumb.jpg",130,88,18);thumbnails[784554]=new thumbnail(784554,"60096","CHEETAH STALKING","c_thumb.jpg",130,173,18);thumbnails[784556]=new thumbnail(784556,"60096","LEOPARD","d_thumb.jpg",130,97,18);thumbnails[785843]=new thumbnail(785843,"60096","LION WITH WILDBEEST PREY","lion-test_thumb.jpg",130,98,18);thumbnails[1077158]=new thumbnail(1077158,"60096","Young elephant bulls playing at who is dominant","young-bulls_thumb.jpg",130,90,18);thumbnails[1088398]=new thumbnail(1088398,"60096","Water Buffalo","buffalo_thumb.jpg",130,169,18);thumbnails[1088401]=new thumbnail(1088401,"60096","Black Rhino","rhino-head_thumb.jpg",130,98,18);thumbnails[1640614]=new thumbnail(1640614,"60096","Alongside the Beeb 2","alongside-beeb-2_thumb.jpg",130,92,18);thumbnails[1640618]=new thumbnail(1640618,"60096","Dik-Dik","dik-dik_thumb.jpg",130,114,18);thumbnails[1640619]=new thumbnail(1640619,"60096","Preparing to film the wildebeest migration from the air","film-from-air_thumb.jpg",130,86,18);thumbnails[1640621]=new thumbnail(1640621,"60096","Impala","geranuk_thumb.jpg",130,86,18);thumbnails[1651388]=new thumbnail(1651388,"60096","Wildebeest jumping the migration queue","wildebeest-jumping_thumb.jpg",130,87,18);thumbnails[1651390]=new thumbnail(1651390,"60096","Vervet monkey","monkey_thumb.jpg",130,195,18);thumbnails[1797338]=new thumbnail(1797338,"60096","Mara Serena lodge - not exactly roughing it!","mara-lodge_thumb.jpg",130,96,18);thumbnails[1797341]=new thumbnail(1797341,"60096","Lodge on Massai Mara","mara-lodge-2_thumb.jpg",130,87,18);thumbnails[2278608]=new thumbnail(2278608,"60096","Female Cheetah at Nairobi National Park","web-cheetagh_thumb.jpg",130,104,18);thumbnails[2278740]=new thumbnail(2278740,"60096","A Genet that wandered into the camp one night","web-genet_thumb.jpg",130,87,18);thumbnails[2278742]=new thumbnail(2278742,"60096","Sweetwater camp","sweetwater-camp_thumb.jpg",130,87,18);thumbnails[2278744]=new thumbnail(2278744,"60096","Starling","starling_thumb.jpg",130,87,18);thumbnails[2278745]=new thumbnail(2278745,"60096","Black Rhino","rhino_thumb.jpg",130,87,18);thumbnails[2278748]=new thumbnail(2278748,"60096","Grevy's Zebra. (Note the ear shape and lack of stripes on the belly compared to the common zebra)","grevys_thumb.jpg",130,87,18);thumbnails[2278752]=new thumbnail(2278752,"60096","Giraffe at Samburu - note the different pattern to the Massai giraffe","giraffe_thumb.jpg",130,87,18);thumbnails[2278753]=new thumbnail(2278753,"60096","Dik Dik","didk-dik_thumb.jpg",130,87,18);thumbnails[2278760]=new thumbnail(2278760,"60096","Olive Baboon","babboon_thumb.jpg",130,87,18);thumbnails[2278764]=new thumbnail(2278764,"60096","Tess one of the rescued chimps at the Ol Pejerot/Jane Goodall institute reserve, Sweetwater","chimp-3_thumb.jpg",130,87,18);thumbnails[783065]=new thumbnail(783065,"68503","Badger out foraging, still from infra red video footage.","badger_thumb.jpg",130,104,18);thumbnails[787288]=new thumbnail(787288,"68503","Young Male Fox","w3_thumb.jpg",130,105,18);thumbnails[1036448]=new thumbnail(1036448,"68503","Male Boar. Still from infra red video. (Note the missing right ear!)","badger 2 for web_thumb.jpg",130,104,18);thumbnails[1085722]=new thumbnail(1085722,"68503","Fox at earth 1","fox2_thumb.jpg",130,101,18);thumbnails[1085726]=new thumbnail(1085726,"68503","fox at earth 2","fox11_thumb.jpg",130,157,18);thumbnails[1090980]=new thumbnail(1090980,"68503","Badgers out foraging","web-5_thumb.jpg",130,97,18);thumbnails[1090983]=new thumbnail(1090983,"68503","Dog Otter","ott_thumb.jpg",130,107,18);thumbnails[1123868]=new thumbnail(1123868,"68503","","taton-park-054_thumb.jpg",130,87,18);thumbnails[1123870]=new thumbnail(1123870,"68503","","taton-park-078_thumb.jpg",130,87,18);thumbnails[1123872]=new thumbnail(1123872,"68503","","taton-park-092_thumb.jpg",130,87,18);thumbnails[1636606]=new thumbnail(1636606,"68503","Two from the same Fox family","f6-fixed_thumb.jpg",130,130,18);thumbnails[1636609]=new thumbnail(1636609,"68503","Adult Dog Fox","fox-fixed_thumb.jpg",130,104,18);thumbnails[1645413]=new thumbnail(1645413,"68503","Otter ","otter_thumb.jpg",130,163,18);thumbnails[1645415]=new thumbnail(1645415,"68503","Otter","otter-2_thumb.jpg",130,104,18);thumbnails[1651368]=new thumbnail(1651368,"68503","Red Fox","fox-2_thumb.jpg",130,87,18);thumbnails[1651379]=new thumbnail(1651379,"68503","Red Fox 2","fox-head_thumb.jpg",130,87,18);thumbnails[1651380]=new thumbnail(1651380,"68503","Badgers foraging on a summer evening","badgers2-554_thumb.jpg",130,87,18);thumbnails[1651382]=new thumbnail(1651382,"68503","Spotted!","badgers-305_thumb.jpg",130,87,18);thumbnails[1651383]=new thumbnail(1651383,"68503","Red Squirrel","baby-squirrel_thumb.jpg",130,87,18);thumbnails[783056]=new thumbnail(783056,"64470","Sparrowhawk","1 jpeg sparrowhawk_thumb.jpg",130,117,18);thumbnails[783060]=new thumbnail(783060,"64470","Sparrowhawk with prey","5 jpeg sparrowhawk_thumb.jpg",130,109,18);thumbnails[1088403]=new thumbnail(1088403,"64470","View from cherry picker used to assist in placing Kestrel box for nesting","cherry-picker_thumb.jpg",130,102,18);thumbnails[1636564]=new thumbnail(1636564,"64470","Jay","jay_thumb.jpg",130,104,18);thumbnails[1636570]=new thumbnail(1636570,"64470","Great Spotted Woodpecker","gswp_thumb.jpg",130,104,18);thumbnails[1645352]=new thumbnail(1645352,"64470","Mute Swan","swan-sillo_thumb.jpg",130,82,18);thumbnails[1645359]=new thumbnail(1645359,"64470","Mute Swan 2","swan_thumb.jpg",130,140,18);thumbnails[1645363]=new thumbnail(1645363,"64470","Puffin","puffin_thumb.jpg",130,141,18);thumbnails[1645365]=new thumbnail(1645365,"64470","Red Kite","kite-2_thumb.jpg",130,104,18);thumbnails[1645367]=new thumbnail(1645367,"64470","Red Kite 2","kite-3_thumb.jpg",130,96,18);thumbnails[1645370]=new thumbnail(1645370,"64470","Egret","egret_thumb.jpg",130,163,18);thumbnails[1645392]=new thumbnail(1645392,"64470","Avocet","avocet_thumb.jpg",130,96,18);thumbnails[1645395]=new thumbnail(1645395,"64470","Arctic Tern","arctic-tern_thumb.jpg",130,79,18);thumbnails[1645401]=new thumbnail(1645401,"64470","Shell Duck","shellx3_thumb.jpg",130,73,18);thumbnails[1645408]=new thumbnail(1645408,"64470","Red Kite","red-kites-midwales-1001_thumb.jpg",130,104,18);thumbnails[1839533]=new thumbnail(1839533,"64470","Kingfisher","1-kf_thumb.jpg",130,195,18);thumbnails[1839543]=new thumbnail(1839543,"64470","Sedge Warbler","sw21_thumb.jpg",130,130,18);thumbnails[1860272]=new thumbnail(1860272,"64470","Kestrel amongst the industry","kestrel-frame_thumb.jpg",130,104,18);thumbnails[4641690]=new thumbnail(4641690,"64470","Osprey","ospey1_thumb.jpg",130,111,18);thumbnails[1085809]=new thumbnail(1085809,"77255","Shaggy Ink cap 1","ink-caps-2_thumb.jpg",130,179,18);thumbnails[1085814]=new thumbnail(1085814,"77255","Shaggy Ink caps 2","ink-caps_thumb.jpg",130,155,18);thumbnails[1085817]=new thumbnail(1085817,"77255","Golden Pholiota","golden-pholiota_thumb.jpg",130,91,18);thumbnails[1085838]=new thumbnail(1085838,"77255","","fungus2_thumb.jpg",130,100,18);thumbnails[1085891]=new thumbnail(1085891,"77255","Fern growing from old tree stump","fern_thumb.jpg",130,98,18);thumbnails[1085893]=new thumbnail(1085893,"77255","Bracket Fungi Oyster Mushroom","bracket-fungus-1_thumb.jpg",130,109,18);thumbnails[1085913]=new thumbnail(1085913,"77255","","fungus_thumb.jpg",130,89,18);thumbnails[1123875]=new thumbnail(1123875,"77255","","6_thumb.jpg",130,212,18);thumbnails[1651391]=new thumbnail(1651391,"77255","Resident of the flora and fauna","spider-014_thumb.jpg",130,195,18);thumbnails[2775175]=new thumbnail(2775175,"173878","African wild dog, Okonjima","wd1_thumb.jpg",130,104,18);thumbnails[2775194]=new thumbnail(2775194,"173878","Richard zu Bentheim using telemetry to track rehabilitating cheetahs at Okonjima","rich3_thumb.jpg",130,150,18);thumbnails[2775201]=new thumbnail(2775201,"173878","It's behind you!","cheet4_thumb.jpg",130,104,18);thumbnails[2775205]=new thumbnail(2775205,"173878","Richard finds his cheetah","6_1_thumb.jpg",130,104,18);thumbnails[2775215]=new thumbnail(2775215,"173878","Tracking on foot","1_1_thumb.jpg",130,100,18);thumbnails[2775455]=new thumbnail(2775455,"173878","Collared cheetah in rehabilitation at Okonjima","t_thumb.jpg",130,98,18);thumbnails[2775458]=new thumbnail(2775458,"173878","Camping at Sesriem","a11_thumb.jpg",130,98,18);thumbnails[2775460]=new thumbnail(2775460,"173878","Trans Kalahari highway","c_1_thumb.jpg",130,98,18);thumbnails[2775462]=new thumbnail(2775462,"173878","The infamous dune 45","h_thumb.jpg",130,98,18);thumbnails[2775463]=new thumbnail(2775463,"173878","Jackal hunting injured cape fur seals on the shoreline","l_thumb.jpg",130,98,18);thumbnails[2775465]=new thumbnail(2775465,"173878","Cape fur seals basking","p_thumb.jpg",130,98,18);thumbnails[2775467]=new thumbnail(2775467,"173878","Zebra at waterhole Etosha","a7_thumb.jpg",130,98,18);thumbnails[4599365]=new thumbnail(4599365,"266209","Stealth Gear being trilled on a recent trip to Scotland.","full-lens-web_thumb.jpg",130,87,18);thumbnails[4599373]=new thumbnail(4599373,"266209","With the Stealth Gear kneeling in the wet is a breeze!","jacket-kneeling-1-web_thumb.jpg",130,97,18);thumbnails[4599385]=new thumbnail(4599385,"266209","Keeping out the wind and rain is no problem with this clothing.","jacket-hood-up-1-web_thumb.jpg",130,106,18);thumbnails[4599395]=new thumbnail(4599395,"266209","The Stealth Gear waistcoat. Top quality like all the garments.","ws-1-web_thumb.jpg",130,117,18);thumbnails[4641687]=new thumbnail(4641687,"266209","Osprey","ospey_thumb.jpg",130,111,18);var galleries=new Object();galleries[80115]=new gallery(80115,"1123866,1123863,1123862,1123836,1123833,1123832,1123831,1090978,1090977,1090975","Insects","section87701",[1085971,1085974,1085977,1085980,1088389,1088392,1090973,1090975,1090977,1090978,1123831,1123832,1123833,1123836,1123862,1123863,1123866]);galleries[120612]=new gallery(120612,"1797336","Tanzania","section157932",[1797336]);galleries[120613]=new gallery(120613,"1797666,1797662,1797658,1797645,1797642,1797639,1077160,1077155,1077150,1077133","Zimbabwe","section157933",[1077133,1077150,1077155,1077160,1797639,1797642,1797645,1797658,1797662,1797666]);galleries[60096]=new gallery(60096,"2278764,2278760,2278753,2278752,2278748,2278745,2278744,2278742,2278740,2278608","Kenyas' Massai Mara ","gallery",[775821,775824,775836,775843,775851,775858,783053,784554,784556,785843,1077158,1088398,1088401,1640614,1640618,1640619,1640621,1651388,1651390,1797338,1797341,2278608,2278740,2278742,2278744,2278745,2278748,2278752,2278753,2278760,2278764]);galleries[68503]=new gallery(68503,"1651383,1651382,1651380,1651379,1651368,1645415,1645413,1636609,1636606,1123872","Mammals","section87701",[783065,787288,1036448,1085722,1085726,1090980,1090983,1123868,1123870,1123872,1636606,1636609,1645413,1645415,1651368,1651379,1651380,1651382,1651383]);galleries[64470]=new gallery(64470,"4641690,1860272,1839543,1839533,1645408,1645401,1645395,1645392,1645370,1645367","birds","section87701",[783056,783060,1088403,1636564,1636570,1645352,1645359,1645363,1645365,1645367,1645370,1645392,1645395,1645401,1645408,1839533,1839543,1860272,4641690]);galleries[77255]=new gallery(77255,"1651391,1123875,1085913,1085893,1085891,1085838,1085817,1085814,1085809","Flora and fauna","section87701",[1085809,1085814,1085817,1085838,1085891,1085893,1085913,1123875,1651391]);galleries[173878]=new gallery(173878,"2775467,2775465,2775463,2775462,2775460,2775458,2775455,2775215,2775205,2775201","Namibia","section217014",[2775175,2775194,2775201,2775205,2775215,2775455,2775458,2775460,2775462,2775463,2775465,2775467]);galleries[266209]=new gallery(266209,"4641687,4599395,4599385,4599373,4599365","Stealth Gear Images","section87701",[4599365,4599373,4599385,4599395,4641687]);var imageSets=new Object();imageSets[1]="775819";imageSets[3]="4641690,4641687,4599395,4599385,4599373,4599365,2775467,2775465,2775463,2775462,2775460,2775458,2775455,2775215,2775205,2775201,2775194,2775175,2278764,2278760,2278753,2278752,2278748,2278745,2278744,2278742,2278740,2278608,1860272,1839543,1839533,1797666,1797662,1797658,1797645,1797642,1797639,1797341,1797338,1797336,1651391,1651390,1651388,1651383,1651382,1651380,1651379,1651368,1645415,1645413";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 34:b="http://www9.clikpic.com/chazt/images";break}switch(a){case 1:b="http://www1.clikpic.com/chazt/images";break}switch(a){case 2:b="http://admin.clikpic.com/chazt/images";break}switch(a){case 4:b="http://www.clikchurch.com/chazt/images";break}switch(a){case 5:b="http://www2.clikpic.com/chazt/images";break}switch(a){case 15:b="http://www3.clikpic.com/chazt/images";break}switch(a){case 21:b="http://www6.clikpic.com/chazt/images";break}switch(a){case 18:b="http://www4.clikpic.com/chazt/images";break}switch(a){case 19:b="http://www5.clikpic.com/chazt/images";break}switch(a){case 22:b="http://tpc5/clikpic/chazt/images";break}switch(a){case 23:b="http://tpc10/clikpic/chazt/images";break}switch(a){case 24:b="http://tpc15/clikpic/chazt/images";break}switch(a){case 25:b="http://tpc16/clikpic/chazt/images";break}switch(a){case 31:b="http://www7.clikpic.com/chazt/images";break}switch(a){case 32:b="http://admin2.clikpic.com/chazt/images";break}switch(a){case 33:b="http://www8.clikpic.com/chazt/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="edwardcharlesphotography: "+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>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&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="imagesofec@aol.com">';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="imagesofec@aol.com">';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+'")'})}}};