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[810864]=new thumbnail(810864,"","","vieworder_thumb.jpg",130,43,18);thumbnails[1377415]=new thumbnail(1377415,"4875","","xxxx_thumb.jpg",104,130,18);thumbnails[1379516]=new thumbnail(1379516,"4875","","_DSF0223m_copy_thumb.jpg",104,130,18);thumbnails[1754526]=new thumbnail(1754526,"4875","","184_thumb.jpg",130,104,18);thumbnails[2288296]=new thumbnail(2288296,"4875","","_DSF1158 copy_thumb.jpg",130,104,18);thumbnails[2356010]=new thumbnail(2356010,"4875","","DSCF1424-copy_thumb.jpg",91,130,18);thumbnails[2369224]=new thumbnail(2369224,"4875","","_DSF1140_thumb.jpg",130,98,18);thumbnails[2369240]=new thumbnail(2369240,"4875","","DSCF0248_thumb.jpg",130,97,18);thumbnails[2392274]=new thumbnail(2392274,"4875","","1_thumb.jpg",104,130,18);thumbnails[2490510]=new thumbnail(2490510,"4875","","11_2_thumb.jpg",104,130,18);thumbnails[2656151]=new thumbnail(2656151,"4875","","0154 copy_thumb.jpg",104,130,18);thumbnails[2656153]=new thumbnail(2656153,"4875","","122 copy_thumb.jpg",130,104,18);thumbnails[3505564]=new thumbnail(3505564,"4875","","i_thumb.jpg",93,130,18);thumbnails[3576821]=new thumbnail(3576821,"4875","","0169_copy-2_thumb.jpg",98,130,18);thumbnails[3576824]=new thumbnail(3576824,"4875","","0179_copy-2_thumb.jpg",97,130,18);thumbnails[3576827]=new thumbnail(3576827,"4875","","274_copy_2-2_thumb.jpg",130,87,18);thumbnails[3576830]=new thumbnail(3576830,"4875","","317_copy_2-2_thumb.jpg",87,130,18);thumbnails[3576832]=new thumbnail(3576832,"4875","","421_copy-2_thumb.jpg",87,130,18);thumbnails[3681872]=new thumbnail(3681872,"4875","","058_copy_thumb.jpg",87,130,18);thumbnails[3681876]=new thumbnail(3681876,"4875","","351_copy_thumb.jpg",130,87,18);thumbnails[3681877]=new thumbnail(3681877,"4875","","378_copy_thumb.jpg",87,130,18);thumbnails[3682138]=new thumbnail(3682138,"4875","","DSCF_thumb.jpg",130,87,18);thumbnails[3697893]=new thumbnail(3697893,"4875","","01s_thumb.jpg",87,130,18);thumbnails[3841096]=new thumbnail(3841096,"4875","","DSCF4797-2_copy_thumb.jpg",130,87,18);thumbnails[3841151]=new thumbnail(3841151,"4875","","DSCF4908-2_copy_thumb.jpg",130,87,18);thumbnails[4226881]=new thumbnail(4226881,"4875","","0166_copy_thumb.jpg",87,130,18);thumbnails[4226886]=new thumbnail(4226886,"4875","","0188_copy_thumb.jpg",87,130,18);thumbnails[4226911]=new thumbnail(4226911,"4875","","0302_copy_thumb.jpg",87,130,18);thumbnails[2632806]=new thumbnail(2632806,"4875","","WF1_thumb.jpg",87,130,18);thumbnails[2856310]=new thumbnail(2856310,"4875","","m_thumb.jpg",104,130,18);thumbnails[3681874]=new thumbnail(3681874,"4875","","246_copy_thumb.jpg",130,87,18);thumbnails[2856321]=new thumbnail(2856321,"4875","","22_thumb.jpg",104,130,18);thumbnails[2632805]=new thumbnail(2632805,"4875","","11_thumb.jpg",130,87,18);thumbnails[2856315]=new thumbnail(2856315,"4875","","rh_thumb.jpg",130,91,18);thumbnails[2591105]=new thumbnail(2591105,"4875","","7_thumb.jpg",104,130,18);thumbnails[2856326]=new thumbnail(2856326,"4875","","Rhinefield_thumb.jpg",130,91,18);thumbnails[2711130]=new thumbnail(2711130,"4875","","012_thumb.jpg",87,130,18);thumbnails[3540597]=new thumbnail(3540597,"4875","","0157_copy_thumb.jpg",130,104,18);thumbnails[1377410]=new thumbnail(1377410,"4875","","xxx_thumb.jpg",104,130,18);thumbnails[2523183]=new thumbnail(2523183,"4875","","31_thumb.jpg",130,104,18);thumbnails[49641]=new thumbnail(49641,"4873","","045_thumb.jpg",130,112,18);thumbnails[61582]=new thumbnail(61582,"4873","","192m_thumb.jpg",130,93,18);thumbnails[694338]=new thumbnail(694338,"4873","","DSCF0045 copy_thumb.JPG",87,130,18);thumbnails[702828]=new thumbnail(702828,"4873","","ws2_thumb.jpg",87,130,18);thumbnails[917039]=new thumbnail(917039,"4873","Highcliffe Castle wedding","120 _thumb.jpg",104,130,18);thumbnails[970475]=new thumbnail(970475,"4873","","129_thumb.jpg",130,93,18);thumbnails[970477]=new thumbnail(970477,"4873","","140_thumb.jpg",130,93,18);thumbnails[970479]=new thumbnail(970479,"4873","","179_thumb.jpg",93,130,18);thumbnails[1754534]=new thumbnail(1754534,"4873","","155_1_thumb.jpg",130,104,18);thumbnails[1754538]=new thumbnail(1754538,"4873","","159_thumb.jpg",104,130,18);thumbnails[1764788]=new thumbnail(1764788,"4873","","152 copy_thumb.jpg",104,130,18);thumbnails[1826320]=new thumbnail(1826320,"4873","","010_thumb.jpg",104,130,18);thumbnails[2369234]=new thumbnail(2369234,"4873","","DSCF0213_thumb.jpg",130,98,18);thumbnails[3576820]=new thumbnail(3576820,"4873","","0008_copy-2_thumb.jpg",130,98,18);thumbnails[3576868]=new thumbnail(3576868,"4873","","554_copy_2_thumb.jpg",130,87,18);thumbnails[3681881]=new thumbnail(3681881,"4873","","421_copy_thumb.jpg",87,130,18);thumbnails[3841200]=new thumbnail(3841200,"4873","","DSCF5057_copy_copy_2_thumb.jpg",87,130,18);thumbnails[3841270]=new thumbnail(3841270,"4873","","DSCF5089_copy_2_thumb.jpg",87,130,18);thumbnails[4226889]=new thumbnail(4226889,"4873","","0182_copy_thumb.jpg",87,130,18);thumbnails[4226906]=new thumbnail(4226906,"4873","","0217_copy_thumb.jpg",87,130,18);thumbnails[4226914]=new thumbnail(4226914,"4873","","0308_copy_thumb.jpg",130,87,18);thumbnails[4427961]=new thumbnail(4427961,"4873","","0217_copy_1_thumb.jpg",87,130,18);thumbnails[4427964]=new thumbnail(4427964,"4873","","0243_copy_thumb.jpg",87,130,18);thumbnails[47656]=new thumbnail(47656,"4873","Bournemouth summer Wedding","DSCF3755_thumb.jpg",99,130,18);thumbnails[2651625]=new thumbnail(2651625,"4873","","DSCF0921 copy_thumb.jpg",104,130,18);thumbnails[1764791]=new thumbnail(1764791,"4873","","167_thumb.jpg",104,130,18);thumbnails[47670]=new thumbnail(47670,"4896","","DSCF3762_thumb.jpg",130,96,18);thumbnails[47706]=new thumbnail(47706,"4896","","Untitled-1_thumb.jpg",130,176,18);thumbnails[170409]=new thumbnail(170409,"4896","","142_thumb.jpg",130,94,18);thumbnails[170413]=new thumbnail(170413,"4896","","155_thumb.jpg",130,186,18);thumbnails[694346]=new thumbnail(694346,"4896","","DSCF0085 copy_thumb.JPG",130,87,18);thumbnails[972765]=new thumbnail(972765,"4896","","DSCF0051_thumb.jpg",130,93,18);thumbnails[972766]=new thumbnail(972766,"4896","","DSCF0052_thumb.jpg",93,130,18);thumbnails[1764812]=new thumbnail(1764812,"4896","","PORTRAIT_thumb.jpg",104,130,18);thumbnails[1880511]=new thumbnail(1880511,"4896","","0001 copy_thumb.jpg",93,130,18);thumbnails[1880518]=new thumbnail(1880518,"4896","","0005 copy_thumb.jpg",93,130,18);thumbnails[1880519]=new thumbnail(1880519,"4896","","DSCF0002 copy_thumb.jpg",93,130,18);thumbnails[1880520]=new thumbnail(1880520,"4896","","DSCF0029_thumb.jpg",93,130,18);thumbnails[1880527]=new thumbnail(1880527,"4896","","DSCF0216_thumb.jpg",93,130,18);thumbnails[1898993]=new thumbnail(1898993,"4896","","DSCF0111_thumb.jpg",130,87,18);thumbnails[1943401]=new thumbnail(1943401,"4896","","105_thumb.jpg",93,130,18);thumbnails[1943451]=new thumbnail(1943451,"4896","","DSCF0160_thumb.jpg",93,130,18);thumbnails[2002757]=new thumbnail(2002757,"4896","","0073_thumb.JPG",93,130,18);thumbnails[2656155]=new thumbnail(2656155,"4896","","0181 copy_thumb.jpg",104,130,18);thumbnails[2919840]=new thumbnail(2919840,"4896","","0085_thumb.jpg",104,130,18);thumbnails[3576834]=new thumbnail(3576834,"4896","","589_copy_2-2_thumb.jpg",87,130,18);thumbnails[47752]=new thumbnail(47752,"4928","","DSCF3906_thumb.jpg",130,159,18);thumbnails[47753]=new thumbnail(47753,"4928","","DSCF3920_thumb.jpg",130,150,18);thumbnails[47754]=new thumbnail(47754,"4928","","DSCF3939_thumb.jpg",130,101,18);thumbnails[47756]=new thumbnail(47756,"4928","","DSCF3944_thumb.jpg",130,157,18);thumbnails[47757]=new thumbnail(47757,"4928","","DSCF3962_thumb.jpg",130,81,18);thumbnails[50629]=new thumbnail(50629,"4928","","ws1_thumb.jpg",130,182,18);thumbnails[170441]=new thumbnail(170441,"4929","Clavell tower","clavell tower_thumb.jpg",130,98,18);thumbnails[170450]=new thumbnail(170450,"4929","Kimmeridge","KIMMERIDGE_thumb.jpg",130,104,18);thumbnails[170454]=new thumbnail(170454,"4929","Cliff top sign","DSCF2860_thumb.jpg",130,185,18);thumbnails[170458]=new thumbnail(170458,"4929","Fossil","kim fossil_thumb.jpg",130,104,18);thumbnails[170463]=new thumbnail(170463,"4929","Jurrasic coast","kimmeridge cliff decay_thumb.jpg",130,98,18);thumbnails[170467]=new thumbnail(170467,"4929","Rock forms","rocks_thumb.jpg",130,98,18);thumbnails[170472]=new thumbnail(170472,"4929","Trees on a frosty morning","trees_thumb.jpg",130,98,18);thumbnails[2668541]=new thumbnail(2668541,"4929","","IMG_0280 copy_thumb.jpg",130,91,18);thumbnails[2668558]=new thumbnail(2668558,"4929","","IMG_0281_thumb.jpg",104,130,18);thumbnails[2668560]=new thumbnail(2668560,"4929","","011_thumb.jpg",130,104,18);thumbnails[2668561]=new thumbnail(2668561,"4929","","IMG_0325 copy_thumb.jpg",130,91,18);thumbnails[3581172]=new thumbnail(3581172,"4929","","tower_thumb.jpg",102,130,18);var galleries=new Object();galleries[4875]=new gallery(4875,"4226911,4226886,4226881,3681877,3576830","wedding images","gallery",[1377415,1379516,1754526,2288296,2356010,2369224,2369240,2392274,2490510,2656151,2656153,3505564,3576821,3576824,3576827,3576830,3576832,3681872,3681876,3681877,3682138,3697893,3841096,3841151,4226881,4226886,4226911,2632806,2856310,3681874,2856321,2632805,2856315,2591105,2856326,2711130,3540597,1377410,2523183]);galleries[4873]=new gallery(4873,"4427964,3681881,3576820,702828,61582,47656","Wedding images","gallery",[49641,61582,694338,702828,917039,970475,970477,970479,1754534,1754538,1764788,1826320,2369234,3576820,3576868,3681881,3841200,3841270,4226889,4226906,4226914,4427961,4427964,47656,2651625,1764791]);galleries[4896]=new gallery(4896,"3576834","Portraits","gallery",[47670,47706,170409,170413,694346,972765,972766,1764812,1880511,1880518,1880519,1880520,1880527,1898993,1943401,1943451,2002757,2656155,2919840,3576834]);galleries[4928]=new gallery(4928,"47756,47752","Red arrows Bournemouth","gallery",[47752,47753,47754,47756,47757,50629]);galleries[4929]=new gallery(4929,"2668561,170454","Dorset","gallery",[170441,170450,170454,170458,170463,170467,170472,2668541,2668558,2668560,2668561,3581172]);var imageSets=new Object();imageSets[1]="3681877,3681874,3576868,3576830,3576827,3576821,3540597,2856321,2856315,2856310,2711130,2632806,2632805,2591105,2523183,2392274,1764791,1379516,47656";imageSets[2]="4427964,4226911,4226886,4226881,3681881,3681877,3576834,3576830,3576820,2668561,702828,170454,61582,47756,47752,47656";imageSets[3]="4427964,4427961,4226914,4226911,4226906,4226889,4226886,4226881,3841270,3841200,3841151,3841096,3697893,3682138,3681881,3681877,3681876,3681874,3681872,3581172,3576868,3576834,3576832,3576830,3576827,3576824,3576821,3576820,3540597,3505564,2919840,2856326,2856321,2856315,2856310,2711130,2668561,2668560,2668558,2668541,2656155,2656153,2656151,2651625,2632806,2632805,2591105,2523183,2490510,2392274";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/thephotoman20/images";break}switch(a){case 1:b="http://www1.clikpic.com/thephotoman20/images";break}switch(a){case 2:b="http://admin.clikpic.com/thephotoman20/images";break}switch(a){case 4:b="http://www.clikchurch.com/thephotoman20/images";break}switch(a){case 5:b="http://www2.clikpic.com/thephotoman20/images";break}switch(a){case 15:b="http://www3.clikpic.com/thephotoman20/images";break}switch(a){case 21:b="http://www6.clikpic.com/thephotoman20/images";break}switch(a){case 18:b="http://www4.clikpic.com/thephotoman20/images";break}switch(a){case 19:b="http://www5.clikpic.com/thephotoman20/images";break}switch(a){case 22:b="http://tpc5/clikpic/thephotoman20/images";break}switch(a){case 23:b="http://tpc10/clikpic/thephotoman20/images";break}switch(a){case 24:b="http://tpc15/clikpic/thephotoman20/images";break}switch(a){case 25:b="http://tpc16/clikpic/thephotoman20/images";break}switch(a){case 31:b="http://www7.clikpic.com/thephotoman20/images";break}switch(a){case 32:b="http://admin2.clikpic.com/thephotoman20/images";break}switch(a){case 33:b="http://www8.clikpic.com/thephotoman20/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=" Wedding Photographers in Bournemouth";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].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+'")'})}}};