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[83098]=new thumbnail(83098,"7896","Streptocarpus","DSC_4922_thumb.jpg",130,87,15);thumbnails[83105]=new thumbnail(83105,"7893","Tranquillity","Amphitheatre_thumb.jpg",130,88,15);thumbnails[83106]=new thumbnail(83106,"7893","Shadows on a Canal Bridge","Bridge shadows_thumb.jpg",130,54,15);thumbnails[83107]=new thumbnail(83107,"7893","Lowry Reflections","Lowry Reflections_thumb.jpg",130,87,15);thumbnails[83109]=new thumbnail(83109,"7893","Raindrops on Handrail","Raindrops on Handrail_thumb.jpg",130,87,15);thumbnails[83111]=new thumbnail(83111,"7893","Spectrum","Soap Bubble_thumb.jpg",130,98,15);thumbnails[83113]=new thumbnail(83113,"7893","Untitled","Untitled 2_thumb.jpg",130,87,15);thumbnails[83114]=new thumbnail(83114,"7893","Untitled","Untitled_thumb.jpg",130,87,15);thumbnails[83116]=new thumbnail(83116,"7893","Imperial War Museum North","Towers of Gold_thumb.jpg",130,87,15);thumbnails[83118]=new thumbnail(83118,"7893","Tree Bark","Tree Bark_thumb.jpg",130,86,15);thumbnails[83119]=new thumbnail(83119,"7893","Shadows on a Wall","Wall shadows_thumb.jpg",130,106,15);thumbnails[83137]=new thumbnail(83137,"7896","Calendula","Calendula_thumb.jpg",130,87,15);thumbnails[83139]=new thumbnail(83139,"7896","Viola","Flower008_thumb.jpg",130,87,15);thumbnails[83141]=new thumbnail(83141,"7896","Orchid","Ochid_thumb.jpg",130,87,15);thumbnails[83142]=new thumbnail(83142,"7896","Helenium","_DSC3894_thumb.jpg",130,87,15);thumbnails[83144]=new thumbnail(83144,"7896","Veronica Trehane","Veronica_Trehane_thumb.jpg",130,86,15);thumbnails[83147]=new thumbnail(83147,"7896","Poppy","Poppy_thumb.jpg",130,87,15);thumbnails[83148]=new thumbnail(83148,"7896","Rose","Rose_thumb.jpg",130,87,15);thumbnails[83150]=new thumbnail(83150,"7896","Argyranthemum","Argyranthemum_thumb.jpg",130,87,15);thumbnails[83151]=new thumbnail(83151,"7896","Crocosmia","Crocosmia_thumb.jpg",130,194,15);thumbnails[83166]=new thumbnail(83166,"7897","Wedding","DSC_4318_thumb.jpg",130,195,15);thumbnails[83167]=new thumbnail(83167,"7897","Lifestyle Portraiture","DSC_4424_thumb.jpg",130,87,15);thumbnails[83169]=new thumbnail(83169,"7897","News","DSC_6928_thumb.jpg",130,86,15);thumbnails[83171]=new thumbnail(83171,"7897","Location Photography","More of the same_thumb.jpg",130,130,15);thumbnails[83174]=new thumbnail(83174,"7897","Studio","DSC_8171_thumb.jpg",130,130,15);thumbnails[83175]=new thumbnail(83175,"7897","Lifestyle photography","DSC_7715 (1)_thumb.jpg",130,93,15);thumbnails[83177]=new thumbnail(83177,"7897","Events","HDSA_C 14_thumb.jpg",130,65,15);thumbnails[83178]=new thumbnail(83178,"7897","Location Photography","Jones029_thumb.jpg",130,87,15);thumbnails[83179]=new thumbnail(83179,"7897","Fashion","Pic 8_thumb.jpg",130,82,15);thumbnails[83183]=new thumbnail(83183,"7898","Salford Quays","SalQuays_1_thumb.jpg",130,87,15);thumbnails[83185]=new thumbnail(83185,"7898","Doi Suthep Temple","Doi Suthep Temple_thumb.jpg",130,87,15);thumbnails[83186]=new thumbnail(83186,"7898","Rochdale in Bloom","Roch_4_thumb.jpg",130,195,15);thumbnails[83187]=new thumbnail(83187,"7898","Healey Dell","Healy Dell Rochdale_thumb.jpg",130,87,15);thumbnails[83192]=new thumbnail(83192,"7898","Imperial War Museum North","Imperial War Museum North_thumb.jpg",130,87,15);thumbnails[83193]=new thumbnail(83193,"7898","Sunrise","Majorca_thumb.jpg",130,98,15);thumbnails[83194]=new thumbnail(83194,"7898","Tower Bridge","St Katherines by the Tower_thumb.jpg",130,87,15);thumbnails[83195]=new thumbnail(83195,"7898","Narrow Boats","Staffordshire Arm Castlefields_thumb.jpg",130,176,15);thumbnails[83198]=new thumbnail(83198,"7898","Titanic Memorial","Titanic Memorial_thumb.jpg",130,89,15);thumbnails[731319]=new thumbnail(731319,"7898","The Lowry","Land  043_thumb.jpg",130,62,15);thumbnails[1484612]=new thumbnail(1484612,"7897","Location Photography","DSC_77353_thumb.jpg",130,195,15);thumbnails[94418]=new thumbnail(94418,"7866","Christmas Fireworks","Christmas Fireworks_thumb.jpg",130,87,15);thumbnails[94426]=new thumbnail(94426,"7866","Christmas Cracker","Christmas Cracker_thumb.jpg",130,87,15);thumbnails[83129]=new thumbnail(83129,"7866","Big Wheel","Big wheel_thumb.jpg",130,194,15);thumbnails[83131]=new thumbnail(83131,"7866","Carnival of Culture","Carnival of Culture_thumb.jpg",130,87,15);thumbnails[83133]=new thumbnail(83133,"7866","Fireworks and Fair","Fireworks and fair1_thumb.jpg",130,87,15);thumbnails[83134]=new thumbnail(83134,"7866","Ladyboys","Lady boys Thailand_thumb.jpg",130,87,15);thumbnails[86454]=new thumbnail(86454,"7866","La Luminere","DSCF8295_thumb.jpg",130,104,15);thumbnails[86484]=new thumbnail(86484,"7866","Festival of light","DSCF8322_thumb.jpg",130,104,15);thumbnails[95489]=new thumbnail(95489,"7866","Manchester Arndale","Manchester Arndale_thumb.jpg",130,87,15);thumbnails[95518]=new thumbnail(95518,"7866","Manchester Wheel","Manchester Wheel_thumb.jpg",130,87,15);var galleries=new Object();galleries[7893]=new gallery(7893,"83119,83118,83116,83114,83113,83111,83109,83107,83106,83105","Concepts","gallery",[83105,83106,83107,83109,83111,83113,83114,83116,83118,83119]);galleries[7896]=new gallery(7896,"83151,83139","Flowers","gallery",[83098,83137,83139,83141,83142,83144,83147,83148,83150,83151]);galleries[7897]=new gallery(7897,"83166","People","gallery",[83166,83167,83169,83171,83174,83175,83177,83178,83179,1484612]);galleries[7898]=new gallery(7898,"731319,83198,83195,83194,83193,83192,83187,83186,83185,83183","Places","gallery",[83183,83185,83186,83187,83192,83193,83194,83195,83198,731319]);galleries[7866]=new gallery(7866,"95518,95489,94426,94418,86484,86454,83134,83133,83131,83129","Events","gallery",[94418,94426,83129,83131,83133,83134,86454,86484,95489,95518]);var imageSets=new Object();imageSets[1]="94426,94418,83187,83111,83106,83098";imageSets[2]="83166,83151,83139";imageSets[3]="1484612,731319,95518,95489,94426,94418,86484,86454,83198,83195,83194,83193,83192,83187,83186,83185,83183,83179,83178,83177,83175,83174,83171,83169,83167,83166,83151,83150,83148,83147,83144,83142,83141,83139,83137,83134,83133,83131,83129,83119,83118,83116,83114,83113,83111,83109,83107,83106,83105,83098";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 34:b="http://www9.clikpic.com/harrydobbs/images";break}switch(a){case 1:b="http://www1.clikpic.com/harrydobbs/images";break}switch(a){case 2:b="http://admin.clikpic.com/harrydobbs/images";break}switch(a){case 4:b="http://www.clikchurch.com/harrydobbs/images";break}switch(a){case 5:b="http://www2.clikpic.com/harrydobbs/images";break}switch(a){case 15:b="http://www3.clikpic.com/harrydobbs/images";break}switch(a){case 21:b="http://www6.clikpic.com/harrydobbs/images";break}switch(a){case 18:b="http://www4.clikpic.com/harrydobbs/images";break}switch(a){case 19:b="http://www5.clikpic.com/harrydobbs/images";break}switch(a){case 22:b="http://tpc5/clikpic/harrydobbs/images";break}switch(a){case 23:b="http://tpc10/clikpic/harrydobbs/images";break}switch(a){case 24:b="http://tpc15/clikpic/harrydobbs/images";break}switch(a){case 25:b="http://tpc16/clikpic/harrydobbs/images";break}switch(a){case 31:b="http://www7.clikpic.com/harrydobbs/images";break}switch(a){case 32:b="http://admin2.clikpic.com/harrydobbs/images";break}switch(a){case 33:b="http://www8.clikpic.com/harrydobbs/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="Harry Dobbs  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>"}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+'")'})}}};