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[2013376]=new thumbnail(2013376,"122153","","IMG_4012_thumb.jpg",130,93,1);thumbnails[2816077]=new thumbnail(2816077,"122543","","JC0P2833 copy_thumb.jpg",130,93,1);thumbnails[2968280]=new thumbnail(2968280,"122156","","291D0405 copy5_thumb.jpg",130,93,1);thumbnails[2013519]=new thumbnail(2013519,"122153","","IMG_4086b1_thumb.jpg",130,93,1);thumbnails[2046293]=new thumbnail(2046293,"122156","","339_thumb.jpg",130,93,1);thumbnails[2962070]=new thumbnail(2962070,"122543","","67574_thumb.jpg",130,93,1);thumbnails[2015207]=new thumbnail(2015207,"122153","","Lornafamily_thumb.jpg",130,93,1);thumbnails[2816058]=new thumbnail(2816058,"122543","","7F7B6783_thumb.jpg",130,93,1);thumbnails[2968284]=new thumbnail(2968284,"122156","","044_Wedding2_thumb.jpg",130,93,1);thumbnails[2012882]=new thumbnail(2012882,"122153","","Web_3877 b_thumb.jpg",130,93,1);thumbnails[2046817]=new thumbnail(2046817,"122156","","163030_5_0952_thumb.jpg",130,93,1);thumbnails[2816288]=new thumbnail(2816288,"122543","","SCRUFFY1031_thumb.jpg",130,93,1);thumbnails[2013379]=new thumbnail(2013379,"122153","","IMG_4040_thumb.jpg",130,93,1);thumbnails[2046816]=new thumbnail(2046816,"122156","","A3490_thumb.jpg",130,93,1);thumbnails[2127208]=new thumbnail(2127208,"122543","","_-5 copy2_thumb.jpg",130,93,1);thumbnails[2013393]=new thumbnail(2013393,"122153","","IMG_3763 copy 2_thumb.jpg",130,182,1);thumbnails[2046815]=new thumbnail(2046815,"122156","","A3396_thumb.jpg",130,182,1);thumbnails[2816287]=new thumbnail(2816287,"122543","","4U1F0124 copy_thumb.jpg",130,182,1);thumbnails[2013389]=new thumbnail(2013389,"122153","","IMG_3691 copy_thumb.jpg",130,182,1);thumbnails[2046288]=new thumbnail(2046288,"122156","","291D0228 copy 2_thumb.jpg",130,182,1);thumbnails[2968289]=new thumbnail(2968289,"122543","","Angie_thumb.jpg",130,182,1);thumbnails[2015191]=new thumbnail(2015191,"122153","","A4phebe copy_thumb.jpg",130,182,1);thumbnails[2046814]=new thumbnail(2046814,"122156","","291D2134 copy 2_thumb.jpg",130,182,1);thumbnails[3384763]=new thumbnail(3384763,"122543","","7F7B7885 copy 5_thumb.jpg",130,182,1);thumbnails[2013394]=new thumbnail(2013394,"122153","","IMG_3813 copy_thumb.jpg",130,182,1);thumbnails[2046840]=new thumbnail(2046840,"122156","","IMG_4671 copy 2_thumb.jpg",130,182,1);thumbnails[3392074]=new thumbnail(3392074,"122543","","IMG_7631 copy_thumb.jpg",130,182,1);thumbnails[2015189]=new thumbnail(2015189,"122153","","JC0P1632_thumb.jpg",130,182,1);thumbnails[2968683]=new thumbnail(2968683,"122156","","IMG_6103 copy_thumb.jpg",130,182,1);thumbnails[3392076]=new thumbnail(3392076,"122543","","DSCN2045_thumb.jpg",130,182,1);thumbnails[2013396]=new thumbnail(2013396,"122153","","IMG_3688B copy_thumb.jpg",130,93,1);thumbnails[2047046]=new thumbnail(2047046,"122156","","285 copy_thumb.jpg",130,93,1);thumbnails[3392222]=new thumbnail(3392222,"122543","","IMG_7618 copy 4_thumb.jpg",130,93,1);thumbnails[2013399]=new thumbnail(2013399,"122153","","IMG_3694 copy_thumb.jpg",130,93,1);thumbnails[2046290]=new thumbnail(2046290,"122156","","291D0370 copy_thumb.jpg",130,93,1);thumbnails[1967238]=new thumbnail(1967238,"122156","","Bedford_wedding21_thumb.jpg",130,93,1);thumbnails[2968294]=new thumbnail(2968294,"122153","","7F7B6915 copy3_thumb.jpg",130,93,1);thumbnails[2013673]=new thumbnail(2013673,"122153","","IMG_0339b copy_thumb.jpg",130,93,1);thumbnails[2968344]=new thumbnail(2968344,"122153","","B&W Boys_thumb.jpg",130,93,1);thumbnails[2968442]=new thumbnail(2968442,"122153","","7F7B6913_B&W_thumb.jpg",130,93,1);thumbnails[2013400]=new thumbnail(2013400,"122153","","IMG_3803 copy_thumb.jpg",130,93,1);thumbnails[2013382]=new thumbnail(2013382,"122153","","IMG_3632 copy_thumb.jpg",130,182,1);thumbnails[1823692]=new thumbnail(1823692,"119254","","Jetski_3073b3_thumb.jpg",130,93,1);thumbnails[1823694]=new thumbnail(1823694,"119254","","Jetski_3859b2_thumb.jpg",130,93,1);thumbnails[2127212]=new thumbnail(2127212,"119254","","Jetski_JC0P3757_thumb.jpg",130,93,1);thumbnails[2127774]=new thumbnail(2127774,"119254","","Jetski_J0P3673_thumb.jpg",130,93,1);thumbnails[2127213]=new thumbnail(2127213,"119254","","Jetski_JC0P3759_thumb.jpg",130,93,1);thumbnails[2127216]=new thumbnail(2127216,"119254","","Pony Club_7F7B5408_thumb.jpg",130,182,1);thumbnails[2127218]=new thumbnail(2127218,"119254","","Pony Club_7F7B5482_thumb.jpg",130,182,1);thumbnails[2127229]=new thumbnail(2127229,"119254","","Pony Club_7F7B5558_thumb.jpg",130,182,1);thumbnails[2127217]=new thumbnail(2127217,"119254","","Pony Club_7F7B5408B_thumb.jpg",130,182,1);thumbnails[2127215]=new thumbnail(2127215,"119254","","Pony Club_7F7B5507_thumb.jpg",130,182,1);thumbnails[1790171]=new thumbnail(1790171,"119254","","web3143_thumb.jpg",130,182,1);thumbnails[1790172]=new thumbnail(1790172,"119254","","web32292_thumb.jpg",130,182,1);thumbnails[1790213]=new thumbnail(1790213,"119254","","web3279_thumb.jpg",130,182,1);thumbnails[1817821]=new thumbnail(1817821,"119254","","web32034_thumb.jpg",130,93,1);var galleries=new Object();galleries[122153]=new gallery(122153,"2968442,2968344,2968294,2015207,2015191,2015189,2013673,2013519,2013400,2013399","Lifestyle","gallery",[2013376,2013519,2015207,2012882,2013379,2013393,2013389,2015191,2013394,2015189,2013396,2013399,2968294,2013673,2968344,2968442,2013400,2013382]);galleries[122543]=new gallery(122543,"2127208","Pets","gallery",[2816077,2962070,2816058,2816288,2127208,2816287,2968289,3384763,3392074,3392076,3392222]);galleries[122156]=new gallery(122156,"2968683,2968284,2968280,2047046,2046840,2046817,2046816,2046815,2046814,2046293","Weddings","gallery",[2968280,2046293,2968284,2046817,2046816,2046815,2046288,2046814,2046840,2968683,2047046,2046290,1967238]);galleries[119254]=new gallery(119254,"1823694","Events","gallery",[1823692,1823694,2127212,2127774,2127213,2127216,2127218,2127229,2127217,2127215,1790171,1790172,1790213,1817821]);var imageSets=new Object();imageSets[1]="2127208,2012882";imageSets[2]="2127208,1823694";imageSets[3]="3392222,3392076,3392074,3384763,2968683,2968442,2968344,2968294,2968289,2968284,2968280,2962070,2816288,2816287,2816077,2816058,2127774,2127229,2127218,2127217,2127216,2127215,2127213,2127212,2127208,2047046,2046840,2046817,2046816,2046815,2046814,2046293,2046290,2046288,2015207,2015191,2015189,2013673,2013519,2013400,2013399,2013396,2013394,2013393,2013389,2013382,2013379,2013376,2012882,1967238";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/dimages/images";break}switch(a){case 1:b="http://www1.clikpic.com/dimages/images";break}switch(a){case 2:b="http://admin.clikpic.com/dimages/images";break}switch(a){case 4:b="http://www.clikchurch.com/dimages/images";break}switch(a){case 5:b="http://www2.clikpic.com/dimages/images";break}switch(a){case 15:b="http://www3.clikpic.com/dimages/images";break}switch(a){case 21:b="http://www6.clikpic.com/dimages/images";break}switch(a){case 18:b="http://www4.clikpic.com/dimages/images";break}switch(a){case 19:b="http://www5.clikpic.com/dimages/images";break}switch(a){case 22:b="http://tpc5/clikpic/dimages/images";break}switch(a){case 23:b="http://tpc10/clikpic/dimages/images";break}switch(a){case 24:b="http://tpc15/clikpic/dimages/images";break}switch(a){case 25:b="http://tpc16/clikpic/dimages/images";break}switch(a){case 31:b="http://www7.clikpic.com/dimages/images";break}switch(a){case 32:b="http://admin2.clikpic.com/dimages/images";break}switch(a){case 33:b="http://www8.clikpic.com/dimages/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="Diana Holmes 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].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+"</p>";var e=c.purchase_instruction;var d=c.item_price;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+'")'})}}};