function photo(j,c,p,t,d,k,h,r,v,o,m,s,a,n,g,l,b,u,q,f,e){this.id=j;this.galleries_id=c;this.photo_ref=p;this.section_code=t;this.src=d;this.width=k;this.height=h;this.caption=r;this.thumbnail=v;this.thumbnail_width=o;this.thumbnail_height=m;this.home=s;this.gallery=a;this.description=n;this.takendate=g;this.photographer=l;this.location=b;this.item_price=u;this.purchase_instruction=q;this.payment_groups_id=f;this.server_id=e;this.src=getServerPath(this.server_id)+"/"+this.src;this.thumbnail=getServerPath(this.server_id)+"/"+this.thumbnail}function gallery(e,c,d,b,a){this.id=e;this.featured_images=c;this.title=d;this.section_code=b;this.photoIDs=a}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 photos=new Object();photos[2615389]=new photo(2615389,"166054","NCR-P01","gallery","Tracy(a) B&W.jpg",500,667,"Pondering","Tracy(a) B&W_thumb.jpg",130,173,0,0,"","","Neil Charles Roberts","",20,"","",5);photos[2615914]=new photo(2615914,"166093","","gallery","MISTY curtains B&W.jpg",500,880,"Curtain Call","MISTY curtains B&W_thumb.jpg",130,229,0,0,"","","Neil Charles Roberts","",15,"","",5);photos[2616037]=new photo(2616037,"166054","","gallery","Daniel crosslegg 2 crop B&W.jpg",498,752,"Oh Boy","Daniel crosslegg 2 crop B&W_thumb.jpg",130,196,0,0,"","","Neil Charles Roberts","",20,"","",5);photos[2616225]=new photo(2616225,"166093","","gallery","Misty in chair crop.jpg",500,324,"Bagpuss","Misty in chair crop_thumb.jpg",130,84,0,0,"","","Neil Charles Roberts","",15,"","",5);photos[3854765]=new photo(3854765,"166093","","gallery","Swan_family_crop.jpg",500,261,"Swan Family","Swan_family_crop_thumb.jpg",130,68,0,0,"","","Neil Charles Roberts","Llangorse Lake",15,"","",5);photos[2615513]=new photo(2615513,"166002","","gallery","Llangorse Lake Cabin B&W II crop.jpg",500,407,"Boat House","Llangorse Lake Cabin B&W II crop_thumb.jpg",130,106,0,0,"","","Neil Charles Roberts","",20,"","",5);photos[2615553]=new photo(2615553,"166002","","gallery","REFLECTIONS(a)B&W.jpg",500,747,"Reflections","REFLECTIONS(a)B&W_thumb.jpg",130,194,0,0,"","","Neil Charles Roberts","",15,"","",5);photos[2615566]=new photo(2615566,"166002","","gallery","Wind Swept Trees  Black Pond B&W(Crop).jpg",500,711,"Wind swept Trees","Wind Swept Trees  Black Pond B&W(Crop)_thumb.jpg",130,185,0,0,"","","Neil Charles Roberts","",15,"","",5);photos[2615593]=new photo(2615593,"166002","","gallery","EV Works site B&W (b).jpg",500,352,"South Wales Valley","EV Works site B&W (b)_thumb.jpg",130,92,0,0,"","","Neil Charles Roberts","",15,"","",5);photos[2615696]=new photo(2615696,"166002","","gallery","Llangorse M'tains(c) B&W crop.jpg",500,232,"Black Mountains in Fog","Llangorse M'tains(c) B&W crop_thumb.jpg",130,60,0,0,"","","Neil Charles Roberts","",15,"","",5);photos[3854616]=new photo(3854616,"166002","","gallery","Cardiff_Bay_Jetty_BW_crop.jpg",500,309,"Jetty","Cardiff_Bay_Jetty_BW_crop_thumb.jpg",130,80,0,0,"","","Neil Charles Roberts","Cardiff Bay",15,"","",5);photos[3854695]=new photo(3854695,"166002","","gallery","Cardiff_Bay_Museum_BW_Crop.jpg",500,912,"Cardiff Bay Museum","Cardiff_Bay_Museum_BW_Crop_thumb.jpg",130,237,0,0,"","","Neil Charles Roberts","Cardiff Bay",15,"","",5);photos[3216752]=new photo(3216752,"166003","NCR08","gallery","EV Sunset(b).jpg",500,312,"Sunset Over Valley","EV Sunset(b)_thumb.jpg",130,81,1,0,"Colour image of Sunset over Welsh Valleys Steelworks Town.","18/12/08","Neil Charles Roberts","Ebbw Vale, South Wales. UK.",30,"","",5);photos[3216755]=new photo(3216755,"166003","NCR09","gallery","EV Sunset(d).jpg",500,349,"Sunset over Valleys Town","EV Sunset(d)_thumb.jpg",130,91,1,0,"Sunset over a Welsh Valleys Steelworks Town","18/12/08","Neil Charles Roberts","Ebbw Vale, South Wales. UK",30,"","",5);photos[2615402]=new photo(2615402,"166003","","gallery","SUNSET CARDIFF BAY(b)1.JPG",500,750,"Sunset over Cardiff Bay,Wales.","SUNSET CARDIFF BAY(b)1_thumb.JPG",130,195,0,0,"","","Neil Charles Roberts","",20,"","",5);photos[2615530]=new photo(2615530,"166003","","gallery","Brecon mountains.jpg",500,668,"Black Mountains","Brecon mountains_thumb.jpg",130,174,0,0,"","","Neil Charles Roberts","Brecon.Mid Wales.UK.",15,"","",5);photos[2615539]=new photo(2615539,"166003","","gallery","Llangorse M'tains(e) WEB.jpg",500,265,"Mountains in Fog","Llangorse M'tains(e) WEB_thumb.jpg",130,69,0,0,"","","Neil Charles Roberts","South Wales.UK.",15,"","",5);photos[2616189]=new photo(2616189,"166003","","gallery","BOAT tied up in LLANGORSE LAKE yes.jpg",500,317,"Boat in Lake","BOAT tied up in LLANGORSE LAKE yes_thumb.jpg",130,82,0,0,"","","Neil Charles Roberts","Llangorse Lake,Mid Wales.",20,"","",5);photos[2616240]=new photo(2616240,"166003","","gallery","SUNSET CARDIFF BAY(a) crop.jpg",500,290,"Sunset over Cardiff Bay & Signal Tower.","SUNSET CARDIFF BAY(a) crop_thumb.jpg",130,75,0,0,"","","Neil Charles Roberts","Cardiff,UK.",15,"","",5);photos[2652915]=new photo(2652915,"166003","","gallery","REFLECTIONS(c).jpg",500,308,"Reflective Moods","REFLECTIONS(c)_thumb.jpg",130,80,0,0,"","","Neil Charles Roberts","South Wales.UK.",15,"","",5);photos[3846759]=new photo(3846759,"166003","NCR10","gallery","SIGNAL_TOWERS_CARDIFF_BAYe_effects.jpg",500,333,"Cardiff Bay","SIGNAL_TOWERS_CARDIFF_BAYe_effects_thumb.jpg",130,87,0,0,"","","Neil Charles Roberts","Cardiff, WALES.",20,"","",5);var thumbnails=new Object();thumbnails[2615389]=new thumbnail(2615389,"166054","Pondering","Tracy(a) B&W_thumb.jpg",130,173,5);thumbnails[2615914]=new thumbnail(2615914,"166093","Curtain Call","MISTY curtains B&W_thumb.jpg",130,229,5);thumbnails[2616037]=new thumbnail(2616037,"166054","Oh Boy","Daniel crosslegg 2 crop B&W_thumb.jpg",130,196,5);thumbnails[2616225]=new thumbnail(2616225,"166093","Bagpuss","Misty in chair crop_thumb.jpg",130,84,5);thumbnails[3854765]=new thumbnail(3854765,"166093","Swan Family","Swan_family_crop_thumb.jpg",130,68,5);thumbnails[2615513]=new thumbnail(2615513,"166002","Boat House","Llangorse Lake Cabin B&W II crop_thumb.jpg",130,106,5);thumbnails[2615553]=new thumbnail(2615553,"166002","Reflections","REFLECTIONS(a)B&W_thumb.jpg",130,194,5);thumbnails[2615566]=new thumbnail(2615566,"166002","Wind swept Trees","Wind Swept Trees  Black Pond B&W(Crop)_thumb.jpg",130,185,5);thumbnails[2615593]=new thumbnail(2615593,"166002","South Wales Valley","EV Works site B&W (b)_thumb.jpg",130,92,5);thumbnails[2615696]=new thumbnail(2615696,"166002","Black Mountains in Fog","Llangorse M'tains(c) B&W crop_thumb.jpg",130,60,5);thumbnails[3854616]=new thumbnail(3854616,"166002","Jetty","Cardiff_Bay_Jetty_BW_crop_thumb.jpg",130,80,5);thumbnails[3854695]=new thumbnail(3854695,"166002","Cardiff Bay Museum","Cardiff_Bay_Museum_BW_Crop_thumb.jpg",130,237,5);thumbnails[3216752]=new thumbnail(3216752,"166003","Sunset Over Valley","EV Sunset(b)_thumb.jpg",130,81,5);thumbnails[3216755]=new thumbnail(3216755,"166003","Sunset over Valleys Town","EV Sunset(d)_thumb.jpg",130,91,5);thumbnails[2615402]=new thumbnail(2615402,"166003","Sunset over Cardiff Bay,Wales.","SUNSET CARDIFF BAY(b)1_thumb.JPG",130,195,5);thumbnails[2615530]=new thumbnail(2615530,"166003","Black Mountains","Brecon mountains_thumb.jpg",130,174,5);thumbnails[2615539]=new thumbnail(2615539,"166003","Mountains in Fog","Llangorse M'tains(e) WEB_thumb.jpg",130,69,5);thumbnails[2616189]=new thumbnail(2616189,"166003","Boat in Lake","BOAT tied up in LLANGORSE LAKE yes_thumb.jpg",130,82,5);thumbnails[2616240]=new thumbnail(2616240,"166003","Sunset over Cardiff Bay & Signal Tower.","SUNSET CARDIFF BAY(a) crop_thumb.jpg",130,75,5);thumbnails[2652915]=new thumbnail(2652915,"166003","Reflective Moods","REFLECTIONS(c)_thumb.jpg",130,80,5);thumbnails[3846759]=new thumbnail(3846759,"166003","Cardiff Bay","SIGNAL_TOWERS_CARDIFF_BAYe_effects_thumb.jpg",130,87,5);var galleries=new Object();galleries[166093]=new gallery(166093,"3854765,2616225,2615914","ANIMALS & PETS","gallery",[2615914,2616225,3854765]);galleries[166054]=new gallery(166054,"2616037,2615389","B&W Images of People","gallery",[2615389,2616037]);galleries[166002]=new gallery(166002,"3854695,3854616,2615696,2615593,2615566,2615553,2615513","B&W Images","gallery",[2615513,2615553,2615566,2615593,2615696,3854616,3854695]);galleries[166003]=new gallery(166003,"3846759,3216755,3216752,2652915,2616240,2616189,2615539,2615530,2615402","Colour Images","gallery",[3216752,3216755,2615402,2615530,2615539,2616189,2616240,2652915,3846759]);var imageSets=new Object();imageSets[1]="3216755,3216752";imageSets[3]="3854765,3854695,3854616,3846759,3216755,3216752,2652915,2616240,2616225,2616189,2616037,2615914,2615696,2615593,2615566,2615553,2615539,2615530,2615513,2615402,2615389";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 1:b="http://www1.clikpic.com/NCROBO/images";break}switch(a){case 2:b="http://admin.clikpic.com/NCROBO/images";break}switch(a){case 4:b="http://www.clikchurch.com/NCROBO/images";break}switch(a){case 5:b="http://www2.clikpic.com/NCROBO/images";break}switch(a){case 15:b="http://www3.clikpic.com/NCROBO/images";break}switch(a){case 21:b="http://www6.clikpic.com/NCROBO/images";break}switch(a){case 18:b="http://www4.clikpic.com/NCROBO/images";break}switch(a){case 19:b="http://www5.clikpic.com/NCROBO/images";break}switch(a){case 22:b="http://tpc5/clikpic/NCROBO/images";break}switch(a){case 23:b="http://tpc10/clikpic/NCROBO/images";break}switch(a){case 24:b="http://tpc15/clikpic/NCROBO/images";break}switch(a){case 25:b="http://tpc16/clikpic/NCROBO/images";break}switch(a){case 31:b="http://www7.clikpic.com/NCROBO/images";break}switch(a){case 32:b="http://admin2.clikpic.com/NCROBO/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(photos[imageID].galleries_id!=""){html+='<a href="'+photos[imageID].section_code+"_"+photos[imageID].galleries_id+'.html">'}else{html+='<a href="gallery.html">'}}html+='<img src="'+photos[imageID].src+'" width="'+photos[imageID].width+'" height="'+photos[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+photos[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="NCR 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(){if(addItemToBasket(document.getElementById("paymentForm"))){if($.browser.msie){$("#paymentConfirm").show()}else{$("#paymentConfirm").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+"</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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="NCROBO">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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=photos[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};