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[4731930]=new thumbnail(4731930,"","Carina Hall","me_thumb.jpg",130,193,18);thumbnails[4797140]=new thumbnail(4797140,"","","framedcoral_sml_thumb.jpg",130,98,18);thumbnails[4797142]=new thumbnail(4797142,"","","framedseascapes_sml_thumb.jpg",130,63,18);thumbnails[5968602]=new thumbnail(5968602,"","","pink_sunset_borneo_thumb.jpg",130,87,18);thumbnails[6044241]=new thumbnail(6044241,"","","coral_reef_reefscape_carina_hall_thumb.jpg",130,91,18);thumbnails[6152382]=new thumbnail(6152382,"","","bikes_mallorca_pollensa_thumb.jpg",130,98,18);thumbnails[4783132]=new thumbnail(4783132,"","Garibaldi - Catalina Island, California","Garibaldi_7_thumb.jpg",130,98,18);thumbnails[4584933]=new thumbnail(4584933,"","A Fine day - South Male Atoll, The Maldives","seas17_thumb.jpg",130,87,18);thumbnails[4433928]=new thumbnail(4433928,"259373","A Friend -  Hawksbill Turtle swimming at Turtle Patch, Sipadan, Borneo","Hawksbill_Turtle_1_thumb.jpg",130,98,18);thumbnails[4449381]=new thumbnail(4449381,"259373","Reefscape - Coral Reefscape at Sha'ab Marsa Alam, The Red Sea","Coral_Reefscape1_thumb.jpg",130,95,18);thumbnails[4449387]=new thumbnail(4449387,"259373","Red Gorgonian & Sea Whip - The Maldives","seafans__whip_thumb.jpg",130,93,18);thumbnails[4449388]=new thumbnail(4449388,"259373","Blue Stripped Snappers with scuba diver - Brissare Rocks, The Seychelles","bev_snapper_edit_2_thumb.jpg",130,95,18);thumbnails[4449390]=new thumbnail(4449390,"259373","Reefscape - scuba diver diving on a coral reef, The Red Sea","reefanddiver_thumb.jpg",130,98,18);thumbnails[4449391]=new thumbnail(4449391,"259373","My Sipadan friend, a Hawksbill turtle at Hanging Garden Coral reef, Borneo","Turtle_up_close_1123_thumb.jpg",130,98,18);thumbnails[4449542]=new thumbnail(4449542,"259373","Little Hawksbill with Maggie - Sipadan, Borneo","Maggie_and_turtle_1_thumb.jpg",130,98,18);thumbnails[4449561]=new thumbnail(4449561,"259373","Whale Shark & Scuba diver - North West Mahe, Conservation project in The Seychelles","whale_shark_4_editbw_thumb.jpg",130,95,18);thumbnails[4449569]=new thumbnail(4449569,"259373","Temple reef with scuba diver - Sharm El Sheikh, The Red Sea","maggiediving_thumb.jpg",130,195,18);thumbnails[4449574]=new thumbnail(4449574,"259373","Pink Gorgonian reef - Ari Atoll, The Maldives","Seafan_11_thumb.jpg",130,173,18);thumbnails[4449577]=new thumbnail(4449577,"259373","Hawksbill Shell - Turtle Patch reef, Sipadan, Borneo","Shell_turtle_11_thumb.jpg",130,185,18);thumbnails[4449580]=new thumbnail(4449580,"259373","Feather Star - Coral Reef near Si Amil Island, Borneo","Sea_Feather_and_Diver_11_thumb.jpg",130,173,18);thumbnails[5409083]=new thumbnail(5409083,"259373","Big blue beauty, Whale Shark, The Seychelles","whaleshark_thumb.jpg",130,87,18);thumbnails[6055088]=new thumbnail(6055088,"259373","Whale Shark in sun light - The Seychelles","whale_shark_seychelles_thumb.jpg",130,173,18);thumbnails[6055089]=new thumbnail(6055089,"259373","Whale Shark - The Seychelles","whale_shark_seychelles_mahe_thumb.jpg",130,87,18);thumbnails[6055091]=new thumbnail(6055091,"259373","Lionfish & Scuba diver - Oman","lionfish_oman_diver_thumb.jpg",130,195,18);thumbnails[4607626]=new thumbnail(4607626,"259373","Circular Spadefish - Hanging Garden reef, Sipadan, Borneo","Spadefish_2_thumb.jpg",130,98,18);thumbnails[4607627]=new thumbnail(4607627,"259373","Big Eyes & Scuba diver - Inner islands near La Digue, The Seychelles","3big_eye_bev_thumb.jpg",130,173,18);thumbnails[4657775]=new thumbnail(4657775,"259373","Kelp Forest - Catalina Island, California","Kelp_reef_thumb.jpg",130,173,18);thumbnails[4611813]=new thumbnail(4611813,"259373","Resting Hawksbill - North Male Atoll, The Maldives","Hawksbill_turtle_2_thumb.jpg",130,87,18);thumbnails[4607633]=new thumbnail(4607633,"259374","Silhouette boy - Beau Vallon, The Seychelles","seychelle_boy0_thumb.jpg",130,87,18);thumbnails[4533540]=new thumbnail(4533540,"259374","Driftwood island, The Maldives","treemaldives4_thumb.jpg",130,87,18);thumbnails[4533618]=new thumbnail(4533618,"259374","Turquoise Thunder - The Maldives","Maldives_storm_1_thumb.jpg",130,87,18);thumbnails[4449701]=new thumbnail(4449701,"259374","Still Blue - Celebes Sea, Borneo","Celebes_Sea_2_thumb.jpg",130,86,18);thumbnails[4584905]=new thumbnail(4584905,"259374","Grand Anse beach - La Digue, The Seychelles","la_digue2_thumb.jpg",130,195,18);thumbnails[4584915]=new thumbnail(4584915,"259374","Pastel Sunset - Beau Vallon beach, The Seychelles","purplesun_thumb.jpg",130,173,18);thumbnails[4585123]=new thumbnail(4585123,"259374","Driftwood at Grand Anse - La Digue, The Seychelles","Seychelles4_thumb.jpg",130,195,18);thumbnails[6055269]=new thumbnail(6055269,"259374","My Perfect Sundown - Beau Vallon, The Seychelles","seychelles_sunset_beau_vallon_thumb.jpg",130,195,18);thumbnails[4449711]=new thumbnail(4449711,"259374","Manukan island pier - Kota Kinabalu, Borneo ","Manukan_island_2_thumb.jpg",130,87,18);thumbnails[4533542]=new thumbnail(4533542,"259374","Breaking waves - Grand Anse, La Digue","Seychelles3_thumb.jpg",130,87,18);thumbnails[4611679]=new thumbnail(4611679,"259374","Fallen Dusk - Celebes Sea, Borneo","pinksky2_thumb.jpg",130,87,18);thumbnails[5978650]=new thumbnail(5978650,"259374","Sea Reflections - Si Amil Island, Borneo","borneo_sea_reflection_thumb.jpg",130,87,18);thumbnails[4584944]=new thumbnail(4584944,"259374","Still Blue 2 - Celebes Sea, Borneo","Celebes_Sea_11_thumb.jpg",130,194,18);thumbnails[4607632]=new thumbnail(4607632,"259374","Island football - Beau Vallon, The Seychelles","footie_thumb.jpg",130,177,18);thumbnails[6055258]=new thumbnail(6055258,"259374","Childhood Bliss - Beau Vallon, The Seychelles","beau_vallon_sunset_seychelles_thumb.jpg",130,195,18);thumbnails[4770343]=new thumbnail(4770343,"259374","Still blue 3 - Celebes Sea, Sipadan","borneo5_1_thumb.jpg",130,201,18);thumbnails[5409022]=new thumbnail(5409022,"263273","Enchanted Pony, The New Forest","white_pony_thumb.jpg",130,87,18);thumbnails[6055142]=new thumbnail(6055142,"263273","Oranutan - Sepilok, Borneo","oranutan_borneo_sepilok1_thumb.jpg",130,87,18);thumbnails[4585119]=new thumbnail(4585119,"263273","Foddies gathering - The Seychelles","Foddies_thumb.jpg",130,87,18);thumbnails[4533172]=new thumbnail(4533172,"263273","Prehistoric Smile - Giant Tortoise, Curieuse Island, The Seychelles","Tortoise_1_thumb.jpg",130,87,18);thumbnails[5960039]=new thumbnail(5960039,"263273","Bay Forest Pony - The New Forest","pony20_thumb.jpg",130,195,18);thumbnails[4533122]=new thumbnail(4533122,"263273","Tern - Aride island, The Seychelles","Tern_thumb.jpg",130,194,18);thumbnails[4533072]=new thumbnail(4533072,"263273","Velvet Nose - The New Forest","newforestpony_thumb.jpg",130,173,18);thumbnails[4605933]=new thumbnail(4605933,"263273","Charismatic Charm - Puffin, Skomer Island, South West Wales","puffin3_thumb.jpg",130,195,18);thumbnails[4533081]=new thumbnail(4533081,"263273","Macaque monkey - Sepilok, Borneo","Monkey_1_thumb.jpg",130,87,18);thumbnails[4605945]=new thumbnail(4605945,"263273","Puffin 2 - Skomer island, South West Wales","puffin1_thumb.jpg",130,87,18);thumbnails[4585194]=new thumbnail(4585194,"263273","Hawker Dragonfly - Sepilok, Borneo","dragonfly_2_thumb.jpg",130,87,18);thumbnails[4782793]=new thumbnail(4782793,"263273","Mother and child - Sepilok, Borneo","Oran_Utang_and_baby_1_thumb.jpg",130,87,18);thumbnails[4611582]=new thumbnail(4611582,"263275","Richmond Park reflection - Richmond upon Thames, England","Richmond_Park_bridge_reflection_thumb.jpg",130,87,18);thumbnails[4729197]=new thumbnail(4729197,"263275","Moody day - The River Wey, Surrey, England","riverwey_thumb.jpg",130,87,18);thumbnails[4605924]=new thumbnail(4605924,"263275","Bay near St Brides - Pembrokeshire, Wales","boat2_thumb.jpg",130,87,18);thumbnails[4585350]=new thumbnail(4585350,"263275","Clapham Common pond - London, England","clap_common_2_thumb.jpg",130,87,18);thumbnails[4533258]=new thumbnail(4533258,"263275","Richmond Hill - Richmond upon Thames, England","Richmond_Hill1_thumb.jpg",130,98,18);thumbnails[4449705]=new thumbnail(4449705,"263275","Still dawn 1 - Kinabatangan river, Sukau, Borneo","Kinabatangan_sunrise_2_thumb.jpg",130,87,18);thumbnails[4770350]=new thumbnail(4770350,"263275","On the way to Sukau - Borneo","borneo6_thumb.jpg",130,87,18);thumbnails[4449707]=new thumbnail(4449707,"263275","Still dawn 2 - Kinabatangan river, Sukau, Borneo","Kinabatangan_sunrise_3_thumb.jpg",130,87,18);thumbnails[4585475]=new thumbnail(4585475,"263275","Secluded Mooring - Falmouth, Cornwall, England","falmouthboat_thumb.jpg",130,82,18);thumbnails[4585000]=new thumbnail(4585000,"263275","Ox-bow lake - Sukau, Borneo","In_the_jungle_ruff_11_thumb.jpg",130,194,18);thumbnails[4585347]=new thumbnail(4585347,"263275","Clapham Common - London, England","clap_common_1_thumb.jpg",130,194,18);thumbnails[4796045]=new thumbnail(4796045,"263275","Late Summer in the City - near St Pauls, London","spitalfields6_thumb.jpg",130,87,18);thumbnails[4533268]=new thumbnail(4533268,"263276","Sacre Coeur - Paris, France","Sacre_Coeur_thumb.jpg",130,173,18);thumbnails[4533281]=new thumbnail(4533281,"263276","Clifton Suspension Bridge & Balloons, Bristol","balloons9_thumb.jpg",130,95,18);thumbnails[4605920]=new thumbnail(4605920,"263276","Le Corbusier's chapel at Ronchamp","Ronchoump_1_thumb.jpg",130,98,18);thumbnails[4611627]=new thumbnail(4611627,"263276","Prgaue arch view - Prague","Prague_2_thumb.jpg",130,173,18);thumbnails[4796048]=new thumbnail(4796048,"263276","St Pauls Cathedral - London","spitalfields5_thumb.jpg",130,87,18);thumbnails[4613218]=new thumbnail(4613218,"263276","60 miles offshore- Daedalus Lighthouse, South Red Sea","Daedalus_lighthouse_The_Red_Sea_thumb.jpg",130,202,18);thumbnails[4728840]=new thumbnail(4728840,"263276","Checkmate piegon - St Paul's Cathedral, London","stpauls1_thumb.jpg",130,194,18);thumbnails[4796041]=new thumbnail(4796041,"263276","St Pauls Cathedral & Lamp Post - London","spitalfields7_thumb.jpg",130,194,18);thumbnails[4585431]=new thumbnail(4585431,"265575","Pink Iris detail - Mum's house","iris_01_thumb.jpg",130,82,18);thumbnails[4585433]=new thumbnail(4585433,"265575","Orchid - Mum's house","iris_02_thumb.jpg",130,82,18);thumbnails[4607628]=new thumbnail(4607628,"265575","Curly Whirly Twig - Sepilok, Borneo","Curly_whirly_twig_thumb.jpg",130,87,18);thumbnails[5959265]=new thumbnail(5959265,"265575","Sun lit Tulips - Oxford Botanical Gardens","tulips_thumb.jpg",130,87,18);thumbnails[4585179]=new thumbnail(4585179,"265575","Purple Tulips 1 - Brockwell Park, Brixton, England","purpleflower1_thumb.jpg",130,87,18);thumbnails[4585181]=new thumbnail(4585181,"265575","Yellow Daisy 2 - Brockwell Park, Brixton, England","yellowflower3_thumb.jpg",130,87,18);thumbnails[4585176]=new thumbnail(4585176,"265575","Ready to burst - Brockwell Park, Brixton, England","bud1_thumb.jpg",130,87,18);thumbnails[4584925]=new thumbnail(4584925,"265575","Purple Tulips 2 - Brockwell Park, Brixton, England","purpleflower0_thumb.jpg",130,87,18);thumbnails[4585249]=new thumbnail(4585249,"265575","Dancing Anthers - Sepilok, Borneo","dancing_anthers_thumb.jpg",130,194,18);thumbnails[4584924]=new thumbnail(4584924,"265575","Yellow Daisy 1 - Brockwell Park, Brixton, England","yellowflower1_thumb.jpg",130,194,18);thumbnails[4605927]=new thumbnail(4605927,"265575","Wildflowers - Skomer Island, South West Wales","weeds0_thumb.jpg",130,195,18);thumbnails[5945755]=new thumbnail(5945755,"265575","Garden Daisies","flowers_thumb.JPG",130,151,18);thumbnails[6055256]=new thumbnail(6055256,"265598","Maldives Street - Baa Atoll","the_maldive_bike_baa_atoll_thumb.jpg",130,87,18);thumbnails[4585217]=new thumbnail(4585217,"265598","Water Village - Sandakan, Borneo","DSC_0626_thumb.jpg",130,87,18);thumbnails[4985450]=new thumbnail(4985450,"265598","Lesson in diving! Yadua Village School, Fiji","fiji1_thumb.jpg",130,83,18);thumbnails[4585479]=new thumbnail(4585479,"265598","Dancing boy - The Submarine Base, Rabaul, Papua New Guinea","dancingPapuaNewGuinea_thumb.jpg",130,81,18);thumbnails[4606007]=new thumbnail(4606007,"265598","Fish Market - Victoria, The Seychelles","thedeal_thumb.jpg",130,87,18);thumbnails[4657794]=new thumbnail(4657794,"265598","Sailfish, a sad sight - Rabaul, Papua New Guinea","Sailfish2_thumb.jpg",130,170,18);thumbnails[4770339]=new thumbnail(4770339,"265598","Water Village 2 - Sandakan, Borneo","borneo5_thumb.jpg",130,87,18);thumbnails[4985470]=new thumbnail(4985470,"265598","'Save Yadua's Coral Reefs' Yadua Village School - Fiji","fiji2_thumb.jpg",130,85,18);thumbnails[4606078]=new thumbnail(4606078,"265598","Depleted - Fish Market, The Seychelles","deadfish_thumb.jpg",130,194,18);thumbnails[4606081]=new thumbnail(4606081,"265598","Victoria Market, The Seychelles","tomatoes_thumb.jpg",130,86,18);thumbnails[4611675]=new thumbnail(4611675,"265598","Si Amil Military - Celebes Sea, Borneo","Malaysian_Military_1_thumb.jpg",130,87,18);thumbnails[4728871]=new thumbnail(4728871,"265598","On the steps of St Pauls Cathedral - London","wedding2_1_thumb.jpg",130,87,18);var galleries=new Object();galleries[259373]=new gallery(259373,"6055091,6055089,6055088,5409083,4657775,4611813,4607627,4607626,4449580,4449577","Reefscapes","gallery",[4433928,4449381,4449387,4449388,4449390,4449391,4449542,4449561,4449569,4449574,4449577,4449580,5409083,6055088,6055089,6055091,4607626,4607627,4657775,4611813]);galleries[259374]=new gallery(259374,"6055269,6055258,5978650,4770343,4611679,4607633,4607632,4585123,4584944,4584915","Seascapes","gallery",[4607633,4533540,4533618,4449701,4584905,4584915,4585123,6055269,4449711,4533542,4611679,5978650,4584944,4607632,6055258,4770343]);galleries[263273]=new gallery(263273,"6055142,5960039,5409022,4782793,4605945,4605933,4585194,4585119,4533172,4533122","Wildlife","gallery",[5409022,6055142,4585119,4533172,5960039,4533122,4533072,4605933,4533081,4605945,4585194,4782793]);galleries[263275]=new gallery(263275,"4796045,4770350,4729197,4611582,4605924,4585475,4585350,4585347,4585000,4533258","Landscapes","gallery",[4611582,4729197,4605924,4585350,4533258,4449705,4770350,4449707,4585475,4585000,4585347,4796045]);galleries[263276]=new gallery(263276,"4796048,4796041,4728840,4613218,4611627,4605920,4533281,4533268","Architecture & Landmarks","gallery",[4533268,4533281,4605920,4611627,4796048,4613218,4728840,4796041]);galleries[265575]=new gallery(265575,"5959265,5945755,4607628,4605927,4585433,4585431,4585249,4585181,4585179,4585176","Flowers","gallery",[4585431,4585433,4607628,5959265,4585179,4585181,4585176,4584925,4585249,4584924,4605927,5945755]);galleries[265598]=new gallery(265598,"6055256,4985470,4985450,4770339,4728871,4657794,4611675,4606081,4606078,4606007","Reportage","gallery",[6055256,4585217,4985450,4585479,4606007,4657794,4770339,4985470,4606078,4606081,4611675,4728871]);var imageSets=new Object();imageSets[1]="5968602";imageSets[3]="6152382,6055269,6055258,6055256,6055142,6055091,6055089,6055088,6044241,5978650,5968602,5960039,5959265,5945755,5409083,5409022,4985470,4985450,4797142,4797140,4796048,4796045,4796041,4783132,4782793,4770350,4770343,4770339,4731930,4729197,4728871,4728840,4657794,4657775,4613218,4611813,4611679,4611675,4611627,4611582,4607633,4607632,4607628,4607627,4607626,4606081,4606078,4606007,4605945,4605933";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/photoescape/images";break}switch(a){case 1:b="http://www1.clikpic.com/photoescape/images";break}switch(a){case 2:b="http://admin.clikpic.com/photoescape/images";break}switch(a){case 24:b="http://tpc15/clikpic/photoescape/images";break}switch(a){case 4:b="http://www.clikchurch.com/photoescape/images";break}switch(a){case 5:b="http://www2.clikpic.com/photoescape/images";break}switch(a){case 22:b="http://tpc5/clikpic/photoescape/images";break}switch(a){case 23:b="http://tpc10/clikpic/photoescape/images";break}switch(a){case 25:b="http://tpc16/clikpic/photoescape/images";break}switch(a){case 15:b="http://www3.clikpic.com/photoescape/images";break}switch(a){case 18:b="http://www4.clikpic.com/photoescape/images";break}switch(a){case 19:b="http://www5.clikpic.com/photoescape/images";break}switch(a){case 31:b="http://www7.clikpic.com/photoescape/images";break}switch(a){case 32:b="http://admin2.clikpic.com/photoescape/images";break}switch(a){case 33:b="http://www8.clikpic.com/photoescape/images";break}switch(a){case 34:b="http://www9.clikpic.com/photoescape/images";break}switch(a){case 35:b="http://admin3.clikpic.com/photoescape/images";break}switch(a){case 37:b="http://admin4.clikpic.com/photoescape/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="Photo Escape: "+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>"}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> 							"+(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+'<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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};