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[2673605]=new thumbnail(2673605,"169023","White Blossom Fine Art Print","014_thumb.gif",130,87,32);thumbnails[2673610]=new thumbnail(2673610,"169023","Red Rose Fine Art Print","023_thumb.gif",130,195,32);thumbnails[2674502]=new thumbnail(2674502,"169024","Prom, Maldon, Essex","prom_thumb.gif",130,87,32);thumbnails[2674508]=new thumbnail(2674508,"169024","A Quiet Sunset","bench_thumb.gif",130,87,32);thumbnails[2686081]=new thumbnail(2686081,"169024","Rain-kissed Lilly","lilly_thumb.gif",130,87,32);thumbnails[2686111]=new thumbnail(2686111,"169024","Pink Burst","pinkburst_thumb.gif",130,87,32);thumbnails[2686117]=new thumbnail(2686117,"169024","Sunrise","sunrise_thumb.gif",130,87,32);thumbnails[2686120]=new thumbnail(2686120,"169024","Sunset","sunset_thumb.gif",130,87,32);thumbnails[2690007]=new thumbnail(2690007,"169024","Avalanche in The Swiss Alps","switzerland_thumb.gif",130,87,32);thumbnails[3952269]=new thumbnail(3952269,"168966","","12_thumb.gif",130,180,32);thumbnails[3952277]=new thumbnail(3952277,"168966","","13_thumb.gif",130,199,32);thumbnails[3952280]=new thumbnail(3952280,"168966","","14_thumb.gif",130,197,32);thumbnails[3952281]=new thumbnail(3952281,"168966","","15_thumb.gif",130,203,32);thumbnails[3952282]=new thumbnail(3952282,"168966","","16_thumb.gif",130,87,32);thumbnails[3952284]=new thumbnail(3952284,"168966","","17_thumb.gif",130,189,32);thumbnails[3952286]=new thumbnail(3952286,"168966","","18_thumb.gif",130,87,32);thumbnails[5151794]=new thumbnail(5151794,"168966","","just-married_thumb.gif",130,87,32);thumbnails[5151795]=new thumbnail(5151795,"168967","","katie_thumb.gif",130,195,32);thumbnails[5151796]=new thumbnail(5151796,"168966","","lad_thumb.gif",130,195,32);thumbnails[5151797]=new thumbnail(5151797,"168966","","leaves_thumb.gif",130,195,32);thumbnails[5151799]=new thumbnail(5151799,"168967","","man_thumb.gif",130,195,32);thumbnails[5151802]=new thumbnail(5151802,"168966","","pond_thumb.gif",130,87,32);thumbnails[5151823]=new thumbnail(5151823,"168967","","portrait-family_thumb.gif",130,86,32);thumbnails[5151846]=new thumbnail(5151846,"168966","","roses_thumb.gif",130,195,32);thumbnails[5151893]=new thumbnail(5151893,"168967","","siblings_thumb.gif",130,86,32);thumbnails[5151895]=new thumbnail(5151895,"168966","","stairs_thumb.gif",130,87,32);thumbnails[5151897]=new thumbnail(5151897,"168966","","s-t-rolls_thumb.gif",130,87,32);thumbnails[5151900]=new thumbnail(5151900,"168966","","sue_thumb.gif",130,195,32);thumbnails[5151901]=new thumbnail(5151901,"168967","","woman_thumb.gif",130,195,32);thumbnails[5151953]=new thumbnail(5151953,"168967","","Toni_thumb.gif",130,195,32);thumbnails[2670438]=new thumbnail(2670438,"168966","","013_thumb.gif",130,195,32);thumbnails[2670454]=new thumbnail(2670454,"168967","","11_thumb.gif",130,195,32);thumbnails[2674496]=new thumbnail(2674496,"169024","Kew Gardens","kew_thumb.gif",130,87,32);thumbnails[3299902]=new thumbnail(3299902,"168965","","c-04_thumb.gif",130,195,32);thumbnails[3300064]=new thumbnail(3300064,"168968","","ad-01_thumb.gif",130,193,32);thumbnails[2670446]=new thumbnail(2670446,"168966","","063_thumb.gif",130,202,32);thumbnails[2670455]=new thumbnail(2670455,"168967","","10_thumb.gif",130,195,32);thumbnails[3299897]=new thumbnail(3299897,"168965","","c-01_thumb.gif",130,195,32);thumbnails[3300252]=new thumbnail(3300252,"168968","","ad-02_thumb.gif",130,193,32);thumbnails[2670447]=new thumbnail(2670447,"168966","","083_thumb.gif",130,195,32);thumbnails[2673594]=new thumbnail(2673594,"168965","Michale McKell, Actor","033_thumb.gif",130,195,32);thumbnails[3295666]=new thumbnail(3295666,"168967","","lils-03_thumb.gif",130,195,32);thumbnails[3300280]=new thumbnail(3300280,"168968","","ad-03_thumb.gif",130,182,32);thumbnails[2670448]=new thumbnail(2670448,"168966","","032_thumb.gif",130,87,32);thumbnails[3295659]=new thumbnail(3295659,"168967","","lils-02_thumb.gif",130,169,32);thumbnails[3299898]=new thumbnail(3299898,"168965","","c-02_thumb.gif",130,195,32);thumbnails[2670451]=new thumbnail(2670451,"168966","","042_thumb.gif",130,87,32);thumbnails[3295657]=new thumbnail(3295657,"168967","","lils-01_thumb.gif",130,86,32);thumbnails[3299901]=new thumbnail(3299901,"168965","","c-03_thumb.gif",130,195,32);thumbnails[2670453]=new thumbnail(2670453,"168966","","052_thumb.gif",130,87,32);thumbnails[2689677]=new thumbnail(2689677,"168965","Marine Photogrpahy - Corporate Image","044_thumb.gif",130,195,32);thumbnails[2689676]=new thumbnail(2689676,"168965","Marine Photography - Corporate Image","034_thumb.gif",130,87,32);thumbnails[3294200]=new thumbnail(3294200,"168966","","01_thumb.jpg",130,87,32);thumbnails[2689678]=new thumbnail(2689678,"168965","Marine Photography - Corporate Image","054_thumb.gif",130,87,32);thumbnails[3295208]=new thumbnail(3295208,"168966","","02_thumb.jpg",130,103,32);thumbnails[2689672]=new thumbnail(2689672,"168965","Tudor Houses - Corporate Photography","015_thumb.gif",130,87,32);thumbnails[3295231]=new thumbnail(3295231,"168966","","04_thumb.jpg",130,87,32);thumbnails[2670456]=new thumbnail(2670456,"168967","","09_thumb.gif",130,87,32);thumbnails[2689675]=new thumbnail(2689675,"168965","Windmill Cogs - Corporate Photography","025_thumb.gif",130,87,32);thumbnails[3295211]=new thumbnail(3295211,"168966","","03_thumb.jpg",130,195,32);thumbnails[3295246]=new thumbnail(3295246,"168966","","07_thumb.jpg",130,195,32);thumbnails[4986020]=new thumbnail(4986020,"168967","","TONI01_thumb.gif",130,87,32);thumbnails[3295252]=new thumbnail(3295252,"168966","","12_thumb.jpg",130,195,32);thumbnails[4986030]=new thumbnail(4986030,"168967","","TONI02_thumb.gif",130,195,32);thumbnails[3295232]=new thumbnail(3295232,"168966","","05_thumb.jpg",130,86,32);thumbnails[4986039]=new thumbnail(4986039,"168967","","TONI03_thumb.gif",130,195,32);thumbnails[3295244]=new thumbnail(3295244,"168966","","06_thumb.jpg",130,86,32);thumbnails[4986041]=new thumbnail(4986041,"168967","","TONI04_thumb.gif",130,195,32);thumbnails[3295247]=new thumbnail(3295247,"168966","","08_thumb.jpg",130,87,32);thumbnails[4986044]=new thumbnail(4986044,"168967","","TONI05_thumb.gif",130,195,32);thumbnails[3295250]=new thumbnail(3295250,"168966","","09_thumb.jpg",130,87,32);thumbnails[4986047]=new thumbnail(4986047,"168967","","TONI06_thumb.gif",130,195,32);thumbnails[3295254]=new thumbnail(3295254,"168966","","13_thumb.jpg",130,86,32);thumbnails[4986050]=new thumbnail(4986050,"168967","","TONI07_thumb.gif",130,87,32);thumbnails[5151775]=new thumbnail(5151775,"168966","","flowers_thumb.gif",130,87,32);thumbnails[5151778]=new thumbnail(5151778,"168966","","girls_thumb.gif",130,87,32);var galleries=new Object();galleries[168968]=new gallery(168968,"3300280,3300252,3300064","Advertising","gallery",[3300064,3300252,3300280]);galleries[168965]=new gallery(168965,"3299902","Corporate","gallery",[3299902,3299897,2673594,3299898,3299901,2689677,2689676,2689678,2689672,2689675]);galleries[169023]=new gallery(169023,"2673610","Fine Art Prints","gallery",[2673605,2673610]);galleries[169024]=new gallery(169024,"2690007,2686120,2686117,2686111,2686081,2674508,2674502,2674496","Gallery Wrapped Canvases","gallery",[2674502,2674508,2686081,2686111,2686117,2686120,2690007,2674496]);galleries[168967]=new gallery(168967,"2670454","Portraits","gallery",[5151795,5151799,5151823,5151893,5151901,5151953,2670454,2670455,3295666,3295659,3295657,2670456,4986020,4986030,4986039,4986041,4986044,4986047,4986050]);galleries[168966]=new gallery(168966,"2670447","Weddings - Portfolio","gallery",[3952269,3952277,3952280,3952281,3952282,3952284,3952286,5151794,5151796,5151797,5151802,5151846,5151895,5151897,5151900,2670438,2670446,2670447,2670448,2670451,2670453,3294200,3295208,3295231,3295211,3295246,3295252,3295232,3295244,3295247,3295250,3295254,5151775,5151778]);galleries[168659]=new gallery(168659,"2670454,2670447","Weddings & Portraits","gallery",[]);galleries[168660]=new gallery(168660,"3299902","Corporate & Advertising","gallery",[]);galleries[169008]=new gallery(169008,"2673610","Fine Art Gallery","gallery",[]);var imageSets=new Object();imageSets[1]="2670454";imageSets[2]="3299902,2673610,2670454,2670447";imageSets[3]="5151953,5151901,5151900,5151897,5151895,5151893,5151846,5151823,5151802,5151799,5151797,5151796,5151795,5151794,5151778,5151775,4986050,4986047,4986044,4986041,4986039,4986030,4986020,3952286,3952284,3952282,3952281,3952280,3952277,3952269,3300280,3300252,3300064,3299902,3299901,3299898,3299897,3295666,3295659,3295657,3295254,3295252,3295250,3295247,3295246,3295244,3295232,3295231,3295211,3295208";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/donnasiggers/images";break}switch(a){case 1:b="http://www1.clikpic.com/donnasiggers/images";break}switch(a){case 2:b="http://admin.clikpic.com/donnasiggers/images";break}switch(a){case 24:b="http://tpc15/clikpic/donnasiggers/images";break}switch(a){case 4:b="http://www.clikchurch.com/donnasiggers/images";break}switch(a){case 5:b="http://www2.clikpic.com/donnasiggers/images";break}switch(a){case 22:b="http://tpc5/clikpic/donnasiggers/images";break}switch(a){case 23:b="http://tpc10/clikpic/donnasiggers/images";break}switch(a){case 25:b="http://tpc16/clikpic/donnasiggers/images";break}switch(a){case 15:b="http://www3.clikpic.com/donnasiggers/images";break}switch(a){case 18:b="http://www4.clikpic.com/donnasiggers/images";break}switch(a){case 19:b="http://www5.clikpic.com/donnasiggers/images";break}switch(a){case 31:b="http://www7.clikpic.com/donnasiggers/images";break}switch(a){case 32:b="http://admin2.clikpic.com/donnasiggers/images";break}switch(a){case 33:b="http://www8.clikpic.com/donnasiggers/images";break}switch(a){case 34:b="http://www9.clikpic.com/donnasiggers/images";break}switch(a){case 35:b="http://admin3.clikpic.com/donnasiggers/images";break}switch(a){case 37:b="http://admin4.clikpic.com/donnasiggers/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="Orchard Photography Gallery: "+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> 				&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://www.paypal.com/cgi-bin/webscr" 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="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="donna.ponder@btinternet.com">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="donna.ponder@btinternet.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';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<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+'")'})}}};