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[1405619]=new thumbnail(1405619,"97647","","IMAGE1EDITED1_thumb.jpg",130,94,18);thumbnails[1405620]=new thumbnail(1405620,"97647","","PHOTO07_61_thumb.JPG",130,174,18);thumbnails[1405621]=new thumbnail(1405621,"97647","","PICTURE 006_thumb.JPG",130,86,18);thumbnails[1405622]=new thumbnail(1405622,"97647","","PICTURE024_thumb.jpg",130,86,18);thumbnails[1405623]=new thumbnail(1405623,"97647","","PICTURE 039_thumb.JPG",130,196,18);thumbnails[1405624]=new thumbnail(1405624,"97647","","PICTURE 045_thumb.jpg",130,86,18);thumbnails[1405625]=new thumbnail(1405625,"97647","","PICTURE 109_thumb.jpg",130,196,18);thumbnails[1405628]=new thumbnail(1405628,"97647","","PICTURE 153_thumb.jpg",130,86,18);thumbnails[1405629]=new thumbnail(1405629,"97647","","PICTURE 194_thumb.jpg",130,196,18);thumbnails[1405632]=new thumbnail(1405632,"97647","","PICTURE 197_thumb.jpg",130,196,18);thumbnails[1406326]=new thumbnail(1406326,"97648","","collage4_thumb.jpg",130,130,18);thumbnails[1406727]=new thumbnail(1406727,"97648","","16_thumb.jpg",130,86,18);thumbnails[1406731]=new thumbnail(1406731,"97648","","18_thumb.jpg",130,86,18);thumbnails[1406736]=new thumbnail(1406736,"97648","","Image3small_thumb.jpg",130,88,18);thumbnails[1406739]=new thumbnail(1406739,"97648","","farrahsmall2_thumb.jpg",130,86,18);thumbnails[1406747]=new thumbnail(1406747,"97648","","Image21_thumb.jpg",130,88,18);thumbnails[1484965]=new thumbnail(1484965,"97647","","wed3_thumb.jpg",130,86,18);thumbnails[1484971]=new thumbnail(1484971,"97647","","wed11_thumb.jpg",130,87,18);thumbnails[1484972]=new thumbnail(1484972,"97647","","wed21_thumb.jpg",130,194,18);thumbnails[1484975]=new thumbnail(1484975,"97647","","wed5_thumb.jpg",130,87,18);thumbnails[1484976]=new thumbnail(1484976,"97647","","wed6_thumb.jpg",130,87,18);thumbnails[1484978]=new thumbnail(1484978,"97647","","wed7_thumb.jpg",130,194,18);thumbnails[1484980]=new thumbnail(1484980,"97647","","wed8_thumb.jpg",130,87,18);thumbnails[1547161]=new thumbnail(1547161,"97647","","Image41_thumb.jpg",130,88,18);thumbnails[1547163]=new thumbnail(1547163,"97647","","Image52_thumb.jpg",130,88,18);thumbnails[1547164]=new thumbnail(1547164,"97647","","Image6_thumb.jpg",130,88,18);thumbnails[1547169]=new thumbnail(1547169,"97648","","Image7_thumb.jpg",130,88,18);thumbnails[1547177]=new thumbnail(1547177,"97648","","Image9_thumb.jpg",130,88,18);thumbnails[1547181]=new thumbnail(1547181,"97647","","Image111_thumb.jpg",130,88,18);thumbnails[1547182]=new thumbnail(1547182,"97647","","Image12_thumb.jpg",130,195,18);thumbnails[1547183]=new thumbnail(1547183,"97647","","Image13_thumb.jpg",130,194,18);thumbnails[1567971]=new thumbnail(1567971,"97647","","wedding121_thumb.jpg",130,194,18);thumbnails[3330125]=new thumbnail(3330125,"","St Ives, Cornwall 2008","a 12x36 clickpic_thumb.jpg",130,44,18);thumbnails[3330133]=new thumbnail(3330133,"","St Ives Town, Cornwall 2008","f 12X16 clickpic_thumb.jpg",130,97,18);thumbnails[3330136]=new thumbnail(3330136,"","Whitby Abbey 2009","Image3 HDR Finished clickpic_thumb.jpg",130,47,18);thumbnails[3330140]=new thumbnail(3330140,"","Castleford 'New' Bridge 2009","z 12X36 clickpic_thumb.jpg",130,43,18);thumbnails[3583878]=new thumbnail(3583878,"97647","","wedding_thumb.jpg",130,110,18);thumbnails[5738328]=new thumbnail(5738328,"97648","","1b_thumb.jpg",130,90,18);thumbnails[5738332]=new thumbnail(5738332,"97648","","1e_thumb.jpg",130,186,18);thumbnails[5738335]=new thumbnail(5738335,"97648","","1small_thumb.jpg",130,96,18);thumbnails[5738338]=new thumbnail(5738338,"97648","","2d_thumb.jpg",130,186,18);thumbnails[5738340]=new thumbnail(5738340,"97648","","2small_thumb.jpg",130,91,18);thumbnails[5738341]=new thumbnail(5738341,"97648","","3_pp_thumb.jpg",130,89,18);thumbnails[5738342]=new thumbnail(5738342,"97648","","3a_thumb.jpg",130,198,18);thumbnails[5738343]=new thumbnail(5738343,"97648","","3h_thumb.jpg",130,186,18);thumbnails[5738352]=new thumbnail(5738352,"97648","","b_12X16_thumb.jpg",130,174,18);thumbnails[5738355]=new thumbnail(5738355,"97648","","Image1bn_thumb.jpg",130,93,18);thumbnails[5738362]=new thumbnail(5738362,"97648","","Image2a_thumb.jpg",130,89,18);thumbnails[5738367]=new thumbnail(5738367,"97648","","Image2c_thumb.jpg",130,84,18);thumbnails[5738370]=new thumbnail(5738370,"97648","","Image3a_thumb.jpg",130,204,18);thumbnails[5738376]=new thumbnail(5738376,"97648","","Image3x_thumb.jpg",130,91,18);thumbnails[5738378]=new thumbnail(5738378,"97648","","Image7_BE97373E-1D09-001F-992D4E1F8DED7FB4_thumb.jpg",130,259,18);thumbnails[5738396]=new thumbnail(5738396,"97648","","Image_1jk_thumb.jpg",130,91,18);thumbnails[5738402]=new thumbnail(5738402,"97648","","Yorkshire_Studios_29th_March_09_144edit_thumb.jpg",130,91,18);thumbnails[5738403]=new thumbnail(5738403,"97648","","Yorkshire_Studios_29th_March_09_211_thumb.jpg",130,91,18);thumbnails[1405659]=new thumbnail(1405659,"97643","","1_thumb.jpg",130,196,18);thumbnails[1406225]=new thumbnail(1406225,"97643","","farrahsmall1_thumb.jpg",130,86,18);thumbnails[1406226]=new thumbnail(1406226,"97643","","Image2_thumb.jpg",130,88,18);thumbnails[1406228]=new thumbnail(1406228,"97643","","Image2edited_thumb.jpg",130,195,18);thumbnails[1406242]=new thumbnail(1406242,"97643","","Picture 022_thumb.jpg",130,193,18);thumbnails[1406244]=new thumbnail(1406244,"97643","","Picture 031edited_thumb.jpg",130,87,18);thumbnails[1406245]=new thumbnail(1406245,"97643","","Picture 033a_thumb.jpg",130,193,18);thumbnails[1406246]=new thumbnail(1406246,"97643","","Picture 038_thumb.jpg",130,88,18);thumbnails[1406248]=new thumbnail(1406248,"97643","","Picture 041_thumb.jpg",130,193,18);thumbnails[1406251]=new thumbnail(1406251,"97643","","Picture 042_thumb.jpg",130,88,18);thumbnails[1406252]=new thumbnail(1406252,"97643","","Picture 054_thumb.jpg",130,88,18);thumbnails[1406254]=new thumbnail(1406254,"97643","","Picture 165_thumb.jpg",130,88,18);thumbnails[1484897]=new thumbnail(1484897,"97643","","faceedited_thumb.jpg",130,193,18);thumbnails[1547179]=new thumbnail(1547179,"97643","","Image10_thumb.jpg",130,192,18);thumbnails[1547209]=new thumbnail(1547209,"97643","","Image15_thumb.jpg",130,188,18);thumbnails[1567936]=new thumbnail(1567936,"97643","","por1_thumb.jpg",130,196,18);thumbnails[1567938]=new thumbnail(1567938,"97643","","por2_thumb.jpg",130,87,18);thumbnails[1567952]=new thumbnail(1567952,"97643","","den2_thumb.jpg",130,195,18);thumbnails[5738320]=new thumbnail(5738320,"97643","","1_BE8D0011-1D09-001F-991C90DA15016E84_thumb.jpg",130,186,18);thumbnails[5738321]=new thumbnail(5738321,"97643","","1aa_thumb.jpg",130,186,18);thumbnails[5738329]=new thumbnail(5738329,"97643","","1c_thumb.jpg",130,186,18);thumbnails[5738330]=new thumbnail(5738330,"97643","","1d_thumb.jpg",130,191,18);thumbnails[5738333]=new thumbnail(5738333,"97643","","1f_thumb.jpg",130,186,18);thumbnails[5738337]=new thumbnail(5738337,"97643","","2_thumb.jpg",130,188,18);thumbnails[5738339]=new thumbnail(5738339,"97643","","2j_thumb.jpg",130,186,18);thumbnails[5738349]=new thumbnail(5738349,"97643","","4_thumb.jpg",130,89,18);thumbnails[5738350]=new thumbnail(5738350,"97643","","7_thumb.jpg",130,93,18);thumbnails[5738351]=new thumbnail(5738351,"97643","","8_thumb.jpg",130,91,18);thumbnails[5738354]=new thumbnail(5738354,"97643","","Image1_thumb.jpg",130,128,18);thumbnails[5738356]=new thumbnail(5738356,"97643","","Image1zx_thumb.jpg",130,183,18);thumbnails[5738363]=new thumbnail(5738363,"97643","","Image2axc_thumb.jpg",130,91,18);thumbnails[5738386]=new thumbnail(5738386,"97643","","Image7_pp_thumb.jpg",130,189,18);thumbnails[5738398]=new thumbnail(5738398,"97643","","Jay_nude_art_studio_light_002_thumb.jpg",130,186,18);thumbnails[5738399]=new thumbnail(5738399,"97643","","Lib_Garage_shoot_073_pp_thumb.jpg",130,186,18);thumbnails[5738401]=new thumbnail(5738401,"97643","","Paul_Rowes_shoot_061_edit_thumb.jpg",130,186,18);thumbnails[1518804]=new thumbnail(1518804,"104246","Mal from the 'Spunksters'","Image1mm_thumb.jpg",130,194,18);thumbnails[1518806]=new thumbnail(1518806,"104246","Jimmy 'tourettes'","Image2mm_thumb.jpg",130,87,18);thumbnails[1547159]=new thumbnail(1547159,"104246","","Image22_thumb.jpg",130,88,18);thumbnails[1567942]=new thumbnail(1567942,"104246","Breeze and Wilson","breeze1_thumb.jpg",130,87,18);thumbnails[1567943]=new thumbnail(1567943,"104246","Breeze and Wilson","breeze2_thumb.jpg",130,123,18);thumbnails[1583083]=new thumbnail(1583083,"104246","the dangerous stiltwalkers","firefest1clik_thumb.jpg",130,88,18);thumbnails[1583084]=new thumbnail(1583084,"104246","","firefest2clik_thumb.jpg",130,87,18);thumbnails[1583090]=new thumbnail(1583090,"104246","","firefest3clik_thumb.jpg",130,87,18);thumbnails[1583227]=new thumbnail(1583227,"104246","Ian 'Angus'","ian1clik_thumb.jpg",130,193,18);thumbnails[1583263]=new thumbnail(1583263,"104246","'The Erics'","erics1_thumb.jpg",130,88,18);thumbnails[1583265]=new thumbnail(1583265,"104246","'The Erics'","erics2_thumb.jpg",130,88,18);thumbnails[1583299]=new thumbnail(1583299,"104246","Bassist/singer of 'the erics'","erics3_thumb.jpg",130,157,18);var galleries=new Object();galleries[97648]=new gallery(97648,"5738403,5738402,5738396,5738378,5738376,5738370,5738367,5738362,5738355,5738352","Portfolio's","gallery",[1406326,1406727,1406731,1406736,1406739,1406747,1547169,1547177,5738328,5738332,5738335,5738338,5738340,5738341,5738342,5738343,5738352,5738355,5738362,5738367,5738370,5738376,5738378,5738396,5738402,5738403]);galleries[97647]=new gallery(97647,"3583878,1567971,1547183,1547182,1547181,1547164,1547163,1547161,1484980,1484978","Weddings","gallery",[1405619,1405620,1405621,1405622,1405623,1405624,1405625,1405628,1405629,1405632,1484965,1484971,1484972,1484975,1484976,1484978,1484980,1547161,1547163,1547164,1547181,1547182,1547183,1567971,3583878]);galleries[97643]=new gallery(97643,"5738401,5738399,5738398,5738386,5738363,5738356,5738354,5738351,5738350,5738349","Portraits","gallery",[1405659,1406225,1406226,1406228,1406242,1406244,1406245,1406246,1406248,1406251,1406252,1406254,1484897,1547179,1547209,1567936,1567938,1567952,5738320,5738321,5738329,5738330,5738333,5738337,5738339,5738349,5738350,5738351,5738354,5738356,5738363,5738386,5738398,5738399,5738401]);galleries[104246]=new gallery(104246,"1583299,1583265,1583263,1583227,1583090,1583084,1583083,1567943,1567942,1547159","Performing","gallery",[1518804,1518806,1547159,1567942,1567943,1583083,1583084,1583090,1583227,1583263,1583265,1583299]);var imageSets=new Object();imageSets[1]="5738399,5738349,5738342,5738333,5738332,3583878,1567971,1567952,1547183,1547182,1547181,1547179,1547177,1547169,1547164,1547163,1547161,1547159,1406739,1405629,1405625,1405619";imageSets[3]="5738403,5738402,5738401,5738399,5738398,5738396,5738386,5738378,5738376,5738370,5738367,5738363,5738362,5738356,5738355,5738354,5738352,5738351,5738350,5738349,5738343,5738342,5738341,5738340,5738339,5738338,5738337,5738335,5738333,5738332,5738330,5738329,5738328,5738321,5738320,3583878,3330140,3330136,3330133,3330125,1583299,1583265,1583263,1583227,1583090,1583084,1583083,1567971,1567952,1567943";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/sykesphotography/images";break}switch(a){case 1:b="http://www1.clikpic.com/sykesphotography/images";break}switch(a){case 2:b="http://admin.clikpic.com/sykesphotography/images";break}switch(a){case 24:b="http://tpc15/clikpic/sykesphotography/images";break}switch(a){case 4:b="http://www.clikchurch.com/sykesphotography/images";break}switch(a){case 5:b="http://www2.clikpic.com/sykesphotography/images";break}switch(a){case 22:b="http://tpc5/clikpic/sykesphotography/images";break}switch(a){case 23:b="http://tpc10/clikpic/sykesphotography/images";break}switch(a){case 25:b="http://tpc16/clikpic/sykesphotography/images";break}switch(a){case 15:b="http://www3.clikpic.com/sykesphotography/images";break}switch(a){case 18:b="http://www4.clikpic.com/sykesphotography/images";break}switch(a){case 19:b="http://www5.clikpic.com/sykesphotography/images";break}switch(a){case 31:b="http://www7.clikpic.com/sykesphotography/images";break}switch(a){case 32:b="http://admin2.clikpic.com/sykesphotography/images";break}switch(a){case 33:b="http://www8.clikpic.com/sykesphotography/images";break}switch(a){case 34:b="http://www9.clikpic.com/sykesphotography/images";break}switch(a){case 35:b="http://admin3.clikpic.com/sykesphotography/images";break}switch(a){case 37:b="http://admin4.clikpic.com/sykesphotography/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="sykesphotography: "+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+'")'})}}};