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[5928810]=new thumbnail(5928810,"","Man in the doorway","7-Man_in_doorway002_thumb.jpg",111,130,1);thumbnails[5928815]=new thumbnail(5928815,"","Flying Goose","Flying_goose003_thumb.jpg",105,130,1);thumbnails[5928818]=new thumbnail(5928818,"","Sailing in the mist","sailing_in_mist004_thumb.jpg",130,86,1);thumbnails[5928822]=new thumbnail(5928822,"","Sunset on Marshes","Sunset_on_marshes001_thumb.jpg",130,86,1);thumbnails[5015158]=new thumbnail(5015158,"101241","Early Morning by Mike Hignell - winner of the public vote","_MG_8546_merge_3_102_thumb.jpg",130,92,1);thumbnails[5049879]=new thumbnail(5049879,"101241","Maen Llia - Brian Price","Maen-Llia01_thumb.jpg",130,130,1);thumbnails[5314681]=new thumbnail(5314681,"101241","Close Encounters","Close_Encounter01_thumb.jpg",91,130,1);thumbnails[266920]=new thumbnail(266920,"22503","Blea Tarn Gate","Blea tarn gate copy001_thumb.jpg",130,93,1);thumbnails[266922]=new thumbnail(266922,"22503","Blea Tarn","BLRA TARN 1 copy001_thumb.jpg",130,87,1);thumbnails[266923]=new thumbnail(266923,"22503","The Boat House","boathouse copy001_thumb.jpg",86,130,1);thumbnails[266924]=new thumbnail(266924,"22503","Tiger ","tiger copy001_thumb.jpg",87,130,1);thumbnails[1471253]=new thumbnail(1471253,"22503","1st Public vote David Cook - Snowdrops","snowdrops_thumb.jpg",130,92,1);thumbnails[1467845]=new thumbnail(1467845,"22296","2nd Judged - Lorraine Saville - Boats in the Sunset","Boats in the sunset0011_thumb.jpg",130,48,1);thumbnails[1352435]=new thumbnail(1352435,"22296","Angle Poise","Gull at an Angle at 72 dpi0010011_thumb.jpg",130,89,1);thumbnails[1352438]=new thumbnail(1352438,"22296","It's in here somewhere","Feet in Pool0010010011_thumb.jpg",130,80,1);thumbnails[1352440]=new thumbnail(1352440,"22296","Bakeesh please","Egypt slide 18 B&W_thumb.jpg",104,130,1);thumbnails[710843]=new thumbnail(710843,"22641","Wind Farm","Wind Farm 1a web Oct 06001_thumb.jpg",130,98,1);thumbnails[710846]=new thumbnail(710846,"22641","Beach Hut","Beach Hut web Oct 06001_thumb.jpg",130,130,1);thumbnails[710848]=new thumbnail(710848,"22641","Ophelia","Ophelia web Oct 06001_thumb.jpg",130,98,1);thumbnails[710852]=new thumbnail(710852,"22641","Stonehenge ","Stonehenge by Harvist Moon 2006 web Oct 06001_thumb.jpg",130,86,1);thumbnails[249624]=new thumbnail(249624,"22504","Monster Truck","DSC_0114_thumb.jpg",86,130,1);thumbnails[249626]=new thumbnail(249626,"22504","Stars and Stripes","DSC_0190_thumb.jpg",77,130,1);thumbnails[249621]=new thumbnail(249621,"22504","Bumper car","DSC_0204_thumb.jpg",96,130,1);thumbnails[249618]=new thumbnail(249618,"22504","Panaroma","Panaromic_view_off_Bridge_-_Copy_thumb.jpg",130,72,1);thumbnails[266927]=new thumbnail(266927,"23783","Lamb","lamb copy001_thumb.jpg",130,88,1);thumbnails[266928]=new thumbnail(266928,"23783","Rainbow","RAINBOW 2 copy001_thumb.jpg",86,130,1);thumbnails[266929]=new thumbnail(266929,"23783","Seagull scratching","SEAGULL SCRATCHING copy001_thumb.jpg",88,130,1);thumbnails[266931]=new thumbnail(266931,"23783","Sunflower","SUNFLOWER copy001_thumb.jpg",130,87,1);thumbnails[1472591]=new thumbnail(1472591,"23783","3rd Judged - Jackie Cook - Seagull","SEAGULL 3001_thumb.jpg",130,87,1);thumbnails[270706]=new thumbnail(270706,"24094","Austin A30","Austin_A30001_thumb.jpg",90,130,1);thumbnails[270707]=new thumbnail(270707,"24094","Kennet Canal Hungerford","Kennet_Canal3001_thumb.jpg",86,130,1);thumbnails[270709]=new thumbnail(270709,"24094","Woolacombe Beach","Woolacombe_Beach1001_thumb.jpg",87,130,1);thumbnails[272914]=new thumbnail(272914,"24094","Combe Gibbet","GibbHCC99_MG_0798-01001_thumb.jpg",92,130,1);thumbnails[4136203]=new thumbnail(4136203,"24704","Lily","Lily_thumb.jpg",91,130,1);thumbnails[4136208]=new thumbnail(4136208,"24704","Beauty","Beauty_thumb.jpg",104,130,1);thumbnails[4136214]=new thumbnail(4136214,"24704","","Peacock_Feather_thumb.jpg",87,130,1);thumbnails[4136220]=new thumbnail(4136220,"24704","","A_Place_to_Rest_thumb.jpg",87,130,1);thumbnails[376530]=new thumbnail(376530,"30678","My grandchildren","scan0001001_thumb.jpg",130,87,1);thumbnails[376531]=new thumbnail(376531,"30678","","scan0002001_thumb.jpg",87,130,1);thumbnails[376532]=new thumbnail(376532,"30678","","scan0003001_thumb.jpg",130,87,1);thumbnails[376533]=new thumbnail(376533,"30678","","scan0004001_thumb.jpg",130,87,1);thumbnails[6290092]=new thumbnail(6290092,"30822","","IMG_0675small_thumb.jpg",130,98,1);thumbnails[6290108]=new thumbnail(6290108,"30822","","IMG_0414small001_thumb.jpg",98,130,1);thumbnails[6290156]=new thumbnail(6290156,"30822","","IMG_0833small001_thumb.jpg",130,98,1);thumbnails[6290160]=new thumbnail(6290160,"30822","","IMG_9128small002_thumb.jpg",98,130,1);thumbnails[4382187]=new thumbnail(4382187,"42620","","IMG_00451_thumb.jpg",130,92,1);thumbnails[4382200]=new thumbnail(4382200,"42620","","IMG_02152_thumb.jpg",130,98,1);thumbnails[4382203]=new thumbnail(4382203,"42620","","IMG_06084_thumb.jpg",130,98,1);thumbnails[4382206]=new thumbnail(4382206,"42620","","IMG_02713_thumb.jpg",130,92,1);thumbnails[1467842]=new thumbnail(1467842,"57623","Venice canal","exhibition print001_thumb.jpg",58,130,1);thumbnails[746627]=new thumbnail(746627,"57623","American Sparrow Hawk","American Sparrow Hawk001_thumb.jpg",87,130,1);thumbnails[746629]=new thumbnail(746629,"57623","Coombe in the frost","Coombe001_thumb.jpg",87,130,1);thumbnails[746631]=new thumbnail(746631,"57623","Helford Estuary","Helford Estuary001_thumb.jpg",130,87,1);thumbnails[746633]=new thumbnail(746633,"57623","Waterfall in the Doone Valley","Waterfall in Doone Valley001_thumb.jpg",130,87,1);thumbnails[830399]=new thumbnail(830399,"64198","","sunderise-A5 copy001_thumb.jpg",130,86,1);thumbnails[830400]=new thumbnail(830400,"64198","Pines","Pines-A5 copy001_thumb.jpg",88,130,1);thumbnails[830403]=new thumbnail(830403,"64198","","chase-stream-A5 copy001_thumb.jpg",88,130,1);thumbnails[946569]=new thumbnail(946569,"71655","Barn Owl!","Pic1_thumb.jpg",130,130,1);thumbnails[946582]=new thumbnail(946582,"71655","Train 069","Train 069_thumb.jpg",130,87,1);thumbnails[946583]=new thumbnail(946583,"71655","Splash of colour","Splash of colour_thumb.jpg",130,87,1);thumbnails[946586]=new thumbnail(946586,"71655","Geometrical pattern","Geometrical pattern_thumb.jpg",130,87,1);thumbnails[4382293]=new thumbnail(4382293,"84576","","Dsc_1405a1_thumb.jpg",87,130,1);thumbnails[4382296]=new thumbnail(4382296,"84576","","Dsc_6859a2_thumb.jpg",87,130,1);thumbnails[4382297]=new thumbnail(4382297,"84576","","Dsc_7968a3_thumb.jpg",87,130,1);thumbnails[4382300]=new thumbnail(4382300,"84576","","Dsc_8109a4_thumb.jpg",87,130,1);thumbnails[1352415]=new thumbnail(1352415,"94690","Pendine Rays","PendineRays001_thumb.jpg",130,80,1);thumbnails[1352419]=new thumbnail(1352419,"94690","Racing","Racing125001_thumb.jpg",130,92,1);thumbnails[1352422]=new thumbnail(1352422,"94690","Autumn","AutumnK&A001_thumb.jpg",94,130,1);thumbnails[1352425]=new thumbnail(1352425,"94690","Bald Eagle","BaldEagle001_thumb.jpg",111,130,1);thumbnails[1471347]=new thumbnail(1471347,"101245","Puffin with Sand Eels","Puffin with Sand Eels001001_thumb.jpg",92,130,1);thumbnails[2981945]=new thumbnail(2981945,"183608","Party Animal","Party Animal_thumb.jpg",95,130,1);thumbnails[2981948]=new thumbnail(2981948,"183608","Clouds","StNichs_thumb.jpg",130,86,1);thumbnails[2981951]=new thumbnail(2981951,"183608","Tree Roots","Tree Roots_thumb.jpg",87,130,1);thumbnails[3966895]=new thumbnail(3966895,"192114","Foxglove","foxglove_thumb.jpg",73,130,1);thumbnails[3966899]=new thumbnail(3966899,"192114","","goldfinch_thumb.jpg",87,130,1);thumbnails[3966902]=new thumbnail(3966902,"192114","","horse_thumb.jpg",86,130,1);thumbnails[3966905]=new thumbnail(3966905,"192114","","stonehenge_thumb.jpg",130,87,1);thumbnails[5015161]=new thumbnail(5015161,"284265","","_MG_956901_thumb.jpg",92,130,1);var galleries=new Object();galleries[101241]=new gallery(101241,"5314681,5049879,5015158","Annual Exhibition 2009","gallery",[5015158,5049879,5314681]);galleries[22503]=new gallery(22503,"1471253","David Cook ","gallery",[266920,266922,266923,266924,1471253]);galleries[22296]=new gallery(22296,"1352438","Lorraine Saville","gallery",[1467845,1352435,1352438,1352440]);galleries[22641]=new gallery(22641,"710843","Micky Thompson","gallery",[710843,710846,710848,710852]);galleries[22504]=new gallery(22504,"249621","Carl Holmes","gallery",[249624,249626,249621,249618]);galleries[23783]=new gallery(23783,"266931","Jackie Cook","gallery",[266927,266928,266929,266931,1472591]);galleries[24094]=new gallery(24094,"272914","Chris Keene","gallery",[270706,270707,270709,272914]);galleries[24704]=new gallery(24704,"4136220,4136214,4136208,4136203","Janet Taylor","gallery",[4136203,4136208,4136214,4136220]);galleries[30678]=new gallery(30678,"376530","Patricia Nicholson","gallery",[376530,376531,376532,376533]);galleries[30822]=new gallery(30822,"6290160,6290156,6290108,6290092","Mike Robinson","gallery",[6290092,6290108,6290156,6290160]);galleries[42620]=new gallery(42620,"4382206,4382203,4382200,4382187","Giff Cooper","gallery",[4382187,4382200,4382203,4382206]);galleries[57623]=new gallery(57623,"746633","Simon Ball","gallery",[1467842,746627,746629,746631,746633]);galleries[64198]=new gallery(64198,"830399","Neil Salmon","gallery",[830399,830400,830403]);galleries[71655]=new gallery(71655,"946583","Tony Bartlett","gallery",[946569,946582,946583,946586]);galleries[84576]=new gallery(84576,"4382300,4382297,4382296,4382293","Janet O'Hara","gallery",[4382293,4382296,4382297,4382300]);galleries[94690]=new gallery(94690,"1352415","Richard Crowther","gallery",[1352415,1352419,1352422,1352425]);galleries[101245]=new gallery(101245,"1471347","Pat Kenchington","gallery",[1471347]);galleries[183608]=new gallery(183608,"2981945","John Priest","gallery",[2981945,2981948,2981951]);galleries[192114]=new gallery(192114,"3966905","Brian Price","gallery",[3966895,3966899,3966902,3966905]);galleries[284265]=new gallery(284265,"5015161","Mike Hignell","gallery",[5015161]);var imageSets=new Object();imageSets[1]="6290160,6290156,6290108,6290092,5928822,5928818,5928815,5928810,5314681,5049879,4136220,4136214,4136208,4136203,3966905,3966902,3966899,3966895,2981951,2981948,2981945,1472591,1471347,1471253,1467845,1352440,1352438,1352435,1352425,1352422,1352419,1352415,946586,946583,946582,946569,830403,830400,830399,746633,746631,746629,746627,710852,710848,710846,710843,272914,266931,266929,266927,266924,266922,266920,249626,249624,249621,249618";imageSets[2]="6290160,6290156,6290108,6290092,5928822,5928818,5928815,5928810,5314681,5049879,5015161,5015158,3966905,2981945,1471347,1471253,1352438,1352415,946583,830399,746633,710843,376530,272914,266931,249621";imageSets[3]="6290160,6290156,6290108,6290092,5928822,5928818,5928815,5928810,5314681,5049879,5015161,5015158,4382300,4382297,4382296,4382293,4382206,4382203,4382200,4382187,4136220,4136214,4136208,4136203,3966905,3966902,3966899,3966895,2981951,2981948,2981945,1472591,1471347,1471253,1467845,1467842,1352440,1352438,1352435,1352425,1352422,1352419,1352415,946586,946583,946582,946569,830403,830400,830399";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/HungferfordCC/images";break}switch(a){case 1:b="http://www1.clikpic.com/HungferfordCC/images";break}switch(a){case 2:b="http://admin.clikpic.com/HungferfordCC/images";break}switch(a){case 24:b="http://tpc15/clikpic/HungferfordCC/images";break}switch(a){case 4:b="http://www.clikchurch.com/HungferfordCC/images";break}switch(a){case 5:b="http://www2.clikpic.com/HungferfordCC/images";break}switch(a){case 22:b="http://tpc5/clikpic/HungferfordCC/images";break}switch(a){case 23:b="http://tpc10/clikpic/HungferfordCC/images";break}switch(a){case 25:b="http://tpc16/clikpic/HungferfordCC/images";break}switch(a){case 15:b="http://www3.clikpic.com/HungferfordCC/images";break}switch(a){case 18:b="http://www4.clikpic.com/HungferfordCC/images";break}switch(a){case 19:b="http://www5.clikpic.com/HungferfordCC/images";break}switch(a){case 31:b="http://www7.clikpic.com/HungferfordCC/images";break}switch(a){case 32:b="http://admin2.clikpic.com/HungferfordCC/images";break}switch(a){case 33:b="http://www8.clikpic.com/HungferfordCC/images";break}switch(a){case 34:b="http://www9.clikpic.com/HungferfordCC/images";break}switch(a){case 35:b="http://admin3.clikpic.com/HungferfordCC/images";break}switch(a){case 37:b="http://admin4.clikpic.com/HungferfordCC/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="Hungerford 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;resizePhotoInfo({centre:true});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+'")'})}}};