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[5254111]=new thumbnail(5254111,"","","amber_small_thumb.jpg",100,100,1);thumbnails[5574616]=new thumbnail(5574616,"","","special_offer_thumb.jpg",100,53,1);thumbnails[3730011]=new thumbnail(3730011,"20106","","DSC_0275_thumb.jpg",100,100,1);thumbnails[4967018]=new thumbnail(4967018,"20106","","DSC_0297b_glen_skirlie1_thumb.jpg",100,100,1);thumbnails[4965124]=new thumbnail(4965124,"20106","","DSC_0376_loch_side1_thumb.jpg",100,100,1);thumbnails[3730207]=new thumbnail(3730207,"20106","","suzanne_thumb.jpg",100,100,1);thumbnails[4965127]=new thumbnail(4965127,"20106","","DSC_0380_crutherland1_thumb.jpg",100,100,1);thumbnails[3729993]=new thumbnail(3729993,"20106","","DSC_0081_thumb.jpg",100,100,1);thumbnails[3732457]=new thumbnail(3732457,"20106","","DSC_3642_1_thumb.jpg",100,100,1);thumbnails[4965116]=new thumbnail(4965116,"20106","","DSC_0232_crutherland1_thumb.jpg",100,100,1);thumbnails[4967010]=new thumbnail(4967010,"20106","","DSC_0179_thumb.jpg",100,100,1);thumbnails[3730164]=new thumbnail(3730164,"20106","","DSC_3662_thumb.jpg",100,100,1);thumbnails[4967020]=new thumbnail(4967020,"20106","","DSC_0303_glen_skirlie1_thumb.jpg",100,100,1);thumbnails[3730136]=new thumbnail(3730136,"20106","","DSC_0038_thumb.jpg",100,100,1);thumbnails[4965308]=new thumbnail(4965308,"20106","","DSC_0014_detail1_thumb.jpg",100,100,1);thumbnails[4967086]=new thumbnail(4967086,"20106","","DSC_0232_dalziel_park1_thumb.jpg",100,100,1);thumbnails[4967028]=new thumbnail(4967028,"20106","","DSC_0219glen_skirlie1_thumb.jpg",100,100,1);thumbnails[4965119]=new thumbnail(4965119,"20106","","DSC_0322_loch_side1_thumb.jpg",100,100,1);thumbnails[4965122]=new thumbnail(4965122,"20106","","DSC_0328_crutherland1_thumb.jpg",100,100,1);thumbnails[4967083]=new thumbnail(4967083,"20106","","DSC_0104_dalziel_park1_thumb.jpg",100,100,1);thumbnails[3730057]=new thumbnail(3730057,"20106","","DSC_0076b1_thumb.jpg",100,100,1);thumbnails[4967116]=new thumbnail(4967116,"20106","","DSC_0187_crutherland1_thumb.jpg",100,100,1);thumbnails[4967013]=new thumbnail(4967013,"20106","","DSC_0271_rutherglen1_thumb.jpg",100,100,1);thumbnails[4967022]=new thumbnail(4967022,"20106","","DSC_0305B_rutherglen1_thumb.jpg",100,100,1);thumbnails[3730022]=new thumbnail(3730022,"20106","","DSC_02731_thumb.jpg",100,100,1);thumbnails[4967007]=new thumbnail(4967007,"20106","","DSC_0161_holiday_inn1_thumb.jpg",100,100,1);thumbnails[4967131]=new thumbnail(4967131,"20106","","DSC_0165b_crutherland1_thumb.jpg",100,100,1);thumbnails[4967138]=new thumbnail(4967138,"227863","","DSC_0068_detail1_thumb.jpg",100,100,1);thumbnails[4967152]=new thumbnail(4967152,"227863","","DSC_0076_holiday_inn1_thumb.jpg",100,100,1);thumbnails[3736609]=new thumbnail(3736609,"227863","","DSC_77541_thumb.jpg",100,100,1);thumbnails[4967145]=new thumbnail(4967145,"227863","","DSC_0500b_crutherland1_thumb.jpg",100,100,1);thumbnails[3730132]=new thumbnail(3730132,"227863","","DSC_0186_thumb.jpg",100,100,1);thumbnails[3737033]=new thumbnail(3737033,"227863","","DSC_0310_thumb.jpg",100,100,1);thumbnails[3730052]=new thumbnail(3730052,"227863","","DSC_03991_thumb.jpg",100,100,1);thumbnails[3732319]=new thumbnail(3732319,"227863","","DSC_5562_1_thumb.jpg",100,100,1);thumbnails[3736639]=new thumbnail(3736639,"227863","","DSC_7737_thumb.jpg",100,100,1);thumbnails[3730064]=new thumbnail(3730064,"227863","","DSC_0034_thumb.jpg",100,100,1);thumbnails[3736676]=new thumbnail(3736676,"227863","","DSC_01331_thumb.jpg",100,100,1);thumbnails[3736584]=new thumbnail(3736584,"227863","","DSC_01451_thumb.jpg",100,100,1);thumbnails[3737024]=new thumbnail(3737024,"227863","","DSC_0308_thumb.jpg",100,100,1);thumbnails[3732409]=new thumbnail(3732409,"227863","","DSC_5461_thumb.jpg",100,100,1);thumbnails[3737058]=new thumbnail(3737058,"227863","","DSC_5046b_thumb.jpg",100,100,1);thumbnails[3736462]=new thumbnail(3736462,"227863","","DSC_8276_thumb.jpg",100,100,1);thumbnails[3737227]=new thumbnail(3737227,"227863","","DSC_4778_thumb.jpg",100,100,1);thumbnails[3730194]=new thumbnail(3730194,"227863","","DSC_3668_thumb.jpg",100,100,1);thumbnails[3736696]=new thumbnail(3736696,"227863","","DSC_0013_thumb.jpg",100,100,1);thumbnails[4967156]=new thumbnail(4967156,"227863","","DSC_0015_holiday_inn1_thumb.jpg",100,100,1);thumbnails[3737510]=new thumbnail(3737510,"20136","","DSC_5228_thumb.jpg",100,100,1);thumbnails[3737561]=new thumbnail(3737561,"20136","","DSC_0019_thumb.jpg",100,100,1);thumbnails[3737659]=new thumbnail(3737659,"20136","","DSC_00891_thumb.jpg",100,100,1);thumbnails[3737990]=new thumbnail(3737990,"20136","","DSC_6521_thumb.jpg",100,100,1);thumbnails[3738144]=new thumbnail(3738144,"20136","","DSC_0019c_thumb.jpg",100,100,1);thumbnails[3737852]=new thumbnail(3737852,"20136","","DSC_66521_thumb.jpg",100,100,1);thumbnails[3738049]=new thumbnail(3738049,"20136","","DSC_0012_thumb.jpg",100,100,1);thumbnails[3737571]=new thumbnail(3737571,"20136","","DSC_0031_thumb.jpg",100,100,1);thumbnails[3738138]=new thumbnail(3738138,"20136","","DSC_0038b_thumb.jpg",100,100,1);thumbnails[3738000]=new thumbnail(3738000,"20136","","DSC_5242-bw_thumb.jpg",100,100,1);thumbnails[3737773]=new thumbnail(3737773,"20136","","DSC_6913_thumb.jpg",100,100,1);thumbnails[3738433]=new thumbnail(3738433,"20136","","DSC_6483_thumb.jpg",100,100,1);thumbnails[3738133]=new thumbnail(3738133,"20136","","DSC_0009_thumb.jpg",100,100,1);thumbnails[3738429]=new thumbnail(3738429,"20136","","DSC_66551_thumb.jpg",100,100,1);thumbnails[3737521]=new thumbnail(3737521,"20136","","DSC_2558b_1_thumb.jpg",100,100,1);thumbnails[3737595]=new thumbnail(3737595,"20136","","DSC_0018b_thumb.jpg",100,100,1);thumbnails[3737669]=new thumbnail(3737669,"20136","","DSC_0139_thumb.jpg",100,100,1);thumbnails[3737628]=new thumbnail(3737628,"20136","","DSC_6294bw_thumb.jpg",100,100,1);thumbnails[3737599]=new thumbnail(3737599,"20136","","DSC_6469_thumb.jpg",100,100,1);thumbnails[3738066]=new thumbnail(3738066,"20136","","DSC_0238_thumb.jpg",100,100,1);thumbnails[3737590]=new thumbnail(3737590,"20136","","DSC_0054_thumb.jpg",100,100,1);thumbnails[3737622]=new thumbnail(3737622,"20136","","DSC_0150_thumb.jpg",100,100,1);thumbnails[3737638]=new thumbnail(3737638,"20136","","DSC_6422_thumb.jpg",100,100,1);thumbnails[3737714]=new thumbnail(3737714,"20136","","compositeimage_thumb.jpg",100,100,1);thumbnails[3737996]=new thumbnail(3737996,"20136","","DSC_65511_thumb.jpg",100,100,1);thumbnails[3737868]=new thumbnail(3737868,"20136","","DSC_01761_thumb.jpg",100,100,1);thumbnails[3738415]=new thumbnail(3738415,"20136","","DSC_6873_thumb.jpg",100,100,1);thumbnails[3737563]=new thumbnail(3737563,"20136","","DSC_0029c_thumb.jpg",100,100,1);thumbnails[3738425]=new thumbnail(3738425,"20136","","DSC_64861_thumb.jpg",100,100,1);thumbnails[3737675]=new thumbnail(3737675,"20136","","DSC_02042_thumb.jpg",100,100,1);thumbnails[3738466]=new thumbnail(3738466,"78797","","DSC_0035_thumb.jpg",100,100,1);thumbnails[3738467]=new thumbnail(3738467,"78797","","DSC_0042_thumb.jpg",100,100,1);thumbnails[3738551]=new thumbnail(3738551,"78797","","DSC_4231_1_thumb.jpg",100,100,1);thumbnails[3738559]=new thumbnail(3738559,"78797","","DSC_4212_thumb.jpg",100,100,1);thumbnails[3738552]=new thumbnail(3738552,"78797","","DSC_4296_1_thumb.jpg",100,100,1);thumbnails[3738549]=new thumbnail(3738549,"78797","","DSC_4205_1_thumb.jpg",100,100,1);thumbnails[3738553]=new thumbnail(3738553,"78797","","DSC_4300_1_thumb.jpg",100,100,1);thumbnails[3738557]=new thumbnail(3738557,"78797","","DSC_4319_1_thumb.jpg",100,100,1);thumbnails[3738547]=new thumbnail(3738547,"78797","","DSC_4198_1_thumb.jpg",100,100,1);thumbnails[3738556]=new thumbnail(3738556,"78797","","DSC_4314_1_thumb.jpg",100,100,1);thumbnails[4968909]=new thumbnail(4968909,"78797","","DSC_0018_party_thumb.jpg",100,100,1);thumbnails[4968912]=new thumbnail(4968912,"78797","","DSC_0025b_party_thumb.jpg",100,100,1);thumbnails[4968929]=new thumbnail(4968929,"78797","","DSC_0068_party_thumb.jpg",100,100,1);thumbnails[4968931]=new thumbnail(4968931,"78797","","DSC_0139_masked_ball_thumb.jpg",100,100,1);thumbnails[4968935]=new thumbnail(4968935,"78797","","DSC_0370_masked_ball_thumb.jpg",100,100,1);var galleries=new Object();galleries[20106]=new gallery(20106,"4967020,4967018,4965116,3730022,3730011","wedding gallery i","gallery",[3730011,4967018,4965124,3730207,4965127,3729993,3732457,4965116,4967010,3730164,4967020,3730136,4965308,4967086,4967028,4965119,4965122,4967083,3730057,4967116,4967013,4967022,3730022,4967007,4967131]);galleries[227863]=new gallery(227863,"3736609","wedding gallery ii","gallery",[4967138,4967152,3736609,4967145,3730132,3737033,3730052,3732319,3736639,3730064,3736676,3736584,3737024,3732409,3737058,3736462,3737227,3730194,3736696,4967156]);galleries[20136]=new gallery(20136,"3738133,3738066,3738049,3737868,3737852,3737659,3737510","portrait gallery","gallery",[3737510,3737561,3737659,3737990,3738144,3737852,3738049,3737571,3738138,3738000,3737773,3738433,3738133,3738429,3737521,3737595,3737669,3737628,3737599,3738066,3737590,3737622,3737638,3737714,3737996,3737868,3738415,3737563,3738425,3737675]);galleries[78797]=new gallery(78797,"3738466","occasions","gallery",[3738466,3738467,3738551,3738559,3738552,3738549,3738553,3738557,3738547,3738556,4968909,4968912,4968929,4968931,4968935]);var imageSets=new Object();imageSets[1]="4967020,4967018,4965127,4965124,4965116,3738133,3738066,3738049,3737868,3737852,3737659,3737561,3737510,3732457,3732319,3730207,3730164,3730136,3730022,3730011";imageSets[2]="4967020,4967018,4965116,3738466,3738133,3738066,3738049,3737868,3737852,3737659,3737510,3736609,3730022,3730011";imageSets[3]="5574616,5254111,4968935,4968931,4968929,4968912,4968909,4967156,4967152,4967145,4967138,4967131,4967116,4967086,4967083,4967028,4967022,4967020,4967018,4967013,4967010,4967007,4965308,4965127,4965124,4965122,4965119,4965116,3738559,3738557,3738556,3738553,3738552,3738551,3738549,3738547,3738467,3738466,3738433,3738429,3738425,3738415,3738144,3738138,3738133,3738066,3738049,3738000,3737996,3737990";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/DonnaHall/images";break}switch(a){case 1:b="http://www1.clikpic.com/DonnaHall/images";break}switch(a){case 2:b="http://admin.clikpic.com/DonnaHall/images";break}switch(a){case 24:b="http://tpc15/clikpic/DonnaHall/images";break}switch(a){case 4:b="http://www.clikchurch.com/DonnaHall/images";break}switch(a){case 5:b="http://www2.clikpic.com/DonnaHall/images";break}switch(a){case 22:b="http://tpc5/clikpic/DonnaHall/images";break}switch(a){case 23:b="http://tpc10/clikpic/DonnaHall/images";break}switch(a){case 25:b="http://tpc16/clikpic/DonnaHall/images";break}switch(a){case 15:b="http://www3.clikpic.com/DonnaHall/images";break}switch(a){case 18:b="http://www4.clikpic.com/DonnaHall/images";break}switch(a){case 19:b="http://www5.clikpic.com/DonnaHall/images";break}switch(a){case 31:b="http://www7.clikpic.com/DonnaHall/images";break}switch(a){case 32:b="http://admin2.clikpic.com/DonnaHall/images";break}switch(a){case 33:b="http://www8.clikpic.com/DonnaHall/images";break}switch(a){case 34:b="http://www9.clikpic.com/DonnaHall/images";break}switch(a){case 35:b="http://admin3.clikpic.com/DonnaHall/images";break}switch(a){case 37:b="http://admin4.clikpic.com/DonnaHall/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="'+escape(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="East Kilbride Wedding and Portrait Photographer: "+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].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> 				&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://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/413955715792922" 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="item_name_1" value="'+e+'">';b=b+'<input type="hidden" name="item_description_1" value="'+ref+'">';b=b+'<input type="hidden" name="item_quantity_1" value="1">';b=b+'<input type="hidden" name="item_price_1" value="'+d+'">';b=b+'<input type="hidden" name="item_currency_1" value="GBP">';b=b+'<input type="Image" src="https://checkout.google.com/buttons/checkout.gif?merchant_id=413955715792922&w=160&h=43&style=trans&variant=text&loc=en_GB" onclick="this.submit" style="margin-left:-6px;">';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<100){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+'")'})}}};