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[3313969]=new thumbnail(3313969,"243033","Snow Scene","Snow_thumb.jpg",130,87,15);thumbnails[3313974]=new thumbnail(3313974,"243033","Evening Glow","evening glow_thumb.jpg",130,87,15);thumbnails[3313980]=new thumbnail(3313980,"243032","Stone Row","Stone Row_thumb.jpg",130,87,15);thumbnails[3313987]=new thumbnail(3313987,"243032","Poppy","Poppy2_thumb.jpg",130,84,15);thumbnails[3314030]=new thumbnail(3314030,"243030","Carnival Time","Carnival Time_thumb.jpg",130,101,15);thumbnails[3314032]=new thumbnail(3314032,"243030","Saas Pordoi","Saas Pordoi_thumb.jpg",130,98,15);thumbnails[3314039]=new thumbnail(3314039,"243030","Sunset Lake Garda","Sunset Lake Garda_thumb.jpg",130,71,15);thumbnails[3314043]=new thumbnail(3314043,"243029","Alnmouth Bay 2","DSC_0637_thumb.jpg",130,86,15);thumbnails[3314047]=new thumbnail(3314047,"243029","Stranded","DSC_0569_thumb.jpg",86,130,15);thumbnails[3314049]=new thumbnail(3314049,"243029","Alnmouth Bay","DSC_0593_edited_thumb.jpg",80,130,15);thumbnails[3314051]=new thumbnail(3314051,"243024","Solo Sunflower","Solo Sunflower_thumb.jpg",130,87,15);thumbnails[3314070]=new thumbnail(3314070,"243028","Eilean Donan","IMG_7892_thumb.jpg",130,87,15);thumbnails[3314072]=new thumbnail(3314072,"243028","Arguments Yard","IMG_6901_thumb.jpg",75,130,15);thumbnails[3314094]=new thumbnail(3314094,"243028","The Harbour","IMG_6045_thumb.jpg",117,130,15);thumbnails[3314119]=new thumbnail(3314119,"243027","Barnard Castle Steam Fair","Barnard Castle Steam Fair_thumb.jpg",130,98,15);thumbnails[3314121]=new thumbnail(3314121,"243027","Maison du Livre","Maison du Livre, Aix-en-Provenc_thumb.jpg",98,130,15);thumbnails[3314122]=new thumbnail(3314122,"243027","Paignton Promenade","Paignton Promenade, Devon_thumb.jpg",130,98,15);thumbnails[3314193]=new thumbnail(3314193,"243026","Zebras Crossing","zebra crossings_thumb.jpg",130,87,15);thumbnails[3314194]=new thumbnail(3314194,"243026","Elephant","kenya 6_thumb.jpg",123,130,15);thumbnails[3314197]=new thumbnail(3314197,"243025","Getting Up Steam","Getting-up-steam_thumb.jpg",130,98,15);thumbnails[3314200]=new thumbnail(3314200,"243025","Blue and White","Copy of scannedimages021_thumb.jpg",84,130,15);thumbnails[3324792]=new thumbnail(3324792,"243023","Burst Balloon","baloon_thumb.jpg",130,87,15);thumbnails[3346649]=new thumbnail(3346649,"243026","The Family","the family4_thumb.jpg",130,182,15);thumbnails[3360643]=new thumbnail(3360643,"243031","Woodhorn Colliery","woodhorn colliery_thumb.jpg",130,186,15);thumbnails[3360644]=new thumbnail(3360644,"243031","Baltic & Bridges","tynehd_thumb.jpg",130,87,15);thumbnails[3360648]=new thumbnail(3360648,"243031","Derwent","Derwent_thumb.jpg",130,87,15);thumbnails[3360649]=new thumbnail(3360649,"243031","Rock","rock_thumb.jpg",130,97,15);thumbnails[3360651]=new thumbnail(3360651,"243023","Thunder","thunder_thumb.jpg",130,79,15);thumbnails[3360652]=new thumbnail(3360652,"243023","Shore Road","shore road_thumb.jpg",130,87,15);thumbnails[3360655]=new thumbnail(3360655,"243023","For Repair","for repair_thumb.jpg",130,87,15);thumbnails[4031585]=new thumbnail(4031585,"243032","Pelicans","Pelicans_thumb.jpg",130,121,15);thumbnails[4031604]=new thumbnail(4031604,"243032","Red Rose","Red_Rose_to_right_thumb.jpg",130,87,15);thumbnails[4031615]=new thumbnail(4031615,"243030","Autumn Belsay","Autumn_Belsay_thumb.jpg",130,97,15);thumbnails[4031631]=new thumbnail(4031631,"243030","Modern Apartments next to Baltic","Modern_Apartments_next_to_Baltic_thumb.jpg",130,98,15);thumbnails[4031633]=new thumbnail(4031633,"243025","Greek Village","scanned_slides010_thumb.jpg",130,182,15);thumbnails[4031645]=new thumbnail(4031645,"243026","Kenyan","keynyan_thumb.jpg",130,180,15);thumbnails[4031650]=new thumbnail(4031650,"243026","","native_thumb.jpg",130,98,15);thumbnails[4031665]=new thumbnail(4031665,"243029","Driftwood","DSC_0124_thumb.jpg",130,86,15);thumbnails[4031666]=new thumbnail(4031666,"243029","Get Off!","Edit_7_thumb.jpg",130,131,15);thumbnails[4059283]=new thumbnail(4059283,"243023","","1_-_Copy_thumb.JPG",130,87,15);thumbnails[4059294]=new thumbnail(4059294,"243023","Lovers","lovers_thumb.jpg",130,93,15);thumbnails[4694953]=new thumbnail(4694953,"270074","","IMG_0415_thumb.JPG",130,87,15);thumbnails[4694955]=new thumbnail(4694955,"270074","","MOTOR_BIKE2_thumb.jpg",130,95,15);thumbnails[4694956]=new thumbnail(4694956,"270074","","MORPETH2_thumb.jpg",130,79,15);thumbnails[3782119]=new thumbnail(3782119,"243023","","b_thumb.jpg",130,87,15);thumbnails[3876924]=new thumbnail(3876924,"243023","","p2_-_Copy_thumb.jpg",130,78,15);thumbnails[3782121]=new thumbnail(3782121,"243023","","a_thumb.jpg",130,87,15);thumbnails[3313952]=new thumbnail(3313952,"243024","Moth Eaten","Moth A4_thumb.jpg",130,92,15);thumbnails[3313965]=new thumbnail(3313965,"243033","Shades of Green","IMG_8058_thumb.jpg",130,87,15);thumbnails[3360646]=new thumbnail(3360646,"243031","Amble Pier","amble pier_thumb.jpg",130,138,15);thumbnails[3313984]=new thumbnail(3313984,"243032","Alnwick castle","Alnwick Castle HDR_thumb.jpg",130,74,15);thumbnails[3313851]=new thumbnail(3313851,"243024","Beautiful Demoiselle","Damsonfly A4_thumb.jpg",92,130,15);var galleries=new Object();galleries[243025]=new gallery(243025,"4031633","Alan Murdie","gallery",[3314197,3314200,4031633]);galleries[243024]=new gallery(243024,"3314051,3313851","Beverley Moffitt","gallery",[3314051,3313952,3313851]);galleries[243026]=new gallery(243026,"4031650","Bob Thompson","gallery",[3314193,3314194,3346649,4031645,4031650]);galleries[243027]=new gallery(243027,"3314119","Colin Alderson","gallery",[3314119,3314121,3314122]);galleries[243028]=new gallery(243028,"3314070","Deryck Wade","gallery",[3314070,3314072,3314094]);galleries[270074]=new gallery(270074,"4694956,4694955,4694953","George Brogan","gallery",[4694953,4694955,4694956]);galleries[243029]=new gallery(243029,"4031666","Nigel Elliott","gallery",[3314043,3314047,3314049,4031665,4031666]);galleries[243031]=new gallery(243031,"3360649,3360648,3360646,3360644,3360643","Nigel Robinson","gallery",[3360643,3360644,3360648,3360649,3360646]);galleries[243030]=new gallery(243030,"4031631","Pearl Alderson","gallery",[3314030,3314032,3314039,4031615,4031631]);galleries[243023]=new gallery(243023,"4059283,3876924,3782121,3782119","Peter Arris","gallery",[3324792,3360651,3360652,3360655,4059283,4059294,3782119,3876924,3782121]);galleries[243032]=new gallery(243032,"4031604,3313980","Susan Walker","gallery",[3313980,3313987,4031585,4031604,3313984]);galleries[243033]=new gallery(243033,"3313974,3313969,3313965","Vera Wade","gallery",[3313969,3313974,3313965]);var imageSets=new Object();imageSets[1]="4059294,4059283,4031666,4031665,4031650,4031645,4031633,4031631,4031615,4031604,4031585,3876924,3782121,3782119,3360655,3360652,3360651,3360649,3360648,3360646,3360644,3360643,3346649,3324792,3314200,3314197,3314194,3314193,3314122,3314121,3314119,3314094,3314072,3314070,3314051,3314049,3314047,3314043,3314039,3314032,3314030,3313987,3313984,3313980,3313974,3313969,3313965,3313952,3313851";imageSets[2]="4059283,4031666,4031650,4031633,4031631,4031604,3876924,3782121,3782119,3314119,3314070,3314051,3313980,3313851";imageSets[3]="4694956,4694955,4694953,4059294,4059283,4031666,4031665,4031650,4031645,4031633,4031631,4031615,4031604,4031585,3876924,3782121,3782119,3360655,3360652,3360651,3360649,3360648,3360646,3360644,3360643,3346649,3324792,3314200,3314197,3314194,3314193,3314122,3314121,3314119,3314094,3314072,3314070,3314051,3314049,3314047,3314043,3314039,3314032,3314030,3313987,3313984,3313980,3313974,3313969,3313965";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/moffitt/images";break}switch(a){case 1:b="http://www1.clikpic.com/moffitt/images";break}switch(a){case 2:b="http://admin.clikpic.com/moffitt/images";break}switch(a){case 24:b="http://tpc15/clikpic/moffitt/images";break}switch(a){case 4:b="http://www.clikchurch.com/moffitt/images";break}switch(a){case 5:b="http://www2.clikpic.com/moffitt/images";break}switch(a){case 22:b="http://tpc5/clikpic/moffitt/images";break}switch(a){case 23:b="http://tpc10/clikpic/moffitt/images";break}switch(a){case 25:b="http://tpc16/clikpic/moffitt/images";break}switch(a){case 15:b="http://www3.clikpic.com/moffitt/images";break}switch(a){case 18:b="http://www4.clikpic.com/moffitt/images";break}switch(a){case 19:b="http://www5.clikpic.com/moffitt/images";break}switch(a){case 31:b="http://www7.clikpic.com/moffitt/images";break}switch(a){case 32:b="http://admin2.clikpic.com/moffitt/images";break}switch(a){case 33:b="http://www8.clikpic.com/moffitt/images";break}switch(a){case 34:b="http://www9.clikpic.com/moffitt/images";break}switch(a){case 35:b="http://admin3.clikpic.com/moffitt/images";break}switch(a){case 37:b="http://admin4.clikpic.com/moffitt/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="Ashington Coop Camera Club: "+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>"}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+'")'})}}};