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[580913]=new thumbnail(580913,"44437","Sea Village I by Gillian McDonald","1003_thumb.jpg",130,121,18);thumbnails[580923]=new thumbnail(580923,"44437"," Sweet Peas by Anne Cotterill","1015_thumb.jpg",130,145,18);thumbnails[580987]=new thumbnail(580987,"44437","Southerndown by Rob Piercy","1009_thumb.jpg",130,93,18);thumbnails[582696]=new thumbnail(582696,"44437"," Ancient Doorway by Sir William Russell Flint  ","10221_thumb.jpg",130,194,18);thumbnails[582822]=new thumbnail(582822,"44437","Midnight Farm by Gillian McDonald","1001_thumb.jpg",130,120,18);thumbnails[582823]=new thumbnail(582823,"44437","St Davids Cathederal by Gillian McDonald","1004_thumb.jpg",130,115,18);thumbnails[582825]=new thumbnail(582825,"44437","Light on the Shore by Gillian McDonald","10051_thumb.jpg",130,49,18);thumbnails[582827]=new thumbnail(582827,"44437","Llanwanda by John Knapp-Fisher","1006_thumb.jpg",130,33,18);thumbnails[582829]=new thumbnail(582829,"44437","Tregynnon Farm by John Knapp-Fisher","1007_thumb.jpg",130,98,18);thumbnails[582830]=new thumbnail(582830,"44437","Beach Conversation by Rob Piercy","1008_thumb.jpg",130,87,18);thumbnails[582833]=new thumbnail(582833,"44437","Lights over Glyders by Rob Piercy","1010_thumb.jpg",130,85,18);thumbnails[582835]=new thumbnail(582835,"44437","The night has a thousand eyes by Sue Howells","1011_thumb.jpg",130,67,18);thumbnails[582842]=new thumbnail(582842,"44437","el sombrero rojo by Fletcher Sibthorpe","1013_thumb.jpg",130,156,18);thumbnails[582843]=new thumbnail(582843,"44437","belleza en las sombras by Fletcher Sibthorpe","1014_thumb.jpg",130,156,18);thumbnails[582844]=new thumbnail(582844,"44437","Miss Lily tells Angelina that she is a good little dancer by Helen Craig","HC3001_small_thumb.jpg",130,65,18);thumbnails[582846]=new thumbnail(582846,"44437","Mare and Foal by jacqueline Stanhope","1019_thumb.jpg",130,110,18);thumbnails[582849]=new thumbnail(582849,"44437","Golden Retriever by Jacqueline Stanhope","1020_thumb.jpg",130,99,18);thumbnails[582851]=new thumbnail(582851,"44437","Original oil painting by Alan Tortice","1021_thumb.jpg",130,80,18);thumbnails[584150]=new thumbnail(584150,"44437","Roses of Provence by Anne Cotterill","10161_thumb.jpg",130,161,18);thumbnails[584182]=new thumbnail(584182,"44437","La Belle Epoque,Aix by Jeremy Barlow","db_belleepoque1_thumb.jpg",130,105,18);thumbnails[584183]=new thumbnail(584183,"44437","an original oil painting by Andrew Grant Kurtis","1023_thumb.jpg",130,86,18);thumbnails[584184]=new thumbnail(584184,"44437","an original oil painting by Edward Hersey","1024_thumb.jpg",130,87,18);thumbnails[584194]=new thumbnail(584194,"44437","an original oil painting by Paul Wilson","1026_thumb.jpg",130,94,18);thumbnails[882997]=new thumbnail(882997,"44437","Stablemates by Jacqueline Stanhope","1046_thumb.jpg",130,95,18);thumbnails[883031]=new thumbnail(883031,"44437","Les Duex Garcons,Aix by Jeremy Barlow ROI","db_les_deux_garcon2_thumb.jpg",130,105,18);thumbnails[814628]=new thumbnail(814628,"63055","Bluebells and May Blossom<br>\r\n by Anne Cotterill","bluebells and may blossom_thumb.jpg",130,161,18);thumbnails[814687]=new thumbnail(814687,"63055","Q is for Queen by Quentin Blake","db_q_queen_thumb.jpg",130,161,18);thumbnails[814690]=new thumbnail(814690,"63055","Heaven Scent by Carolyn Blish","1052_thumb.jpg",130,103,18);thumbnails[814709]=new thumbnail(814709,"63055","an original oil painting by John Horsewell","1053_thumb.jpg",130,101,18);thumbnails[814718]=new thumbnail(814718,"63055","Light on the Loch II by Gillian McDonald","1054_thumb.jpg",130,253,18);thumbnails[814724]=new thumbnail(814724,"63055","Dance II by Raymond Leach<br>\r\n","1055_thumb.jpg",130,109,18);thumbnails[814727]=new thumbnail(814727,"63055","Western Farm by Gillian McDonald<br>\r\n ","1056_thumb.jpg",130,116,18);thumbnails[814759]=new thumbnail(814759,"63055","Windflowers by Anne Cotterill","1057_thumb.jpg",130,106,18);thumbnails[882840]=new thumbnail(882840,"63055","Mauve Hills by Gillian McDonald","MauveHills_thumb.jpg",130,91,18);thumbnails[882862]=new thumbnail(882862,"63055","Donkey over gate by Andrew Hutchinson","1033_thumb.jpg",130,191,18);thumbnails[882904]=new thumbnail(882904,"63055","Facade, Naples. by Jeremy Barlow ROI","1039_thumb.jpg",130,105,18);thumbnails[882917]=new thumbnail(882917,"63055","Filly Foals by Jacqueline Stanhope","1034_thumb.jpg",130,127,18);thumbnails[882923]=new thumbnail(882923,"63055","Happy Days by Sue Howells","1059_thumb.jpg",130,130,18);thumbnails[882927]=new thumbnail(882927,"63055","Mountain Village III by Gillian McDonald","1060_thumb.jpg",130,124,18);thumbnails[882984]=new thumbnail(882984,"63055","Brotherhood by Jacqueline Stanhope","1040_thumb.jpg",130,102,18);thumbnails[1626206]=new thumbnail(1626206,"63055","Guess how much I love you by Anita Jeram","AJ9102_small_thumb.jpg",130,87,18);thumbnails[995588]=new thumbnail(995588,"77682","Snooker World Champions","1062_thumb.jpg",130,130,18);thumbnails[1009865]=new thumbnail(1009865,"77682","Cesc Fabregas","1063_thumb.jpg",130,130,18);thumbnails[1009867]=new thumbnail(1009867,"77682","Theo Walcott","1064_thumb.jpg",130,130,18);thumbnails[1011819]=new thumbnail(1011819,"77682","Edwin Van der Sar","1065_thumb.jpg",130,130,18);thumbnails[1044170]=new thumbnail(1044170,"77682","Ole Gunner Solskjaer","1067_thumb.jpg",130,130,18);thumbnails[4791795]=new thumbnail(4791795,"77682","an original painting by John Horsewell ","IMG_1308_thumb.jpg",130,98,18);thumbnails[4791797]=new thumbnail(4791797,"77682","an original painting by John Horsewell","IMG_1309_thumb.jpg",130,98,18);thumbnails[4791799]=new thumbnail(4791799,"77682","an original elephant painting by Stephen Park","IMG_1313_thumb.jpg",130,98,18);thumbnails[4791801]=new thumbnail(4791801,"77682","an original painting by Wayne Westwood","IMG_1314_thumb.jpg",130,98,18);thumbnails[4791802]=new thumbnail(4791802,"77682","an original painting by Wayne Westwood","IMG_1315_thumb.jpg",130,98,18);thumbnails[1121108]=new thumbnail(1121108,"81947","'Zen' a limited edition solid bronze frog by Tim Cotterill.","BF85Zen_thumb.jpg",130,94,18);thumbnails[1121124]=new thumbnail(1121124,"81947","'Ember' a limited edition solid bronze frog by Tim Cotterill<br>\r\nEdition SOLD OUT","Ember_thumb.jpg",130,129,18);thumbnails[1121125]=new thumbnail(1121125,"81947","'Toady' a limited edition solid bronze frog by Tim Cotterill.","BF54Toady_hr_thumb.jpg",130,174,18);thumbnails[1121128]=new thumbnail(1121128,"81947","'Tag' a limited edition solid bronze frog by Tim Cotterill.","BF102_TagHR_thumb.jpg",130,76,18);thumbnails[1121130]=new thumbnail(1121130,"81947","'Surf' a limited edition solid bronze frog by Tim Cotterill.<br>\r\nEdition SOLD OUT","BFM8_Surf_whtbkgHR_thumb.jpg",130,113,18);thumbnails[1121132]=new thumbnail(1121132,"81947","'Snack Attack' a limited edition solid bronze frog by Tim Cotterill.","BF67BlueSnackAttack_hr_thumb.jpg",130,173,18);thumbnails[1121133]=new thumbnail(1121133,"81947","'Sky' a limited edition solid bronze frog by Tim Cotterill'<br>\r\nEdition SOLD OUT","BFM4_Sky_thumb.jpg",130,93,18);thumbnails[1121134]=new thumbnail(1121134,"81947","'Scout' a limited edition solid bronze frog by Tim Cotterill.","BF71Scout_hr__thumb.jpg",130,98,18);thumbnails[1121140]=new thumbnail(1121140,"81947","'Meadow' a limited edition solid bronze frog by Tim Cotterill.","BFM6_Meadow_whtbkgHR_thumb.jpg",130,120,18);thumbnails[1121284]=new thumbnail(1121284,"81947","'Hung Over' a limited edition solid bronze frog by Tim Cotterill.","BF63HungOver_hr_thumb.jpg",130,173,18);thumbnails[1121295]=new thumbnail(1121295,"81947","'Hibiscus' a limited edition solid bronze frog by Tim Cotterill.<br>\r\nEdition SOLD OUT","Hibiscus_thumb.jpg",130,186,18);thumbnails[1600146]=new thumbnail(1600146,"81947","'Zorro' a limited edition solid bronze frog by Tim Cotterill","BF105_ZorroHR_thumb.jpg",130,103,18);thumbnails[1977084]=new thumbnail(1977084,"81947",'"Coco" a new UK only Limited Edition Bronze Frog. ',"UK Special Patina Frog - Spring 2008_thumb.JPG",130,66,18);thumbnails[5880261]=new thumbnail(5880261,"81947",'"Persia" the latest UK only Special Edition solid bronze frog byTim Cotterill.<br>\r\n',"UK_Spring_Frog_2010_-_4_thumb.jpg",130,93,18);thumbnails[5880491]=new thumbnail(5880491,"81947",'"Bugsy" a Special UK Edition only solid bronze frog by Tim Cotterill',"BF119_UK_Special_thumb.jpeg",130,67,18);thumbnails[5880530]=new thumbnail(5880530,"81947",'"Under Cover" a Special UK only Limited Edition solid bronze frog by Tim Cotterill',"BF136_Under_Cover-1_thumb.jpeg",130,91,18);var galleries=new Object();galleries[44437]=new gallery(44437,"582835"," Kingfisher Gallery 1","gallery",[580913,580923,580987,582696,582822,582823,582825,582827,582829,582830,582833,582835,582842,582843,582844,582846,582849,582851,584150,584182,584183,584184,584194,882997,883031]);galleries[63055]=new gallery(63055,"1626206,882984,882927,882923,882917,882904,882862,882840,814759,814727"," Kingfisher Gallery 2","gallery",[814628,814687,814690,814709,814718,814724,814727,814759,882840,882862,882904,882917,882923,882927,882984,1626206]);galleries[77682]=new gallery(77682,"4791802,4791801,4791799,4791797,4791795","Kingfisher Gallery 3","gallery",[995588,1009865,1009867,1011819,1044170,4791795,4791797,4791799,4791801,4791802]);galleries[81947]=new gallery(81947,"1977084","Kingfisher Gallery 4","gallery",[1121108,1121124,1121125,1121128,1121130,1121132,1121133,1121134,1121140,1121284,1121295,1600146,1977084,5880261,5880491,5880530]);var imageSets=new Object();imageSets[1]="4791802,4791801,4791799,4791797,4791795,882904,814709,814690,584184,584150,582843,582829,582696,580987,580913";imageSets[2]="4791802,4791801,4791799,4791797,4791795,1977084,582835";imageSets[3]="5880530,5880491,5880261,4791802,4791801,4791799,4791797,4791795,1977084,1626206,1600146,1121295,1121284,1121140,1121134,1121133,1121132,1121130,1121128,1121125,1121124,1121108,1044170,1011819,1009867,1009865,995588,883031,882997,882984,882927,882923,882917,882904,882862,882840,814759,814727,814724,814718,814709,814690,814687,814628,584194,584184,584183,584182,584150,582851";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/rpngallery/images";break}switch(a){case 1:b="http://www1.clikpic.com/rpngallery/images";break}switch(a){case 2:b="http://admin.clikpic.com/rpngallery/images";break}switch(a){case 24:b="http://tpc15/clikpic/rpngallery/images";break}switch(a){case 4:b="http://www.clikchurch.com/rpngallery/images";break}switch(a){case 5:b="http://www2.clikpic.com/rpngallery/images";break}switch(a){case 22:b="http://tpc5/clikpic/rpngallery/images";break}switch(a){case 23:b="http://tpc10/clikpic/rpngallery/images";break}switch(a){case 25:b="http://tpc16/clikpic/rpngallery/images";break}switch(a){case 15:b="http://www3.clikpic.com/rpngallery/images";break}switch(a){case 18:b="http://www4.clikpic.com/rpngallery/images";break}switch(a){case 19:b="http://www5.clikpic.com/rpngallery/images";break}switch(a){case 31:b="http://www7.clikpic.com/rpngallery/images";break}switch(a){case 32:b="http://admin2.clikpic.com/rpngallery/images";break}switch(a){case 33:b="http://www8.clikpic.com/rpngallery/images";break}switch(a){case 34:b="http://www9.clikpic.com/rpngallery/images";break}switch(a){case 35:b="http://admin3.clikpic.com/rpngallery/images";break}switch(a){case 37:b="http://admin4.clikpic.com/rpngallery/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="KINGFISHER GALLERY: "+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<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+'")'})}}};