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[3512150]=new thumbnail(3512150,"214329","Bembridge Windmill","Bembridge_Wingmill_thumb.jpg",130,87,15);thumbnails[3512155]=new thumbnail(3512155,"214329","Coast Seawall","Bembridge_Coast_Seawall_thumb.jpg",130,87,15);thumbnails[3512182]=new thumbnail(3512182,"214329","Clouds","Bembridge_coast_Clouds_thumb.jpg",130,85,15);thumbnails[3512205]=new thumbnail(3512205,"214329","Beach enclave","Beach_enclave_thumb.jpg",130,87,15);thumbnails[3512209]=new thumbnail(3512209,"214329","Lifeboat pier Bembridge","Lifeboat_pier_Bembridge_thumb.jpg",130,85,15);thumbnails[3512218]=new thumbnail(3512218,"214329","Horningsea","Horningsea_thumb.jpg",130,87,15);thumbnails[3512224]=new thumbnail(3512224,"214329","Frozen lake","Icetrack_thumb.jpg",130,87,15);thumbnails[3512229]=new thumbnail(3512229,"214329","Path to bridge","Path_to_bridge_thumb.jpg",87,130,15);thumbnails[3512234]=new thumbnail(3512234,"214329","Footbridge","Footbridge_thumb.jpg",87,130,15);thumbnails[3512243]=new thumbnail(3512243,"214329","Overgrown gate","Overgrown_gate_thumb.jpg",87,130,15);thumbnails[3512248]=new thumbnail(3512248,"214329","Petal carpet","Petal_carpet_thumb.jpg",130,87,15);thumbnails[3512254]=new thumbnail(3512254,"214329","Wier","Wier_thumb.jpg",130,87,15);thumbnails[3527440]=new thumbnail(3527440,"214329","Autumn treescape","Autumn-Treescape_thumb.jpg",130,87,15);thumbnails[3527442]=new thumbnail(3527442,"214329","Beach silhouette","Beach-silhouette_thumb.jpg",130,76,15);thumbnails[3527444]=new thumbnail(3527444,"214329","Shore","Shore_thumb.jpg",130,87,15);thumbnails[3527446]=new thumbnail(3527446,"214329","Thoresby Park","Thoresby-Park_thumb.jpg",130,98,15);thumbnails[3527448]=new thumbnail(3527448,"214329","Yarmouth-Regatta-Isle-Of-Wight","Yarmouth-Regatta-Isle-Of-Wi_thumb.jpg",130,93,15);thumbnails[3593557]=new thumbnail(3593557,"214329","Cycle and footbridge, Milton","Cycle-footbridge-Milton1_thumb.jpg",87,130,15);thumbnails[3512272]=new thumbnail(3512272,"214330","All Saints Church Godshill","All_Saints_Church_Godshill_thumb.jpg",130,87,15);thumbnails[3512275]=new thumbnail(3512275,"214330","Bembridge windmill","Bembridge_windmill_thumb.jpg",87,130,15);thumbnails[3512281]=new thumbnail(3512281,"214330","Shanklin Old Town","Shanklin_Old_Town_thumb.jpg",130,87,15);thumbnails[3512282]=new thumbnail(3512282,"214330","Cottage roof","Cottage_roof_thumb.jpg",130,87,15);thumbnails[3512285]=new thumbnail(3512285,"214330","Window","Window_thumb.jpg",78,130,15);thumbnails[3527395]=new thumbnail(3527395,"214330","Fountains Abbey","Fountains-Abbey_thumb.jpg",130,83,15);thumbnails[3527433]=new thumbnail(3527433,"214330","Fountains Abbey","Fountains-Abbey-2_thumb.jpg",130,87,15);thumbnails[3527435]=new thumbnail(3527435,"214330","Greenhouse","Greenhouse_thumb.jpg",98,130,15);thumbnails[3527437]=new thumbnail(3527437,"214330","Wisborough-Green-Church","Wisborough-Green-Church_thumb.jpg",130,98,15);thumbnails[3512287]=new thumbnail(3512287,"214784","Frosty Choycia","Frosty_Choycia_thumb.jpg",87,130,15);thumbnails[3512288]=new thumbnail(3512288,"214784","Fungus","Fungus_thumb.jpg",130,87,15);thumbnails[3512289]=new thumbnail(3512289,"214784","Sunflower","Sunflower_thumb.jpg",130,87,15);thumbnails[3572840]=new thumbnail(3572840,"214784","Daffodil Narcissus","Daffodil_Narcissus_thumb.jpg",87,130,15);thumbnails[3593566]=new thumbnail(3593566,"214784","Oak leaf","IMG_6599_thumb.jpg",87,130,15);thumbnails[3512364]=new thumbnail(3512364,"214785","Dragonfly","Dragonfly_thumb.jpg",87,130,15);thumbnails[3512367]=new thumbnail(3512367,"214785","Magpie","Magpie_thumb.jpg",130,87,15);thumbnails[3512368]=new thumbnail(3512368,"214785","Robin on song","Robin_on_song_thumb.jpg",130,87,15);thumbnails[3521286]=new thumbnail(3521286,"214785","Mute swan","Mute swan_thumb.jpg",87,130,15);thumbnails[3527385]=new thumbnail(3527385,"214785","Kestrel hovering","Kestrel_thumb.jpg",130,87,15);thumbnails[3593570]=new thumbnail(3593570,"214785","Goose","IMG_0323_thumb.jpg",130,87,15);thumbnails[3512371]=new thumbnail(3512371,"214786","Live Steam","Live_Steam_thumb.jpg",130,87,15);thumbnails[3512372]=new thumbnail(3512372,"214786","Saddle tank engine (Red)","Saddle_tank_engine_thumb.jpg",130,87,15);thumbnails[3512375]=new thumbnail(3512375,"214786","Saddle tank engine (green)","Saddle_tank_engine_green_thumb.jpg",87,130,15);thumbnails[3512376]=new thumbnail(3512376,"214786","Signal box","Signal_box_thumb.jpg",130,87,15);thumbnails[3512421]=new thumbnail(3512421,"214786","Pannier tank engine","Pannier_tank_engine_thumb.jpg",130,87,15);thumbnails[3512424]=new thumbnail(3512424,"214786","Workmans hut","Workmans_hut_thumb.jpg",130,87,15);thumbnails[3527452]=new thumbnail(3527452,"214786","Engine-driver-South-Devon-Railway","Engine-driver-South-Devon-R_thumb.jpg",87,130,15);thumbnails[3527455]=new thumbnail(3527455,"214786","Trams","Trams_thumb.jpg",87,130,15);thumbnails[3527456]=new thumbnail(3527456,"214786","Trolley Bus","Trolley-Bus_thumb.jpg",130,87,15);thumbnails[3527457]=new thumbnail(3527457,"214786","Trolley Bus","Trolley-Bus-2_thumb.jpg",87,130,15);thumbnails[3527459]=new thumbnail(3527459,"214786","Water stop Isle of Wight Railway","Water-stop_thumb.jpg",87,130,15);thumbnails[3512308]=new thumbnail(3512308,"214789","Coloured board (Blue)","Coloured_board_Blue_thumb.jpg",130,87,15);thumbnails[3512328]=new thumbnail(3512328,"214789","Coloured board (Red)","Coloured_board_Red_thumb.jpg",130,87,15);thumbnails[3512339]=new thumbnail(3512339,"214789","Ice patern","Copy-of-Ice-patern_thumb.jpg",130,87,15);thumbnails[3512354]=new thumbnail(3512354,"214789","Gravel","Gravel_thumb.jpg",87,130,15);thumbnails[3512539]=new thumbnail(3512539,"214791","Kodak no 2 Hawkette","no-2-hawkette_thumb.jpg",98,130,15);thumbnails[3512542]=new thumbnail(3512542,"214791","Coronet Cub","coronet-cub_thumb.jpg",130,98,15);thumbnails[3512546]=new thumbnail(3512546,"214791","Ensign box camera","ensign-box_thumb.jpg",111,130,15);thumbnails[3513745]=new thumbnail(3513745,"214791","Brownie Flash IV","brownie-flash-IV_thumb.jpg",110,130,15);thumbnails[3513748]=new thumbnail(3513748,"214791","Purma Special","purma-special_thumb.jpg",130,84,15);thumbnails[3527494]=new thumbnail(3527494,"214791","Sanderson","Sanderson_thumb.jpg",130,87,15);thumbnails[3593896]=new thumbnail(3593896,"214791","Ilford Advocate","Ilford_Advocate_thumb.jpg",130,84,15);thumbnails[3593915]=new thumbnail(3593915,"214791","Iloca stereo","Iloca_stereo_thumb.jpg",130,68,15);thumbnails[3593924]=new thumbnail(3593924,"214791","Rolleicord twin lens reflex","Rolleicord_thumb.jpg",96,130,15);thumbnails[3593929]=new thumbnail(3593929,"214791","Shew","shew_thumb.jpg",130,101,15);thumbnails[3512293]=new thumbnail(3512293,"214790","Danger snowball","Danger_snowball_thumb.jpg",130,87,15);thumbnails[3512297]=new thumbnail(3512297,"214790","Telephone pole","Telephone_pole_thumb.jpg",130,87,15);thumbnails[3512300]=new thumbnail(3512300,"214790","Twin bears","Twin_bears_thumb.jpg",130,87,15);thumbnails[3527450]=new thumbnail(3527450,"214790","Gaffers day Yarmouth Isle of Wight","Gaffers day Yarmouth Isle of Wight_thumb.jpg",130,98,15);var galleries=new Object();galleries[214329]=new gallery(214329,"3512218","Landscapes","gallery",[3512150,3512155,3512182,3512205,3512209,3512218,3512224,3512229,3512234,3512243,3512248,3512254,3527440,3527442,3527444,3527446,3527448,3593557]);galleries[214330]=new gallery(214330,"3527437,3527435,3527433,3527395,3512285,3512282,3512281,3512275,3512272","Buildings","gallery",[3512272,3512275,3512281,3512282,3512285,3527395,3527433,3527435,3527437]);galleries[214784]=new gallery(214784,"3593566,3572840,3512289,3512288,3512287","Flora","gallery",[3512287,3512288,3512289,3572840,3593566]);galleries[214785]=new gallery(214785,"3593570,3527385,3521286,3512368,3512367,3512364","Wildlife","gallery",[3512364,3512367,3512368,3521286,3527385,3593570]);galleries[214786]=new gallery(214786,"3527459,3527457,3527456,3527455,3527452,3512424,3512421,3512376,3512375,3512372","Transport","gallery",[3512371,3512372,3512375,3512376,3512421,3512424,3527452,3527455,3527456,3527457,3527459]);galleries[214789]=new gallery(214789,"3512354,3512339,3512328,3512308","Abstract","gallery",[3512308,3512328,3512339,3512354]);galleries[214791]=new gallery(214791,"3593929,3593924,3593915,3593896,3527494,3513748,3513745,3512546,3512542,3512539","Old Cameras","gallery",[3512539,3512542,3512546,3513745,3513748,3527494,3593896,3593915,3593924,3593929]);galleries[214790]=new gallery(214790,"3527450,3512300,3512297,3512293","General","gallery",[3512293,3512297,3512300,3527450]);var imageSets=new Object();imageSets[1]="3593896,3593557,3527494,3527459,3527457,3527456,3527455,3527452,3527450,3527448,3527446,3527444,3527442,3527440,3527437,3527435,3527433,3527395,3527385,3521286,3513748,3513745,3512539,3512421,3512371,3512367,3512328,3512300,3512289,3512281,3512272,3512229,3512218,3512182,3512150";imageSets[2]="3512218";imageSets[3]="3593929,3593924,3593915,3593896,3593570,3593566,3593557,3572840,3527494,3527459,3527457,3527456,3527455,3527452,3527450,3527448,3527446,3527444,3527442,3527440,3527437,3527435,3527433,3527395,3527385,3521286,3513748,3513745,3512546,3512542,3512539,3512424,3512421,3512376,3512375,3512372,3512371,3512368,3512367,3512364,3512354,3512339,3512328,3512308,3512300,3512297,3512293,3512289,3512288,3512287";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/allanbell/images";break}switch(a){case 1:b="http://www1.clikpic.com/allanbell/images";break}switch(a){case 2:b="http://admin.clikpic.com/allanbell/images";break}switch(a){case 24:b="http://tpc15/clikpic/allanbell/images";break}switch(a){case 4:b="http://www.clikchurch.com/allanbell/images";break}switch(a){case 5:b="http://www2.clikpic.com/allanbell/images";break}switch(a){case 22:b="http://tpc5/clikpic/allanbell/images";break}switch(a){case 23:b="http://tpc10/clikpic/allanbell/images";break}switch(a){case 25:b="http://tpc16/clikpic/allanbell/images";break}switch(a){case 15:b="http://www3.clikpic.com/allanbell/images";break}switch(a){case 18:b="http://www4.clikpic.com/allanbell/images";break}switch(a){case 19:b="http://www5.clikpic.com/allanbell/images";break}switch(a){case 31:b="http://www7.clikpic.com/allanbell/images";break}switch(a){case 32:b="http://admin2.clikpic.com/allanbell/images";break}switch(a){case 33:b="http://www8.clikpic.com/allanbell/images";break}switch(a){case 34:b="http://www9.clikpic.com/allanbell/images";break}switch(a){case 35:b="http://admin3.clikpic.com/allanbell/images";break}switch(a){case 37:b="http://admin4.clikpic.com/allanbell/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="ABELLPHOTOGRAPHY: "+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(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+'")'})}}};