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[566925]=new thumbnail(566925,"43699","BTCC Astra VX","DSC_0347_thumb.JPG",130,85,18);thumbnails[567173]=new thumbnail(567173,"43699","One arm golf Tynemouth","omg0346_thumb.jpg",130,87,18);thumbnails[575730]=new thumbnail(575730,"43699","Great North run","gnr0815_thumb.jpg",130,194,18);thumbnails[1306499]=new thumbnail(1306499,"43699","Newcastle Bluestar vs curzon ashton 002","250807 BLUESTARVCURZONASHTON0033W_thumb.jpg",130,173,18);thumbnails[1492167]=new thumbnail(1492167,"43699","Local football","Football_thumb.jpg",130,168,18);thumbnails[1492168]=new thumbnail(1492168,"43699","Tynedale rugby","rugby_thumb.jpg",130,92,18);thumbnails[1533801]=new thumbnail(1533801,"43699","a minutes silence","IC271007HARTLEPOOLSILENCE001_thumb.jpg",130,98,18);thumbnails[2126792]=new thumbnail(2126792,"43699","Horse racing","150308ncraces003_thumb.jpg",130,86,18);thumbnails[750390]=new thumbnail(750390,"44391","Red Kite","W0437C_thumb.jpg",130,81,18);thumbnails[1801749]=new thumbnail(1801749,"44391","Eagle Owl","IC231007BIRDOFPRAY017_thumb.jpg",130,46,18);thumbnails[1883416]=new thumbnail(1883416,"44391","Kestrel","IC060208049C_thumb.jpg",130,81,18);thumbnails[1944621]=new thumbnail(1944621,"44391","Nuthatch with Nut.","nuthatch_thumb.jpg",130,86,18);thumbnails[2126786]=new thumbnail(2126786,"44391","Mute Swans","csv3_thumb.jpg",130,87,18);thumbnails[3056021]=new thumbnail(3056021,"44391","Bald eagle001","Bald eagle001_thumb.jpg",130,131,18);thumbnails[3056024]=new thumbnail(3056024,"44391","Little egret in flight","DSC_0859A_thumb.jpg",130,79,18);thumbnails[3056029]=new thumbnail(3056029,"44391","Lanner Falcon","Lanner Falcon002_thumb.jpg",130,72,18);thumbnails[3402486]=new thumbnail(3402486,"44391","Roe deer in snow","Roe deer_thumb.jpg",130,87,18);thumbnails[3402487]=new thumbnail(3402487,"44391","Lesser Redpoll","11001A_thumb.jpg",130,195,18);thumbnails[3402492]=new thumbnail(3402492,"44391","Goldfinch in tree","Goldfinch_thumb.jpg",130,79,18);thumbnails[3564368]=new thumbnail(3564368,"44391","Sparrowhawk (male)","20090306-20090306-NP1U2416_thumb.jpg",130,175,18);thumbnails[4331951]=new thumbnail(4331951,"44391","Four spot broad bodied chaser","chaser_thumb.jpg",130,87,18);thumbnails[4331952]=new thumbnail(4331952,"44391","Juvenile kingfisher with fish","Kingfisher001_thumb.jpg",130,87,18);thumbnails[4737680]=new thumbnail(4737680,"44391","Dunlin","dunnlin01_thumb.jpg",130,87,18);thumbnails[4737681]=new thumbnail(4737681,"44391","Golden Eagle","IMG_0343seaE2_thumb.jpg",130,90,18);thumbnails[4737684]=new thumbnail(4737684,"44391","Little Stint","Little_Stint_thumb.jpg",130,87,18);thumbnails[4737685]=new thumbnail(4737685,"44391","Sand martin 01","sand_martin01_thumb.jpg",130,87,18);thumbnails[4737689]=new thumbnail(4737689,"44391","Sand martin 02","Sand_martin02_thumb.jpg",130,87,18);thumbnails[568201]=new thumbnail(568201,"43856","Lake","Lake_thumb.jpg",130,86,18);thumbnails[568230]=new thumbnail(568230,"43856","St Marys lighthouse","St Marys lighthouse_thumb.jpg",130,79,18);thumbnails[1001707]=new thumbnail(1001707,"43856","bridge and signal box","DSC_0059-01_thumb.jpg",130,87,18);thumbnails[1640219]=new thumbnail(1640219,"43856","The waterside Knaresborough","waterside_thumb.jpg",130,87,18);thumbnails[1944620]=new thumbnail(1944620,"43856","Winter frost","IC1902Roth001B_thumb.jpg",130,86,18);thumbnails[5025309]=new thumbnail(5025309,"43856","Ullswater Cumbria","_IFF0091A_thumb.jpg",130,86,18);thumbnails[5025316]=new thumbnail(5025316,"43856","Ullswater Cumbria","_IFF0095A_thumb.jpg",130,86,18);thumbnails[5025320]=new thumbnail(5025320,"43856","Boats at Keswick Cumbria","_IFF0125A_thumb.jpg",130,87,18);thumbnails[5846429]=new thumbnail(5846429,"43856","Talking Tarn Cumbria","Talkin_Tarn02AA_thumb.jpg",130,87,18);thumbnails[5846438]=new thumbnail(5846438,"43856","Derwent Water","_IFF0115A_thumb.jpg",130,86,18);thumbnails[568258]=new thumbnail(568258,"43898","Wedding(reportage)","P9_thumb.jpg",130,139,18);thumbnails[568261]=new thumbnail(568261,"43898","Wedding (formal)","P32_thumb.jpg",130,184,18);thumbnails[568263]=new thumbnail(568263,"43898","Baby (reportage)","P03_thumb.jpg",130,195,18);thumbnails[568295]=new thumbnail(568295,"43898","Baby (formal)","P06_thumb.jpg",130,168,18);thumbnails[568313]=new thumbnail(568313,"43898","Graduation Day","P0257_thumb.jpg",130,162,18);thumbnails[3056013]=new thumbnail(3056013,"43898","Wedding ","003W_thumb.jpg",130,183,18);thumbnails[3056014]=new thumbnail(3056014,"43898","wedding 02","005W_thumb.jpg",130,195,18);thumbnails[3056016]=new thumbnail(3056016,"43898","wedding 03","038W_thumb.jpg",130,98,18);thumbnails[5187323]=new thumbnail(5187323,"43898","","E10p_thumb.jpg",130,87,18);thumbnails[5187359]=new thumbnail(5187359,"43898","","ICF_49541_thumb.jpg",130,195,18);thumbnails[5846442]=new thumbnail(5846442,"43898","Eyes","ICF_5076A_thumb.jpg",130,87,18);thumbnails[5846446]=new thumbnail(5846446,"43898","","ICF_5108A_thumb.jpg",130,196,18);thumbnails[575772]=new thumbnail(575772,"44392","I see the light.","E0197_thumb.jpg",130,87,18);thumbnails[1368658]=new thumbnail(1368658,"44392","The bounty leaving the Tyne","bounty01W_thumb.jpg",130,98,18);thumbnails[1492170]=new thumbnail(1492170,"44392","press","black horse 01_thumb.jpg",130,101,18);thumbnails[1492171]=new thumbnail(1492171,"44392","press","black horse 02_thumb.jpg",130,195,18);thumbnails[1533835]=new thumbnail(1533835,"44392","people look towards the big LCD screen and wait for the results of the junior great north run 07","JGNR02_thumb.jpg",130,98,18);thumbnails[1533840]=new thumbnail(1533840,"44392","Journey South play some tracks from their new album at Asda Cramlington.","_J0S4888_thumb.jpg",130,173,18);thumbnails[1640215]=new thumbnail(1640215,"44392","sleeping beauty awakes","_J0S5647_thumb.jpg",130,97,18);thumbnails[1734350]=new thumbnail(1734350,"44392","Widow twanky gets a new bra","_J0S5955W_thumb.jpg",130,215,18);thumbnails[1744923]=new thumbnail(1744923,"44392","Wet hoppings again!","hoppingsW_thumb.jpg",130,89,18);thumbnails[1744925]=new thumbnail(1744925,"44392","A Christmas wrap up.","_J0S5903W_thumb.jpg",130,92,18);thumbnails[1744926]=new thumbnail(1744926,"44392","You What!  newcastle fan made to ware a Sunderland shirt at his wedding ","W_thumb.jpg",130,104,18);thumbnails[2847624]=new thumbnail(2847624,"44392","The Journey","PN08_princess_royal_007_thumb.jpg",130,87,18);thumbnails[2847625]=new thumbnail(2847625,"44392","Watching them watching you.","PN08_princess_royal_008_thumb.jpg",130,100,18);thumbnails[2847626]=new thumbnail(2847626,"44392","The Princess Royal opens freeman's quay Durham","PN08_princess_royal_014_thumb.jpg",130,104,18);thumbnails[5461828]=new thumbnail(5461828,"44392","RIP sperm whale.","whale01_thumb.jpg",130,196,18);thumbnails[5461830]=new thumbnail(5461830,"44392","HMS Illustrious.","HMS_illuustrious01_thumb.jpg",130,87,18);var galleries=new Object();galleries[43699]=new gallery(43699,"1306499","Sport","gallery",[566925,567173,575730,1306499,1492167,1492168,1533801,2126792]);galleries[44391]=new gallery(44391,"4737689,4737685,4737684,4737681,4737680,4331952,4331951,3564368,3402492,3402487","Wildlife","gallery",[750390,1801749,1883416,1944621,2126786,3056021,3056024,3056029,3402486,3402487,3402492,3564368,4331951,4331952,4737680,4737681,4737684,4737685,4737689]);galleries[43856]=new gallery(43856,"1944620","Landscapes","gallery",[568201,568230,1001707,1640219,1944620,5025309,5025316,5025320,5846429,5846438]);galleries[43898]=new gallery(43898,"3056014","People","gallery",[568258,568261,568263,568295,568313,3056013,3056014,3056016,5187323,5187359,5846442,5846446]);galleries[44392]=new gallery(44392,"2847625","Press & the rest","gallery",[575772,1368658,1492170,1492171,1533835,1533840,1640215,1734350,1744923,1744925,1744926,2847624,2847625,2847626,5461828,5461830]);var imageSets=new Object();imageSets[1]="3056021,3056013,2847625,2126792,1944620,1744923,575772";imageSets[2]="3056014,2847625,1944620,1306499";imageSets[3]="5846446,5846442,5846438,5846429,5461830,5461828,5187359,5187323,5025320,5025316,5025309,4737689,4737685,4737684,4737681,4737680,4331952,4331951,3564368,3402492,3402487,3402486,3056029,3056024,3056021,3056016,3056014,3056013,2847626,2847625,2847624,2126792,2126786,1944621,1944620,1883416,1801749,1744926,1744925,1744923,1734350,1640219,1640215,1533840,1533835,1533801,1492171,1492170,1492168,1492167";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/iclyne/images";break}switch(a){case 1:b="http://www1.clikpic.com/iclyne/images";break}switch(a){case 2:b="http://admin.clikpic.com/iclyne/images";break}switch(a){case 24:b="http://tpc15/clikpic/iclyne/images";break}switch(a){case 4:b="http://www.clikchurch.com/iclyne/images";break}switch(a){case 5:b="http://www2.clikpic.com/iclyne/images";break}switch(a){case 22:b="http://tpc5/clikpic/iclyne/images";break}switch(a){case 23:b="http://tpc10/clikpic/iclyne/images";break}switch(a){case 25:b="http://tpc16/clikpic/iclyne/images";break}switch(a){case 15:b="http://www3.clikpic.com/iclyne/images";break}switch(a){case 18:b="http://www4.clikpic.com/iclyne/images";break}switch(a){case 19:b="http://www5.clikpic.com/iclyne/images";break}switch(a){case 31:b="http://www7.clikpic.com/iclyne/images";break}switch(a){case 32:b="http://admin2.clikpic.com/iclyne/images";break}switch(a){case 33:b="http://www8.clikpic.com/iclyne/images";break}switch(a){case 34:b="http://www9.clikpic.com/iclyne/images";break}switch(a){case 35:b="http://admin3.clikpic.com/iclyne/images";break}switch(a){case 37:b="http://admin4.clikpic.com/iclyne/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="Foto Frame 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="iclyne@blueyonder.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="iclyne@blueyonder.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+'")'})}}};