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[5212441]=new thumbnail(5212441,"","Lynne at work","Lynne_at_work001_thumb.jpg",130,173,18);thumbnails[5006120]=new thumbnail(5006120,"283117","Red Jacket<br>\r\n","Red_Jacket_thumb.jpg",130,182,18);thumbnails[5047525]=new thumbnail(5047525,"283117","Clock Shop","Clock_Shop_thumb.jpg",130,86,18);thumbnails[5047529]=new thumbnail(5047529,"283117","Enchanted Tree","Enchanted_Wood_thumb.jpg",130,102,18);thumbnails[5047531]=new thumbnail(5047531,"283117","The Tell","The_Tell_thumb.jpg",130,183,18);thumbnails[5119189]=new thumbnail(5119189,"283117","Coffee Teller","Coffee_Teller_thumb.jpg",130,168,18);thumbnails[5119217]=new thumbnail(5119217,"283117","Oasis Rhythm","Oasis_Rhythm_thumb.jpg",130,156,18);thumbnails[5119218]=new thumbnail(5119218,"283117","Raffia Bow","Raffia_Bow_thumb.jpg",130,157,18);thumbnails[5119236]=new thumbnail(5119236,"283117","Reverie","Reverie_thumb.jpg",130,134,18);thumbnails[5119237]=new thumbnail(5119237,"283117","Siblings","Siblings_thumb.jpg",130,156,18);thumbnails[5119239]=new thumbnail(5119239,"283117","Waiting","Waiting_thumb.jpg",130,190,18);thumbnails[5119240]=new thumbnail(5119240,"283117","White Handkerchief","White_Handkerchief_thumb.jpg",130,171,18);thumbnails[5367627]=new thumbnail(5367627,"283117","Mona Trad and the Wall for Lebanon","Mona_Trad001_thumb.jpg",130,86,18);thumbnails[5367681]=new thumbnail(5367681,"283117","My Giant Tree shouting for Lebanon","My_Tree001_thumb.jpg",130,196,18);thumbnails[5367687]=new thumbnail(5367687,"283117","Painting the Wall for Lebanon - 2005","Painting_the_Wall001_thumb.jpg",130,90,18);thumbnails[5367699]=new thumbnail(5367699,"283117","Devi and Bradley with Maurice at Harissa","Devi_and_Maurice001_thumb.jpg",130,193,18);thumbnails[5367726]=new thumbnail(5367726,"283117","Bradley at Byblos","Bradley001_thumb.jpg",130,87,18);thumbnails[5367848]=new thumbnail(5367848,"283117","Devi, Maurice and friends at Byblos","Devi_and_friends002_thumb.jpg",130,79,18);thumbnails[5434650]=new thumbnail(5434650,"283117","Threshold","Threshold_thumb.jpg",130,184,18);thumbnails[5310259]=new thumbnail(5310259,"283117","Ottoman Echoes","Ottoman_Echoes_thumb.jpg",130,173,18);thumbnails[6612159]=new thumbnail(6612159,"362276","Kitchen Sink","Kitchen_Sink_thumb.jpg",130,155,18);thumbnails[6612166]=new thumbnail(6612166,"362276","Ball of Wool","Ball_of_Wool_thumb.jpg",130,159,18);thumbnails[6612194]=new thumbnail(6612194,"362276","Samburu","Samburu_AEA70903-1D09-001F-99415D39E2A815DA_thumb.jpg",130,104,18);thumbnails[6612197]=new thumbnail(6612197,"362276","African Woman","African_Woman_thumb.jpg",130,155,18);thumbnails[6612202]=new thumbnail(6612202,"362276","Hubble Bubble","Hubble_Bubble_thumb.jpg",130,97,18);thumbnails[6612206]=new thumbnail(6612206,"362276","Beirut Smoke","Beirut_Smoke_thumb.jpg",130,131,18);thumbnails[5177133]=new thumbnail(5177133,"297485","Lynne at Joun, above Sidon","Lynne001web_thumb.jpg",130,171,18);thumbnails[5288670]=new thumbnail(5288670,"297485","Penny at Joun, above Sidon","Penny_thumb.jpg",130,173,18);thumbnails[5177084]=new thumbnail(5177084,"283118","Leaving Lebanon","Leaving_Lebanon_thumb.jpg",130,87,18);thumbnails[5188373]=new thumbnail(5188373,"283118","Moonflowers","Moonflower_thumb.jpg",130,105,18);thumbnails[5205358]=new thumbnail(5205358,"283118","AJ and Bridget","Bridget_thumb.jpg",130,87,18);thumbnails[5205367]=new thumbnail(5205367,"283118","Moonflowers on the Beirut balcony","Balcony_moonflowers_thumb.jpg",130,87,18);thumbnails[5360544]=new thumbnail(5360544,"298800","Sarajevo House","Sarajevo_House_1_thumb.jpg",130,101,18);thumbnails[5360640]=new thumbnail(5360640,"298800","Turkish Doll with Bosnian Friends","Dolls_thumb.jpg",130,76,18);thumbnails[5310279]=new thumbnail(5310279,"298800","Reconciliation","Reconciliation_thumb.jpg",130,92,18);thumbnails[5342426]=new thumbnail(5342426,"300705","Lynne on North Beach, Gallipoli - April 2001","Lynne_on_North_Beach_thumb.jpg",130,98,18);thumbnails[5343489]=new thumbnail(5343489,"300705","Bird over Rescue Site","Bird_over_Rescue_Site_thumb.jpg",130,100,18);thumbnails[5340299]=new thumbnail(5340299,"300705","Turkish Doll","Turkish_Doll_thumb.jpg",130,127,18);thumbnails[5208639]=new thumbnail(5208639,"293961","Young Masai Woman","Africa001_thumb.jpg",130,98,18);thumbnails[5310447]=new thumbnail(5310447,"293961","Samburu","Samburu_thumb.jpg",130,105,18);thumbnails[5318283]=new thumbnail(5318283,"293961","Masai child","Masai_child_thumb.jpg",130,182,18);thumbnails[5318294]=new thumbnail(5318294,"293961","Young Samburu girl","Samburu_woman_thumb.jpg",130,172,18);thumbnails[5318300]=new thumbnail(5318300,"293961","Young Masai girl","Young_Masai_Girl_thumb.jpg",130,173,18);thumbnails[5318318]=new thumbnail(5318318,"293961","Rendille Vitality","Rendille_Vitality_thumb.jpg",130,163,18);thumbnails[5438533]=new thumbnail(5438533,"307466","Historical costume (male) - 13th century","Historical_Costume_13th_century_copy_thumb.jpg",130,202,18);thumbnails[5438608]=new thumbnail(5438608,"307466","Female Costume 13th Century","Female_costume_13th_century_copy_thumb.jpg",130,208,18);thumbnails[5438601]=new thumbnail(5438601,"307466","Enchanted Garden","Enchanted_Garden_copy_thumb.jpg",130,189,18);thumbnails[5438605]=new thumbnail(5438605,"307466","Dancing Girl","Dancing_Girl_copy_thumb.jpg",130,171,18);thumbnails[5438610]=new thumbnail(5438610,"307466","Portrait of a friend","Portrait_of_a_Friend_copy_thumb.jpg",130,167,18);var galleries=new Object();galleries[362276]=new gallery(362276,"6612206,6612202,6612197,6612194,6612166,6612159","Hereford Art-fest 2010","gallery",[6612159,6612166,6612194,6612197,6612202,6612206]);galleries[283117]=new gallery(283117,"5434650,5367848,5367726,5367699,5367687,5367681,5367627,5310259,5119240,5119239","Lebanon and Syria","gallery",[5006120,5047525,5047529,5047531,5119189,5119217,5119218,5119236,5119237,5119239,5119240,5367627,5367681,5367687,5367699,5367726,5367848,5434650,5310259]);galleries[297485]=new gallery(297485,"5288670,5177133","Travels in Lebanon with Penny","gallery",[5177133,5288670]);galleries[283118]=new gallery(283118,"5205367,5205358,5188373,5177084","Leaving the Levant","gallery",[5177084,5188373,5205358,5205367]);galleries[298800]=new gallery(298800,"5360640,5360544,5310279","The Balkans","gallery",[5360544,5360640,5310279]);galleries[300705]=new gallery(300705,"5343489,5342426,5340299","Turkey","gallery",[5342426,5343489,5340299]);galleries[293961]=new gallery(293961,"5318318,5318300,5318294,5318283,5310447,5208639","Africa","gallery",[5208639,5310447,5318283,5318294,5318300,5318318]);galleries[307466]=new gallery(307466,"5438610,5438608,5438605,5438601,5438533","The Early Years","gallery",[5438533,5438608,5438601,5438605,5438610]);var imageSets=new Object();imageSets[1]="5212441";imageSets[3]="6612206,6612202,6612197,6612194,6612166,6612159,5438610,5438608,5438605,5438601,5438533,5434650,5367848,5367726,5367699,5367687,5367681,5367627,5360640,5360544,5343489,5342426,5340299,5318318,5318300,5318294,5318283,5310447,5310279,5310259,5288670,5212441,5208639,5205367,5205358,5188373,5177133,5177084,5119240,5119239,5119237,5119236,5119218,5119217,5119189,5047531,5047529,5047525,5006120";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/lynnepoole/images";break}switch(a){case 1:b="http://www1.clikpic.com/lynnepoole/images";break}switch(a){case 2:b="http://admin.clikpic.com/lynnepoole/images";break}switch(a){case 24:b="http://tpc15/clikpic/lynnepoole/images";break}switch(a){case 4:b="http://www.clikchurch.com/lynnepoole/images";break}switch(a){case 5:b="http://www2.clikpic.com/lynnepoole/images";break}switch(a){case 22:b="http://tpc5/clikpic/lynnepoole/images";break}switch(a){case 23:b="http://tpc10/clikpic/lynnepoole/images";break}switch(a){case 25:b="http://tpc16/clikpic/lynnepoole/images";break}switch(a){case 15:b="http://www3.clikpic.com/lynnepoole/images";break}switch(a){case 18:b="http://www4.clikpic.com/lynnepoole/images";break}switch(a){case 19:b="http://www5.clikpic.com/lynnepoole/images";break}switch(a){case 31:b="http://www7.clikpic.com/lynnepoole/images";break}switch(a){case 32:b="http://admin2.clikpic.com/lynnepoole/images";break}switch(a){case 33:b="http://www8.clikpic.com/lynnepoole/images";break}switch(a){case 34:b="http://www9.clikpic.com/lynnepoole/images";break}switch(a){case 35:b="http://admin3.clikpic.com/lynnepoole/images";break}switch(a){case 37:b="http://admin4.clikpic.com/lynnepoole/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="Lynne Poole Images: "+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+'")'})}}};