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[1051498]=new thumbnail(1051498,"","2006 Irish Cup Final","a2_thumb.jpg",130,103,15);thumbnails[1051500]=new thumbnail(1051500,"","2006 Irish Cup Final","g9_thumb.JPG",130,132,15);thumbnails[1051502]=new thumbnail(1051502,"","Drogheda Fans at the 2007 Setanta Cup Final","a65_thumb.jpg",130,170,15);thumbnails[1031240]=new thumbnail(1031240,"76955","In a rush","b31 copy copy_thumb.jpg",130,86,15);thumbnails[1743354]=new thumbnail(1743354,"76955","","cpwa_thumb.JPG",130,215,15);thumbnails[1743360]=new thumbnail(1743360,"76955","Bridal Party","cpwb_thumb.jpg",130,174,15);thumbnails[1743363]=new thumbnail(1743363,"76955","Making Sure","cpwc_thumb.JPG",130,93,15);thumbnails[1743364]=new thumbnail(1743364,"76955","How cool are we!","cpwd_thumb.jpg",130,196,15);thumbnails[1743381]=new thumbnail(1743381,"76955","Here comes the Bride","cpwe_thumb.JPG",130,101,15);thumbnails[1743394]=new thumbnail(1743394,"76955","Signed and sealed","cpwf_thumb.jpg",130,88,15);thumbnails[1743397]=new thumbnail(1743397,"76955","Mother of the Bride","cpwg_thumb.JPG",130,105,15);thumbnails[1743430]=new thumbnail(1743430,"76955","Special Guests","cpwh_thumb.JPG",130,96,15);thumbnails[1743449]=new thumbnail(1743449,"76955","Father of the Bride","cpwi_thumb.jpg",130,209,15);thumbnails[1743471]=new thumbnail(1743471,"76955","","cpwj_thumb.JPG",130,121,15);thumbnails[1743482]=new thumbnail(1743482,"76955","","cpwk_thumb.JPG",130,97,15);thumbnails[1743484]=new thumbnail(1743484,"76955","","cpwl_thumb.JPG",130,109,15);thumbnails[1031258]=new thumbnail(1031258,"76955","","b9a copy copy_thumb.jpg",130,130,15);thumbnails[1743350]=new thumbnail(1743350,"76955","Black and White","cpw1_thumb.JPG",130,119,15);thumbnails[2287883]=new thumbnail(2287883,"353368","Good Luck","cpp_thumb.jpg",130,147,15);thumbnails[2287949]=new thumbnail(2287949,"76955","Filmed in Technicolour","cpe1_thumb.jpg",130,93,15);thumbnails[2287993]=new thumbnail(2287993,"353368","It must be love","cpi_thumb.jpg",130,95,15);thumbnails[2288033]=new thumbnail(2288033,"353368","No turning back","cpq copy copy_thumb.jpg",130,120,15);thumbnails[1031232]=new thumbnail(1031232,"76955","","a69 copycopy_thumb.jpg",130,106,15);thumbnails[2287950]=new thumbnail(2287950,"353368","Mirror Mirror.....","cpr_thumb.jpg",130,96,15);thumbnails[2287994]=new thumbnail(2287994,"76955","Last minute nerves or just warm?","cpo_thumb.jpg",130,91,15);thumbnails[2288026]=new thumbnail(2288026,"353368","The race is on","cpt copy copy_thumb.jpg",130,126,15);thumbnails[6377209]=new thumbnail(6377209,"76955","cpjj2","cpjj2_thumb.jpg",130,194,15);thumbnails[2288027]=new thumbnail(2288027,"76955","I want cake...","cpw_thumb.jpg",130,94,15);thumbnails[6377207]=new thumbnail(6377207,"76955","cpjj1","cpjj1_thumb.jpg",130,87,15);thumbnails[2287995]=new thumbnail(2287995,"76955","A Big Hug","cpu_thumb.jpg",130,79,15);thumbnails[2287996]=new thumbnail(2287996,"76955","I win!","cpy_thumb.jpg",130,98,15);thumbnails[3882563]=new thumbnail(3882563,"266213","New York","cpny_thumb.jpg",130,173,15);thumbnails[3882588]=new thumbnail(3882588,"266213","New York","cpnya_thumb.jpg",130,191,15);thumbnails[3882624]=new thumbnail(3882624,"266213","Stars and Stripes","cpnyc_thumb.jpg",130,197,15);thumbnails[4013494]=new thumbnail(4013494,"266213","Ground Zero","NY1_thumb.jpg",130,201,15);thumbnails[4765441]=new thumbnail(4765441,"266213","Bangkok Slum","bka_thumb.jpg",130,87,15);thumbnails[4599393]=new thumbnail(4599393,"266213","Sunset","CPmaratius_thumb.jpg",130,68,15);thumbnails[4013497]=new thumbnail(4013497,"266213","New York Taxi","NY4_thumb.jpg",130,186,15);thumbnails[4013498]=new thumbnail(4013498,"266213","Chrylser Building","NY5_thumb.jpg",130,173,15);thumbnails[4013499]=new thumbnail(4013499,"266213","The Plaza Hotel","NY6_thumb.jpg",130,85,15);thumbnails[4013500]=new thumbnail(4013500,"266213","Ice Skating at Christmas in Central Park, New York","NY7_thumb.jpg",130,98,15);thumbnails[4599464]=new thumbnail(4599464,"266213","Wall Street","NY8_thumb.jpg",130,203,15);thumbnails[1741602]=new thumbnail(1741602,"117002","Belfast City Hall, Christmas 2007","cpa_1_thumb.JPG",130,90,15);thumbnails[1741607]=new thumbnail(1741607,"117002","Statue ","cpb_1_thumb.JPG",130,111,15);thumbnails[1741609]=new thumbnail(1741609,"117002","Albert Clock, Belfast, in the snow","cpc_1_thumb.JPG",130,130,15);thumbnails[1741612]=new thumbnail(1741612,"117002","Statue in the snow","cpd_1_thumb.JPG",130,181,15);thumbnails[1741617]=new thumbnail(1741617,"117002","","cpe_thumb.JPG",130,181,15);thumbnails[1741619]=new thumbnail(1741619,"117002","Christmas Tree at Belfast City Hall","cpf_1_thumb.JPG",130,204,15);thumbnails[2443758]=new thumbnail(2443758,"117002","Brompton Pier at midnight","nt4 copy copycp_thumb.JPG",130,93,15);thumbnails[4767020]=new thumbnail(4767020,"117002","Hay bales Ards Pennisular","hay_f_thumb.jpg",130,87,15);thumbnails[4767021]=new thumbnail(4767021,"117002","Hay bales in Ards","Haybales_a_thumb.jpg",130,114,15);thumbnails[4767064]=new thumbnail(4767064,"117002","hay bales and Scrabo Tower","haybalesd_thumb.jpg",130,80,15);thumbnails[4767022]=new thumbnail(4767022,"117002","hay bales ","haybales_c1_thumb.jpg",130,64,15);thumbnails[4599002]=new thumbnail(4599002,"117002","Tombstoning","CPcliff2_thumb.jpg",130,59,15);thumbnails[4599003]=new thumbnail(4599003,"117002","No turning back","CPjump_thumb.jpg",130,117,15);thumbnails[4599004]=new thumbnail(4599004,"117002","Splash","CPjumpmon_thumb.jpg",130,148,15);thumbnails[4599005]=new thumbnail(4599005,"117002","Foolish or Adventurous?","CPwave_thumb.jpg",130,85,15);thumbnails[4599001]=new thumbnail(4599001,"117002","Cliff Walking","CPcliff_thumb.jpg",130,81,15);thumbnails[1033242]=new thumbnail(1033242,"78254","Bangor Marina","cp9_thumb.JPG",130,81,15);thumbnails[1033246]=new thumbnail(1033246,"78254","Waiting for the Ferry to Strangford","cp10_thumb.JPG",130,81,15);thumbnails[2443815]=new thumbnail(2443815,"78254","Bathtime 1","cpho_thumb.jpg",130,98,15);thumbnails[4599420]=new thumbnail(4599420,"78254","Waterfall","CPwaterfall_thumb.jpg",130,150,15);thumbnails[2443816]=new thumbnail(2443816,"78254","Bathtime 2","cpho2_thumb.jpg",130,96,15);thumbnails[4599394]=new thumbnail(4599394,"78254","Crawfordsburn Post Office","CPpostoffice_thumb.jpg",130,92,15);thumbnails[1033158]=new thumbnail(1033158,"76956","Royal Belfast Quasqui Centenary","cpc_thumb.jpg",130,86,15);thumbnails[1033159]=new thumbnail(1033159,"76956","Royal Belfast Quasqui Centenary","cpf_thumb.JPG",130,104,15);thumbnails[1033160]=new thumbnail(1033160,"76956","","cpb_thumb.JPG",130,104,15);thumbnails[1033162]=new thumbnail(1033162,"76956","","cpd_thumb.JPG",130,163,15);thumbnails[1033169]=new thumbnail(1033169,"76956","Royal Belfast Quasqui Centenary","cp3_thumb.jpg",130,104,15);thumbnails[1031281]=new thumbnail(1031281,"76954","2007 Irish Cup Final","c9 copy copy_thumb.JPG",130,105,15);thumbnails[1031291]=new thumbnail(1031291,"76954","Mark Dickson celebrates scoring the opening goal","a10 copy copy_thumb.JPG",130,169,15);thumbnails[1031324]=new thumbnail(1031324,"76954","Noel Bailie recieves the Gibson Cup","a53 copy copy_thumb.JPG",130,207,15);thumbnails[1031330]=new thumbnail(1031330,"76954","","a96 copy copy_thumb.JPG",130,106,15);thumbnails[1033156]=new thumbnail(1033156,"76954","Royal Belfast Quasqui Centenary","cpa_thumb.jpg",130,140,15);thumbnails[1033165]=new thumbnail(1033165,"76954","Royal Belfast Quasqui Centenary","cp6_thumb.JPG",130,163,15);thumbnails[1033166]=new thumbnail(1033166,"76954","Royal Belfast Quasqui Centenary","cp51_thumb.JPG",130,104,15);thumbnails[1033259]=new thumbnail(1033259,"76954","Lawrie Sanchez","cp11_thumb.JPG",130,182,15);thumbnails[1033263]=new thumbnail(1033263,"76954","Portadown FC 2005 Nationwide Irish Cup Champions","cp12_thumb.JPG",130,85,15);thumbnails[1051424]=new thumbnail(1051424,"76954","William Murphy gets up close and personal with Elliot Morris","c25_thumb.jpg",130,112,15);thumbnails[1051437]=new thumbnail(1051437,"76954","Peter Thompson Celebrates his first of two goals in the 2006 Irish Cup Final","c30_thumb.JPG",130,99,15);thumbnails[1070708]=new thumbnail(1070708,"76954","Jim Ervin","a40_thumb.jpg",130,90,15);thumbnails[1070709]=new thumbnail(1070709,"76954","William winky Murphy","a80_thumb.jpg",130,234,15);var galleries=new Object();galleries[353683]=new gallery(353683,"","Sample Weddings","gallery",[]);galleries[353368]=new gallery(353368,"2288033,2288026,2287993,2287950,2287883","Samantha and Neil","gallery",[2287883,2287993,2288033,2287950,2288026]);galleries[76955]=new gallery(76955,"1031240","Wedding Photography","gallery",[1031240,1743354,1743360,1743363,1743364,1743381,1743394,1743397,1743430,1743449,1743471,1743482,1743484,1031258,1743350,2287949,1031232,2287994,6377209,2288027,6377207,2287995,2287996]);galleries[266213]=new gallery(266213,"4599464,4013494","North South East West","gallery",[3882563,3882588,3882624,4013494,4765441,4599393,4013497,4013498,4013499,4013500,4599464]);galleries[117002]=new gallery(117002,"4767064,4767020,4599004,1741612","Out and About","gallery",[1741602,1741607,1741609,1741612,1741617,1741619,2443758,4767020,4767021,4767064,4767022,4599002,4599003,4599004,4599005,4599001]);galleries[78254]=new gallery(78254,"4599420","Miscellaneous","gallery",[1033242,1033246,2443815,4599420,2443816,4599394]);galleries[76956]=new gallery(76956,"1033162","Social Photography","gallery",[1033158,1033159,1033160,1033162,1033169]);galleries[76954]=new gallery(76954,"1031281","Sport","gallery",[1031281,1031291,1031324,1031330,1033156,1033165,1033166,1033259,1033263,1051424,1051437,1070708,1070709]);var imageSets=new Object();imageSets[1]="4767064,4767020,4599464,4599420,4599004,4013494,1741612,1741609,1741602,1031240";imageSets[2]="4767064,4767020,4599464,4599420,4599004,4013494,1741612,1033162,1031281,1031240";imageSets[3]="4767064,4767020,4599464,4599420,4599004";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/fortuna1886/images";break}switch(a){case 1:b="http://www1.clikpic.com/fortuna1886/images";break}switch(a){case 2:b="http://admin.clikpic.com/fortuna1886/images";break}switch(a){case 24:b="http://tpc15/clikpic/fortuna1886/images";break}switch(a){case 4:b="http://www.clikchurch.com/fortuna1886/images";break}switch(a){case 5:b="http://www2.clikpic.com/fortuna1886/images";break}switch(a){case 22:b="http://tpc5/clikpic/fortuna1886/images";break}switch(a){case 23:b="http://tpc10/clikpic/fortuna1886/images";break}switch(a){case 25:b="http://tpc16/clikpic/fortuna1886/images";break}switch(a){case 15:b="http://www3.clikpic.com/fortuna1886/images";break}switch(a){case 18:b="http://www4.clikpic.com/fortuna1886/images";break}switch(a){case 19:b="http://www5.clikpic.com/fortuna1886/images";break}switch(a){case 31:b="http://www7.clikpic.com/fortuna1886/images";break}switch(a){case 32:b="http://admin2.clikpic.com/fortuna1886/images";break}switch(a){case 33:b="http://www8.clikpic.com/fortuna1886/images";break}switch(a){case 34:b="http://www9.clikpic.com/fortuna1886/images";break}switch(a){case 35:b="http://admin3.clikpic.com/fortuna1886/images";break}switch(a){case 37:b="http://admin4.clikpic.com/fortuna1886/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="Thompson 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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(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="darren@tthompson.wanadoo.co.uk">';b=b+'<input type="hidden" name="currency_code" value="GBP">';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="darren@tthompson.wanadoo.co.uk">';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+'")'})}}};