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[571760]=new thumbnail(571760,"43042","Robin Hoods Bay","robin hood 3 for web_thumb.jpg",130,38,15);thumbnails[549441]=new thumbnail(549441,"44976","Staithes North Yorkshire","staithes warm up copy_thumb.jpg",130,89,15);thumbnails[549467]=new thumbnail(549467,"42474","Billy Idol ","IMG_8944 copy copy_thumb.jpg",130,99,15);thumbnails[555146]=new thumbnail(555146,"44976","Staithes North Yorkshire","stai1_thumb.jpg",130,176,15);thumbnails[555155]=new thumbnail(555155,"43015","Swan Landing on the Lake","00192 copy_thumb.jpg",130,81,15);thumbnails[555159]=new thumbnail(555159,"44976","Holiday Cottage","00197 copy_thumb.jpg",130,107,15);thumbnails[555161]=new thumbnail(555161,"44976","Whitby Pier","CRW_5815 copy_thumb.jpg",130,176,15);thumbnails[555165]=new thumbnail(555165,"43015","Deer","00204 copy_thumb.jpg",130,111,15);thumbnails[555168]=new thumbnail(555168,"43015","Owl Eyes","Dscf0343_thumb.jpg",130,107,15);thumbnails[555179]=new thumbnail(555179,"44975","Chatsworth House at Night","CRW_1769 copy_thumb.jpg",130,68,15);thumbnails[555541]=new thumbnail(555541,"44976","Whitby Sands","CRW_1425 copy_thumb.jpg",130,188,15);thumbnails[555547]=new thumbnail(555547,"42468","Chesterfield","CRW_5233 copy_thumb.jpg",130,187,15);thumbnails[555572]=new thumbnail(555572,"43014","Red Arrows","IMG_1066 copy_thumb.jpg",130,178,15);thumbnails[555580]=new thumbnail(555580,"44976","Whitby Abbey","00187_RJ copy_thumb.jpg",130,88,15);thumbnails[555595]=new thumbnail(555595,"43015","Monkeys","IMG_1305 copy_thumb.jpg",130,102,15);thumbnails[555605]=new thumbnail(555605,"42468","Richmond","IMG_3015 copy_thumb.jpg",130,190,15);thumbnails[555614]=new thumbnail(555614,"42468","Cleethorpes in winter","IMG_4461 copy_thumb.jpg",130,190,15);thumbnails[556948]=new thumbnail(556948,"43015","Seal Pup","IMG_4268 copy_thumb.jpg",130,112,15);thumbnails[556950]=new thumbnail(556950,"42468","Richmond Castle","00218 copy_thumb.jpg",130,82,15);thumbnails[556957]=new thumbnail(556957,"42474","Orson","IMG_1092 copy copy_thumb.jpg",130,100,15);thumbnails[556963]=new thumbnail(556963,"42474","NME TOUR","nme tour montage copy_thumb.jpg",130,99,15);thumbnails[557802]=new thumbnail(557802,"43042","Barcelona FC","barcelona finnished copy_thumb.jpg",130,49,15);thumbnails[557882]=new thumbnail(557882,"43015","Monkey","00227 copy_thumb.jpg",130,139,15);thumbnails[583651]=new thumbnail(583651,"44976","The Boat","IMG_5418 copy copy_thumb.jpg",130,93,15);thumbnails[583652]=new thumbnail(583652,"44976","Robin Hoods Bay","IMG_5422 copy copy_thumb.jpg",130,91,15);thumbnails[583653]=new thumbnail(583653,"44976","Robin Hoods bay","IMG_5607 copy copy_thumb.jpg",130,98,15);thumbnails[583670]=new thumbnail(583670,"44976","The Old Post Office","IMG_5623 copy copy_thumb.jpg",130,166,15);thumbnails[583674]=new thumbnail(583674,"44975","Cottage in the Country","00225 copy_thumb.jpg",130,89,15);thumbnails[583676]=new thumbnail(583676,"44975","Chatsworth House","CRW_1731 copy_thumb.jpg",130,81,15);thumbnails[583678]=new thumbnail(583678,"44976","Beach Huts","00234_RJ copy_thumb.jpg",130,92,15);thumbnails[583681]=new thumbnail(583681,"44976","Whitby Pier","whit pier1_thumb.jpg",130,95,15);thumbnails[583686]=new thumbnail(583686,"42468","Barcelona","IMG_7334 copy_thumb.jpg",130,86,15);thumbnails[584208]=new thumbnail(584208,"42468","Renishaw Hall Gardens","00244_RJ copy_thumb.jpg",130,92,15);thumbnails[585733]=new thumbnail(585733,"42822","Crooked Spire","00147_RJ copy_thumb.jpg",130,177,15);thumbnails[585742]=new thumbnail(585742,"44976","Staithes","00198 copy_thumb.jpg",130,98,15);thumbnails[586846]=new thumbnail(586846,"42822","Flying Scotsman","112_1228_RT8 copy_thumb.jpg",130,95,15);thumbnails[586848]=new thumbnail(586848,"44976","Sandsend","138_3846 copy_thumb.jpg",130,85,15);thumbnails[586851]=new thumbnail(586851,"42468","Renishaw Hall Gardens","00243_RJ copy_thumb.jpg",130,89,15);thumbnails[586858]=new thumbnail(586858,"42822","Wards Brewery sheffield","wards copy_thumb.jpg",130,158,15);thumbnails[648034]=new thumbnail(648034,"43015","Red Panda","CRW_5338 copy_thumb.jpg",130,99,15);thumbnails[648038]=new thumbnail(648038,"42468","Cromford Mill Pond","IMG_1164 copy_thumb.jpg",130,188,15);thumbnails[648042]=new thumbnail(648042,"44975","Castleton","IMG_4098 copy copy_thumb.jpg",130,94,15);thumbnails[659636]=new thumbnail(659636,"43042","The Winter Gardens in sheffield","sheffield copy_thumb.jpg",130,57,15);thumbnails[659637]=new thumbnail(659637,"43042","Bramall Lane ","blades3 copy_thumb.jpg",130,70,15);thumbnails[659639]=new thumbnail(659639,"43042","La Scala Milan","la scarla copy_thumb.jpg",130,57,15);thumbnails[659641]=new thumbnail(659641,"42822","Real Madrid","IMG_8391 copy_thumb.jpg",130,99,15);thumbnails[659648]=new thumbnail(659648,"44975","Hathersage","Dscf1778_thumb.jpg",130,170,15);thumbnails[659650]=new thumbnail(659650,"42822","Madrid","IMG_8259 copy_thumb.jpg",130,95,15);thumbnails[701681]=new thumbnail(701681,"53907","Harris Hawk","IMG_4998 copy copy_thumb.jpg",130,106,15);thumbnails[701691]=new thumbnail(701691,"53907","Harris Hawk Taken At Maltby","IMG_4996 copy copy_thumb.jpg",130,106,15);thumbnails[701701]=new thumbnail(701701,"53907","Harris Hawk","IMG_4887 copy copy_thumb.jpg",130,106,15);thumbnails[701709]=new thumbnail(701709,"53907","Harris Hawk","IMG_4874 copy copy_thumb.jpg",130,106,15);thumbnails[701718]=new thumbnail(701718,"53907","Harris Hawk in Flight","IMG_4625 copy copy_thumb.jpg",130,93,15);thumbnails[701725]=new thumbnail(701725,"53907","Harris Hawk in Flight","IMG_4622 copy copy_thumb.jpg",130,68,15);thumbnails[701727]=new thumbnail(701727,"53907","Harris Hawk in Flight","IMG_4595 copy copy_thumb.jpg",130,106,15);thumbnails[701733]=new thumbnail(701733,"53907","Harris Hawk","IMG_4594 copy copy_thumb.jpg",130,106,15);thumbnails[701740]=new thumbnail(701740,"53907","Harris Hawk","IMG_4572 copy copy_thumb.jpg",130,106,15);thumbnails[701742]=new thumbnail(701742,"53907","Harris Hawk in Flight","IMG_4463 copy copy_thumb.jpg",130,106,15);thumbnails[1758712]=new thumbnail(1758712,"118097","David and Tina's wedding 2007","IMG_6507 copy copy_thumb.jpg",130,179,15);thumbnails[1758718]=new thumbnail(1758718,"118097","David and Tina's Wedding Day 2007","IMG_6508 copy_thumb.jpg",130,188,15);thumbnails[549374]=new thumbnail(549374,"42339","Bee on a Flower","CRW_6786_RT8 copy copy_thumb.jpg",130,165,15);thumbnails[555174]=new thumbnail(555174,"42339","Flower","Dscf0071_thumb.jpg",130,174,15);thumbnails[555552]=new thumbnail(555552,"42339","Flower","DSCF2273 copy_thumb.jpg",130,100,15);thumbnails[555561]=new thumbnail(555561,"42339","Tulips","flow_thumb.jpg",130,195,15);var galleries=new Object();galleries[42474]=new gallery(42474,"549467","Concert/Music Photography","gallery",[549467,556957,556963]);galleries[53907]=new gallery(53907,"701742,701740,701733,701727,701725,701718,701709,701701,701691,701681","Harris Hawk","gallery",[701681,701691,701701,701709,701718,701725,701727,701733,701740,701742]);galleries[42468]=new gallery(42468,"648038,586851,584208,583686,556950,555614,555605,555547","Landscape Photography","gallery",[555547,555605,555614,556950,583686,584208,586851,648038]);galleries[42822]=new gallery(42822,"659650,659641,586858,586846,585733","Odds and Sods","gallery",[585733,586846,586858,659641,659650]);galleries[43042]=new gallery(43042,"659639,659637,659636,571760,557802","Panoramics","gallery",[571760,557802,659636,659637,659639]);galleries[43014]=new gallery(43014,"555572","Red Arrows","gallery",[555572]);galleries[44975]=new gallery(44975,"659648,648042,583676,583674,555179","The Peak District","gallery",[555179,583674,583676,648042,659648]);galleries[44976]=new gallery(44976,"549441","The Yorkshire Coast","gallery",[549441,555146,555159,555161,555541,555580,583651,583652,583653,583670,583678,583681,585742,586848]);galleries[118097]=new gallery(118097,"1758718,1758712","Wedding Photos","gallery",[1758712,1758718]);galleries[43015]=new gallery(43015,"648034,557882,556948,555595,555168,555165,555155","Wildlife","gallery",[555155,555165,555168,555595,556948,557882,648034]);galleries[42339]=new gallery(42339,"555561,555552,555174,549374","Natural History","gallery",[549374,555174,555552,555561]);var imageSets=new Object();imageSets[1]="586858,586851,586848,586846,585742,585733,584208,583686,583681,583678,583676,583674,583670,583653,583652,583651,571760,557882,557802,556963,556957,556950,556948,555614,555605,555580,555572,555561,555552,555547,555541,555161,549374";imageSets[2]="549467,549441";imageSets[3]="1758718,1758712,701742,701740,701733,701727,701725,701718,701709,701701,701691,701681,659650,659648,659641,659639,659637,659636,648042,648038,648034,586858,586851,586848,586846,585742,585733,584208,583686,583681,583678,583676,583674,583670,583653,583652,583651,571760,557882,557802,556963,556957,556950,556948,555614,555605,555595,555580,555572,555561";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 34:b="http://www9.clikpic.com/bigwhopper/images";break}switch(a){case 1:b="http://www1.clikpic.com/bigwhopper/images";break}switch(a){case 2:b="http://admin.clikpic.com/bigwhopper/images";break}switch(a){case 4:b="http://www.clikchurch.com/bigwhopper/images";break}switch(a){case 5:b="http://www2.clikpic.com/bigwhopper/images";break}switch(a){case 15:b="http://www3.clikpic.com/bigwhopper/images";break}switch(a){case 21:b="http://www6.clikpic.com/bigwhopper/images";break}switch(a){case 18:b="http://www4.clikpic.com/bigwhopper/images";break}switch(a){case 19:b="http://www5.clikpic.com/bigwhopper/images";break}switch(a){case 22:b="http://tpc5/clikpic/bigwhopper/images";break}switch(a){case 23:b="http://tpc10/clikpic/bigwhopper/images";break}switch(a){case 24:b="http://tpc15/clikpic/bigwhopper/images";break}switch(a){case 25:b="http://tpc16/clikpic/bigwhopper/images";break}switch(a){case 31:b="http://www7.clikpic.com/bigwhopper/images";break}switch(a){case 32:b="http://admin2.clikpic.com/bigwhopper/images";break}switch(a){case 33:b="http://www8.clikpic.com/bigwhopper/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="LIFE IS BETTER STILL...KEVIN WELLS LRPS : "+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+"</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="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+'")'})}}};