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[2908669]=new thumbnail(2908669,"180167","Pylon Rescue","Pylon Rescue_thumb.jpg",130,195,32);thumbnails[2908671]=new thumbnail(2908671,"180167","Leybourne Lakes","A Hint of Autumn, Leybourne Lakes_thumb.jpg",130,97,32);thumbnails[2908673]=new thumbnail(2908673,"180167","Anthurium","Anthurium_thumb.jpg",130,195,32);thumbnails[2908675]=new thumbnail(2908675,"180167","Banjo Man","Banjo Man_thumb.jpg",130,158,32);thumbnails[2908679]=new thumbnail(2908679,"180167","Erythonium","Erythronium1_thumb.jpg",130,194,32);thumbnails[2908681]=new thumbnail(2908681,"180167","Harry","Harry_thumb.jpg",130,182,32);thumbnails[2908683]=new thumbnail(2908683,"180167","Lady Mitchell","LadyMitchell_thumb.jpg",130,185,32);thumbnails[2908686]=new thumbnail(2908686,"180167","Organ Loft Norwich","OrganLoftNorwichCathedral_thumb.jpg",130,210,32);thumbnails[2908688]=new thumbnail(2908688,"180167","Naval Veteran","Naval Veteran_thumb.jpg",130,195,32);thumbnails[3123263]=new thumbnail(3123263,"190873","Punting","PUNTING_thumb.jpg",130,98,32);thumbnails[3123270]=new thumbnail(3123270,"191632","Young Gorilla","3 YOUNG GORILLA_thumb.jpg",130,98,32);thumbnails[3123271]=new thumbnail(3123271,"191632","Puffin","4 PUFFIN_thumb.jpg",130,98,32);thumbnails[4840565]=new thumbnail(4840565,"276378","Double Take on Ranoch Moor","double_take_on_rannoch_moor1_thumb.jpg",130,173,32);thumbnails[4840599]=new thumbnail(4840599,"276378","Frog Family","Frog_Family_thumb.jpg",130,98,32);thumbnails[4840617]=new thumbnail(4840617,"276378","Misty City","Misty_City_thumb.jpg",130,98,32);thumbnails[4840631]=new thumbnail(4840631,"276378","Pidgeon Street Life","Pigeon_Street_life_thumb.jpg",130,98,32);thumbnails[4840696]=new thumbnail(4840696,"276378","Venetian Rubbish Collection","Venitian_Rubbish_Collection_thumb.jpg",130,98,32);thumbnails[5041619]=new thumbnail(5041619,"276378","Big Ben Thru Eye","BigBenthruEye_thumb.jpg",130,173,32);thumbnails[5041621]=new thumbnail(5041621,"276378","Frosty Post Box","frostypostbox_thumb.jpg",130,106,32);thumbnails[5041624]=new thumbnail(5041624,"276378","Maldon","maldon_thumb.jpg",130,173,32);thumbnails[5041626]=new thumbnail(5041626,"276378","Poppy","poppy_thumb.jpg",130,162,32);thumbnails[5093974]=new thumbnail(5093974,"287982","Colourful Living St Hellier","Colourful_living_St_Hellier_thumb.jpg",130,87,32);thumbnails[5094238]=new thumbnail(5094238,"287982","Last Sun Bathe of the Season","Last_Sunbathe_of_the_Season_thumb.jpg",130,98,32);thumbnails[5094240]=new thumbnail(5094240,"287982","Solid as a Rock","SolidasaRock_thumb.jpg",130,195,32);thumbnails[5094243]=new thumbnail(5094243,"287982","Trust me It smells lovely too","Trust_me_it_smells_lovely_too_thumb.jpg",130,87,32);thumbnails[5157510]=new thumbnail(5157510,"284961","Two's Company","2sCompany_thumb.jpg",130,94,32);thumbnails[5157514]=new thumbnail(5157514,"284961","Rushing Tide Monochrome","RushingTide_thumb.jpg",130,94,32);thumbnails[5190849]=new thumbnail(5190849,"293099","Against the evening tide","Rowers_thumb.jpg",130,98,32);thumbnails[5628944]=new thumbnail(5628944,"319120","Sunset over Whitstable","SUNSET_OVER_WHITSTABLE_thumb.jpg",130,202,32);thumbnails[5628949]=new thumbnail(5628949,"319120","Will Returns","WILL_RETURNS_thumb.jpg",130,176,32);thumbnails[5658760]=new thumbnail(5658760,"284961","I must down to the sea again","I_must_down_to_the_sea_again_thumb.jpg",130,87,32);thumbnails[5662568]=new thumbnail(5662568,"190873","Remember Me","Remember_Me_thumb.jpg",130,98,32);thumbnails[5662569]=new thumbnail(5662569,"190873","Female Stilt with Chick","1_Female_Stilt_with_Chick_thumb.jpg",130,166,32);thumbnails[5662570]=new thumbnail(5662570,"190873","Beggars","2_Beggers_thumb.jpg",130,175,32);thumbnails[5662572]=new thumbnail(5662572,"190873","Welsh Jetty","4_Welsh_Jetty_thumb.jpg",130,128,32);thumbnails[5662579]=new thumbnail(5662579,"320783","Apex Missed","3_Apex_Missed_thumb.jpg",130,63,32);thumbnails[5681312]=new thumbnail(5681312,"321795","The Shimmer Pool","The_Shimmer_Pool_thumb.jpg",130,98,32);thumbnails[5681320]=new thumbnail(5681320,"180167","Evening Light - Riverside Park","Evening_Light_Riverside_Park_thumb.jpg",130,108,32);thumbnails[5681331]=new thumbnail(5681331,"180167","St David's Cathederal","St__Davids_Cathedral_thumb.jpg",130,195,32);thumbnails[5685355]=new thumbnail(5685355,"322019","F1 Burnout","FI_BURNOUT_by_Alexander_Johnson_thumb.jpg",130,59,32);thumbnails[5723434]=new thumbnail(5723434,"191632","Ring Necked Pheasant","Ring_Necked_Pheasant_thumb.jpg",130,98,32);thumbnails[5739222]=new thumbnail(5739222,"190873","Gus","Gus_thumb.jpg",130,91,32);thumbnails[5739234]=new thumbnail(5739234,"190873","Tree on Lake Gwynant","Tree_on_lake_Gwynant_2_thumb.jpg",130,98,32);thumbnails[5739236]=new thumbnail(5739236,"190873","Who's There","Whos_there_thumb.jpg",130,166,32);thumbnails[5768475]=new thumbnail(5768475,"326687","All in a Twist","All_in_a_twist_by_Peter_Walker_thumb.jpg",130,115,32);thumbnails[5768566]=new thumbnail(5768566,"326687","Busker","Busker_by_Peter_Walker_thumb.jpg",130,69,32);thumbnails[5768608]=new thumbnail(5768608,"326687","Robin","Robin_by_Peter_Walker_thumb.jpg",130,195,32);thumbnails[5768615]=new thumbnail(5768615,"326687","Battered Bee","Battered_Bee_on_Ragged_Robin_by_Peter_Walker_thumb.jpg",130,83,32);thumbnails[5784852]=new thumbnail(5784852,"320783","Flying Legend","Flying_Legend_thumb.jpg",130,74,32);thumbnails[5784853]=new thumbnail(5784853,"320783","Where there's Smoke","Where_Theres_Smoke_thumb.jpg",130,98,32);thumbnails[5800998]=new thumbnail(5800998,"328512","Winter River Scene","Winter_River_Scene_thumb.jpg",130,195,32);thumbnails[5801003]=new thumbnail(5801003,"328512","Flame Thrower","Flame_Thrower_thumb.jpg",130,191,32);thumbnails[5834060]=new thumbnail(5834060,"330167","Avalanche at Lake Louise - 20 points in the Colour Print Competition","Avalanche_at_Lake_Louise_Steve_Laity_thumb.jpg",130,98,32);thumbnails[5834065]=new thumbnail(5834065,"284961","Jackie in Hi Key ","Jackie_Hi_Key_thumb.jpg",130,172,32);thumbnails[5834066]=new thumbnail(5834066,"284961","Jackie in Low Key","Jackie_Low_Key_thumb.jpg",130,172,32);thumbnails[5834067]=new thumbnail(5834067,"284961","Louise ","Louise_thumb.jpg",130,172,32);thumbnails[5834068]=new thumbnail(5834068,"284961","Sisters ","Sisters_thumb.jpg",130,92,32);thumbnails[5838466]=new thumbnail(5838466,"276378","Lucas","Lucas_thumb.jpg",130,98,32);thumbnails[5838472]=new thumbnail(5838472,"276378","David Baily","David_Bailey_thumb.jpg",130,173,32);thumbnails[5034053]=new thumbnail(5034053,"284961","Rushing Tide Colour","BEACHWALK_thumb.jpg",130,84,32);thumbnails[5034057]=new thumbnail(5034057,"284961","Sunst Beach","SUNSETBEACH_thumb.jpg",130,84,32);thumbnails[5157512]=new thumbnail(5157512,"284961","Drinka Pinta Milka Day","DrinkaPinta_thumb.jpg",130,174,32);thumbnails[5157515]=new thumbnail(5157515,"284961","The Lonely Sea and the Sky","SilverTide_thumb.jpg",130,94,32);thumbnails[2908668]=new thumbnail(2908668,"180167","St David's Cathederal","St_thumb. David's Cathedral.jpg",130,195,32);thumbnails[2908687]=new thumbnail(2908687,"180167","Mind Your Feet","Mind your feet_thumb.jpg",130,93,32);thumbnails[4840588]=new thumbnail(4840588,"276378","SilverBack","silver_back_thumb.jpg",130,173,32);thumbnails[3123266]=new thumbnail(3123266,"191632","Pelican Fishing","2 PELICAN FISHING_thumb.jpg",130,98,32);thumbnails[5034056]=new thumbnail(5034056,"284961","Leap of Faith","LEAPOFFAITH_thumb.jpg",130,86,32);var galleries=new Object();galleries[190873]=new gallery(190873,"5739234,5739222,5662568","Alan Lomakin","gallery",[3123263,5662568,5662569,5662570,5662572,5739222,5739234,5739236]);galleries[322019]=new gallery(322019,"5685355","Alexander Johnson","gallery",[5685355]);galleries[293099]=new gallery(293099,"5190849","Brian Hayes","gallery",[5190849]);galleries[276378]=new gallery(276378,"5838472,5838466,5041626,5041624,5041619,4840696,4840631,4840617,4840599,4840588","Dave Hall","gallery",[4840565,4840599,4840617,4840631,4840696,5041619,5041621,5041624,5041626,5838466,5838472,4840588]);galleries[180167]=new gallery(180167,"5681320,2908688,2908687,2908686,2908683,2908681,2908679,2908675,2908673,2908671,2908669,2908668","Don Beevis","gallery",[2908669,2908671,2908673,2908675,2908679,2908681,2908683,2908686,2908688,5681320,5681331,2908668,2908687]);galleries[284961]=new gallery(284961,"5834068,5834067,5834066,5834065,5658760,5157515,5157514,5157512,5157510,5034057,5034056,5034053","John Pollock","gallery",[5157510,5157514,5658760,5834065,5834066,5834067,5834068,5034053,5034057,5157512,5157515,5034056]);galleries[191632]=new gallery(191632,"5723434,3123271,3123270,3123266","Karen Jones","gallery",[3123270,3123271,5723434,3123266]);galleries[328512]=new gallery(328512,"5800998","Les Welton","gallery",[5800998,5801003]);galleries[287982]=new gallery(287982,"5094243,5094240,5094238,5093974","Marilyn Curtis","gallery",[5093974,5094238,5094240,5094243]);galleries[319120]=new gallery(319120,"5628949,5628944","Norman Jenner","gallery",[5628944,5628949]);galleries[320783]=new gallery(320783,"5784853,5662579","Paul Davison","gallery",[5662579,5784852,5784853]);galleries[326687]=new gallery(326687,"5768608,5768566,5768475","Peter Walker","gallery",[5768475,5768566,5768608,5768615]);galleries[321795]=new gallery(321795,"5681312","Roy Levens","gallery",[5681312]);galleries[330167]=new gallery(330167,"5834060","Steve Laity","gallery",[5834060]);var imageSets=new Object();imageSets[1]="5834068,5834067,5834066,5834065,5834060,5784853,5768566,5768475,5739234,5739222,5723434,5681312,5662579,5662572,5658760,5157515,5157514,5157512,4840599,4840588,3123266,2908687";imageSets[2]="5838472,5838466,5834068,5834067,5834066,5834065,5834060,5800998,5784853,5768608,5768566,5768475,5739234,5739222,5723434,5685355,5681320,5681312,5662579,5662568,5658760,5628949,5628944,5190849,5157515,5157514,5157512,5157510,5094243,5094240,5094238,5093974,5041626,5041624,5041619,5034057,5034056,5034053,4840696,4840631,4840617,4840599,4840588,3123271,3123270,3123266,2908688,2908687,2908686,2908683,2908681,2908679,2908675,2908673,2908671,2908669,2908668";imageSets[3]="5834067,5834066,5834065,5658760,5157515,5157512";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/cameraclub/images";break}switch(a){case 1:b="http://www1.clikpic.com/cameraclub/images";break}switch(a){case 2:b="http://admin.clikpic.com/cameraclub/images";break}switch(a){case 24:b="http://tpc15/clikpic/cameraclub/images";break}switch(a){case 4:b="http://www.clikchurch.com/cameraclub/images";break}switch(a){case 5:b="http://www2.clikpic.com/cameraclub/images";break}switch(a){case 22:b="http://tpc5/clikpic/cameraclub/images";break}switch(a){case 23:b="http://tpc10/clikpic/cameraclub/images";break}switch(a){case 25:b="http://tpc16/clikpic/cameraclub/images";break}switch(a){case 15:b="http://www3.clikpic.com/cameraclub/images";break}switch(a){case 18:b="http://www4.clikpic.com/cameraclub/images";break}switch(a){case 19:b="http://www5.clikpic.com/cameraclub/images";break}switch(a){case 31:b="http://www7.clikpic.com/cameraclub/images";break}switch(a){case 32:b="http://admin2.clikpic.com/cameraclub/images";break}switch(a){case 33:b="http://www8.clikpic.com/cameraclub/images";break}switch(a){case 34:b="http://www9.clikpic.com/cameraclub/images";break}switch(a){case 35:b="http://admin3.clikpic.com/cameraclub/images";break}switch(a){case 37:b="http://admin4.clikpic.com/cameraclub/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="West Malling Photographic Society: "+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;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].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(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<120){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+'")'})}}};