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[2067840]=new thumbnail(2067840,"87187","","IMG_3454 copy_thumb.jpg",130,104,1);thumbnails[3199397]=new thumbnail(3199397,"87187","","IMG_6546_thumb.jpg",130,104,1);thumbnails[3199398]=new thumbnail(3199398,"87187","","IMG_4442_thumb.JPG",130,163,1);thumbnails[3351916]=new thumbnail(3351916,"87187","","Dudley3 clickIMG_8579 copy_thumb.jpg",130,163,1);thumbnails[3984564]=new thumbnail(3984564,"87192","BCU European Championships","IMG_2999_thumb.jpg",130,104,1);thumbnails[3984567]=new thumbnail(3984567,"87192","BCU European Championships","IMG_2954_thumb.jpg",130,163,1);thumbnails[3984583]=new thumbnail(3984583,"87192","BCU European Championships","IMG_3204_copy_thumb.jpg",130,163,1);thumbnails[3984589]=new thumbnail(3984589,"87192","BCU European Championships","IMG_3081_thumb.jpg",130,104,1);thumbnails[4117098]=new thumbnail(4117098,"87187","Stitchwort","IMG_3338_copy_thumb.jpg",130,163,1);thumbnails[6233744]=new thumbnail(6233744,"87193","Jocecline","Click-001_thumb.jpg",130,195,1);thumbnails[6233747]=new thumbnail(6233747,"87193","Joceline","Click-002_thumb.jpg",130,163,1);thumbnails[6233752]=new thumbnail(6233752,"87193","Ruthie","Click-004_thumb.jpg",130,163,1);thumbnails[6233755]=new thumbnail(6233755,"87193","FreakyGemma","Click-005_thumb.jpg",130,163,1);thumbnails[6233776]=new thumbnail(6233776,"87193","Daniemarie","Click-006_thumb.jpg",130,163,1);thumbnails[6233790]=new thumbnail(6233790,"87193","Halo Haynes","Click-009_thumb.jpg",130,195,1);thumbnails[6233796]=new thumbnail(6233796,"87193","Halo Haynes","Click-010_thumb.jpg",130,163,1);thumbnails[6233802]=new thumbnail(6233802,"87193","Halo Haynes","Click-011_thumb.jpg",130,195,1);thumbnails[6233805]=new thumbnail(6233805,"87193","Jo Jo  Crowder","Click-012_thumb.jpg",130,163,1);thumbnails[6233828]=new thumbnail(6233828,"87193","Samantha Alexander","Click-014_thumb.jpg",130,163,1);thumbnails[6233831]=new thumbnail(6233831,"87193","Samantha Alexander","Click-015_thumb.jpg",130,195,1);thumbnails[6233839]=new thumbnail(6233839,"87193","Samantha Alexander","Click-016_thumb.jpg",130,195,1);thumbnails[6233847]=new thumbnail(6233847,"87193","Clover","Click-018_thumb.jpg",130,195,1);thumbnails[6233849]=new thumbnail(6233849,"87193","Hay","Click-020_thumb.jpg",130,104,1);thumbnails[6233906]=new thumbnail(6233906,"87193","Jess West","Click-024_thumb.jpg",130,195,1);thumbnails[6233922]=new thumbnail(6233922,"87193","Lawnski","Click-026_thumb.jpg",130,163,1);thumbnails[6233934]=new thumbnail(6233934,"87193","Blue Saphire","Click-027_thumb.jpg",130,104,1);thumbnails[6233935]=new thumbnail(6233935,"87193","Blue Saphire","Click-030_thumb.jpg",130,104,1);thumbnails[6233952]=new thumbnail(6233952,"87193","Blue Saphire","Click-028_thumb.jpg",130,195,1);thumbnails[6233999]=new thumbnail(6233999,"87193","Jess West","Click-025_thumb.jpg",130,87,1);thumbnails[6234015]=new thumbnail(6234015,"87193","Tinna","Click-037_thumb.jpg",130,87,1);thumbnails[6234036]=new thumbnail(6234036,"87193","Hay","Click-0211_thumb.jpg",130,87,1);thumbnails[6350037]=new thumbnail(6350037,"351825","Becky & Rob","KJ0Z2204_copy_thumb.jpg",130,195,1);thumbnails[6350041]=new thumbnail(6350041,"351825","Becky & Rob","KJ0Z2216_copy_thumb.jpg",130,195,1);thumbnails[6350043]=new thumbnail(6350043,"351825","Becky & Rob","KJ0Z2220_copy_thumb.jpg",130,195,1);thumbnails[6350045]=new thumbnail(6350045,"351825","Becky & Rob","KJ0Z2221_copy_thumb.jpg",130,195,1);thumbnails[6350047]=new thumbnail(6350047,"351825","Becky & Rob","KJ0Z2224_copy_thumb.jpg",130,195,1);thumbnails[6350053]=new thumbnail(6350053,"351825","Becky & Rob","KJ0Z2233_copy_thumb.jpg",130,195,1);thumbnails[6350056]=new thumbnail(6350056,"351825","Becky & Rob","KJ0Z2237_copy_thumb.jpg",130,195,1);thumbnails[4655192]=new thumbnail(4655192,"87187","George","IMG_5624_copyclick_thumb.jpg",130,104,1);thumbnails[4655194]=new thumbnail(4655194,"87187","Good boy George","IMG_5599click_thumb.jpg",130,163,1);thumbnails[3306083]=new thumbnail(3306083,"87192","Dont look back","IMG_5720 click_thumb.jpg",130,135,1);thumbnails[4655420]=new thumbnail(4655420,"87187","Maggs and Fox","IMG_5642_copy_copyclick_thumb.jpg",130,87,1);thumbnails[3306086]=new thumbnail(3306086,"87192","Before and after?","IMG_5724 click_thumb.jpg",130,104,1);thumbnails[1358505]=new thumbnail(1358505,"87191","A Grave Situation","Click45_thumb.jpg",130,88,1);thumbnails[1216940]=new thumbnail(1216940,"87189","Brooklyn Bridge and Downtown Manhattan","nyclick4004_thumb.jpg",130,74,1);thumbnails[1304553]=new thumbnail(1304553,"87191","New Brighton","click43_thumb.jpg",130,62,1);thumbnails[1304556]=new thumbnail(1304556,"87187","Snowdrop","IMG_1634_thumb.jpg",130,104,1);thumbnails[1575369]=new thumbnail(1575369,"87192","At the end of the day","click52_thumb.jpg",130,95,1);thumbnails[1216760]=new thumbnail(1216760,"87187","Sunrise","CLICK2_thumb.jpg",130,87,1);thumbnails[1216936]=new thumbnail(1216936,"87191","Lowry","CLICK13_thumb.jpg",130,93,1);thumbnails[1575373]=new thumbnail(1575373,"87192","","click51_thumb.jpg",130,217,1);thumbnails[1216947]=new thumbnail(1216947,"87191","Coniston","CLICK19_thumb.jpg",130,163,1);thumbnails[1216945]=new thumbnail(1216945,"87191","Wastwater","CLICK18_thumb.jpg",130,52,1);thumbnails[1216763]=new thumbnail(1216763,"87187","Snowdrop 2","IMG_16223_thumb.jpg",130,209,1);thumbnails[1216939]=new thumbnail(1216939,"87191","Night Time","CLICK14_thumb.jpg",130,78,1);thumbnails[1216762]=new thumbnail(1216762,"87187","Two Lips","Click4_thumb.jpg",130,100,1);thumbnails[1216957]=new thumbnail(1216957,"87191","Padley Gorge I","CLICK21_thumb.jpg",130,85,1);thumbnails[1216959]=new thumbnail(1216959,"87191","Padley Gorge II","CLICK22_thumb.jpg",130,72,1);thumbnails[1217205]=new thumbnail(1217205,"87191","Under Humber","Click27_thumb.jpg",130,126,1);thumbnails[1575381]=new thumbnail(1575381,"87192","Rehearsal","click12_1_thumb.jpg",130,87,1);thumbnails[2067837]=new thumbnail(2067837,"87187","","IMG_3076 copy_thumb.jpg",130,87,1);thumbnails[2114367]=new thumbnail(2114367,"87189","Central Park Lullaby","nyclick4349 copy_thumb.jpg",130,104,1);thumbnails[3351900]=new thumbnail(3351900,"87187","","dudley epz copy click_thumb.jpg",130,104,1);thumbnails[3351911]=new thumbnail(3351911,"87187","","dudley3 clickIMG_8576 copy_thumb.jpg",130,104,1);thumbnails[2114369]=new thumbnail(2114369,"87189","Times Square","nyclickIMG_3889_thumb.jpg",130,104,1);thumbnails[2114371]=new thumbnail(2114371,"87189","Subway","nyclick4183_thumb.jpg",130,163,1);var galleries=new Object();galleries[87193]=new gallery(87193,"6234036,6234015,6233999,6233952,6233935,6233934,6233922,6233906,6233849,6233847","Glamour","section119550",[6233744,6233747,6233752,6233755,6233776,6233790,6233796,6233802,6233805,6233828,6233831,6233839,6233847,6233849,6233906,6233922,6233934,6233935,6233952,6233999,6234015,6234036]);galleries[87191]=new gallery(87191,"1358505,1304553,1217205,1216959,1216957,1216947,1216945,1216939,1216936","Landscape","section119547",[1358505,1304553,1216936,1216947,1216945,1216939,1216957,1216959,1217205]);galleries[87189]=new gallery(87189,"2114371,2114369,2114367,1216940","New York","section119546",[1216940,2114367,2114369,2114371]);galleries[87192]=new gallery(87192,"3984589,3984583,3984567,3984564,3306086,3306083,1575381,1575373,1575369","People","section119549",[3984564,3984567,3984583,3984589,3306083,3306086,1575369,1575373,1575381]);galleries[87187]=new gallery(87187,"4655420,4655194,4655192,4117098,3351916,3351911,3351900,3199398,3199397,2067840","Still Life","section119545",[2067840,3199397,3199398,3351916,4117098,4655192,4655194,4655420,1304556,1216760,1216763,1216762,2067837,3351900,3351911]);galleries[351825]=new gallery(351825,"6350056,6350053,6350047,6350045,6350043,6350041,6350037","Weddings","section419826",[6350037,6350041,6350043,6350045,6350047,6350053,6350056]);var imageSets=new Object();imageSets[1]="6350056,6350053,6350047,6350045,6350043,6350041,6350037,4655420,4655194,4655192,3984589,3984567,3984564,3351916,3351911,3351900";imageSets[3]="6350056,6350053,6350047,6350045,6350043,6350041,6350037,6234036,6234015,6233999,6233952,6233935,6233934,6233922,6233906,6233849,6233847,6233839,6233831,6233828,6233805,6233802,6233796,6233790,6233776,6233755,6233752,6233747,6233744,4655420,4655194,4655192,4117098,3984589,3984583,3984567,3984564,3351916,3351911,3351900,3306086,3306083,3199398,3199397,2114371,2114369,2114367,2067840,2067837,1575381";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/mounters/images";break}switch(a){case 1:b="http://www1.clikpic.com/mounters/images";break}switch(a){case 2:b="http://admin.clikpic.com/mounters/images";break}switch(a){case 24:b="http://tpc15/clikpic/mounters/images";break}switch(a){case 4:b="http://www.clikchurch.com/mounters/images";break}switch(a){case 5:b="http://www2.clikpic.com/mounters/images";break}switch(a){case 22:b="http://tpc5/clikpic/mounters/images";break}switch(a){case 23:b="http://tpc10/clikpic/mounters/images";break}switch(a){case 25:b="http://tpc16/clikpic/mounters/images";break}switch(a){case 15:b="http://www3.clikpic.com/mounters/images";break}switch(a){case 18:b="http://www4.clikpic.com/mounters/images";break}switch(a){case 19:b="http://www5.clikpic.com/mounters/images";break}switch(a){case 31:b="http://www7.clikpic.com/mounters/images";break}switch(a){case 32:b="http://admin2.clikpic.com/mounters/images";break}switch(a){case 33:b="http://www8.clikpic.com/mounters/images";break}switch(a){case 34:b="http://www9.clikpic.com/mounters/images";break}switch(a){case 35:b="http://admin3.clikpic.com/mounters/images";break}switch(a){case 37:b="http://admin4.clikpic.com/mounters/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("section119546"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section119546.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("section119546"!=""){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="Mounters photography: "+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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="john1961@btinternet.com">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="john1961@btinternet.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};