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[2802537]=new thumbnail(2802537,"183581","","Johann studio-web_thumb.jpg",130,202,5);thumbnails[2802542]=new thumbnail(2802542,"183581","","self1_thumb.jpg",130,188,5);thumbnails[2802546]=new thumbnail(2802546,"183581","","David-studio-web1_thumb.jpg",130,174,5);thumbnails[2802552]=new thumbnail(2802552,"183581","","Marc souriant-edit-web_thumb.jpg",130,182,5);thumbnails[2802555]=new thumbnail(2802555,"183581","","Mario on the couch-edit-2-web_thumb.jpg",130,130,5);thumbnails[2802557]=new thumbnail(2802557,"183581","","Nice July 2008-210-cropped_thumb.jpg",130,130,5);thumbnails[2802560]=new thumbnail(2802560,"183581","","Thierry-edit-web_thumb.jpg",130,188,5);thumbnails[2802568]=new thumbnail(2802568,"183581","","Mark-session-1-09_thumb.jpg",130,130,5);thumbnails[2802582]=new thumbnail(2802582,"183581","","Johann yellow rose-1-web_thumb...jpg",130,196,5);thumbnails[3022847]=new thumbnail(3022847,"183581","","sheep man-web_thumb.jpg",130,149,5);thumbnails[3207660]=new thumbnail(3207660,"183581","","Mario's eye Islandbridge 5-B&W_thumb..jpg",130,88,5);thumbnails[3207662]=new thumbnail(3207662,"183581","","Zach-web-01_thumb.jpg",130,196,5);thumbnails[3207663]=new thumbnail(3207663,"183581","","Christian-Tshirt-04-web_thumb.jpg",130,310,5);thumbnails[3279144]=new thumbnail(3279144,"183581","","Peter SA home-web2_thumb.jpg",130,96,5);thumbnails[3279147]=new thumbnail(3279147,"183581","","Peter SA-home-web_thumb.jpg",130,198,5);thumbnails[3279149]=new thumbnail(3279149,"183581","","PeterSA-home-web3_thumb.jpg",130,178,5);thumbnails[3279151]=new thumbnail(3279151,"183581","","Peter SA-pub-05-web_thumb.jpg",130,187,5);thumbnails[3279165]=new thumbnail(3279165,"183581","","Zach-web-03_thumb.jpg",130,185,5);thumbnails[3279188]=new thumbnail(3279188,"183581","","Alexandre-Noel08-33-web_thumb.jpg",130,191,5);thumbnails[3328457]=new thumbnail(3328457,"183581","","Stuart-January-040-edit-web_thumb.jpg",130,187,5);thumbnails[3328460]=new thumbnail(3328460,"183581","","Stuart-January-048-web_thumb.jpg",130,193,5);thumbnails[3328463]=new thumbnail(3328463,"183581","","Stuart-January-114-web_thumb.jpg",130,189,5);thumbnails[3328465]=new thumbnail(3328465,"183581","","Anthony-January-51-web_thumb.jpg",130,181,5);thumbnails[3930820]=new thumbnail(3930820,"183581","","Weekend_Cyril-114-web_thumb.jpg",130,149,5);thumbnails[5589898]=new thumbnail(5589898,"183581","","Damien-Jan10-082-web_thumb.jpg",130,193,5);thumbnails[5589902]=new thumbnail(5589902,"183581","","Damien-Jan10-144-web_thumb.jpg",130,201,5);thumbnails[5589905]=new thumbnail(5589905,"183581","","Damien-Jan10-218-web_thumb.jpg",130,195,5);thumbnails[5589910]=new thumbnail(5589910,"183581","","Mark-OH-Jan10-57-web_thumb.jpg",130,201,5);thumbnails[5589911]=new thumbnail(5589911,"183581","","Mark-OH-Jan10-76-web_thumb.jpg",130,197,5);thumbnails[5589916]=new thumbnail(5589916,"183581","","DJ-372-edit-square-web_thumb.jpg",130,130,5);thumbnails[5589917]=new thumbnail(5589917,"183581","","DJ-379-web_thumb.jpg",130,85,5);thumbnails[5935930]=new thumbnail(5935930,"183581","","TIM-LONDON10-096-web_thumb.JPG",130,87,5);thumbnails[5935937]=new thumbnail(5935937,"183581","","Tim-hat-1-web_thumb.jpg",130,87,5);thumbnails[2939762]=new thumbnail(2939762,"183581","","Zach-web-02_thumb.jpg",130,181,5);thumbnails[2802598]=new thumbnail(2802598,"137321","","Christian topless-web_thumb.jpg",130,169,5);thumbnails[2802600]=new thumbnail(2802600,"137321","","David sirene-web_thumb.JPG",130,177,5);thumbnails[2802602]=new thumbnail(2802602,"137321","","Nude-session2-14-web2_thumb.jpg",130,193,5);thumbnails[2802607]=new thumbnail(2802607,"137321","","sailor Gaire-2_thumb.jpg",130,195,5);thumbnails[2802613]=new thumbnail(2802613,"137321","","chest 6-messed_thumb.jpg",130,163,5);thumbnails[2939763]=new thumbnail(2939763,"137321","","Fra-standing-web1_thumb.jpg",130,175,5);thumbnails[3204160]=new thumbnail(3204160,"137321","","P-01_thumb.jpg",130,164,5);thumbnails[3204162]=new thumbnail(3204162,"137321","","P-03_thumb.jpg",130,194,5);thumbnails[3204163]=new thumbnail(3204163,"137321","","P-04_thumb.jpg",130,130,5);thumbnails[3204164]=new thumbnail(3204164,"137321","","BACCHUS-72-web_thumb.jpg",130,179,5);thumbnails[3204165]=new thumbnail(3204165,"137321","","Holding leather bum-web_thumb.jpg",130,175,5);thumbnails[3204167]=new thumbnail(3204167,"137321","","Pecs and knives-25-web_thumb.jpg",130,130,5);thumbnails[3204168]=new thumbnail(3204168,"137321","","Nude-session2-47-web_thumb.jpg",130,154,5);thumbnails[3204169]=new thumbnail(3204169,"137321","","BACCHUS-50-edit-web_thumb.jpg",130,172,5);thumbnails[3204170]=new thumbnail(3204170,"137321","","BACCHUS-55-web_thumb.jpg",130,182,5);thumbnails[3204354]=new thumbnail(3204354,"137321","","caught red handed-web_thumb.jpg",130,148,5);thumbnails[3216890]=new thumbnail(3216890,"137321","","Nude-session2-53-edit-web_thumb.jpg",130,161,5);thumbnails[3216891]=new thumbnail(3216891,"137321","","Nude-session2-52-edit-web_thumb.jpg",130,212,5);thumbnails[3216894]=new thumbnail(3216894,"137321","","Nude-session2-51-web_thumb.jpg",130,185,5);thumbnails[3216897]=new thumbnail(3216897,"137321","","BACCHUS-48-web-colour_thumb.jpg",130,130,5);thumbnails[3275793]=new thumbnail(3275793,"137321","","JohannK-for web-1_thumb..jpg",130,157,5);thumbnails[3275795]=new thumbnail(3275795,"137321","","JohannK-2nd-02-web_thumb.jpg",130,130,5);thumbnails[3275840]=new thumbnail(3275840,"137321","","JD-web_thumb.jpg",130,150,5);thumbnails[3328193]=new thumbnail(3328193,"137321","","Anthony-January-27-web_thumb.jpg",130,155,5);thumbnails[3328194]=new thumbnail(3328194,"137321","","Anthony-January-18-web_thumb.jpg",130,154,5);thumbnails[3669269]=new thumbnail(3669269,"137321","","slip_vert-30-web_thumb.jpg",130,174,5);thumbnails[3669270]=new thumbnail(3669270,"137321","","slip_bleu-01-web_thumb.jpg",130,195,5);thumbnails[5038525]=new thumbnail(5038525,"137321","","Leather_boy-October09-13-web_thumb.jpg",130,130,5);thumbnails[5038528]=new thumbnail(5038528,"137321","","Leather_boy-October09-15-web_thumb.jpg",130,130,5);thumbnails[5589919]=new thumbnail(5589919,"137321","","DJ-035-bw_1-web_thumb.jpg",130,195,5);thumbnails[5589920]=new thumbnail(5589920,"137321","","DJ-045-bw_1-web_thumb.jpg",130,203,5);thumbnails[5589921]=new thumbnail(5589921,"137321","","DJ-052-edit-Bw_1-web_thumb.JPG",130,195,5);thumbnails[5589922]=new thumbnail(5589922,"137321","","DJ-186-bw-web_thumb.jpg",130,197,5);thumbnails[5589924]=new thumbnail(5589924,"137321","","DJ-271-web_thumb.jpg",130,195,5);thumbnails[5589927]=new thumbnail(5589927,"137321","","Dillon-2nd-session-08_thumb.JPG",130,182,5);thumbnails[5589929]=new thumbnail(5589929,"137321","","Dillon-2nd-session-09_thumb.JPG",130,179,5);thumbnails[5589930]=new thumbnail(5589930,"137321","","Dillon-Oct09-026-web_1_thumb.JPG",130,184,5);thumbnails[5589932]=new thumbnail(5589932,"137321","","Dillon-Oct09-101-web_thumb.JPG",130,192,5);thumbnails[5589933]=new thumbnail(5589933,"137321","","Dillon-Oct09-117-web_thumb.JPG",130,130,5);thumbnails[5589934]=new thumbnail(5589934,"137321","","Darragh-023-edit-framed-web_thumb.jpg",130,186,5);thumbnails[5589936]=new thumbnail(5589936,"137321","","Darragh-054-edit-web_thumb.jpg",130,195,5);thumbnails[5589938]=new thumbnail(5589938,"137321","","Darragh-9695-web_thumb.jpg",130,195,5);thumbnails[5935940]=new thumbnail(5935940,"137321","","Nicholas-079_1_thumb.JPG",130,203,5);thumbnails[5935943]=new thumbnail(5935943,"137321","","Nicholas-060-web_thumb.jpg",130,87,5);thumbnails[6348841]=new thumbnail(6348841,"137321","","DJ-152-edit-web_thumb.jpg",130,194,5);thumbnails[6348843]=new thumbnail(6348843,"137321","","Kwstas-studio-061-bw-web_thumb.jpg",130,93,5);thumbnails[6348846]=new thumbnail(6348846,"137321","","Kwstas-studio-111-web_thumb.jpg",130,174,5);thumbnails[6348850]=new thumbnail(6348850,"137321","","Kwstas-studio-067_thumb.JPG",130,180,5);thumbnails[2802616]=new thumbnail(2802616,"175279","","Donegal-1-WEB1_thumb.jpg",130,130,5);thumbnails[2802617]=new thumbnail(2802617,"175279","","Le baiser-web_thumb.jpg",130,130,5);thumbnails[2802619]=new thumbnail(2802619,"175279","","Johann and Mark-halo-web_thumb.jpg",130,191,5);thumbnails[2802620]=new thumbnail(2802620,"175279","","PP & ASH S&M-18-square-web_thumb.jpg",130,130,5);thumbnails[2802628]=new thumbnail(2802628,"175279","","happy couple-web_thumb.jpg",130,108,5);thumbnails[2802653]=new thumbnail(2802653,"175279","","K&P's wedding-182-edit-b&w_thumb.jpg",130,130,5);thumbnails[2939545]=new thumbnail(2939545,"175279","","Zach&Andy-2-web_thumb.jpg",130,113,5);thumbnails[2939640]=new thumbnail(2939640,"175279","","Amoureux-web_thumb..jpg",130,179,5);thumbnails[3328328]=new thumbnail(3328328,"175279","","Love-1-web_thumb.jpg",130,156,5);thumbnails[4856966]=new thumbnail(4856966,"175279","","Manchester-Oct08-021-web1_thumb.jpg",130,185,5);var galleries=new Object();galleries[183581]=new gallery(183581,"5935937,5935930,5589917,5589916,5589911,5589910,5589905,5589902,5589898,3930820","FACES","gallery",[2802537,2802542,2802546,2802552,2802555,2802557,2802560,2802568,2802582,3022847,3207660,3207662,3207663,3279144,3279147,3279149,3279151,3279165,3279188,3328457,3328460,3328463,3328465,3930820,5589898,5589902,5589905,5589910,5589911,5589916,5589917,5935930,5935937,2939762]);galleries[137321]=new gallery(137321,"6348850,6348846,6348843,6348841,5935943,5935940,5589938,5589936,5589934,5589933","BODYSCAPES","gallery",[2802598,2802600,2802602,2802607,2802613,2939763,3204160,3204162,3204163,3204164,3204165,3204167,3204168,3204169,3204170,3204354,3216890,3216891,3216894,3216897,3275793,3275795,3275840,3328193,3328194,3669269,3669270,5038525,5038528,5589919,5589920,5589921,5589922,5589924,5589927,5589929,5589930,5589932,5589933,5589934,5589936,5589938,5935940,5935943,6348841,6348843,6348846,6348850]);galleries[175279]=new gallery(175279,"4856966,3328328,2939640,2939545,2802653,2802628,2802620,2802619,2802617,2802616","LOVESCAPES","gallery",[2802616,2802617,2802619,2802620,2802628,2802653,2939545,2939640,3328328,4856966]);var imageSets=new Object();imageSets[1]="3669269,3328457,3022847,2939762,2939545,2802619,2802617,2802607,2802600,2802598,2802560,2802557,2802537";imageSets[3]="6348850,6348846,6348843,6348841,5935943,5935940,5935937,5935930,5589938,5589936,5589934,5589933,5589932,5589930,5589929,5589927,5589924,5589922,5589921,5589920,5589919,5589917,5589916,5589911,5589910,5589905,5589902,5589898,5038528,5038525,4856966,3930820,3669270,3669269,3328465,3328463,3328460,3328457,3328328,3328194,3328193,3279188,3279165,3279151,3279149,3279147,3279144,3275840,3275795,3275793";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/asteridesign2/images";break}switch(a){case 1:b="http://www1.clikpic.com/asteridesign2/images";break}switch(a){case 2:b="http://admin.clikpic.com/asteridesign2/images";break}switch(a){case 24:b="http://tpc15/clikpic/asteridesign2/images";break}switch(a){case 4:b="http://www.clikchurch.com/asteridesign2/images";break}switch(a){case 5:b="http://www2.clikpic.com/asteridesign2/images";break}switch(a){case 22:b="http://tpc5/clikpic/asteridesign2/images";break}switch(a){case 23:b="http://tpc10/clikpic/asteridesign2/images";break}switch(a){case 25:b="http://tpc16/clikpic/asteridesign2/images";break}switch(a){case 15:b="http://www3.clikpic.com/asteridesign2/images";break}switch(a){case 18:b="http://www4.clikpic.com/asteridesign2/images";break}switch(a){case 19:b="http://www5.clikpic.com/asteridesign2/images";break}switch(a){case 31:b="http://www7.clikpic.com/asteridesign2/images";break}switch(a){case 32:b="http://admin2.clikpic.com/asteridesign2/images";break}switch(a){case 33:b="http://www8.clikpic.com/asteridesign2/images";break}switch(a){case 34:b="http://www9.clikpic.com/asteridesign2/images";break}switch(a){case 35:b="http://admin3.clikpic.com/asteridesign2/images";break}switch(a){case 37:b="http://admin4.clikpic.com/asteridesign2/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="Capture my beauty: "+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> 							"+(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+'")'})}}};