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[1775949]=new thumbnail(1775949,"119418","","Grasshopper3_thumb.jpg",130,85,18);thumbnails[1775953]=new thumbnail(1775953,"119418","","Horses_thumb.jpg",130,86,18);thumbnails[1775956]=new thumbnail(1775956,"119418","","Kingfisher_thumb.jpg",130,85,18);thumbnails[1775960]=new thumbnail(1775960,"119418","","Stag_thumb.jpg",130,104,18);thumbnails[1775961]=new thumbnail(1775961,"119418","","Swallows Feeding_thumb.jpg",130,83,18);thumbnails[2767808]=new thumbnail(2767808,"119418","","Wild Geese_thumb.jpg",130,88,18);thumbnails[3869739]=new thumbnail(3869739,"119418","","Otter_thumb.jpg",130,80,18);thumbnails[3869743]=new thumbnail(3869743,"119418","","Kingfisher_on_perch_thumb.jpg",130,214,18);thumbnails[3892058]=new thumbnail(3892058,"119418","","Cub01_thumb.jpg",130,99,18);thumbnails[3892060]=new thumbnail(3892060,"119418","","Cub02_thumb.jpg",130,108,18);thumbnails[3892709]=new thumbnail(3892709,"119418","","Rabbit_thumb.jpg",130,89,18);thumbnails[4791408]=new thumbnail(4791408,"119418","","Mr_Squirrel_thumb.jpg",130,89,18);thumbnails[4791410]=new thumbnail(4791410,"119418"," ","Squirell_thumb.jpg",130,91,18);thumbnails[4791751]=new thumbnail(4791751,"119418","","Robin_1_thumb.jpg",130,97,18);thumbnails[5765974]=new thumbnail(5765974,"119418","","Peregrine_thumb.jpg",130,96,18);thumbnails[6289534]=new thumbnail(6289534,"119418","","Bugs_thumb.jpg",130,98,18);thumbnails[1962361]=new thumbnail(1962361,"121677","","24_thumb.jpg",130,86,18);thumbnails[1962374]=new thumbnail(1962374,"121677","","35_thumb.jpg",130,86,18);thumbnails[2065576]=new thumbnail(2065576,"121677","","Dolmen_thumb.jpg",130,86,18);thumbnails[3869675]=new thumbnail(3869675,"121677","","Boat_thumb.jpg",130,211,18);thumbnails[3869773]=new thumbnail(3869773,"121677","","Kitchen1_thumb.jpg",130,80,18);thumbnails[3896152]=new thumbnail(3896152,"121677","","Eye_thumb.jpg",130,173,18);thumbnails[5730877]=new thumbnail(5730877,"121677","","2009_Winter_Landscape_001_2_thumb.jpg",130,86,18);thumbnails[5730887]=new thumbnail(5730887,"121677","","2009_Winter_Landscape_003_thumb.jpg",130,86,18);thumbnails[3869684]=new thumbnail(3869684,"235217","","Eoin_thumb.jpg",130,79,18);thumbnails[3869770]=new thumbnail(3869770,"235217","","Sparks_thumb.jpg",130,78,18);thumbnails[3869778]=new thumbnail(3869778,"235217","","Eoin1_thumb.jpg",130,86,18);thumbnails[3892056]=new thumbnail(3892056,"235217","","Beach_Stroller_thumb.jpg",130,206,18);thumbnails[3892113]=new thumbnail(3892113,"235217","","Dark_Man_thumb.jpg",130,214,18);thumbnails[3896149]=new thumbnail(3896149,"235217","","Model3_thumb.jpg",130,194,18);thumbnails[5770908]=new thumbnail(5770908,"235217","","Eoin__Cody_thumb.jpg",130,89,18);thumbnails[5770912]=new thumbnail(5770912,"235217","","Laura_thumb.jpg",130,177,18);thumbnails[5914221]=new thumbnail(5914221,"235217","","Only_Kidding_thumb.jpg",130,152,18);thumbnails[2001507]=new thumbnail(2001507,"134262","","Sunset_thumb.jpg",130,194,18);thumbnails[2854217]=new thumbnail(2854217,"134262","","Flower5_thumb.jpg",130,195,18);thumbnails[3869748]=new thumbnail(3869748,"134262","","Snow_Drop_thumb.jpg",130,104,18);thumbnails[3869769]=new thumbnail(3869769,"134262","","Kitchen_table_thumb.jpg",130,217,18);thumbnails[3892118]=new thumbnail(3892118,"134262","","Divers_thumb.jpg",130,211,18);thumbnails[5770909]=new thumbnail(5770909,"134262","","Gerry_thumb.jpg",130,164,18);thumbnails[5770915]=new thumbnail(5770915,"134262","","Tree_designs_thumb.jpg",130,87,18);thumbnails[5869946]=new thumbnail(5869946,"134262","","Abandoned_boat_thumb.jpg",130,91,18);thumbnails[5869953]=new thumbnail(5869953,"134262","","Ivy_thumb.jpg",130,195,18);thumbnails[5869959]=new thumbnail(5869959,"134262","","Sprockets_thumb.jpg",130,100,18);thumbnails[4309279]=new thumbnail(4309279,"254015","","Patrick_Morrissey_thumb.jpg",130,93,18);thumbnails[4791404]=new thumbnail(4791404,"254015","","Racer1_thumb.jpg",130,106,18);thumbnails[5786231]=new thumbnail(5786231,"254015","","Great_Catch_thumb.jpg",130,243,18);thumbnails[3870555]=new thumbnail(3870555,"235241","","Piping_thumb.jpg",130,184,18);thumbnails[5730835]=new thumbnail(5730835,"235241","","Beef_thumb.jpg",130,160,18);thumbnails[5730839]=new thumbnail(5730839,"235241","","Couple_thumb.jpg",130,104,18);thumbnails[5730840]=new thumbnail(5730840,"235241","","Door_handle_thumb.jpg",130,92,18);thumbnails[5730843]=new thumbnail(5730843,"235241","","Friar_thumb.jpg",130,184,18);thumbnails[5730847]=new thumbnail(5730847,"235241","","Hook_Lighthouse_Sepia_thumb.jpg",130,89,18);thumbnails[5730855]=new thumbnail(5730855,"235241","","Me__Her_thumb.jpg",130,103,18);thumbnails[5730856]=new thumbnail(5730856,"235241","","Naked_thumb.jpg",130,181,18);thumbnails[5730860]=new thumbnail(5730860,"235241","","No_6_bus_thumb.jpg",130,228,18);thumbnails[5730862]=new thumbnail(5730862,"235241","","Scoreboard_thumb.jpg",130,89,18);thumbnails[5730864]=new thumbnail(5730864,"235241","","Sean_thumb.jpg",130,195,18);thumbnails[5730866]=new thumbnail(5730866,"235241","","Splash_thumb.jpg",130,86,18);thumbnails[5730869]=new thumbnail(5730869,"235241","","Stairs_thumb.jpg",130,185,18);thumbnails[5730870]=new thumbnail(5730870,"235241","","Train_thumb.jpg",130,190,18);thumbnails[5730871]=new thumbnail(5730871,"235241","","Westgate_thumb.jpg",130,183,18);thumbnails[3321727]=new thumbnail(3321727,"235214","","Bridge_thumb.jpg",130,92,18);thumbnails[3869834]=new thumbnail(3869834,"235214","","Lake_thumb.jpg",130,80,18);thumbnails[3892116]=new thumbnail(3892116,"235214","","Deer2_thumb.jpg",130,204,18);thumbnails[3892119]=new thumbnail(3892119,"235214","","Kilcash_Castle_thumb.jpg",130,210,18);thumbnails[3892711]=new thumbnail(3892711,"235214","","Seascape_thumb.jpg",130,86,18);thumbnails[3893028]=new thumbnail(3893028,"235214","","Ruin_thumb.jpg",130,86,18);thumbnails[5730889]=new thumbnail(5730889,"235214","","2009_Winter_Landscape_004_thumb.jpg",130,86,18);thumbnails[5730891]=new thumbnail(5730891,"235214","","2009_Winter_Landscape_002_thumb.jpg",130,86,18);thumbnails[5770914]=new thumbnail(5770914,"235214","","River_thumb.jpg",130,86,18);thumbnails[5869947]=new thumbnail(5869947,"235214","","Boat_41452C9A-1EC9-D45B-1C13FA29CEC8E9D5_thumb.jpg",130,214,18);thumbnails[5869951]=new thumbnail(5869951,"235214","","Bridge_414584AD-1EC9-D45B-1CCE0418608D287A_thumb.jpg",130,87,18);thumbnails[5869958]=new thumbnail(5869958,"235214","","Seascape_41469E3B-1EC9-D45B-1CBE7117702FD6AD_thumb.jpg",130,86,18);thumbnails[5913737]=new thumbnail(5913737,"235214","","Rainbow_thumb.jpg",130,88,18);var galleries=new Object();galleries[119418]=new gallery(119418,"6289534,5765974,4791751,4791410,4791408,3892709,3892060,3892058,3869743,3869739","Wildlife","gallery",[1775949,1775953,1775956,1775960,1775961,2767808,3869739,3869743,3892058,3892060,3892709,4791408,4791410,4791751,5765974,6289534]);galleries[121677]=new gallery(121677,"2065576","Places","gallery",[1962361,1962374,2065576,3869675,3869773,3896152,5730877,5730887]);galleries[235217]=new gallery(235217,"5914221,5770912,5770908,3896149,3892113,3892056,3869778,3869770,3869684","People","gallery",[3869684,3869770,3869778,3892056,3892113,3896149,5770908,5770912,5914221]);galleries[134262]=new gallery(134262,"5869959,5869953,5869946,5770915,5770909,3892118,3869769,3869748,2854217,2001507","General","gallery",[2001507,2854217,3869748,3869769,3892118,5770909,5770915,5869946,5869953,5869959]);galleries[254015]=new gallery(254015,"5786231,4791404,4309279","Sport","gallery",[4309279,4791404,5786231]);galleries[235241]=new gallery(235241,"5730871,5730870,5730869,5730866,5730864,5730862,5730860,5730856,5730855,5730847","Black & White","gallery",[3870555,5730835,5730839,5730840,5730843,5730847,5730855,5730856,5730860,5730862,5730864,5730866,5730869,5730870,5730871]);galleries[235214]=new gallery(235214,"5913737,5869958,5869951,5869947,5770914,5730891,5730889,3893028,3892711,3892119","Scapes","gallery",[3321727,3869834,3892116,3892119,3892711,3893028,5730889,5730891,5770914,5869947,5869951,5869958,5913737]);var imageSets=new Object();imageSets[1]="4791751,4791410,4791408,4791404,4309279,3896152,3896149,3893028,3892711,3892709,3892119,3892116,3892060,3892058,3892056,3870555,3869834,3869773,3869770,3869769,3869748,3869743,3869739,3869684,3869675,3321727,2854217,2767808,2065576,2001507,1962361,1775960,1775956,1775953,1775949";imageSets[2]="2065576";imageSets[3]="3896152,3869773,2065576,1962374,1962361";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/bolgerm/images";break}switch(a){case 1:b="http://www1.clikpic.com/bolgerm/images";break}switch(a){case 2:b="http://admin.clikpic.com/bolgerm/images";break}switch(a){case 24:b="http://tpc15/clikpic/bolgerm/images";break}switch(a){case 4:b="http://www.clikchurch.com/bolgerm/images";break}switch(a){case 5:b="http://www2.clikpic.com/bolgerm/images";break}switch(a){case 22:b="http://tpc5/clikpic/bolgerm/images";break}switch(a){case 23:b="http://tpc10/clikpic/bolgerm/images";break}switch(a){case 25:b="http://tpc16/clikpic/bolgerm/images";break}switch(a){case 15:b="http://www3.clikpic.com/bolgerm/images";break}switch(a){case 18:b="http://www4.clikpic.com/bolgerm/images";break}switch(a){case 19:b="http://www5.clikpic.com/bolgerm/images";break}switch(a){case 31:b="http://www7.clikpic.com/bolgerm/images";break}switch(a){case 32:b="http://admin2.clikpic.com/bolgerm/images";break}switch(a){case 33:b="http://www8.clikpic.com/bolgerm/images";break}switch(a){case 34:b="http://www9.clikpic.com/bolgerm/images";break}switch(a){case 35:b="http://admin3.clikpic.com/bolgerm/images";break}switch(a){case 37:b="http://admin4.clikpic.com/bolgerm/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=photos[f].caption+": bolgerphoto.com";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> </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> 				&euro;"+(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="mb2004@eircom.net">';b=b+'<input type="hidden" name="currency_code" value="EUR">';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="mb2004@eircom.net">';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<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+'")'})}}};