var BROWSER_NO_COMPATIBLE='Votre navigateur n\'est pas comptatible avec le module Google Maps';var NO_GEOCODE_WITH_ADRRESS='L\'adresse fournie n\'a pu être localisé. Veuillez vérifier son exactitude.\nIl se peut qu\'elle soit trop récente, ou trop complète. Essayez en supprimant du champ "adresse" tout complément (lieu-dit, résidence, ...).\nVous pouvez aussi effectuer la géolocalisation manuellement en double-cliquant sur la carte.';var NO_DESTINATION='Impossible de calculer votre itinéraire : Aucune destination de précisée.';
if(typeof Prototype=='undefined'){throw("GoMap requires the Prototype JavaScript");}var GoMap=Class.create({initialize:function(a,b){this.container=$(a);this.options=Object.extend({lat:42,lng:3,zoom:10,point:{lat:null,lng:null,panTo:false},controls:['GLargeMapControl','GMapTypeControl'],enableDragging:true,enableInfoWindow:true,enableDoubleClickZoom:false,enableContinuousZoom:false,enableGoogleBar:false,enableScrollWheelZoom:false},b||{});this.isWorking=true;this.controls=[];this.markers=[];this.icons=[];this.registeredOverlays=[];this.routes={};this.routes.container=null;this.routes.from=null;this.routes.destinations=[];if(GBrowserIsCompatible()){Event.observe(window,'unload',GUnload);this.map=new GMap2(this.container);this.addControls(this.options.controls);var c=new GLatLng(parseFloat(this.options.lat),parseFloat(this.options.lng));this.map.setCenter(c,this.options.zoom);if(this.options.enableDragging){this.map.enableDragging()}if(this.options.enableInfoWindow){this.map.enableInfoWindow()}if(this.options.enableDoubleClickZoom){this.map.enableDoubleClickZoom()}if(this.options.enableContinuousZoom){this.map.enableContinuousZoom()}if(this.options.enableGoogleBar){this.map.enableGoogleBar()}if(this.options.enableScrollWheelZoom){this.map.enableScrollWheelZoom()}if(this.options.point.lat!==null&&this.options.point.lng!==null){this.addMarker(this.options.point.lat,this.options.point.lng,this.options.point.panTo)}}else{alert(BROWSER_NO_COMPATIBLE);return}},addControls:function(a){var b=[];if(Object.isArray(a)){a.each(function(c){b.push(c)})}else{b.push(a)}var d=this;b.each(function(c){d.addControl(c)})},addControl:function(a){if(this.controls.indexOf(a)==-1){this.map.addControl(eval('new '+a+'()'));this.controls.push(a)}},removeControl:function(a){if(this.controls.indexOf(a)!=-1){this.map.removeControl(a)}},center:function(a,b,c){this.map.setCenter(new GLatLng(a,b),c)},observeRefreshGeocod:function(a,b,c,d,e){this.addressField=c;this.latFied=$(d);this.lngField=$(e);$(a).style.cursor='pointer';Event.observe(a,b,this.geocode.bindAsEventListener(this))},geocode:function(){var b='';if(Object.isArray(this.addressField)){this.addressField.each(function(a){b+=$(a).value+' '})}else{b=$(this.addressField).value}b.strip();var c=new GClientGeocoder();var d=this;c.getLatLng(b,function(a){d.placeMarkerGeocode(a)})},placeMarkerGeocode:function(a){if(a===null){alert(NO_GEOCODE_WITH_ADRRESS)}else{this.map.clearOverlays();var b=this.addMarker(a.lat(),a.lng(),true);this.latFied.value=a.lat();this.lngField.value=a.lng();b=this.makeSelectCoord(b,this.latFied,this.lngField)}},setSelectCoord:function(d,e,f){var f=Object.extend({event:'dblclick'},f||{});if(f.event=='dblclick'&&this.map.doubleClickZoomEnabled()){this.map.disableDoubleClickZoom()}var g=this;this.handleSelectCoord=GEvent.addListener(this.map,f.event,function(a,b){g.map.clearOverlays();var c=g.addMarker(b.lat(),b.lng());c=g.makeSelectCoord(c,d,e);$(d).value=c.getPoint().lat();$(e).value=c.getPoint().lng()})},addMarker:function(a,b,c,d){var e=new GLatLng(parseFloat(a),parseFloat(b));var f=new GMarker(e,d);this.map.addOverlay(f);if(c===true){this.map.panTo(e)}this.markers.push(f);return f},getMarkers:function(){return this.markers},makeSelectCoord:function(a,b,c){var d=a.getLatLng();var e=d.lat();var f=d.lng();var g=a.getIcon();GEvent.removeListener(this.handleSelectCoord);if(this.options.enableDoubleClickZoom){this.map.enableDoubleClickZoom()}this.map.removeOverlay(a);var h={icon:g,title:'Déplacer moi pour sélectionner votre position précisément',draggable:true};var a=this.addMarker(e,f,true,h);GEvent.addListener(a,'dragend',function(){$(b).value=a.getPoint().lat();$(c).value=a.getPoint().lng()});return a},registerOverlay:function(a){this.registeredOverlays.push(a)},clearRegisteredOverlays:function(){var b=this;this.registeredOverlays.each(function(a){b.map.removeOverlay(a)});this.registeredOverlays.clear()},displayRegisteredOverlays:function(){var b=this;this.registeredOverlays.each(function(a){try{b.map.addOverlay(a)}catch(exception){}})},setDefaultIcon:function(a){this.registerIcon('default',a)},getDefaultIcon:function(){if(!this.hasIcon('default')){this.setDefaultIcon(new GIcon(G_DEFAULT_ICON))}return this.icons['default']},registerIcon:function(a,b,c){var c=new Boolean(c);if(this.hasIcon(a)){if(c){this.icons[a]=b}}else{this.icons[a]=b}},getIcon:function(a,b){if(undefined==b){b=true}else{b=new Boolean(b)}if(!this.hasIcon(a)){if(true===b){return this.getDefaultIcon()}else{return null}}else{return this.icons[a]}},hasIcon:function(a){if(undefined==this.icons[a]){return false}return true},initXml:function(a){},loadXml:function(j){var k=this;GDownloadUrl(j,function(a){var b=GXml.parse(a);var c=b.documentElement.getElementsByTagName('marker');k.map.clearOverlays();k.displayRegisteredOverlays();for(var i=0;i<c.length;i++){var d=parseFloat(c[i].getAttribute("lat"));var e=parseFloat(c[i].getAttribute("lng"));var f=c[i].getAttribute("text");var g=c[i].getAttribute("icon");var h=k.addMarker(d,e,false,k.getIcon(g));h.bindInfoWindowHtml(f);GEvent.addListener(h,'infowindowopen',function(){k.map.savePosition()});GEvent.addListener(h,'infowindowclose',function(){k.map.returnToSavedPosition()})}})},initKml:function(a){},loadKml:function(a){var b=new GGeoXml(a);return b},initRoute:function(a){this.routes.container=$(a);this.routes.gdir=new GDirections(this.map,this.routes.container);var b=this;GEvent.addListener(b.routes.gdir,"load",function(){});GEvent.addListener(b.routes.gdir,"error",function(){alert('erreur : '+b.routes.gdir.getStatus().code)});GEvent.addListener(b.routes.gdir,"addoverlay",function(){$(b.routes.container).fire('routes:loaded')})},setFrom:function(a){this.routes.from=a.strip()},addDestination:function(a){this.routes.destinations.push(a.stripTags().strip())},observeRefreshRoute:function(a){this.routes.elFrom=$(a);this.routes.form=this.routes.elFrom.form;Event.observe(this.routes.form,'submit',this.refreshRoutes.bindAsEventListener(this))},refreshRoutes:function(a){this.setFrom(this.routes.elFrom.value);this.calculRoutes();Event.stop(a)},calculRoutes:function(){this.map.clearOverlays();this.routes.gdir.clear();if(this.routes.destinations.length===0){alert(NO_DESTINATION)}else if(this.routes.destinations.length==1){var a='from: '+this.routes.from+' to: '+this.routes.destinations[0];this.routes.gdir.load(a)}else{this.routes.destinations.unshift(this.routes.from);this.routes.gdir.loadFromWaypoints(this.routes.destinations)}}});
if(typeof Effect=='undefined'){throw("carroussel.js requires including script.aculo.us' effects.js library!");}function defaultFx(a,b,c){new Effect.Fade($(a),{duration:c.fxSpeed});new Effect.Appear($(b),{duration:c.fxSpeed})}var caroussel=Class.create({initialize:function(a,b){this.container=$(a);this.options=Object.extend({tag:'li',treeTag:'ul',init:this.defaultInit,transitionFx:defaultFx,effectSpeed:1,effectOptions:{},autostart:false,pauseOnOver:false,time:3,loop:false,random:false,previousBt:null,nextBt:null,playBt:null,pauseBt:null,stopBt:null,pagesBt:null,disabledClass:'disabled'},b||{});if(null!==this.options.pagesBt){this.options.randoms=false}this.timer=null;this.slides=Element.findChildren(this.container,false,false,this.options.tag);this.slidesIndex=$R(0,this.slides.size(),true).toArray();this.slidesNav=[];this.currentNav=0;this._updateNav();this.isTheLoop=false;if(null!==this.options.init){this.options.init(this.slides,this._getSlideElement(this.currentNav))}this._initButtons();if(this._canAutoStart()){this.start()}},defaultInit:function(b,c){b.each(function(a){if(c!=a){$(a).style.display='none'}})},start:function(){if(null===this.timer){this.timer=new PeriodicalExecuter(this.next.bind(this),this.options.time)}},stop:function(){if(null!==this.timer){this.timer.stop();this.timer=null}},pause:function(){this.stop()},next:function(a){this.stop();if(this._canAutoStart()){this.start()}this._updateNav();var b=this.currentNav+1;var c=this._getSlidesBeetwen(this.currentNav,b);var d=this._getSlideElement(this._getIndexSlideByIndexNav(this.currentNav));var e=this._getSlideElement(this._getIndexSlideByIndexNav(b));this.currentNav=b;this._updateButtons();var f=Object.extend({fxSpeed:this.options.effectSpeed,slides:this.slides,slidesBetween:c,isTheLoop:this.isTheLoop,revert:false},this.options.effectOptions);this.options.transitionFx(d,e,f);this._dontLink(a)},previous:function(a){this.stop();if(this._canAutoStart()){this.start()}this.isTheLoop=false;if(0===this._getIndexSlideByIndexNav(this.currentNav)){if(this.options.loop){var b=this.slidesNav.size()-1;this.isTheLoop=true}else{return}}else{var b=this.currentNav-1}var c=this._getSlidesBeetwen(this.currentNav,b);var d=this._getSlideElement(this._getIndexSlideByIndexNav(this.currentNav));var e=this._getSlideElement(this._getIndexSlideByIndexNav(b));this.currentNav=b;this._updateButtons();var f={fxSpeed:this.options.effectSpeed,slides:this.slides,slidesBetween:c,isTheLoop:this.isTheLoop,revert:true};this.options.transitionFx(d,e,f);this._dontLink(a)},_goTo:function(a){this.stop();if(this._canAutoStart()){this.start()}var a=Math.abs(parseInt(a,10));if(a<0){a=0}if(a>this.slidesNav.size()){a=this.slidesNav.size()}var b=this._getIndexNavBySlideIndex(parseInt(a,10));var c=this._getSlidesBeetwen(this.currentNav,b);var d=this._getSlideElement(this._getIndexSlideByIndexNav(this.currentNav));var e=this._getSlideElement(this._getIndexSlideByIndexNav(b));var f=this._getIndexSlideByIndexNav(this.currentNav)>this._getIndexSlideByIndexNav(b);this.currentNav=b;this._updateButtons();var g={fxSpeed:this.options.effectSpeed,slides:this.slides,slidesBetween:c,isTheLoop:this.isTheLoop,revert:f};this.options.transitionFx(d,e,g)},goTo:function(a){this._goTo(parseInt(a,10)-1)},_canAutoStart:function(){if(this.slides.length>1&&this.options.autostart){return true}return false},__goToAndEvent:function(a,b){this._goTo(b);this._dontLink(a)},_initButtons:function(){if(null!==this.options.previousBt){if($(this.options.previousBt)){$(this.options.previousBt).stopObserving('click');if(0===this.currentNav){if(this.options.loop){$(this.options.previousBt).removeClassName(this.options.disabledClass);$(this.options.previousBt).observe('click',this.previous.bind(this))}else{$(this.options.previousBt).addClassName(this.options.disabledClass);$(this.options.previousBt).observe('click',this._desactivedButton.bind(this))}}else{$(this.options.previousBt).removeClassName(this.options.disabledClass);$(this.options.previousBt).observe('click',this.previous.bind(this))}}}if(null!==this.options.nextBt){if($(this.options.nextBt)){$(this.options.nextBt).stopObserving('click');if(this.currentNav==this.slidesNav.size()-1){if(this.options.loop){$(this.options.nextBt).removeClassName(this.options.disabledClass);$(this.options.nextBt).observe('click',this.next.bind(this))}else{$(this.options.nextBt).addClassName(this.options.disabledClass);$(this.options.nextBt).observe('click',this._desactivedButton.bind(this));if(this._canAutoStart()){this.stop()}}}else{$(this.options.nextBt).removeClassName(this.options.disabledClass);$(this.options.nextBt).observe('click',this.next.bind(this))}}}if(null!==this.options.pagesBt){if($(this.options.pagesBt)){var b=$(this.options.pagesBt);var c=Element.findChildren(b,false,false,'li');var d=this._getIndexSlideByIndexNav(this.currentNav);c.each(function(p,a){$(p).stopObserving('click');if(a==d){$(p).addClassName(this.options.disabledClass);$(p).observe('click',this._desactivedButton.bind(this))}else{$(p).removeClassName(this.options.disabledClass);$(p).observe('click',this.__goToAndEvent.bindAsEventListener(this,a))}}.bind(this))}}},_updateButtons:function(){this._initButtons()},_desactivedButton:function(a){this._dontLink(a)},_mouseOver:function(a){this.stop()},_mouseOut:function(a){this.start()},_getIndexSlideByIndexNav:function(a){return this.slidesNav[a]},_getIndexNavBySlideIndex:function(a){for(var i=this.slidesNav.size()-1;i>=0;i--){if(this.slidesNav[i]==a){return i}}},_getSlideElement:function(a){return this.slides[a]},_getSlideIndexByElement:function(b){var c=-1;this.slides.each(function(s,a){if(s==b){c=a}});return c},_getSlidesBeetwen:function(a,b){var c=this._getIndexSlideByIndexNav(a);var d=this._getIndexSlideByIndexNav(b);return Math.abs(d-c)},_slideIndexIsRevert:function(a){var b=this._getIndexNavBySlideIndex(a);return this._isRevert(b)},_isRevert:function(a){console.info('this.currentNav = '+this.currentNav+' | navIndex='+a);if(this.currentNav>=a){return false}else{return true}},_getEffectOptions:function(){var a=Object.extend({fxSpeed:this.options.effectSpeed,slides:this.slides,revert:this._isRevert(this.currentNav)},this.options.effectOptions||{});return a},_dontLink:function(a){if(a&&false===a instanceof PeriodicalExecuter){var b=Event.findElement(a,'a');if(b!=document){a.stop()}}},_updateNav:function(){if(0===this.slidesNav.size()||this.currentNav==this.slidesNav.size()-1){var a=this.slidesIndex.clone();this.slidesNav.push(a);this.slidesNav=this.slidesNav.flatten();this.isTheLoop=true}else{this.isTheLoop=false}}});Element.findChildren=function(b,c,d,f){if(!b.hasChildNodes()){return null}f=f.toUpperCase();if(c){c=[c].flatten()}var g=[];$A(b.childNodes).each(function(e){if(e.tagName&&e.tagName.toUpperCase()==f&&(!c||(Element.classNames(e).detect(function(v){return c.include(v)})))){g.push(e)}if(d){var a=Element.findChildren(e,c,d,f);if(a)g.push(a)}});return(g.length>0?g.flatten():[])};function effet_fade(a){$(a).fade()}function effet_appear(a){$(a).appear()}function effet_slideDown(a){Effect.SlideDown(a)}function effet_slideUp(a){Effect.SlideUp(a)}function effet_parrallel(a){new Effect.Parallel([new Effect.Move(a,{sync:true,x:400,y:0,mode:'relative'}),new Effect.Opacity(a,{sync:true,from:0,to:1})],{duration:1.5})}
var participants_erreur="Merci de bien vouloir remplir les informations des participants";var texte_erreur="Vous n'avez pas rempli tous les champs obligatoires...";var tel_erreur="Votre numéro de téléphone n'a pas un format valide";var email_erreur="L'adresse email n'est pas valide...";var pass_erreur="Saisissez un mot de passe valide : sans espace, d'au moins 6 caractères, alphanumériques uniquement (0-9,a-z,A-Z)";var pseudo_erreur="Saisissez un nom d'utilisateur valide : sans espace ni caractères spéciaux";var select_erreur="Choisissez une option dans la liste déroulante...";var date_erreur="La date n'est pas valide... format : jj/mm/aaaa";var int_erreur="Remplissez le champ avec un nombre entier...";var checkbox_erreur="Pour valider le formulaire, vous devez selectionner la case à cocher...";var checkboxes_erreur="Pour valider le formulaire, vous devez selectionner au moins une case à cocher";var radio_erreur="Choisissez une option...";var dateFin_erreur="La date de fin doit être supérieure à la date de début...";var passIdentique_erreur="Les deux mots de passe ne correspondent pas. Veuillez vérifier.";var cgv_erreur="Pour valider le formulaire, vous devez avoir accepté les conditions générales";
function getElementsByClass(a,b,c){var d=[];if(b===null){b=document}if(c===null){c='*'}var e=b.getElementsByTagName(c);var f=e.length;var g=new RegExp("(^|\\s)"+a+"(\\s|$)");for(i=0,j=0;i<f;i++){if(g.test(e[i].className)){d[j]=e[i];j++}}return d}function verifMail(a){a=a.toLowerCase();var b=/^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,3}$/;return(b.exec(a)!==null)}function verifTel(a){var b=/^(\(?[+0-9]{1,2}\d{2}\)?)?(\d{1,2})\D{0,1}(\d{2})\D{0,1}(\d{2})\D{0,1}(\d{2})\D{0,1}(\d{2})$/;if(!(b.exec(a)!==null)){return false}else{return true}}function verifTelGen(a){var b=/[^0-9 \-\.\/_\(\)+]/;if(b.exec(a)){return false}else{return true}}function verifTelMobile(a){var b=/^(\(?[+0-9]{1,2}\d{2}\)?)?(06|6)\D{0,1}(\d{2})\D{0,1}(\d{2})\D{0,1}(\d{2})\D{0,1}(\d{2})$/;if(!(b.exec(a)!==null)){return false}else{return true}}var couleur_de_bordure="#adef05";function colore(a){document.getElementById(a).style.borderColor="#ff0000"}function init(a){document.getElementById(a).style.borderColor=couleur_de_bordure}function colore_parent(a){matches=$(a).className.match(/parent_([^\s]*)/);if(!matches){return true}var b=RegExp.$1;var c=$(b);c.style.border="1px solid #ff0000"}function init_parent(a){matches=$(a).className.match(/parent_([^\s]*)/);if(!matches){return true}var b=RegExp.$1;var c=$(b);c.style.borderColor=couleur_de_bordure}function verification(a){var b=getElementsByClass('require',a,'*');var i,count,matches,countHolder;var c=[];var d=[];var e=[];var f=[];for(i=0;i<b.length;i++){count=b[i];matches=count.className.match(/type_([^\s]*)/);count.TheType=RegExp.$1;switch(count.TheType){case'texte':if(count.value===''){alert(texte_erreur);count.focus();colore(count.id);return false}init(count.id);break;case'email':if(count.value===''){alert(texte_erreur);count.focus();colore(count.id);return false}if(!(verifMail(count.value))){alert(email_erreur);count.focus();colore(count.id);return false}init(count.id);break;case'tel':if(count.value===''){alert(tel_erreur);count.focus();colore(count.id);return false}if(!verifTel(count.value)){alert(tel_erreur);count.focus();colore(count.id);return false}init(count.id);break;case'telOrNull':if((count.value!==''&&!verifTel(count.value))){alert(tel_erreur);count.focus();colore(count.id);return false}init(count.id);break;case'telGen':if(count.value===''){alert(tel_erreur);count.focus();colore(count.id);return false}if(!verifTelGen(count.value)){alert(tel_erreur);count.focus();colore(count.id);return false}init(count.id);break;case'telGenOrNull':if((count.value!==''&&!verifTelGen(count.value))){alert(tel_erreur);count.focus();colore(count.id);return false}init(count.id);break;case'telMobile':if(count.value===''){alert(texte_erreur);count.focus();colore(count.id);return false}if(!verifTelMobile(count.value)){alert(telMobile_erreur);count.focus();colore(count.id);return false}init(count.id);break}}return true}var Links=Class.create({initialize:function(a){this.localdomain=window.location.hostname;this.options=Object.extend({externalizeClass:'externe',noExternalizeClass:'no-externe',addClassToExterne:true,addClassToNoExterne:true,fireFinishEvent:true,EventName:'Links:finished'},a||{});this._init()},_init:function(){$$('a').each(function(a){if(this._isExtern(a)){a.observe('click',this._onClick.bindAsEventListener(this))}}.bind(this));if(this.options.fireFinishEvent){$(document).fire(this.options.EventName)}},_isExtern:function(a){if($(a).hasClassName(this.options.externalizeClass)){return true}else if($(a).hasClassName(this.options.noExternalizeClass)){return false}if(this.localdomain!==a.hostname&&('http:'===a.protocol||'https:'===a.protocol)){if(this.options.addClassToExterne){$(a).addClassName(this.options.externalizeClass)}return true}else{if(this.options.addClassToNoExterne){$(a).addClassName(this.options.noExternalizeClass)}return false}return false},_onClick:function(b){var a=b.findElement('a');if(a!==document){b.stop();window.open(a.href)}}});document.observe("dom:loaded",function(e){new Links()});
function effectEnd(){$('slider').fire("effect:end")}function gliderEffect(b,c,d){var e=$(b).getWidth();var x=e*-1;if(d.revert){x=x*-1}if(d.isTheLoop){x=x*-1}x=x*d.slidesBetween;d.slides.each(function(s){new Effect.Move($(s),{x:x,y:0,mode:'relative',duration:d.fxSpeed,transition:function(a){return 1-(Math.cos(a*4.5*Math.PI)*Math.exp(-a*6))}})});setTimeout(effectEnd,1100)}function sliderInit(h){$('chargement').setStyle({zIndex:'100',display:'block'});h.each(function(s){$(s).setStyle({position:'relative',left:'0px'})});$$('ul.menuNav').each(function(f,g){$A($(f).getElementsByTagName('a')).map(Element.extend).each(function(a,e){$(a).observe('click',function(b){b.stop();popularsSlides.goTo(e+1);var c=/#(.*)$/g;var d=c.exec(a.href);if(d){if('accueil'===d[1]){pageTracker._trackPageview('/')}else{pageTracker._trackPageview('/'+d[1])}}})})})}var popularsSlides=new caroussel('contenu',{init:sliderInit,transitionFx:gliderEffect,effectSpeed:1});document.observe('dom:loaded',function(a){var b='5.388044720972317';var c='-54.01805877685547';var d='1';gmap=new GoMap('map',{lat:b,lng:c,enableScrollWheelZoom:true,controls:['GSmallMapControl','GMapTypeControl']});gmap.map.setMapType(G_HYBRID_MAP);gmap.loadXml('http://www.nosclientsvontetreverts.com/marqueursArbresGmap.xml');document.observe('effect:end',function(){gmap.map.checkResize()})});function envoi(){var a=new Ajax.Updater('reponse-mail','mail.php',{method:'post',parameters:{prenom:$('formPrenom').serialize(true),nom:$('formNom').serialize(true),email:$('formEmail').serialize(true),telephone:$('formTelephone').serialize(true),message:$('formMessage').serialize(true)},onSuccess:function(){$('formContact').reset()}})}$('formContact').observe('submit',function(a){a.stop();if(verification($('formContact'))===true){envoi()}});document.observe('dom:loaded',function(a){$('chargement').setStyle({zIndex:'1000'})});function hideLoading(){$('chargement').fade()}if(window.addEventListener){window.addEventListener("load",hideLoading,false)}else if(window.attachEvent){window.attachEvent("onload",hideLoading)}
