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[3059252]=new thumbnail(3059252,"188124","","IMG_4128 crop_thumb.jpg",130,59,18);thumbnails[3059264]=new thumbnail(3059264,"188124","","IMG_4160_thumb.jpg",130,213,18);thumbnails[3059601]=new thumbnail(3059601,"188124","","IMG_4128_thumb.jpg",130,96,18);thumbnails[3059606]=new thumbnail(3059606,"188124","","IMG_4130_thumb.jpg",130,175,18);thumbnails[3059609]=new thumbnail(3059609,"188124","","IMG_4200_thumb.jpg",130,164,18);thumbnails[3059612]=new thumbnail(3059612,"188124","","IMG_4203_thumb.jpg",130,175,18);thumbnails[3059618]=new thumbnail(3059618,"188124","","IMG_4214_thumb.jpg",130,175,18);thumbnails[3059623]=new thumbnail(3059623,"188124","","IMG_4218_thumb.jpg",130,175,18);thumbnails[3059624]=new thumbnail(3059624,"188124","","IMG_4223_thumb.jpg",130,102,18);thumbnails[3059628]=new thumbnail(3059628,"188124","","IMG_4223pop_thumb.jpg",130,102,18);thumbnails[3059632]=new thumbnail(3059632,"188124","","IMG_4226_thumb.jpg",130,105,18);thumbnails[3059636]=new thumbnail(3059636,"188124","","IMG_4229_thumb.jpg",130,210,18);thumbnails[3059638]=new thumbnail(3059638,"188124","","IMG_4232_thumb.jpg",130,176,18);thumbnails[3059641]=new thumbnail(3059641,"188124","","IMG_4236_thumb.jpg",130,182,18);thumbnails[3059645]=new thumbnail(3059645,"188124","","IMG_4245_thumb.jpg",130,227,18);thumbnails[3059649]=new thumbnail(3059649,"188124","","IMG_4265_thumb.jpg",130,176,18);thumbnails[3059651]=new thumbnail(3059651,"188124","","IMG_4266 b_thumb.jpg",130,175,18);thumbnails[3059653]=new thumbnail(3059653,"188124","","IMG_4266_thumb.jpg",130,161,18);thumbnails[3059657]=new thumbnail(3059657,"188124","","IMG_4281_thumb.jpg",130,179,18);thumbnails[3059660]=new thumbnail(3059660,"188124","","IMG_4290_thumb.jpg",130,175,18);thumbnails[3059662]=new thumbnail(3059662,"188124","","IMG_4314_thumb.jpg",130,175,18);thumbnails[3059663]=new thumbnail(3059663,"188124","","IMG_4315_thumb.jpg",130,175,18);thumbnails[3059666]=new thumbnail(3059666,"188124","","IMG_4318_thumb.jpg",130,96,18);thumbnails[3059671]=new thumbnail(3059671,"188124","","IMG_4358_thumb.jpg",130,175,18);thumbnails[3059674]=new thumbnail(3059674,"188124","","IMG_4379_thumb.jpg",130,96,18);thumbnails[3059677]=new thumbnail(3059677,"188124","","IMG_4397_thumb.jpg",130,175,18);thumbnails[3059685]=new thumbnail(3059685,"188124","","IMG_4404_thumb.jpg",130,175,18);thumbnails[3059686]=new thumbnail(3059686,"188124","","IMG_4415_thumb.jpg",130,175,18);thumbnails[3059691]=new thumbnail(3059691,"188124","","IMG_4454_thumb.jpg",130,96,18);thumbnails[3059695]=new thumbnail(3059695,"188124","","IMG_4597_thumb.jpg",130,175,18);thumbnails[3059703]=new thumbnail(3059703,"188124","","IMG_4663_thumb.jpg",130,175,18);thumbnails[3059709]=new thumbnail(3059709,"188124","","IMG_4194_thumb.jpg",130,175,18);thumbnails[2485656]=new thumbnail(2485656,"116072","","reves web_thumb.jpg",130,181,18);thumbnails[2421095]=new thumbnail(2421095,"116538","","JM3 copyweb_thumb.jpg",130,193,18);thumbnails[2421097]=new thumbnail(2421097,"116538","","BB copyweb_thumb.jpg",130,93,18);thumbnails[2421090]=new thumbnail(2421090,"116538","","fetemusiqueweb_thumb.jpg",130,183,18);thumbnails[2421080]=new thumbnail(2421080,"116072","","chenonceauxsmall_thumb.jpg",130,183,18);thumbnails[2421084]=new thumbnail(2421084,"116378","","chenonceaux2web_thumb.jpg",130,93,18);thumbnails[2421325]=new thumbnail(2421325,"116378","","chateau framed 1web_thumb.jpg",130,90,18);thumbnails[1728845]=new thumbnail(1728845,"116072","en dépanne","en dépanne1_thumb.jpg",130,99,18);thumbnails[1728851]=new thumbnail(1728851,"116072","camouflage","camouflage_thumb.jpg",130,87,18);thumbnails[1728831]=new thumbnail(1728831,"116072","honfleur","honfleur_thumb.jpg",130,178,18);thumbnails[1729112]=new thumbnail(1729112,"116072","ice bound","ice bound_thumb.jpg",130,105,18);thumbnails[1731078]=new thumbnail(1731078,"116072","Chateau de Saumur","Chateau de Saumur framed 2_thumb.jpg",130,103,18);thumbnails[1731345]=new thumbnail(1731345,"116073","","Winter Berries True Pop web_thumb.jpg",130,180,18);thumbnails[1731367]=new thumbnail(1731367,"116073","","Winter Berries web_thumb.jpg",130,180,18);thumbnails[1728867]=new thumbnail(1728867,"116072","magasin","magasin_thumb.jpg",130,196,18);thumbnails[1731372]=new thumbnail(1731372,"116073","","home from the sea web_thumb.jpg",130,185,18);thumbnails[1731380]=new thumbnail(1731380,"116378","","spinnaker tower web_thumb.jpg",130,185,18);thumbnails[1731578]=new thumbnail(1731578,"116073","","Blues framed web_thumb.jpg",130,187,18);thumbnails[1731618]=new thumbnail(1731618,"116378","","église day_thumb.jpg",130,184,18);thumbnails[1731621]=new thumbnail(1731621,"116378","","église for web_thumb.jpg",130,185,18);thumbnails[1731646]=new thumbnail(1731646,"116378","","église_thumb.jpg",130,184,18);thumbnails[1734360]=new thumbnail(1734360,"116538","","cowboy junkies_thumb.jpg",130,190,18);thumbnails[1734361]=new thumbnail(1734361,"116538","","mime 2_thumb.jpg",130,241,18);thumbnails[1734363]=new thumbnail(1734363,"116538","","mime_thumb.jpg",130,191,18);thumbnails[1734364]=new thumbnail(1734364,"116538","","sidewalk stage_thumb.jpg",130,144,18);thumbnails[1734367]=new thumbnail(1734367,"116538","","sun god_thumb.jpg",130,219,18);thumbnails[1734396]=new thumbnail(1734396,"116538","","pied piper_thumb.jpg",130,74,18);thumbnails[1735459]=new thumbnail(1735459,"116538","","watching_thumb.jpg",130,145,18);thumbnails[1777131]=new thumbnail(1777131,"116072","","ail_thumb.jpg",130,92,18);thumbnails[1849210]=new thumbnail(1849210,"116072","","Bateau sur La Loire_thumb.jpg",130,184,18);thumbnails[2496388]=new thumbnail(2496388,"116378","","chateau de saumur_thumb.jpg",130,94,18);thumbnails[2496398]=new thumbnail(2496398,"116072","","feu d'artifice1_thumb.jpg",130,183,18);thumbnails[2496408]=new thumbnail(2496408,"116072","","feu d'artifice 2_thumb.jpg",130,183,18);thumbnails[1728861]=new thumbnail(1728861,"116069","le ciel bleu","le ciel bleu_thumb.jpg",130,85,18);thumbnails[1728871]=new thumbnail(1728871,"116069","coucher","coucher_thumb.jpg",130,83,18);thumbnails[1728885]=new thumbnail(1728885,"116069","bateau vert","bateau vert_thumb.jpg",130,92,18);thumbnails[1728849]=new thumbnail(1728849,"116069","forêt","foret black border_thumb.jpg",130,185,18);thumbnails[1728875]=new thumbnail(1728875,"116069","nouvelle jour","nouvelle jour web_thumb.jpg",130,185,18);thumbnails[1733493]=new thumbnail(1733493,"116069","","étang_thumb.jpg",130,138,18);thumbnails[1735618]=new thumbnail(1735618,"116069","","foret deux_thumb.jpg",130,189,18);thumbnails[1735622]=new thumbnail(1735622,"116069","","Foret trois_thumb.jpg",130,190,18);thumbnails[1774445]=new thumbnail(1774445,"116069","","lever_thumb.jpg",130,90,18);thumbnails[1849255]=new thumbnail(1849255,"116069","","L'étang_thumb.jpg",130,94,18);thumbnails[1849258]=new thumbnail(1849258,"116069","","La Loire_thumb.jpg",130,92,18);var galleries=new Object();galleries[116378]=new gallery(116378,"2496388,2421325,2421084,1731646,1731621,1731618,1731380","Buildings & Architecture","gallery",[2421084,2421325,1731380,1731618,1731621,1731646,2496388]);galleries[116072]=new gallery(116072,"2421080","France","gallery",[2485656,2421080,1728845,1728851,1728831,1729112,1731078,1728867,1777131,1849210,2496398,2496408]);galleries[116073]=new gallery(116073,"1731578,1731372,1731367,1731345","General","gallery",[1731345,1731367,1731372,1731578]);galleries[116538]=new gallery(116538,"2421097,2421095,2421090,1735459,1734396,1734367,1734364,1734363,1734361,1734360","People","gallery",[2421095,2421097,2421090,1734360,1734361,1734363,1734364,1734367,1734396,1735459]);galleries[188124]=new gallery(188124,"3059709,3059703,3059695,3059691,3059686,3059685,3059677,3059674,3059671,3059666","Wedding","gallery",[3059252,3059264,3059601,3059606,3059609,3059612,3059618,3059623,3059624,3059628,3059632,3059636,3059638,3059641,3059645,3059649,3059651,3059653,3059657,3059660,3059662,3059663,3059666,3059671,3059674,3059677,3059685,3059686,3059691,3059695,3059703,3059709]);galleries[116069]=new gallery(116069,"1849258,1849255,1774445,1735622,1735618,1733493,1728885,1728875,1728871,1728861","Landscapes","gallery",[1728861,1728871,1728885,1728849,1728875,1733493,1735618,1735622,1774445,1849255,1849258]);var imageSets=new Object();imageSets[1]="1728849";imageSets[2]="2421080";imageSets[3]="3059709,3059703,3059695,3059691,3059686,3059685,3059677,3059674,3059671,3059666,3059663,3059662,3059660,3059657,3059653,3059651,3059649,3059645,3059641,3059638,3059636,3059632,3059628,3059624,3059623,3059618,3059612,3059609,3059606,3059601,3059264,3059252,2496408,2496398,2496388,2485656,2421325,2421097,2421095,2421090,2421084,2421080,1849258,1849255,1849210,1777131,1774445,1735622,1735618,1735459";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/LeChant/images";break}switch(a){case 1:b="http://www1.clikpic.com/LeChant/images";break}switch(a){case 2:b="http://admin.clikpic.com/LeChant/images";break}switch(a){case 4:b="http://www.clikchurch.com/LeChant/images";break}switch(a){case 5:b="http://www2.clikpic.com/LeChant/images";break}switch(a){case 15:b="http://www3.clikpic.com/LeChant/images";break}switch(a){case 21:b="http://www6.clikpic.com/LeChant/images";break}switch(a){case 18:b="http://www4.clikpic.com/LeChant/images";break}switch(a){case 19:b="http://www5.clikpic.com/LeChant/images";break}switch(a){case 22:b="http://tpc5/clikpic/LeChant/images";break}switch(a){case 23:b="http://tpc10/clikpic/LeChant/images";break}switch(a){case 24:b="http://tpc15/clikpic/LeChant/images";break}switch(a){case 25:b="http://tpc16/clikpic/LeChant/images";break}switch(a){case 31:b="http://www7.clikpic.com/LeChant/images";break}switch(a){case 32:b="http://admin2.clikpic.com/LeChant/images";break}switch(a){case 33:b="http://www8.clikpic.com/LeChant/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="chantography: "+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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&euro;"+c.item_price+"</p>";var e=c.purchase_instruction;var d=c.item_price;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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="LECHANT">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};