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[3323800]=new thumbnail(3323800,"202528","","city7_thumb.jpg",130,87,15);thumbnails[3323801]=new thumbnail(3323801,"202528","","city10_thumb.jpg",130,163,15);thumbnails[3323804]=new thumbnail(3323804,"202528","","city11_thumb.jpg",130,75,15);thumbnails[3323806]=new thumbnail(3323806,"202528","","citylowres_thumb.jpg",130,173,15);thumbnails[3323808]=new thumbnail(3323808,"202528","","final film1_thumb.jpg",130,92,15);thumbnails[3323810]=new thumbnail(3323810,"202528","","final film2_thumb.jpg",130,184,15);thumbnails[3315815]=new thumbnail(3315815,"199842","","31_thumb.jpg",130,195,15);thumbnails[3315821]=new thumbnail(3315821,"199842","","4_thumb.jpg",130,195,15);thumbnails[3315828]=new thumbnail(3315828,"199842","","11_thumb.jpg",130,195,15);thumbnails[3315852]=new thumbnail(3315852,"199842","","132_thumb.jpg",130,195,15);thumbnails[3315866]=new thumbnail(3315866,"199842","","14_thumb.jpg",130,217,15);thumbnails[3315879]=new thumbnail(3315879,"199842","","17_thumb.jpg",130,195,15);thumbnails[3315981]=new thumbnail(3315981,"199842","","26_thumb.jpg",130,196,15);thumbnails[3316003]=new thumbnail(3316003,"199842","","Son25_thumb.jpg",130,187,15);thumbnails[3316179]=new thumbnail(3316179,"199842","","A24_thumb.jpg",130,195,15);thumbnails[3316187]=new thumbnail(3316187,"199842","","28_thumb.jpg",130,195,15);thumbnails[3316198]=new thumbnail(3316198,"199842","","22_thumb.jpg",130,195,15);thumbnails[3316200]=new thumbnail(3316200,"199842","","son2_thumb.jpg",130,192,15);thumbnails[3316205]=new thumbnail(3316205,"199842","","al111_thumb.jpg",130,84,15);thumbnails[3316279]=new thumbnail(3316279,"199842","","Alex 032_thumb.jpg",130,87,15);thumbnails[3316283]=new thumbnail(3316283,"199842","","271_thumb.jpg",130,96,15);thumbnails[3316286]=new thumbnail(3316286,"199842","","Maj19_thumb.jpg",130,109,15);thumbnails[3316292]=new thumbnail(3316292,"199842","","151_thumb.jpg",130,88,15);thumbnails[3316294]=new thumbnail(3316294,"199842","","24_thumb.jpg",130,87,15);thumbnails[3316300]=new thumbnail(3316300,"199842","","18_thumb.jpg",130,98,15);thumbnails[3316307]=new thumbnail(3316307,"199842","","laura1_thumb.jpg",130,87,15);thumbnails[3316312]=new thumbnail(3316312,"199842","","m13_thumb.jpg",130,195,15);thumbnails[3316319]=new thumbnail(3316319,"199842","","30_thumb.jpg",130,202,15);thumbnails[3316333]=new thumbnail(3316333,"199842","","alex11_thumb.jpg",130,183,15);thumbnails[3316337]=new thumbnail(3316337,"199842","","23_thumb.jpg",130,144,15);thumbnails[5687396]=new thumbnail(5687396,"199842","","c1_thumb.jpg",130,195,15);thumbnails[5687401]=new thumbnail(5687401,"199842","","c2_thumb.jpg",130,195,15);thumbnails[3318714]=new thumbnail(3318714,"199843","","133_thumb.jpg",130,87,15);thumbnails[3320326]=new thumbnail(3320326,"199843","","141_thumb.jpg",130,195,15);thumbnails[3320343]=new thumbnail(3320343,"199843","","Taya2_thumb.jpg",130,184,15);thumbnails[3320349]=new thumbnail(3320349,"199843","","taya9_thumb.jpg",130,43,15);thumbnails[5687558]=new thumbnail(5687558,"199843","","c3_thumb.jpg",130,195,15);thumbnails[5687597]=new thumbnail(5687597,"199843","","c4_thumb.jpg",130,195,15);thumbnails[5687598]=new thumbnail(5687598,"199843","","c5_thumb.jpg",130,87,15);thumbnails[5687601]=new thumbnail(5687601,"199843","","c6_thumb.jpg",130,179,15);thumbnails[3320315]=new thumbnail(3320315,"199846","","sun1_thumb.jpg.jpg",130,87,15);thumbnails[3320318]=new thumbnail(3320318,"199846","","sun2_thumb.jpg",130,87,15);thumbnails[3320321]=new thumbnail(3320321,"199846","","sun3_thumb.jpg",130,87,15);thumbnails[3320323]=new thumbnail(3320323,"199846","","sun6_thumb.jpg",130,195,15);thumbnails[3323777]=new thumbnail(3323777,"199846","","eatonhall07 005_thumb.jpg",130,195,15);thumbnails[3323784]=new thumbnail(3323784,"199846","","eatonhall07 007_thumb.jpg",130,87,15);thumbnails[3320661]=new thumbnail(3320661,"199848","","lips1_thumb.jpg",130,81,15);thumbnails[3320662]=new thumbnail(3320662,"199848","","20_thumb.jpg",130,87,15);thumbnails[3320663]=new thumbnail(3320663,"199848","Company: Adam International","171_thumb.jpg",130,91,15);thumbnails[3322950]=new thumbnail(3322950,"199848","Company: Yell.com","12_thumb.jpg",130,195,15);thumbnails[3322974]=new thumbnail(3322974,"199848","COmpany: Yell.com","5_thumb.jpg",130,87,15);thumbnails[3322981]=new thumbnail(3322981,"199848","Company: Luminanz","111_thumb.jpg",130,195,15);thumbnails[3323136]=new thumbnail(3323136,"199848","Company: Yell.com","38_thumb.jpg",130,87,15);thumbnails[3323793]=new thumbnail(3323793,"199848","GN Systems","GN57_thumb.jpg",130,195,15);thumbnails[3323262]=new thumbnail(3323262,"199848","Company: Hollyoaks","jpeg liver1_1_thumb.jpg",130,184,15);thumbnails[3322979]=new thumbnail(3322979,"199848","Company: Luminanz","L7_thumb.jpg",130,89,15);thumbnails[3320651]=new thumbnail(3320651,"199848","","142_thumb.jpg",130,88,15);thumbnails[3320664]=new thumbnail(3320664,"199848","Company: Envirolink","45_thumb.jpg",130,96,15);thumbnails[3323265]=new thumbnail(3323265,"199848","","jpeg liver1_thumb.jpg",130,92,2);thumbnails[3320666]=new thumbnail(3320666,"199848","","perfume 164_thumb.jpg",130,195,15);thumbnails[3320684]=new thumbnail(3320684,"199848","Company: GN Systems","GN34_thumb.jpg",130,196,15);thumbnails[3322953]=new thumbnail(3322953,"199848","Company: Luminanz","41_thumb.jpg",130,189,15);thumbnails[3315383]=new thumbnail(3315383,"199847","","1_thumb.jpg",130,87,15);thumbnails[3315389]=new thumbnail(3315389,"199847","","3_thumb.jpg",130,87,15);thumbnails[3315399]=new thumbnail(3315399,"199847","","8_thumb.jpg",130,87,15);thumbnails[3315404]=new thumbnail(3315404,"199847","","9_thumb.jpg",130,94,15);thumbnails[3315409]=new thumbnail(3315409,"199847","","A5_thumb.jpg",130,92,15);thumbnails[3315411]=new thumbnail(3315411,"199847","","cath_thumb.jpg",130,87,15);thumbnails[3315417]=new thumbnail(3315417,"199847","","chung_thumb.jpg",130,87,15);thumbnails[3315426]=new thumbnail(3315426,"199847","","flat1_thumb.jpg",130,92,15);thumbnails[3315431]=new thumbnail(3315431,"199847","","leo1_thumb.jpg",130,87,15);thumbnails[3315435]=new thumbnail(3315435,"199847","","leo_thumb.jpg",130,92,15);thumbnails[3323417]=new thumbnail(3323417,"199849","Tricia McTeague","5a copy_thumb.jpg",130,130,15);thumbnails[3323419]=new thumbnail(3323419,"199849","Tricia McTeague","t5_thumb.jpg",130,129,15);thumbnails[3323420]=new thumbnail(3323420,"199849","The Idles","04_thumb.jpg",130,195,15);thumbnails[3323773]=new thumbnail(3323773,"199849","The Idles","01_thumb.jpg",130,92,15);var galleries=new Object();galleries[202528]=new gallery(202528,"3323800","Cityscapes/Architecture","gallery",[3323800,3323801,3323804,3323806,3323808,3323810]);galleries[199842]=new gallery(199842,"3316283","Fashion","gallery",[3315815,3315821,3315828,3315852,3315866,3315879,3315981,3316003,3316179,3316187,3316198,3316200,3316205,3316279,3316283,3316286,3316292,3316294,3316300,3316307,3316312,3316319,3316333,3316337,5687396,5687401]);galleries[199843]=new gallery(199843,"3318714","Portraiture","gallery",[3318714,3320326,3320343,3320349,5687558,5687597,5687598,5687601]);galleries[199846]=new gallery(199846,"3320318","Landscape/Sunsets","gallery",[3320315,3320318,3320321,3320323,3323777,3323784]);galleries[199848]=new gallery(199848,"3320661","Commercial","gallery",[3320661,3320662,3320663,3322950,3322974,3322981,3323136,3323793,3323262,3322979,3320651,3320664,3323265,3320666,3320684,3322953]);galleries[199847]=new gallery(199847,"3315389","Abstract","gallery",[3315383,3315389,3315399,3315404,3315409,3315411,3315417,3315426,3315431,3315435]);galleries[199849]=new gallery(199849,"3323417","Bands/Album Artwork","gallery",[3323417,3323419,3323420,3323773]);var imageSets=new Object();imageSets[1]="5687601,5687598,5687597,5687558,5687401,5687396,3323810,3323808,3323806,3323804,3323801,3323800,3323793,3323784,3323777,3323773,3323420,3323419,3323417,3323265,3323262,3323136,3322981,3322979,3322974,3322953,3322950,3320684,3320666,3320664,3320663,3320662,3320661,3320651,3320349,3320343,3320326,3320323,3320321,3320318,3320315,3318714,3316337,3316333,3316319,3316312,3316307,3316300,3316294,3316292";imageSets[2]="3323800,3323417,3320661,3320318,3318714,3316283,3315389";imageSets[3]="5687601,5687598,5687597,5687558,5687401,5687396,3323810,3323808,3323806,3323804,3323801,3323800,3323793,3323784,3323777,3323773,3323420,3323419,3323417,3323265,3323262,3323136,3322981,3322979,3322974,3322953,3322950,3320684,3320666,3320664,3320663,3320662,3320661,3320651,3320349,3320343,3320326,3320323,3320321,3320318,3320315,3318714,3316337,3316333,3316319,3316312,3316307,3316300,3316294,3316292";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/spicerkerry/images";break}switch(a){case 1:b="http://www1.clikpic.com/spicerkerry/images";break}switch(a){case 2:b="http://admin.clikpic.com/spicerkerry/images";break}switch(a){case 24:b="http://tpc15/clikpic/spicerkerry/images";break}switch(a){case 4:b="http://www.clikchurch.com/spicerkerry/images";break}switch(a){case 5:b="http://www2.clikpic.com/spicerkerry/images";break}switch(a){case 22:b="http://tpc5/clikpic/spicerkerry/images";break}switch(a){case 23:b="http://tpc10/clikpic/spicerkerry/images";break}switch(a){case 25:b="http://tpc16/clikpic/spicerkerry/images";break}switch(a){case 15:b="http://www3.clikpic.com/spicerkerry/images";break}switch(a){case 18:b="http://www4.clikpic.com/spicerkerry/images";break}switch(a){case 19:b="http://www5.clikpic.com/spicerkerry/images";break}switch(a){case 31:b="http://www7.clikpic.com/spicerkerry/images";break}switch(a){case 32:b="http://admin2.clikpic.com/spicerkerry/images";break}switch(a){case 33:b="http://www8.clikpic.com/spicerkerry/images";break}switch(a){case 34:b="http://www9.clikpic.com/spicerkerry/images";break}switch(a){case 35:b="http://admin3.clikpic.com/spicerkerry/images";break}switch(a){case 37:b="http://admin4.clikpic.com/spicerkerry/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="kerry spicer 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>"}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+'")'})}}};