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[678284]=new thumbnail(678284,"51844","1950 D.A.","music_005_thumb.jpg",130,86,1);thumbnails[678327]=new thumbnail(678327,"51844","Sucioperro","music_017_thumb.jpg",130,86,1);thumbnails[678331]=new thumbnail(678331,"51844","Big Burd","music_018_thumb.jpg",130,86,1);thumbnails[681139]=new thumbnail(681139,"52105","B.Y.T","byt_thumb.jpg",130,196,1);thumbnails[681149]=new thumbnail(681149,"52105","Untitled","leaf_thumb.jpg",130,50,1);thumbnails[681172]=new thumbnail(681172,"","Salou 2","Salou_thumb.jpg",130,86,1);thumbnails[681187]=new thumbnail(681187,"52105","Lactose Fermenting on a Blood Agar Plate","bacteriology plate1_thumb.jpg",130,130,1);thumbnails[681212]=new thumbnail(681212,"52105","Cyber Men","bpool 054_thumb.jpg",130,86,1);thumbnails[681215]=new thumbnail(681215,"52105","Blackpool 2006","bpool 086_thumb.jpg",130,130,1);thumbnails[681219]=new thumbnail(681219,"52105","Defensive Position I","def_posI_thumb.jpg",130,130,1);thumbnails[681221]=new thumbnail(681221,"52105","Defensive Position II","def_posII_thumb.jpg",130,109,1);thumbnails[681233]=new thumbnail(681233,"52105","Defensive Position III","def_posIII_thumb.jpg",130,130,1);thumbnails[681234]=new thumbnail(681234,"52105","Shiny Beast","Shiny Beast_thumb.jpg",130,97,1);thumbnails[681236]=new thumbnail(681236,"52105","Slugs and Snails...","2006-06-17001_thumb.jpg",130,94,1);thumbnails[681237]=new thumbnail(681237,"51844","Chloe","Chloe026_thumb.jpg",130,86,1);thumbnails[704092]=new thumbnail(704092,"52105","Fly On The Wall","fly 1_thumb.jpg",130,86,1);thumbnails[710743]=new thumbnail(710743,"51844","Scott","Low Wattage_190805h_thumb.jpg",130,86,1);thumbnails[748600]=new thumbnail(748600,"51844","The Ansion","Ansion_01_thumb.jpg",130,178,1);thumbnails[755611]=new thumbnail(755611,"52105","Ailsa Craig","Ailsa_1_thumb.jpg",130,86,1);thumbnails[3184736]=new thumbnail(3184736,"51844","Culann","Culann_006_thumb.jpg",130,87,1);thumbnails[3184744]=new thumbnail(3184744,"52105","Untitled","Sepia_002b_thumb.jpg",130,194,1);thumbnails[3184746]=new thumbnail(3184746,"51844","Christine","Sepia_008b_thumb.jpg",130,88,1);thumbnails[3184755]=new thumbnail(3184755,"51844","This Familier Smile","This Familier Smile_thumb.jpg",130,186,1);thumbnails[3199922]=new thumbnail(3199922,"51844","Amelie","Amelie_-73_thumb.jpg",130,196,1);thumbnails[3199927]=new thumbnail(3199927,"52105","Day Surgery Statue, Ayr Hospital","Day Surgery Statue BW 2_thumb.jpg",130,76,1);thumbnails[3199940]=new thumbnail(3199940,"52105","Heart","Heart_thumb.jpg",130,130,1);thumbnails[678268]=new thumbnail(678268,"9378","Mummy Short Arms","music_0011_thumb.jpg",130,211,1);thumbnails[678277]=new thumbnail(678277,"9378","Sound Check","music_0021_thumb.jpg",130,195,1);thumbnails[678280]=new thumbnail(678280,"9378","Amongst The Arrows","music_004_thumb.jpg",130,86,1);thumbnails[678287]=new thumbnail(678287,"9378","Big Lix","music_006_thumb.jpg",130,86,1);thumbnails[678297]=new thumbnail(678297,"9378","Buck 65","music_008_thumb.jpg",130,86,1);thumbnails[678302]=new thumbnail(678302,"9378","Chime Recording Session 2006","music_011_thumb.jpg",130,86,1);thumbnails[678310]=new thumbnail(678310,"9378","Chime Recording Session 2006","music_012_thumb.jpg",130,195,1);thumbnails[678311]=new thumbnail(678311,"9378","Chime Recording Session 2006","music_013_thumb.jpg",130,86,1);thumbnails[678322]=new thumbnail(678322,"9378","1950 D.A.","music_015_thumb.jpg",130,86,1);thumbnails[678324]=new thumbnail(678324,"9378","1950 D.A.","music_016_thumb.jpg",130,86,1);thumbnails[678340]=new thumbnail(678340,"9378","Genepool","music_020_thumb.jpg",130,86,1);thumbnails[678344]=new thumbnail(678344,"9378","Hello! He lied","music_021_thumb.jpg",130,86,1);thumbnails[678346]=new thumbnail(678346,"9378","The Ansion","music_022_thumb.jpg",130,86,1);thumbnails[678358]=new thumbnail(678358,"9378","The Ansion","music_023_thumb.jpg",130,86,1);thumbnails[678743]=new thumbnail(678743,"9378","Mummy Short Arms","music_026_thumb.jpg",130,195,1);thumbnails[681083]=new thumbnail(681083,"9378","This Familiar Smile","music_036_thumb.jpg",130,195,1);thumbnails[681089]=new thumbnail(681089,"9378","My Final Wish","Low Wattage_220705015_thumb.jpg",130,195,1);thumbnails[681105]=new thumbnail(681105,"9378","...And You Will Know Us By The Trail Of Dead","TOD14_thumb.jpg",130,86,1);thumbnails[704086]=new thumbnail(704086,"9378","Arab Strap","Arab Strap 5_thumb.jpg",130,86,1);thumbnails[704087]=new thumbnail(704087,"9378","Sucioperro","dragon_thumb.jpg",130,85,1);thumbnails[704089]=new thumbnail(704089,"9378","Tempercalm","Low Wattage_190805k_thumb.jpg",130,245,1);thumbnails[710740]=new thumbnail(710740,"9378","Genepool","genepool1_thumb.jpg",130,87,1);thumbnails[710745]=new thumbnail(710745,"9378","Starstudded 78","SS78_thumb.jpg",130,195,1);thumbnails[755616]=new thumbnail(755616,"9378","Colonal Stratho","HAC 0610200006_thumb.jpg",130,101,1);thumbnails[3199925]=new thumbnail(3199925,"9378","Spleen","Brian_thumb.jpg",130,196,1);var galleries=new Object();galleries[52105]=new gallery(52105,"3199940,3199927,3184744,755611,704092,681236,681234,681233,681221,681219","Miscellaneous","gallery",[681139,681149,681187,681212,681215,681219,681221,681233,681234,681236,704092,755611,3184744,3199927,3199940]);galleries[51844]=new gallery(51844,"3199922,3184755,3184746,3184736,748600,710743,681237,678331,678327,678284","Portrait","gallery",[678284,678327,678331,681237,710743,748600,3184736,3184746,3184755,3199922]);galleries[9378]=new gallery(9378,"3199925,755616,710745,710740,704089,704087,704086,681105,681089,681083","Live Music","gallery",[678268,678277,678280,678287,678297,678302,678310,678311,678322,678324,678340,678344,678346,678358,678743,681083,681089,681105,704086,704087,704089,710740,710745,755616,3199925]);var imageSets=new Object();imageSets[1]="678311";imageSets[3]="3199940,3199927,3199925,3199922,3184755,3184746,3184744,3184736,755616,755611,748600,710745,710743,710740,704092,704089,704087,704086,681237,681236,681234,681233,681221,681219,681215,681212,681187,681172,681149,681139,681105,681089,681083,678743,678358,678346,678344,678340,678331,678327,678324,678322,678311,678310,678302,678297,678287,678284,678280,678277";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/Max_Fax/images";break}switch(a){case 1:b="http://www1.clikpic.com/Max_Fax/images";break}switch(a){case 2:b="http://admin.clikpic.com/Max_Fax/images";break}switch(a){case 24:b="http://tpc15/clikpic/Max_Fax/images";break}switch(a){case 4:b="http://www.clikchurch.com/Max_Fax/images";break}switch(a){case 5:b="http://www2.clikpic.com/Max_Fax/images";break}switch(a){case 22:b="http://tpc5/clikpic/Max_Fax/images";break}switch(a){case 23:b="http://tpc10/clikpic/Max_Fax/images";break}switch(a){case 25:b="http://tpc16/clikpic/Max_Fax/images";break}switch(a){case 15:b="http://www3.clikpic.com/Max_Fax/images";break}switch(a){case 18:b="http://www4.clikpic.com/Max_Fax/images";break}switch(a){case 19:b="http://www5.clikpic.com/Max_Fax/images";break}switch(a){case 31:b="http://www7.clikpic.com/Max_Fax/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Max_Fax/images";break}switch(a){case 33:b="http://www8.clikpic.com/Max_Fax/images";break}switch(a){case 34:b="http://www9.clikpic.com/Max_Fax/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Max_Fax/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Max_Fax/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="Dave Dickie: 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;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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="MAX_FAX">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};