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[5460623]=new thumbnail(5460623,"","","website_picture1_thumb.jpg",100,122,1);thumbnails[5608414]=new thumbnail(5608414,"317739","","DSC_0520_copy_thumb.jpg",100,68,1);thumbnails[5608415]=new thumbnail(5608415,"317739","","2_DSC_0475_thumb.jpg",100,67,1);thumbnails[5608416]=new thumbnail(5608416,"317739","","3_DSC_0496_thumb.jpg",100,67,1);thumbnails[5608417]=new thumbnail(5608417,"317739","","4_DSC_4609_thumb.jpg",100,65,1);thumbnails[5608418]=new thumbnail(5608418,"317739","","5_DSC_4726_thumb.jpg",100,67,1);thumbnails[5608419]=new thumbnail(5608419,"317739","","6_DSC_4698_thumb.jpg",100,67,1);thumbnails[5608420]=new thumbnail(5608420,"317739","","7_DSC_4641_thumb.jpg",100,68,1);thumbnails[5608421]=new thumbnail(5608421,"317739","","8_DSC_4588_thumb.jpg",100,67,1);thumbnails[5608422]=new thumbnail(5608422,"317739","","9_DSC_4621_thumb.jpg",100,66,1);thumbnails[5608423]=new thumbnail(5608423,"317739","","10_DSC_0514_thumb.jpg",100,67,1);thumbnails[5608424]=new thumbnail(5608424,"317739","","11_DSC_4717_thumb.jpg",100,62,1);thumbnails[5601528]=new thumbnail(5601528,"317739","","DSC_4644_small_for_website_thumb.jpg",100,65,1);thumbnails[1053814]=new thumbnail(1053814,"317739","","COMMERCIAL (44)_thumb.jpg",100,67,1);thumbnails[1053812]=new thumbnail(1053812,"317739","","COMMERCIAL (42)_thumb.jpg",100,63,1);thumbnails[1053813]=new thumbnail(1053813,"317739","","COMMERCIAL (43)_thumb.jpg",100,67,1);thumbnails[1053809]=new thumbnail(1053809,"317739","","COMMERCIAL (34)_thumb.jpg",100,67,1);thumbnails[1053810]=new thumbnail(1053810,"317739","","COMMERCIAL (36)_thumb.jpg",100,67,1);thumbnails[1053815]=new thumbnail(1053815,"317739","","COMMERCIAL 35_thumb.jpg",100,68,1);thumbnails[5601534]=new thumbnail(5601534,"317739","","DSC_4675_copy_small_for_website1_thumb.jpg",100,150,1);thumbnails[5601533]=new thumbnail(5601533,"317739","","DSC_0552_small_for_website1_thumb.jpg",100,150,1);thumbnails[5601530]=new thumbnail(5601530,"317739","","DSC_4660_small_for_website_thumb.jpg",96,150,1);thumbnails[1053811]=new thumbnail(1053811,"317739","","COMMERCIAL (41)_thumb.jpg",100,150,1);thumbnails[5601532]=new thumbnail(5601532,"317739","","DSC_0561_small_for_website__thumb.jpg",100,150,1);thumbnails[5601531]=new thumbnail(5601531,"317739","","DSC_4674_small_for_website_thumb.jpg",100,150,1);thumbnails[1053816]=new thumbnail(1053816,"317739","","COMMERCIAL (40)_thumb.jpg",100,150,1);thumbnails[5601529]=new thumbnail(5601529,"317739","","DSC_0540_small_for_website__thumb.jpg",100,150,1);thumbnails[6470818]=new thumbnail(6470818,"2206","","twitter_logo_150pxl_wide_x_75pxl_high_copy_thumb.jpg",100,50,1);thumbnails[6470819]=new thumbnail(6470819,"2206","","facebook-logo_75x75_pxl_copy_thumb.jpg",100,100,1);thumbnails[2179405]=new thumbnail(2179405,"2206","","CHONG 1_thumb.jpg",100,68,1);thumbnails[1053797]=new thumbnail(1053797,"2206","","COMMERCIAL (12)_thumb.jpg",100,63,1);thumbnails[1053808]=new thumbnail(1053808,"2206","","COMMERCIAL (29)_thumb.jpg",100,67,1);thumbnails[1053798]=new thumbnail(1053798,"2206","","COMMERCIAL (13)_thumb.jpg",100,67,1);thumbnails[2179557]=new thumbnail(2179557,"2206","","COMMERCIAL 11_thumb.jpg",100,67,1);thumbnails[1053803]=new thumbnail(1053803,"2206","","COMMERCIAL (21)_thumb.jpg",100,67,1);thumbnails[1053800]=new thumbnail(1053800,"2206","","COMMERCIAL (18)_thumb.jpg",100,67,1);thumbnails[1053805]=new thumbnail(1053805,"2206","","COMMERCIAL (26)_thumb.jpg",100,67,1);thumbnails[1053790]=new thumbnail(1053790,"2206","","COMMERCIAL 2_thumb.jpg",100,68,1);thumbnails[1053801]=new thumbnail(1053801,"2206","","COMMERCIAL (20)_thumb.jpg",100,67,1);thumbnails[1053795]=new thumbnail(1053795,"2206","","COMMERCIAL 7_thumb.jpg",100,68,1);thumbnails[1053789]=new thumbnail(1053789,"2206","","COMMERCIAL (1)_thumb.jpg",100,68,1);thumbnails[2179829]=new thumbnail(2179829,"2206","","DSC_6106_thumb.jpg",100,67,1);thumbnails[2179848]=new thumbnail(2179848,"2206","","DSC_6155_thumb.jpg",100,67,1);thumbnails[1053787]=new thumbnail(1053787,"2206","","COMMERCIAL_thumb.jpg",100,68,1);thumbnails[1053799]=new thumbnail(1053799,"2206","","COMMERCIAL (17)_thumb.jpg",100,150,1);thumbnails[1053807]=new thumbnail(1053807,"2206","","COMMERCIAL (28)1_thumb.jpg",100,150,1);thumbnails[1398074]=new thumbnail(1398074,"2881","","BAND SHOTS_11_thumb.jpg",100,67,1);thumbnails[3000837]=new thumbnail(3000837,"2881","","DSC7858_website_thumb.jpg",100,74,1);thumbnails[2319478]=new thumbnail(2319478,"2881","","DSC_1041 B&W SINGLE FOR WEBSITE_thumb.jpg",100,67,1);thumbnails[1398075]=new thumbnail(1398075,"2881","","BAND SHOTS_21_thumb.jpg",100,67,1);thumbnails[3000836]=new thumbnail(3000836,"2881","","DSC7844_for website_thumb.jpg",100,76,1);thumbnails[2319462]=new thumbnail(2319462,"2881","","DSC_1036_MODIFIED 3 FOR WEBSITE_thumb.jpg",100,113,1);thumbnails[3000838]=new thumbnail(3000838,"2881","","DSC7941_website_thumb.jpg",93,150,1);thumbnails[3000782]=new thumbnail(3000782,"146484","","DSC_2212_for website_thumb.jpg",100,53,1);thumbnails[3000831]=new thumbnail(3000831,"146484","","DSC_1674_for website_thumb.jpg",100,69,1);thumbnails[3000833]=new thumbnail(3000833,"146484","","DSC_1861_for website_thumb.jpg",100,110,1);thumbnails[2219585]=new thumbnail(2219585,"146484","","DSC_0900_thumb.jpg",100,150,1);thumbnails[3000832]=new thumbnail(3000832,"146484","","DSC_1781_for website_thumb.jpg",100,138,1);thumbnails[3864499]=new thumbnail(3864499,"15205","","SLIDE_SHOW_November_2008_copy1_thumb.jpg",92,150,1);thumbnails[3761797]=new thumbnail(3761797,"15205","","WEDDING_SLIDE_SHOW_SHOT_2_copy1_thumb.jpg",100,149,1);thumbnails[3761793]=new thumbnail(3761793,"15205","","SLIDE_SHOW_November_2008_59_copy_thumb.jpg",96,150,1);thumbnails[3864491]=new thumbnail(3864491,"15205","","WEDDING_SLIDE_SHOW_SHOT_29_thumb.jpg",100,150,1);thumbnails[3864495]=new thumbnail(3864495,"15205","","WEDDING_SLIDE_SHOW_SHOT_69_thumb.jpg",100,148,1);thumbnails[3864498]=new thumbnail(3864498,"15205","","WEDDING_SLIDE_SHOW_SHOT_76_thumb.jpg",100,140,1);thumbnails[3864487]=new thumbnail(3864487,"15205","","WEDDING_SLIDE_SHOW_SHOT_21_thumb.jpg",100,150,1);thumbnails[3864474]=new thumbnail(3864474,"15205","","DSC_8808_thumb.jpg",100,150,1);thumbnails[3761803]=new thumbnail(3761803,"15205","","SLIDE_SHOW_November_2008_12_thumb.jpg",100,138,1);thumbnails[1053751]=new thumbnail(1053751,"15205","","WEDDING (7)_thumb.jpg",95,150,1);thumbnails[3761787]=new thumbnail(3761787,"15205","","SLIDE_SHOW_November_2008_66_copy_thumb.jpg",100,148,1);thumbnails[3864478]=new thumbnail(3864478,"15205","","DSC_8907_thumb.jpg",100,150,1);thumbnails[2566097]=new thumbnail(2566097,"15205","","BOYS WITH GARTER_thumb.jpg",100,137,1);thumbnails[1053753]=new thumbnail(1053753,"15205","","WEDDING (8)1_thumb.JPG",96,150,1);thumbnails[2565975]=new thumbnail(2565975,"15205","","BACK OF DRESS_thumb.jpg",100,138,1);thumbnails[3864493]=new thumbnail(3864493,"15205","","WEDDING_SLIDE_SHOW_SHOT_34_thumb.jpg",100,46,1);thumbnails[1053782]=new thumbnail(1053782,"15205","","WEDDING (31)_thumb.jpg",100,67,1);thumbnails[1053767]=new thumbnail(1053767,"15205","","WEDDING (38)_thumb.jpg",100,55,1);thumbnails[1053775]=new thumbnail(1053775,"15205","","WEDDING (16)_thumb.jpg",100,68,1);thumbnails[1053760]=new thumbnail(1053760,"15205","","WEDDING (21)_thumb.jpg",100,67,1);thumbnails[2561018]=new thumbnail(2561018,"15205","","BOYS ON PARK BENCH_thumb.jpg",100,58,1);thumbnails[3864482]=new thumbnail(3864482,"15205","","DSC_8788_BW_thumb.jpg",100,67,1);thumbnails[1053765]=new thumbnail(1053765,"15205","","WEDDING (37)_thumb.jpg",100,67,1);thumbnails[1494473]=new thumbnail(1494473,"15205","","DSC_8778_B&W_thumb.jpg",100,67,1);thumbnails[1053771]=new thumbnail(1053771,"15205","","WEDDING (41)_thumb.jpg",100,67,1);thumbnails[1494476]=new thumbnail(1494476,"15205","","DSC_8922_B&W_thumb.jpg",100,67,1);thumbnails[2561044]=new thumbnail(2561044,"15205","","MELANIES MONTAGE_thumb.jpg",100,71,1);thumbnails[3864492]=new thumbnail(3864492,"15205","","WEDDING_SLIDE_SHOW_SHOT_31_thumb.jpg",100,67,1);thumbnails[2565809]=new thumbnail(2565809,"15205","","NATALIE WITH COLOURED UMBRELLAS_thumb.jpg",100,71,1);thumbnails[1053777]=new thumbnail(1053777,"15205","","WEDDING (25)_thumb.jpg",100,36,1);thumbnails[1076693]=new thumbnail(1076693,"15205","","B&W FLOWERS_MELANIES WEDDING_thumb.jpg",100,45,1);thumbnails[1053700]=new thumbnail(1053700,"2211","","KIDS (24)1_thumb.jpg",100,128,1);thumbnails[1053739]=new thumbnail(1053739,"2211","","KIDS (22)_thumb.jpg",100,126,1);thumbnails[1053738]=new thumbnail(1053738,"2211","","KIDS (21)_thumb.jpg",79,150,1);thumbnails[1053703]=new thumbnail(1053703,"2211","","KIDS (2)4_thumb.jpg",100,135,1);thumbnails[1053735]=new thumbnail(1053735,"2211","","KIDS (19)_thumb.jpg",100,131,1);thumbnails[3717314]=new thumbnail(3717314,"2211","","DSC_4144_copy_small_for_website_thumb.jpg",100,150,1);thumbnails[1053732]=new thumbnail(1053732,"2211","","KIDS (17)1_thumb.jpg",100,147,1);thumbnails[1053734]=new thumbnail(1053734,"2211","","KIDS (18)_thumb.jpg",100,128,1);thumbnails[1053714]=new thumbnail(1053714,"2211","","KIDS (8)1_thumb.jpg",100,139,1);thumbnails[1053726]=new thumbnail(1053726,"2211","","KIDS (15)_thumb.jpg",100,132,1);thumbnails[3717304]=new thumbnail(3717304,"2211","","DSC_4115_copy_small_for_website_thumb.jpg",100,150,1);thumbnails[1053704]=new thumbnail(1053704,"2211","","KIDS (3)4_thumb.jpg",100,150,1);thumbnails[1053722]=new thumbnail(1053722,"2211","","KIDS (12)_thumb.jpg",100,133,1);thumbnails[1053719]=new thumbnail(1053719,"2211","","KIDS (9)_thumb.jpg",100,112,1);thumbnails[1053721]=new thumbnail(1053721,"2211","","KIDS (11)_thumb.jpg",100,150,1);thumbnails[1053701]=new thumbnail(1053701,"2211","","KIDS2_thumb.jpg",100,80,1);thumbnails[1053706]=new thumbnail(1053706,"2211","","KIDS (4)3_thumb.jpg",100,68,1);thumbnails[1053724]=new thumbnail(1053724,"2211","","KIDS (13)_thumb.jpg",100,63,1);thumbnails[1053740]=new thumbnail(1053740,"2211","","KIDS (23)_thumb.jpg",100,67,1);thumbnails[1053702]=new thumbnail(1053702,"2211","","KIDS (1)3_thumb.jpg",98,150,1);thumbnails[3043265]=new thumbnail(3043265,"2211","","The Boys_for WEBSITE_thumb.jpg",100,61,1);thumbnails[2219546]=new thumbnail(2219546,"113354","","DSC_0855_thumb.jpg",100,52,1);thumbnails[1681631]=new thumbnail(1681631,"113354","","DSC_59771_thumb.jpg",100,120,1);thumbnails[1681632]=new thumbnail(1681632,"113354","","DSC_59901_thumb.jpg",100,121,1);thumbnails[2219544]=new thumbnail(2219544,"113354","","DSC_0772_thumb.jpg",45,150,1);thumbnails[1061276]=new thumbnail(1061276,"31968","","DSC_6641 copy_SMALLER3_thumb.JPG",100,150,1);thumbnails[1076709]=new thumbnail(1076709,"31968","","WEBSITE SHOTS (114)_thumb.jpg",91,150,1);thumbnails[1076710]=new thumbnail(1076710,"31968","","WEBSITE SHOTS (116)_thumb.jpg",100,150,1);thumbnails[1076711]=new thumbnail(1076711,"31968","","WEBSITE SHOTS (115)_thumb.jpg",100,150,1);thumbnails[1076712]=new thumbnail(1076712,"31968","","WEBSITE SHOTS (8)_thumb.jpg",100,67,1);thumbnails[1076713]=new thumbnail(1076713,"31968","","WEBSITE SHOTS (18) copy_thumb.jpg",100,67,1);thumbnails[1076714]=new thumbnail(1076714,"31968","","WEBSITE SHOTS (20)_thumb.jpg",100,67,1);thumbnails[1076715]=new thumbnail(1076715,"31968","","WEBSITE SHOTS (43)_thumb.jpg",100,67,1);thumbnails[1076716]=new thumbnail(1076716,"31968","","WEBSITE SHOTS (40)_thumb.jpg",100,46,1);thumbnails[1076717]=new thumbnail(1076717,"31968","","WEBSITE SHOTS (23)_thumb.jpg",100,38,1);thumbnails[1076718]=new thumbnail(1076718,"31968","","DSC_6630 copy_SMALLER_thumb.jpg",100,150,1);thumbnails[1076719]=new thumbnail(1076719,"31968","","DSC_6635_COPY_SMALL_thumb.jpg",100,66,1);thumbnails[3000834]=new thumbnail(3000834,"31968","","1octGrantD_for website_thumb.jpg",100,67,1);var galleries=new Object();galleries[317739]=new gallery(317739,"5608418","COMMERCIAL - Interior","gallery",[5608414,5608415,5608416,5608417,5608418,5608419,5608420,5608421,5608422,5608423,5608424,5601528,1053814,1053812,1053813,1053809,1053810,1053815,5601534,5601533,5601530,1053811,5601532,5601531,1053816,5601529]);galleries[2206]=new gallery(2206,"2179405","COMMERCIAL - Exterior","gallery",[6470818,6470819,2179405,1053797,1053808,1053798,2179557,1053803,1053800,1053805,1053790,1053801,1053795,1053789,2179829,2179848,1053787,1053799,1053807]);galleries[2881]=new gallery(2881,"1398074","PORTRAITS - General","gallery",[1398074,3000837,2319478,1398075,3000836,2319462,3000838]);galleries[146484]=new gallery(146484,"3000833,3000832,3000831,3000782,2219585","FOOD","gallery",[3000782,3000831,3000833,2219585,3000832]);galleries[15205]=new gallery(15205,"3864499","WEDDINGS","gallery",[3864499,3761797,3761793,3864491,3864495,3864498,3864487,3864474,3761803,1053751,3761787,3864478,2566097,1053753,2565975,3864493,1053782,1053767,1053775,1053760,2561018,3864482,1053765,1494473,1053771,1494476,2561044,3864492,2565809,1053777,1076693]);galleries[2211]=new gallery(2211,"1053703","PORTRAITS - Kids","gallery",[1053700,1053739,1053738,1053703,1053735,3717314,1053732,1053734,1053714,1053726,3717304,1053704,1053722,1053719,1053721,1053701,1053706,1053724,1053740,1053702,3043265]);galleries[113354]=new gallery(113354,"1681632","PRODUCT SHOTS","gallery",[2219546,1681631,1681632,2219544]);galleries[31968]=new gallery(31968,"1061276","LANDSCAPES","gallery",[1061276,1076709,1076710,1076711,1076712,1076713,1076714,1076715,1076716,1076717,1076718,1076719,3000834]);var imageSets=new Object();imageSets[1]="3864499,3864498,3864495,3864491,3864487,3864482,3864478,3864474,3761803,3761793,3761787,2565975,1076693,1053782,1053775,1053765,1053760";imageSets[2]="5608418,3864499,2179405,1681632,1398074,1061276,1053703";imageSets[3]="6470819,6470818,5608424,5608423,5608422,5608421,5608420,5608419,5608418,5608417,5608416,5608415,5608414,5601534,5601533,5601532,5601531,5601530,5601529,5601528,5460623,3864499,3864498,3864495,3864493,3864492,3864491,3864487,3864482,3864478,3864474,3761803,3761797,3761793,3761787,3717314,3717304,3043265,3000838,3000837,3000836,3000834,3000833,3000832,3000831,3000782,2566097,2565975,2565809,2561044";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/grntdv/images";break}switch(a){case 1:b="http://www1.clikpic.com/grntdv/images";break}switch(a){case 2:b="http://admin.clikpic.com/grntdv/images";break}switch(a){case 24:b="http://tpc15/clikpic/grntdv/images";break}switch(a){case 4:b="http://www.clikchurch.com/grntdv/images";break}switch(a){case 5:b="http://www2.clikpic.com/grntdv/images";break}switch(a){case 22:b="http://tpc5/clikpic/grntdv/images";break}switch(a){case 23:b="http://tpc10/clikpic/grntdv/images";break}switch(a){case 25:b="http://tpc16/clikpic/grntdv/images";break}switch(a){case 15:b="http://www3.clikpic.com/grntdv/images";break}switch(a){case 18:b="http://www4.clikpic.com/grntdv/images";break}switch(a){case 19:b="http://www5.clikpic.com/grntdv/images";break}switch(a){case 31:b="http://www7.clikpic.com/grntdv/images";break}switch(a){case 32:b="http://admin2.clikpic.com/grntdv/images";break}switch(a){case 33:b="http://www8.clikpic.com/grntdv/images";break}switch(a){case 34:b="http://www9.clikpic.com/grntdv/images";break}switch(a){case 35:b="http://admin3.clikpic.com/grntdv/images";break}switch(a){case 37:b="http://admin4.clikpic.com/grntdv/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="'+escape(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="Grant Davenport 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>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> 				AU$"+(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="">';b=b+'<input type="hidden" name="currency_code" value="AUD">';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="">';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<100){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+'")'})}}};