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[1542972]=new thumbnail(1542972,"","","BakeryMarriott_thumb.jpg",130,87,1);thumbnails[1662179]=new thumbnail(1662179,"","","REDBEETLE_thumb.jpg",130,87,1);thumbnails[2099893]=new thumbnail(2099893,"","","Nice shots_thumb.jpg",130,195,1);thumbnails[2415378]=new thumbnail(2415378,"","","DSC_0520_thumb.jpg",130,87,1);thumbnails[2415379]=new thumbnail(2415379,"","","DSC_0499-Edit_thumb.jpg",130,87,1);thumbnails[2415380]=new thumbnail(2415380,"","","DSC_0500_thumb.jpg",130,87,1);thumbnails[2415381]=new thumbnail(2415381,"","","DSC_0517_thumb.jpg",130,87,1);thumbnails[2415382]=new thumbnail(2415382,"","","DSC_0503_thumb.jpg",130,52,1);thumbnails[2415383]=new thumbnail(2415383,"","","DSC_0513-Edit_thumb.jpg",130,87,1);thumbnails[2415384]=new thumbnail(2415384,"","","DSC_0538_thumb.jpg",130,87,1);thumbnails[2415385]=new thumbnail(2415385,"","","DSC_0505_thumb.jpg",130,194,1);thumbnails[2415386]=new thumbnail(2415386,"","","DSC_0518_thumb.jpg",130,87,1);thumbnails[1662081]=new thumbnail(1662081,"","","MonkeyPoser_thumb.jpg",130,87,1);thumbnails[1542977]=new thumbnail(1542977,"","","Whistling Kite_thumb.jpg",130,93,1);thumbnails[1662082]=new thumbnail(1662082,"","","Monkeyface_thumb.jpg",130,195,1);thumbnails[1635883]=new thumbnail(1635883,"","","whaleBreach(B&W)_thumb.jpg",130,87,1);thumbnails[3071971]=new thumbnail(3071971,"","","Shadows_thumb.jpg",130,93,1);thumbnails[3832871]=new thumbnail(3832871,"","","GOS-H3_15_of_49_thumb.jpg",130,194,1);thumbnails[3832923]=new thumbnail(3832923,"","","GOS-H3_19_of_49_thumb.jpg",130,194,1);thumbnails[3832938]=new thumbnail(3832938,"","","GOS-H3_20_of_49_thumb.jpg",130,194,1);thumbnails[3836502]=new thumbnail(3836502,"","","GOS-H3_22_of_49_thumb.jpg",130,194,1);thumbnails[3836513]=new thumbnail(3836513,"","","GOS-H3_24_of_49_thumb.jpg",130,194,1);thumbnails[3836524]=new thumbnail(3836524,"","","GOS-H3_28_of_49_thumb.jpg",130,194,1);thumbnails[3836526]=new thumbnail(3836526,"","","GOS-H3_29_of_49_thumb.jpg",130,87,1);thumbnails[3836813]=new thumbnail(3836813,"","","GOS-H3_37_of_49_thumb.jpg",130,194,1);thumbnails[1635357]=new thumbnail(1635357,"104894","","BeachWalk_thumb.jpg",130,87,1);thumbnails[1635358]=new thumbnail(1635358,"104894","","Groomsman_thumb.jpg",130,87,1);thumbnails[1635412]=new thumbnail(1635412,"104894","","Champagne_thumb.jpg",130,87,1);thumbnails[1635415]=new thumbnail(1635415,"104894","","GoldRings_thumb.jpg",130,194,1);thumbnails[3071983]=new thumbnail(3071983,"104894","","Brooke&Jake (191 of 235)_thumb.jpg",130,87,1);thumbnails[3071977]=new thumbnail(3071977,"104894","","Brooke&Jake (105 of 235)_thumb.jpg",130,87,1);thumbnails[1635367]=new thumbnail(1635367,"104894","","BeachKiss_thumb.jpg",130,193,1);thumbnails[3071982]=new thumbnail(3071982,"104894","","Brooke&Jake (134 of 235)_thumb.jpg",130,87,1);thumbnails[1635428]=new thumbnail(1635428,"104894","","BeachPose_thumb.jpg",130,195,1);thumbnails[1635425]=new thumbnail(1635425,"104894","","WritingInTheSand_thumb.jpg",130,84,1);thumbnails[3071989]=new thumbnail(3071989,"104894","","Brooke&Jake (198 of 235)_thumb.jpg",130,87,1);thumbnails[1635413]=new thumbnail(1635413,"104894","","FlowerKiss_thumb.jpg",130,87,1);thumbnails[1635456]=new thumbnail(1635456,"104894","","Ceremony_thumb.jpg",130,87,1);thumbnails[1635480]=new thumbnail(1635480,"104894","","HelicopterBride_thumb.jpg",130,87,1);thumbnails[1635482]=new thumbnail(1635482,"104894","","InCar1_thumb.jpg",130,87,1);thumbnails[1635483]=new thumbnail(1635483,"104894","","SydneyCove_thumb.jpg",130,93,1);thumbnails[2099906]=new thumbnail(2099906,"104894","","Candle_thumb.jpg",130,87,1);thumbnails[2099908]=new thumbnail(2099908,"104894","","Flowers_thumb.jpg",130,87,1);thumbnails[2099910]=new thumbnail(2099910,"104894","","PostPushers_thumb.jpg",130,87,1);thumbnails[1526259]=new thumbnail(1526259,"128563","","Arthur's Pass Falls_thumb.jpg",130,93,1);thumbnails[1662225]=new thumbnail(1662225,"128563","","BrokenRiverCaves_thumb.jpg",130,87,1);thumbnails[3071955]=new thumbnail(3071955,"128563","Lakeshore, Queenstown.","LakeShore_thumb.jpg",130,87,1);thumbnails[1662226]=new thumbnail(1662226,"128563","","LakeMatheson_1_thumb.jpg",130,87,1);thumbnails[1662228]=new thumbnail(1662228,"128563","","AlpineRIver_thumb.jpg",130,87,1);thumbnails[2099918]=new thumbnail(2099918,"128563","","NZFarm_thumb.jpg",130,87,1);thumbnails[3071950]=new thumbnail(3071950,"128563","Alpine Bridge, South Island","AlpineBridge_thumb.jpg",130,87,1);thumbnails[2099748]=new thumbnail(2099748,"128563","","QueenstownBoats_thumb.jpg",130,195,1);thumbnails[2411297]=new thumbnail(2411297,"128564","","TramCity_thumb.jpg",130,87,1);thumbnails[2411299]=new thumbnail(2411299,"128564","","HKNoodleBar-2_thumb.jpg",130,48,1);thumbnails[2413248]=new thumbnail(2413248,"128564","","NightScape_thumb.jpg",130,93,1);thumbnails[2411307]=new thumbnail(2411307,"128575","","DSC_1048_thumb.jpg",130,87,1);thumbnails[2411308]=new thumbnail(2411308,"128575","","DSC_0915_thumb.jpg",130,87,1);thumbnails[2411310]=new thumbnail(2411310,"128575","","DSC_1232_thumb.jpg",130,87,1);thumbnails[2411311]=new thumbnail(2411311,"128575","","DSC_1245-2_thumb.jpg",130,65,1);thumbnails[2411312]=new thumbnail(2411312,"128575","","DSC_1042_thumb.jpg",130,65,1);thumbnails[2412328]=new thumbnail(2412328,"128575","","DSC_0946_thumb.jpg",130,87,1);thumbnails[2412332]=new thumbnail(2412332,"128575","","DSC_1034_thumb.jpg",130,87,1);thumbnails[2412389]=new thumbnail(2412389,"128575","","DSC_1372_thumb.jpg",130,87,1);thumbnails[2413175]=new thumbnail(2413175,"128575","","DSC_1407_thumb.jpg",130,87,1);thumbnails[2413179]=new thumbnail(2413179,"128575","","DSC_0954_thumb.jpg",130,194,1);thumbnails[2413181]=new thumbnail(2413181,"128575","","DSC_1001_thumb.jpg",130,194,1);thumbnails[2413191]=new thumbnail(2413191,"128575","","DSC_1033_thumb.jpg",130,194,1);thumbnails[2413201]=new thumbnail(2413201,"128575","","DSC_1273_thumb.jpg",130,194,1);thumbnails[2413211]=new thumbnail(2413211,"128575","","DSC_1006_thumb.jpg",130,215,1);thumbnails[2413216]=new thumbnail(2413216,"128575","","DSC_1244_thumb.jpg",130,194,1);thumbnails[1635629]=new thumbnail(1635629,"105741","","TempleSunset_thumb.jpg",130,87,1);thumbnails[1635651]=new thumbnail(1635651,"105741","","TempleDancers_thumb.jpg",130,87,1);thumbnails[1635659]=new thumbnail(1635659,"105741","","Great Days Fishing_thumb.jpg",130,87,1);thumbnails[1635673]=new thumbnail(1635673,"105741","","TempleFeature_thumb.jpg",130,87,1);thumbnails[1635685]=new thumbnail(1635685,"105741","","CokeGirl_thumb.jpg",130,87,1);thumbnails[1635687]=new thumbnail(1635687,"105741","","StreetCleaner_thumb.jpg",130,87,1);thumbnails[1635719]=new thumbnail(1635719,"105741","","BoatBoy_thumb.jpg",130,195,1);thumbnails[1635721]=new thumbnail(1635721,"105741","","Fisherman_thumb.jpg",130,195,1);thumbnails[1635725]=new thumbnail(1635725,"105741","","paradedrummer_thumb.jpg",130,195,1);thumbnails[1635804]=new thumbnail(1635804,"105741","","AnchoredBoats_thumb.jpg",130,87,1);thumbnails[1635811]=new thumbnail(1635811,"105741","","TempleGuard_thumb.jpg",130,87,1);thumbnails[1635815]=new thumbnail(1635815,"105741","","Cruise_thumb.jpg",130,87,1);thumbnails[1635816]=new thumbnail(1635816,"105741","","BoyMonk_thumb.jpg",130,195,1);thumbnails[1635817]=new thumbnail(1635817,"105741","","TempleOfferings_thumb.jpg",130,195,1);thumbnails[1635820]=new thumbnail(1635820,"105741","","TempleDancers2_thumb.jpg",130,195,1);thumbnails[1537576]=new thumbnail(1537576,"104707","","DSC_0032_thumb.jpg",130,73,1);thumbnails[1543028]=new thumbnail(1543028,"104707","","Life in Motion_thumb.jpg",130,87,1);thumbnails[1644192]=new thumbnail(1644192,"104707","","Waterfall21_thumb.jpg",130,87,1);thumbnails[1635878]=new thumbnail(1635878,"104707","","LighthouseRainbow_thumb.jpg",130,87,1);thumbnails[1644179]=new thumbnail(1644179,"104707","","LifeHutLightning_thumb.jpg",130,87,1);thumbnails[1635881]=new thumbnail(1635881,"104707","","Q1Bridge_thumb.jpg",130,87,1);thumbnails[1662230]=new thumbnail(1662230,"104707","","MilfordStormy_thumb.jpg",130,195,1);thumbnails[1662232]=new thumbnail(1662232,"104707","","Pullingbrook3_thumb.jpg",130,195,1);thumbnails[3814560]=new thumbnail(3814560,"104892","Kanya- Urbn Stylz","DSC_3914-Edit-2_thumb.jpg",130,195,1);thumbnails[3814561]=new thumbnail(3814561,"104892","","DSC_3927-Edit-7_thumb.jpg",130,163,1);thumbnails[3832590]=new thumbnail(3832590,"104892","","GOS-H3_2_of_49_thumb.jpg",130,87,1);thumbnails[2394422]=new thumbnail(2394422,"104892","","Lynette-LCP-3360_thumb.jpg",130,87,1);thumbnails[3814563]=new thumbnail(3814563,"104892","","DSC_4106-Editcropped-38_thumb.jpg",130,195,1);thumbnails[2394415]=new thumbnail(2394415,"104892","","Lynette-LCP--10_thumb.jpg",130,195,1);thumbnails[2394417]=new thumbnail(2394417,"104892","","Lynette-LCP-3_thumb.jpg",130,194,1);thumbnails[2394410]=new thumbnail(2394410,"104892","","Lynette-LCP--2-2_thumb.jpg",130,87,1);thumbnails[2394418]=new thumbnail(2394418,"104892","","Lynette-LCP-3394_thumb.jpg",130,195,1);thumbnails[2394419]=new thumbnail(2394419,"104892","","Lynette-LCP--5_thumb.jpg",130,194,1);thumbnails[1635851]=new thumbnail(1635851,"104892","","Paz1_thumb.jpg",130,195,1);thumbnails[2394421]=new thumbnail(2394421,"104892","","Lynette-LCP-3524_thumb.jpg",130,195,1);thumbnails[2394474]=new thumbnail(2394474,"104892","","Lynette-LCP--5-2_thumb.jpg",130,194,1);thumbnails[3832813]=new thumbnail(3832813,"104892","","GOS-H3_12_of_49_thumb.jpg",130,194,1);thumbnails[3711920]=new thumbnail(3711920,"213508","Street Games","Myanmar_1_of_121_thumb.jpg",130,98,1);thumbnails[3711926]=new thumbnail(3711926,"213508","Novice Monk","Myanmar_4_of_120_thumb.jpg",130,87,1);thumbnails[3712022]=new thumbnail(3712022,"213508","Shwedagon Paya","Myanmar_16_of_120_thumb.jpg",130,87,1);thumbnails[3712031]=new thumbnail(3712031,"213508","Cup of Tea Cowboy","Myanmar_1_of_120_thumb.jpg",130,194,1);thumbnails[3712039]=new thumbnail(3712039,"213508","Bookstore","Myanmar_11_of_120_thumb.jpg",130,194,1);thumbnails[3712049]=new thumbnail(3712049,"213508","Birds on the wire","Myanmar_15_of_120_thumb.jpg",130,194,1);thumbnails[3712054]=new thumbnail(3712054,"213508","On the Bus","Myanmar_7_of_120_thumb.jpg",130,87,1);thumbnails[3712062]=new thumbnail(3712062,"213508","Locked up","Myanmar_5_of_120_thumb.jpg",130,87,1);thumbnails[3712135]=new thumbnail(3712135,"213508","Lottery Wheel","Myanmar_6_of_120_thumb.jpg",130,87,1);thumbnails[3712245]=new thumbnail(3712245,"213508","Book keeper","Myanmar_10_of_120_thumb.jpg",130,87,1);thumbnails[3712272]=new thumbnail(3712272,"213508","Pagoda Sunset","Myanmar_19_of_120_thumb.jpg",130,87,1);thumbnails[3712424]=new thumbnail(3712424,"213508","Irrawaddy River Hulk","Myanmar_21_of_120_thumb.jpg",130,87,1);thumbnails[3712482]=new thumbnail(3712482,"213508","Novice Monk and Teacher","Myanmar_25_of_120_thumb.jpg",130,194,1);thumbnails[3712577]=new thumbnail(3712577,"213508","Morning Worker","Myanmar_28_of_120_thumb.jpg",130,194,1);thumbnails[3712603]=new thumbnail(3712603,"213508","Banana Boxer","Myanmar_44_of_120_thumb.jpg",130,194,1);thumbnails[3702432]=new thumbnail(3702432,"213509","Bridge Riders","Laos_32_of_32_thumb.jpg",130,87,1);thumbnails[3702435]=new thumbnail(3702435,"213509","Temple Buddhas","Laos_29_of_32_thumb.jpg",130,87,1);thumbnails[3702440]=new thumbnail(3702440,"213509","Quiet Monk","Laos_25_of_32_thumb.jpg",130,87,1);thumbnails[3702443]=new thumbnail(3702443,"213509","Sunset on the Mekong","Laos_4_of_32_thumb.jpg",130,202,1);thumbnails[3702444]=new thumbnail(3702444,"213509","Golden Motif","Laos_15_of_32_thumb.jpg",130,194,1);thumbnails[3702446]=new thumbnail(3702446,"213509","Local Boy","Laos_11_of_32_thumb.jpg",130,194,1);thumbnails[3702448]=new thumbnail(3702448,"213509","Fresh Fruit Flavors","Laos_5_of_32_thumb.jpg",130,87,1);thumbnails[3702454]=new thumbnail(3702454,"213509","Red Flower","Laos_9_of_32_thumb.jpg",130,87,1);thumbnails[3702455]=new thumbnail(3702455,"213509","Sleepy on the Mekong","Laos_3_of_32_thumb.jpg",130,87,1);thumbnails[3702459]=new thumbnail(3702459,"213509","River Crossing","Laos_24_of_32_thumb.jpg",130,194,1);thumbnails[3702461]=new thumbnail(3702461,"213509","Making Merit","Laos_22_of_32_thumb.jpg",130,194,1);thumbnails[3702471]=new thumbnail(3702471,"213509","Dry Fields","Laos_17_of_32_thumb.jpg",130,194,1);var galleries=new Object();galleries[104894]=new gallery(104894,"1635425","Weddings ","gallery",[1635357,1635358,1635412,1635415,3071983,3071977,1635367,3071982,1635428,1635425,3071989,1635413,1635456,1635480,1635482,1635483,2099906,2099908,2099910]);galleries[128563]=new gallery(128563,"1662226","New Zealand","gallery",[1526259,1662225,3071955,1662226,1662228,2099918,3071950,2099748]);galleries[128564]=new gallery(128564,"2413248,2411299,2411297","Hong Kong","gallery",[2411297,2411299,2413248]);galleries[128575]=new gallery(128575,"2413216,2413211,2413201,2413191,2413181,2413179,2413175,2412389,2412332,2412328","Bali","gallery",[2411307,2411308,2411310,2411311,2411312,2412328,2412332,2412389,2413175,2413179,2413181,2413191,2413201,2413211,2413216]);galleries[105741]=new gallery(105741,"1635659,1635651","Thailand","gallery",[1635629,1635651,1635659,1635673,1635685,1635687,1635719,1635721,1635725,1635804,1635811,1635815,1635816,1635817,1635820]);galleries[104707]=new gallery(104707,"1644179","Landscapes","gallery",[1537576,1543028,1644192,1635878,1644179,1635881,1662230,1662232]);galleries[128560]=new gallery(128560,"3711926,1662226,1635659,1635651","Travel Photography","gallery",[]);galleries[104892]=new gallery(104892,"2394422,2394410","Fashion","gallery",[3814560,3814561,3832590,2394422,3814563,2394415,2394417,2394410,2394418,2394419,1635851,2394421,2394474,3832813]);galleries[213508]=new gallery(213508,"3711926","Myanmar ","gallery",[3711920,3711926,3712022,3712031,3712039,3712049,3712054,3712062,3712135,3712245,3712272,3712424,3712482,3712577,3712603]);galleries[213509]=new gallery(213509,"3702471,3702461,3702459,3702455,3702454,3702448,3702446,3702444,3702443,3702440","Laos","gallery",[3702432,3702435,3702440,3702443,3702444,3702446,3702448,3702454,3702455,3702459,3702461,3702471]);var imageSets=new Object();imageSets[1]="3712424,3712272,3712245,3712022,3711926,3711920,3702471,3702454,3702435,3702432,3071977,2411311,2394422,2099918,1662228,1635428,1635357";imageSets[2]="3711926,2415378,2394422,2394410,1662226,1662081,1644179,1635659,1635651,1635425,1542972";imageSets[3]="3836813,3836526,3836524,3836513,3836502,3832938,3832923,3832871,3832813,3832590,3814563,3814561,3814560,3712603,3712577,3712482,3712424,3712272,3712245,3712135,3712062,3712054,3712049,3712039,3712031,3712022,3711926,3711920,3702471,3702461,3702459,3702455,3702454,3702448,3702446,3702444,3702443,3702440,3702435,3702432,3071989,3071983,3071982,3071977,3071971,3071955,3071950,2415386,2415385,2415384";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/LCooperPhotography/images";break}switch(a){case 1:b="http://www1.clikpic.com/LCooperPhotography/images";break}switch(a){case 2:b="http://admin.clikpic.com/LCooperPhotography/images";break}switch(a){case 24:b="http://tpc15/clikpic/LCooperPhotography/images";break}switch(a){case 4:b="http://www.clikchurch.com/LCooperPhotography/images";break}switch(a){case 5:b="http://www2.clikpic.com/LCooperPhotography/images";break}switch(a){case 22:b="http://tpc5/clikpic/LCooperPhotography/images";break}switch(a){case 23:b="http://tpc10/clikpic/LCooperPhotography/images";break}switch(a){case 25:b="http://tpc16/clikpic/LCooperPhotography/images";break}switch(a){case 15:b="http://www3.clikpic.com/LCooperPhotography/images";break}switch(a){case 18:b="http://www4.clikpic.com/LCooperPhotography/images";break}switch(a){case 19:b="http://www5.clikpic.com/LCooperPhotography/images";break}switch(a){case 31:b="http://www7.clikpic.com/LCooperPhotography/images";break}switch(a){case 32:b="http://admin2.clikpic.com/LCooperPhotography/images";break}switch(a){case 33:b="http://www8.clikpic.com/LCooperPhotography/images";break}switch(a){case 34:b="http://www9.clikpic.com/LCooperPhotography/images";break}switch(a){case 35:b="http://admin3.clikpic.com/LCooperPhotography/images";break}switch(a){case 37:b="http://admin4.clikpic.com/LCooperPhotography/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="Locky    Cooper    Photography: "+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>Make Up Artist </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>Model </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(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+'")'})}}};