function addInitHandler(n){ORSYS.init(n)}function Show(n){document.getElementById(n)&&(document.getElementById(n).style.display="block")}function Hide(n){document.getElementById(n)&&(document.getElementById(n).style.display="none")}function Format(n,t){switch(t){case"upper":n.value=n.value.toUpperCase()}}(function(){if(typeof Event!="undefined"&&(Event.prototype.preventDefault||(Event.prototype.preventDefault=function(){this.returnValue=!1}),Event.prototype.stopPropagation||(Event.prototype.stopPropagation=function(){this.cancelBubble=!0}),!Element.prototype.addEventListener)){var n=[],t=function(t,i){var e=this,u=function(n){n.target=n.srcElement;n.currentTarget=e;i.handleEvent?i.handleEvent(n):i.call(e,n)},r,f;t=="DOMContentLoaded"?(r=function(n){document.readyState=="complete"&&u(n)},document.attachEvent("onreadystatechange",r),n.push({object:this,type:t,listener:i,wrapper:r}),document.readyState=="complete"&&(f=new Event,f.srcElement=window,r(f))):(this.attachEvent("on"+t,u),n.push({object:this,type:t,listener:i,wrapper:u}))},i=function(t,i){for(var u=0,r;u<n.length;){if(r=n[u],r.object==this&&r.type==t&&r.listener==i){t=="DOMContentLoaded"?this.detachEvent("onreadystatechange",r.wrapper):this.detachEvent("on"+t,r.wrapper);n.splice(u,1);break}++u}};Element.prototype.addEventListener=t;Element.prototype.removeEventListener=i;HTMLDocument&&(HTMLDocument.prototype.addEventListener=t,HTMLDocument.prototype.removeEventListener=i);Window&&(Window.prototype.addEventListener=t,Window.prototype.removeEventListener=i)}})();typeof window.removeLater=="undefined"&&(window.removeLater=function(){});ORSYS=function(n){function rt(n){l.push(n)}function ut(n){for(var t=0;n!=null;){if(t+=n.offsetTop,n.nodeName=="BODY")break;n=n.offsetParent}return t}function y(n){for(var t=0;n!=null;){if(t+=n.offsetLeft,n.nodeName=="BODY")break;n=n.offsetParent}return t}function o(n){return n.offsetWidth}function ft(n){return n.offsetHeight}function p(n,t){var r=n.children,u=[],i;if(r)for(i=0;i<r.length;i++)r[i].nodeName==t&&u.push(r[i]);return u}function a(n,t){for(n=n.nextSibling;n;){if(n.nodeName==t)return n;n=n.nextSibling}return null}function w(n){var i=document.getElementById(n),t;return i==null?(console.log("Impossible de trouver l'élément avec un id ["+n+"] ??"),t=document.createElement("div"),t.setAttribute("id",n),t):i}function s(n,t){return n.className?n.className.indexOf(t)>-1:!1}function et(n){n.style.opacity=1}function b(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)}function ot(){try{return document.documentElement.getAttribute("lang")=="en"}catch(n){return!1}}function e(n,t){return ot()?t:n}function d(n){var i=n.getAttribute("data-value"),r=n.getAttribute("data-maxValue"),u=parseInt(parseFloat(i)/parseFloat(r)*100),t=document.createElement("div");t.className="jaugeBar";n.appendChild(t);t.style.height="100%";t.style.width=u+"%"}function ht(n){if(n=n.firstChild,n!=null&&n.nodeName=="SPAN"){var t=n.getAttribute("data-value"),i=parseInt(parseFloat(t.replace(",","."))*20);n.style.width=i+"%"}}function g(n){var t,o,r,u,s,f;try{if(t=document.getElementById("magic"),t){var e=["nom","prenom","societe"],i="",h=document.getElementById("magic2");if(h!=null&&(o=h.value,o&&(e=o.split(";"))),r=n.elements,r==null){t.value="skip";return}for(u=0;u<r.length;u++)for(s=r[u],f=0;f<e.length;f++)s.name==e[f]&&(i+=s.value);i==""&&(i="skip");t.value=i}}catch(c){}}function ct(){function n(n,t){var i,r;if(t.getAttribute("data-label")=="-")return n;for(i=t.previousSibling;i!=null;){if(i.nodeName=="LABEL")return r=i.textContent,r.trim&&(r=r.trim()),n+" ["+r+"]";i=i.previousSibling}return t.getAttribute("data-label")||n+" ["+t.name+"]"}return{init:function(t){for(var r=t.getElementsByTagName("*"),u,i=0;i<r.length;i++)r[i].nodeName=="INPUT"&&r[i]&&r[i].hasAttribute("data-confirm")&&ORSYS.cantPaste(r[i]);u=t.onsubmit;u!=null&&(t.oldSubmit=oldSubmit);t.onsubmit=function(i){for(var u=this.getElementsByTagName("*"),o,s,f,h,r=0;r<u.length;r++)if(u[r].nodeName=="SELECT"){if(u[r].getAttribute("required")=="true"&&u[r].options.selectedIndex<1)return alert(n(e("Le champ","The field"),u[r])+e(" est obligatoire"," is required")),u[r].focus(),!1}else if(u[r].nodeName=="INPUT"||u[r].nodeName=="TEXTAREA"){if(o=u[r].getAttribute("data-skip")=="true",o)continue;if(u[r].getAttribute("required")=="true"&&u[r].value=="")return alert(n(e("Le champ","The field"),u[r])+e(" est obligatoire"," is required")),u[r].focus(),!1;if(u[r].name.toLowerCase().indexOf("email")>-1){if(s=u[r].hasAttribute("required"),(s||u[r].value!="")&&!/.+@[^\.]+\.[^\.]+/.test(u[r].value))return alert(n(e("L'email","Email"),u[r])+e(" n'est pas valide"," is not valid")),u[r].focus(),!1;if(u[r].hasAttribute("data-confirm")&&(f=document.getElementById(u[r].getAttribute("data-confirm")),f&&f.value!=u[r].value))return alert("Attention : les 2 adresses email doivent être identiques. Merci de vérifier votre adresse email"),!1}u[r].getAttribute("data-role")=="generated"&&(u[r].value=(new Date).getTime())}return(h=i||event,typeof t.beforeSubmit=="function"&&!t.beforeSubmit())?!1:(g(t),this.oldSubmit)?this.oldSubmit():!0}}}}function lt(){return{init:function(n){n.isClose=!0;var t=a(n,"DIV"),i=n.getAttribute("data-next");i!=""&&i!=null&&(t=w(n.getAttribute("data-next")));n.innerHTML==(n.getAttribute("data-close")||"Fermer")&&(n.isClose=!1);n.onclick=function(n){var i=n||event;this.isClose?(t.style.display="block",this.isClose=!1,this.innerHTML=this.getAttribute("data-close")||"Fermer"):(t.style.display="none",this.isClose=!0,this.innerHTML=this.getAttribute("data-label")||"Lire la suite");i.preventDefault()}}}}function vt(n){if(n.style.top!=""){var t=parseInt(n.style.top);t<0&&(t+=2,n.style.top=t+"px",setTimeout(function(){vt(n)},2))}}function nt(){function t(){this.hiddenZone.style.display=="none"?(this.hiddenZone.style.display="block",this.hiddenZone.className="zone openZone",this.open=!0):(this.hiddenZone.className="zone closeZone",this.hiddenZone.style.display="none",this.open=!1)}function n(n){if(typeof n=="boolean"?this.hiddenZone.style.display=n?"block":"none":t.call(this),this.status&&(this.hiddenZone.style.display=="none"?this.statusOn&&(this.status.innerHTML=this.statusOn):this.statusOff&&(this.status.innerHTML=this.statusOff)),!this.multiple)for(var i=0;i<u.length;i++)u[i]!=this&&u[i].open&&t.call(u[i]);at=this}return{init:function(t){var r,i;for(u.push(t),t.open=t.getAttribute("data-status")=="-"?!0:!1,t.hiddenZone=a(t,"DIV"),t.statusOn=t.getAttribute("data-on")||"+",t.statusOff=t.getAttribute("data-off")||"-",t.multiple=t.hasAttribute("data-multiple")?t.getAttribute("data-multiple")=="true":!0,t.autoOpen=t.getAttribute("data-autoOpen")=="true",r=t.getElementsByTagName("*"),i=0;i<r.length;i++)r[i].getAttribute("data-role")=="status"&&(t.status=r[i]);t.autoOpen&&(t.onmouseenter=function(){n.call(this)},t.onmouseleave=function(){n.call(this)});t.onclick=n},openCloseAll:function(n,t,i){var e,o,r;for(n=n||this,t=t||event,t.init&&typeof f!="boolean"&&(f=t.init),f=!f,e=n.getAttribute("data-titleOn")||"Tout voir",o=n.getAttribute("data-titleOff")||"Tout cacher",r=0;r<u.length;r++)if(typeof i=="string"){if(u[r].getAttribute("data-cat")==i)u[r].onclick(f)}else u[r].onclick(f);return n.innerHTML=f?o:e,event&&event.preventDefault(),!1}}}function tt(){function n(n){n.scrollIntoView({behavior:"smooth",block:"start"})}return{init:function(n){for(var r=this,i=n.getElementsByTagName("*"),t=0;t<i.length;t++)i[t].getAttribute("data-role")=="tab"&&(this.lastTab==null&&(this.lastTab=i[t]),this.initTab(i[t]));this.mode=n.getAttribute("data-mode");this.colorOn=n.getAttribute("data-colorOn");this.colorOff=n.getAttribute("data-colorOff")},initTab:function(t){for(var i=this,e=t.getAttribute("data-target"),f=t.getElementsByTagName("IMG"),r,u=0;u<f.length;u++)r=f[u],r.getAttribute("data-imgOn")!=null&&(t.imgOn=r.getAttribute("data-imgOn"),t.img=r),r.getAttribute("data-imgOff")!=null&&(t.imgOff=r.getAttribute("data-imgOff"));this.textColorOn=t.getAttribute("data-textColorOn");t.onclick=function(t){var e,u;i.lastTab.style.backgroundColor="#808080";try{i.lastTab.style.boxShadow="4px 0px 0px -4px rgba(0,0,0,0.75)"}catch(s){}this.style.backgroundColor="#0093A8";try{this.style.boxShadow="4px 0px 33px -4px rgba(0,0,0,0.75)"}catch(s){}var f=i.lastTab.getAttribute("data-target"),r=this.getAttribute("data-target"),o=this.getAttribute("data-mode")=="scroll";if(o)for(e=document.getElementsByTagName("A"),u=0;u<e.length;u++)e[u].getAttribute("name")==r&&n(e[u]);else i.mode=="solo"&&f==r?i.isInvible(r)?i.showTabContent(r):i.hideTabContent(r):(i.hideTabContent(f),i.showTabContent(r));i.colorOn!=null&&i.colorOff!=null&&(i.setColor(this,i.isInvible(r)?i.colorOff:i.colorOn),i.setColor(i.lastTab,i.isInvible(f)?i.colorOff:i.colorOn));i.textColorOn&&(i.lastTab&&(i.lastTab.style.color=i.defColor),i.defColor||(i.defColor=this.style.color),this.style.color=i.isInvible(r)?i.defColor:i.textColorOn);i.lastTab.img!=null&&(i.lastTab.img.src=i.isInvible(f)?this.imgOff:this.imgOn);this.img!=null&&(this.img.src=i.isInvible(r)?this.imgOff:this.imgOn);i.lastTab=this;t&&t.preventDefault()}},hideTabContent:function(n){var t=document.getElementById(n);t!=null&&(t.style.display="none",t=document.getElementById("m"+n),t&&(t.style.display="none"))},showTabContent:function(n){var t=document.getElementById(n);t!=null&&(t.style.display="block",t=document.getElementById("m"+n),t&&(t.style.display="block"))},isInvible:function(n){var t=document.getElementById(n);return t.style.display=="none"},setColor:function(n,t){var i=n;typeof n=="string"&&(i=document.getElementById(n));i!=null&&(i=i.parentNode,i.style.backgroundColor=t)}}}function yt(){return{init:function(n){for(var r,i,t=0;t<n.children.length;t++)if(n.children[t].nodeName=="DIV")if(s(n.children[t],"rzoneHeader"))r=this,r.status=!1,n.onclick=function(){r.status=!r.status;r.displayContent(this)};else if(s(n.children[t],"rzoneContent"))for(this.content=n.children[t],i=0;i<this.content.length;i++)this.content[i].nodeName=="DIV"&&s(this.content[i],"rzoneIndicator")&&(this.indicator=this.content[i])},displayContent:function(){this.content.style.display=this.status?"block":"none";this.indicator=this.status?"v":">";this.indicator.style.display="block"}}}function pt(){return{init:function(n){var i,r,u,t;for(this.indexBox=0,this.box=[],this.boxInit=[],t=0;t<n.children.length;t++)if(n.children[t].nodeName=="DIV"){if(i=n.children[t],s(i,"grid"))for(r=0;r<i.children.length;r++)i.children[r].nodeName=="DIV"&&(this.box.push(i.children[r]),this.boxInit.push(i.children[r]));s(i,"cursor")&&(this.cursor=i)}for(this.parents=[],u=this.box[0].parentNode,this.parents.push(u),t=1;t<this.box.length;t++)this.box[t].parentNode!=u&&this.parents.push(u=this.box[t].parentNode);this.status()},showBox:function(n){for(var i,u,r,t=0;t<this.parents.length;t++)while(this.parents[t].hasChildNodes())this.parents[t].removeChild(this.parents[t].firstChild);for(i=this.boxInit[n],u=this.boxInit[0],this.box=[i],t=0;t<this.boxInit.length;t++)this.boxInit[t]!=i&&this.box.push(this.boxInit[t]);for(t=0;t<this.box.length;t++)r=this.parents[Math.floor(t/2)],r.appendChild(this.box[t]);this.boxInit[0].style.opacity=0;this.boxInit[0].style.opacity=1;this.indexBox=n},status:function(){var i=this,t,n;for(this.cursor.innerHTML="",t=0;t<this.box.length;t++)n=document.createElement("SPAN"),t==this.indexBox&&(n.style.color="red"),n.innerHTML="&#8226;",n.index=t,n.onclick=function(){i.showBox(this.index);i.status()},n.onmouseover=function(){try{this.style.cursor="pointer"}catch(n){}},this.cursor.appendChild(n)}}}function wt(){if(window.XMLHttpRequest)return new window.XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(n){return null}}function h(n,t,i){var r=wt(),u,f;if(r){r.onload=function(){t(this.responseText)};i?r.open("POST",n):r.open("GET",n);r.setRequestHeader&&(r.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8"),r.setRequestHeader("Cache-Control","max-age=0,no-cache,no-store"));try{if(i){if(typeof i=="object"){u="";for(f in i)u&&(u+="&"),u+=f+"="+encodeURIComponent(i[f]).replace("'","%27");i=u}r.send(i)}else r.send()}catch(e){try{console.log("AJAX error "+e)}catch(o){}}}}function v(n,t,i){for(var u,f=0;f<t.childNodes.length;f++)u=t.childNodes[f],u.style.backgroundColor="white",u.style.color="black",(f==i||u==i)&&(r=i,u.style.backgroundColor="black",u.style.color="white",n.value=u.textContent,r=f)}function bt(){return{init:function(n){n.onchange=function(){if(this.selectedIndex>0){var n=this.options[this.selectedIndex].value;return window.location="/centre/"+n,!0}return!1}}}}function kt(){return{init:function(n){n.onchange=function(){if(this.selectedIndex>0){var n=this.options[this.selectedIndex].value;return window.location="/sessionsGaranties?centreId="+n,!0}return!1}}}}var l=[],k,st,i,it,t,r,c;window.addEventListener("load",function(){var i=document.body.onload,t;for(i&&i(),t=0;t<l.length;t++)l[t].call(n)});k=function(){function y(t){for(var r=!1,i=0;i<n.length;i++)if(n[i]==s){t&&(n.splice(i,1),a());r=!0;break}return r}function a(){var t=window.localStorage;t?t.setItem("cours",n.join(",")):d("cours",n.join(","))}function v(){var i,u,f,n,r;for(t=[],i=document.getElementsByTagName("INPUT"),n=0;n<i.length;n++)i[n].getAttribute("data-role")=="selection"&&i[n].checked&&t.push(i[n].name);for(u=["caddieSupprimer","caddieTelecharger","caddieTransmettre"],n=0;n<u.length;n++)r=document.getElementById(u[n]),r.disabled=t.length==0;for(f=["caddieComparer"],n=0;n<f.length;n++)r=document.getElementById(f[n]),r.disabled=t.length!=2}function d(n,t){var i=new Date,r;i.setTime(i.getTime()+2592e6);r="expires="+i.toUTCString();document.cookie=n+"="+t+";"+r+";path=/"}function g(n){for(var r=n+"=",f=decodeURIComponent(document.cookie),u=f.split(";"),t,i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}function nt(){var r=window.localStorage,t=null;(t=r?r.getItem("cours"):g("cours"),t&&(n=t.split(",")),e(),i=document.getElementById("caddie"),i)&&(n.length==0?i.innerHTML="Pas de sélection":n.length>0&&i&&(i.innerHTML="",h("/selections/cours?refs="+n.join(","),function(data){var json=eval("("+data+")"),inputs=[],i,c,d,selection,ref,titre,tmp,cocher,toutCocher,toutDecocher;if(json&&json.length){for(i=0;i<json.length;i++)c=json[i],d=document.createElement("DIV"),d.code=c.Code,selection=document.createElement("DIV"),selection.className="selectionCours",tmp=document.createElement("INPUT"),tmp.type="checkbox",tmp.name=c.Code,tmp.setAttribute("data-role","selection"),tmp.onclick=v,selection.appendChild(tmp),inputs.push(tmp),d.appendChild(selection),ref=document.createElement("DIV"),ref.className="refCours",ref.innerHTML="Réf. "+c.Code,d.appendChild(ref),titre=document.createElement("DIV"),titre.className="titreCours",tmp=document.createElement("A"),tmp.innerHTML=c.Titre,tmp.href=c.URL,titre.appendChild(tmp),d.appendChild(titre),i.appendChild(d);json.length>4&&(cocher=document.getElementById("cocheDecoche"),cocher&&(cocher.style.display="block"),toutCocher=document.getElementById("toutCocher"),toutDecocher=document.getElementById("toutDecocher"),toutCocher.inputs=inputs,toutCocher.onclick=function(n){n.preventDefault();for(var t=0;t<this.inputs.length;t++)this.inputs[t].checked=!0;v()},toutDecocher.inputs=inputs,toutDecocher.onclick=function(n){n.preventDefault();for(var t=0;t<this.inputs.length;t++)this.inputs[t].checked=!1;v()})}},null)))}function tt(t){y(!0)||(n.push(s),a());t.preventDefault();e()}function e(){var t,i;if(u&&(u.innerText=y(!1)?"Formation ajoutée":"Ajouter à ma sélection"),l&&(l.innerText=n.length),n.length==0)for(t=0;t<f.length;t++)i=document.getElementById(f[t]),i&&(i.disabled=!0)}function it(){console.log("selections")}function p(n){var t=new DOMParser;return t.parseFromString(n,"application/xml")}function o(n){return n.innerText?n.innerText:n.firstChild.nodeValue}function w(n){var t=n.getElementsByTagName("objectifs");return t&&t.length?o(t[0]):""}function b(n){var r="",t=n.getElementsByTagName("objectifs-pedagogiques"),u,i;if(t&&t.length){for(r="<ul>",t=t[0],u=t.childNodes,i=0;i<u.length;i++)u[i].nodeName=="p"&&(r+="<li>"+o(u[i])+"<\/li>");r+="<\/ul>"}return r}function k(n){var t="",u=n.getElementsByTagName("chapitre"),f,e,r,i;if(u&&u.length){for(f=0;f<u.length;f++)for(e=u[f],r=e.childNodes,i=0;i<r.length;i++)r[i].nodeName=="titre"?(t!=""&&(t+="<\/div>"),t+="<h3>"+o(r[i])+"<\/h3>",t+="<div style='display:none' data-role='chContent'>"):r[i].nodeName=="p"&&(t+="<div>- "+o(r[i])+"<\/div>");t+="<\/div>"}return t}function rt(n,t){var i="<input type='submit' name='action' onclick='detailChapitres(this)' value='Afficher le détail'>",r,u,f,s,e,o;i+="<table width='100%' style='margin-bottom:10px'>";i+="<tr class='big'><td><strong>"+n.Titre+"<\/strong><\/td><td><strong>"+t.Titre+"<\/strong><\/td><\/tr>";i+="<tr><td width='50%'><strong>Réf:<\/strong> "+n.Ref+"<\/td><td width='50%'><strong>Réf:<\/strong> "+t.Ref+"<\/td><\/tr>";i+="<tr><td><strong>Durée:<\/strong> "+n.Duree+"<\/td><td><strong>Durée:<\/strong> "+t.Duree+"<\/td><\/tr>";i+="<tr><td valign='top'><strong>Prérequis:<\/strong> "+n.Prerequis+"<\/td><td valign='top'><strong>Prérequis:<\/strong> "+t.Prerequis+"<\/td><\/tr>";i+="<tr><td valign='top' style='padding-top:10px'><strong>Participants:<\/strong> "+n.Participants+"<\/td><td valign='top' style='padding-top:10px'><strong>Participants:<\/strong> "+t.Participants+"<\/td><\/tr>";r=p(n.Programme);u=p(t.Programme);i+="<tr><td valign='top' style='padding-top:10px'><strong>Objectif<\/strong><br>"+w(r)+"<\/td><td valign='top' style='padding-top:10px'><strong>Objectif<\/strong><br>"+w(u)+"<\/tr>";i+="<tr><td valign='top' style='padding-top:10px'><strong>Objectifs pédagogiques<\/strong><br>"+b(r)+"<\/td><td  style='padding-top:10px' valign='top'><strong>Objectifs pédagogiques<\/strong><br>"+b(u)+"<\/td><\/tr>";i+="<tr><td valign='top' style='padding-top:10px'><strong>Programme<\/strong><br>"+k(r)+"<\/td><td style='padding-top:10px' valign='top'><strong>Programme<\/strong><br>"+k(u)+"<\/td><\/tr>";i+="<\/table>";f=document.getElementById("overlay");s=document.getElementById("dialog");f&&s&&(e=document.getElementById("dialogContent"),e.innerHTML=i,e.style.overflow="auto",f.style.visibility="visible");o=document.getElementById("dialogClose");o.overlay=f;o.onclick=function(){this.overlay.style.visibility="hidden"}}function ut(i){var u=this.id,c,l,f,o,s,v,r;if(u=="caddieComparer"&&h("/selections/CoursContent?refs="+t[0]+","+t[1],function(data){var data=eval("("+data+")");rt(data.Left,data.Right)}),u!="caddieTelecharger"){if(u=="caddieTransmettre"&&(c=prompt("Email de destination ?"),c)){l=document.getElementById("emailCaddie");l&&(l.value=c);return}if(u=="caddieSupprimer"&&(f=document.getElementById("caddie"),f)){for(o=f.childNodes,s=0;s<t.length;s++){for(v=t[s],r=0;r<o.length;r++)if(o[r].code==v){f.removeChild(o[r]);break}for(r=0;r<n.length;r++)if(n[r]==v){n.splice(r,1);break}}t=[];a();e()}i.preventDefault()}}var n=[],s=null,r=null,c=null,u=null,l=null,t=[],f=["caddieSupprimer","caddieTelecharger","caddieTransmettre","caddieComparer"],i=null;return{init:function(){var n,t;for(c=document.getElementById("selections"),l=document.getElementById("selectionsCount"),r=document.getElementById("selection"),r&&(s=r.getAttribute("data-code"),r.onclick=tt,u=document.getElementById("selectionLabel"),e()),c&&(c.onclick=it),nt(),n=0;n<f.length;n++)t=document.getElementById(f[n]),t&&(t.onclick=ut)}}}();st=null;var u=[],f=null,at=null;return i={parts:[],_enabled:!0,etat:null,leftBtn:null,rightBtn:null,start:function(n){for(var u=w(n),r=p(u,"DIV"),f,t=0;t<r.length;t++)r[t].getAttribute("data-role")=="screen"?(this.parts.push(r[t]),f=r[t].getAttribute("data-couleur")):r[t].className=="carouselEtat"&&(this.etat=r[t]);this._handle=setInterval(function(n){return function(){n.action()}}(this),5e3);u.onmouseover=function(){i.enabled(n,!1)};u.onmouseout=function(){i.enabled(n,!0)};this.leftBtn=document.getElementById("leftCarrouselBtn");this.rightBtn=document.getElementById("rightCarrouselBtn");this.leftBtn&&this.rightBtn&&(this.leftBtn.onclick=function(){return i.show(i.current(),i.previous(n),!0),!1},this.rightBtn.onclick=function(){return i.show(i.current(),i.next(n),!0),!1});this.showEtat(this.current())},current:function(){for(var n=0;n<this.parts.length;n++)if(this.parts[n].className.indexOf("hide")==-1)return this.parts[n];return null},next:function(){for(var n=0;n<this.parts.length;n++)if(this.parts[n].className.indexOf("hide")==-1)return this.parts[Math.min(this.parts.length-1,n+1)];return null},previous:function(){for(var n=0;n<this.parts.length;n++)if(this.parts[n].className.indexOf("hide")==-1)return this.parts[Math.max(0,n-1)];return null},enabled:function(n,t){this._enabled=t},action:function(){if(this._enabled)for(var n=0;n<this.parts.length;n++)if(this.parts[n].className.indexOf("hide")==-1){this.show(this.parts[n],this.parts[(n+1)%this.parts.length]);break}},showEtat:function(n){var r,t;if(this.leftBtn&&this.rightBtn)for(r=0;r<this.parts.length;r++)this.parts[r]==n&&(r==0?this.leftBtn.style.visibility="hidden":this.leftBtn.style.visibility=="hidden"&&(this.leftBtn.style.visibility="visible"),r==this.parts.length-1?this.rightBtn.style.visibility="hidden":this.rightBtn.style.visibility=="hidden"&&(this.rightBtn.style.visibility="visible"));if(this.etat)for(this.etat.innerHTML="",r=0;r<this.parts.length;r++)t=document.createElement("DIV"),t.style.width="15px",t.style.height="15px",t.style.marginLeft="10px",t.style.display="inline-block",t.innerHTML="&nbsp;",t.style.fontSize="12px",t.style.backgroundColor=this.parts[r]==n?"#404839":"#888",t.style.opacity=.9,t.index=r,t.onclick=function(){var n=this.index;i.show(i.current(),i.parts[n],!0)},t.onmouseover=function(){try{this.style.cursor="pointer"}catch(n){}},this.etat.appendChild(t)},show:function(n,t,i){i&&(clearInterval(this._handle),this._handle=setInterval(function(n){return function(){n.action()}}(this),5e3));for(var r=t.parentNode;r.nodeName!="SECTION";)if(r=r.parentNode,r=="BODY"||r==null)break;r!=null&&r.nodeName=="SECTION"&&t.hasAttribute("data-couleur")&&(r.style.backgroundColor=t.getAttribute("data-couleur"));n.className="hideFading";t.className="showFading";this.showEtat(t)}},it=function(){return{displayCat:function(n,t){var u;n.img||(u=n.getElementsByTagName("IMG"),u&&u.length&&(n.img=u[0]));var r=document.getElementById("categorie"+t),f=document.getElementById("categoriesContent"),e=document.getElementById("carrousel"),i=document.getElementById("categorie2"+t);typeof this.visible=="undefined"&&(this.visible=b(i));i&&this.visible&&(i.innerHTML==""&&(i.innerHTML=r.innerHTML),i.style.display=="block"?i.style.display="none":(i.style.olDisplay=i.style.display,i.style.display="block"));f.style.opacity=0;r.style.display=="block"?(f.style.display="none",r.style.display="none",e&&(e.style.display="block"),n.img&&(n.img.src="/images/template/bottom-white.png"),n.parentNode.style.backgroundColor=""):(this.lastCategorie&&(this.lastCategorie.style.display="none"),this.lastButton&&this.lastButton.img&&(this.lastButton.img.src="/images/template/bottom-white.png",this.lastButton.parentNode.style.backgroundColor=""),n.img&&(n.img.src="/images/template/top-white.png"),r.style.display="block",et(f),f.style.display="block",e&&(e.style.display="none"),this.lastButton=n,this.lastCategorie=r,n.parentNode.style.backgroundColor="rgb(231, 69, 65)")}}}(),t=null,r=-1,c={searchChoices:function(n,i){var u,f,e;if(t!=null&&(document.body.removeChild(t),t=null),i.length>0){for(t=document.createElement("DIV"),t.className="choicesMenu",u=0;u<i.length;u++)f=document.createElement("DIV"),f.textContent=i[u],f.onmousedown=function(){this.textContent.charAt(this.textContent.length-1)=="\n"&&(this.textContent=this.textContent.substring(0,this.textContent.length-1));this.textContent.charAt(this.textContent.length-1)==13&&(this.textContent=this.textContent.substring(0,this.textContent.length-1));n.value=this.textContent;n.focus();v(n,t,this);var i=encodeURIComponent(this.textContent);i=i.replace("%0D","");i=i.replace(replace(/%2F/g,"%20"));i=i.replace(13,"");i=i.replace(10,"");window.location="/recherche/"+i},t.appendChild(f);return t.style.backgroundColor="#E7E7E8",t.style.border="1px solid #AAA",t.style.position="absolute",t.style.left=y(n)+"px",e=document.documentElement.scrollTop||document.body.scrollTop,e>0&&(e+=16),t.style.top=ut(n)+ft(n)+e+"px",t.style.width=o(n)+"px",t.style.opacity=.9,document.body.appendChild(t),r=-1,!1}},searchChoicesDown:function(n){r<t.childNodes.length-1&&(r++,v(n,t,r))},searchChoicesUp:function(n){r>0&&(r--,v(n,t,r))}},n.init=rt,n.carousel=function(n,t){typeof t=="undefined"?i.start(n):i.enabled(n,t)},n.hscroll=function(n){pt().init(n)},n.openClose=function(n){nt().init(n)},n.formValidation=function(n){ct().init(n)},n.magify=function(n){g(n)},n.next=function(n){lt().init(n)},n.openCloseAll=function(n,t,i){nt().openCloseAll(n,t,i)},n.rzone=function(n){yt().init(n)},n.tabs=function(n){tt().init(n)},n.showTab=function(n){tt().showTabContent(n)},n.note=function(n){ht(n)},n.jauge=function(n){d(n)},n.jauge=function(n){d(n)},n.accesCentre=function(n){bt().init(n)},n.accesSessionsGaranties=function(n){kt().init(n)},n.displayCat=function(n,t){it.displayCat(n,t)},n.displaySibling=function(n){var t=a(n,"DIV");t&&(t.style.display="block")},n.displayEC=function(n){var t=document.getElementById("espaceClientBox"),u,i,r;t&&(u=n.getElementsByTagName("IMG"),i=null,u&&u.length&&(i=u[0]),t.style.display=="block"?(t.style.display="none",i&&(i.src="/Content/images/communs/espacePro.jpg")):(t.style.display="block",i&&(i.src="/Content/images/communs/espacePro2.jpg"),r=y(n),r+o(t)>o(document.body)?(r=o(document.body)-o(t),t.style.left=r+"px"):t.style.left=r+"px"))},n.ajax_callback=h,n.searchChoices=c.searchChoices,n.searchChoicesDown=c.searchChoicesDown,n.searchChoicesUp=c.searchChoicesUp,n.isVisible=b,n.print=function(n){window.print();n=n||event;n.preventDefault()},n.mail=function(n,t,i){h("/Tools/Mail",function(){},{to:n,subject:t,content:i})},n.cantPaste=function(n){var t=null;t=typeof n=="string"?document.getElementById(n):n;t&&(t.onpaste=function(n){n.preventDefault()})},n.synchronize=function(n,t){(typeof n=="string"&&(n=document.getElementById(n)),typeof t=="string"&&(t=document.getElementById(t)),n&&t)&&t.onclick&&(n.onclick=function(){t.onclick();event.preventDefault()})},n.children=p,n.selections=k,n}({});ORSYS.init(function(){function tt(n,t,i){var r,u;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/"}var p,s,h,t,c,i,u,l,it,a,rt,f,r,v,w,b,e,ut,o,ft,et,k,d,g,nt,n,y;for(this.selections.init(),p=document.getElementById("backButton"),p&&(p.onclick=function(){return window.history.back(),!1}),r=document.getElementById("menuButton"),r&&(r.onclick=function(){var r=document.getElementById("leftMenu"),n,u,f,i,t;if(r.style.display=="none")for(r.style.display="table-cell",n=document.getElementById("leftMenuContent"),n.style.width="200px",u=document.getElementById("menu"),n.innerHTML=u.innerHTML,f=document.body.scrollTop||document.documentElement.scrollTop,n.style.paddingTop=f+"px",document.body.style.overflow="hidden",i=n.getElementsByTagName("LI"),t=0;t<i.length;t++)i[t].parentNode.nodeName=="UL"&&(i[t].onclick=function(){for(var t=this.children,i,n=0;n<t.length;n++)if(t[n].nodeName=="UL"){i=t[n];i.style.display=ORSYS.isVisible(i)?"none":"block";break}});else r.style.display="none",document.body.style.overflow="auto"}),s=["TN","MA","CM"],n=0;n<s.length;n++)h=document.getElementById(s[n]+"Button"),h&&(h.cat=s[n],h.onclick=function(n){ORSYS.displayCat(this,this.cat);n&&n.preventDefault();this.className="red"});for(r=document.getElementById("espaceProBtn"),btn2=document.getElementById("espaceProBtn2"),r&&(r.onclick=function(n){ORSYS.displayEC(this);this==r&&n&&n.preventDefault()},btn2&&(btn2.onclick=r.onclick)),t=document.getElementsByTagName("DIV"),n=0;n<t.length;n++)i=t[n].getAttribute("data-role"),i=="tabs"?this.tabs(t[n]):i=="openClose"?this.openClose(t[n]):i=="jauge"?this.jauge(t[n]):i=="noteOff"?this.note(t[n]):t[n].className&&(t[n].className.indexOf("hgrid")>-1?this.hscroll(t[n]):t[n].className.indexOf("rzone")>-1&&this.rzone(t[n]));for(t=document.getElementsByTagName("A"),n=0;n<t.length;n++)i=t[n].getAttribute("data-role"),i=="next"&&this.next(t[n]);for(t=document.getElementsByTagName("FORM"),n=0;n<t.length;n++)i=t[n].getAttribute("data-role"),i=="formValidation"&&this.formValidation(t[n]);for(t=document.getElementsByTagName("INPUT"),n=0;n<t.length;n++)if(t[n].hasAttribute("data-validation"))try{t[n].setCustomValidity&&t[n].setCustomValidity(t[n].getAttribute("data-validation"));t[n].type=="checkbox"&&(t[n].onclick=function(){this.checked?this.setCustomValidity(""):this.setCustomValidity(this.getAttribute("data-validation"))})}catch(ot){console.log("CustomValidy non disponible : "+ot)}for(document.getElementById("carrousel")&&ORSYS.carousel("carrousel"),t=document.getElementsByTagName("SELECT"),n=0;n<t.length;n++)c=t[n],i=c.getAttribute("data-role"),i=="accesCentre"?this.accesCentre(c):i=="sessionsGaranties"&&this.accesSessionsGaranties(c);for(u=["query","query2"],n=0;n<u.length;n++)(l=document.getElementById(u[n]),l)&&(l.onkeydown=function(n){var t,i;typeof n=="undefined"&&(n=event);t=n.charCode;t||(t=n.keyCode);t==13&&(i=encodeURIComponent(this.value),i=i.replace(/%2F/g,"%20"),i=i.replace(/%2B/g,"_plus"),window.location="/recherche/"+i);this.onclick=function(){return ORSYS.searchChoices(this,[]),this.focus(),!1};t==27&&ORSYS.searchChoices(this,[]);t==38?(ORSYS.searchChoicesUp(this),initValue=this.value,this.focus()):t==40&&(ORSYS.searchChoicesDown(this),initValue=this.value,this.focus());this.focus()},l.onkeyup=function(n){var t;if(typeof n=="undefined"&&(n=event),t=n.charCode||n.keyCode,t!=38&&t!=40&&t!=27)if(this.value.length>1){var u=this.getAttribute("data-langue"),r="/Tools/Words?wordPart="+encodeURIComponent(this.value),i=this;ORSYS.ajax_callback(r,function(n){var t=JSON.parse(n);ORSYS.searchChoices(i,t);i.focus()},null)}else ORSYS.searchChoices(this,[])});for(it=["queryButton","queryButton2"],n=0;n<u.length;n++)(a=document.getElementById(it[n]),a)&&(rt=document.getElementById(u[n]),a.field=rt,a.onclick=function(){var n=this.field.value;n=n.replace(/\+/g,"_plus");window.location="/recherche/"+encodeURIComponent(n)});for(f=["openCatIN","openCatMA","openCatCM"],n=0;n<f.length;n++)r=document.getElementById(f[n]),r&&(r.cat=f[n].substring(f[n].length-2),r.onclick=function(){var n=document.getElementById("Cat"+this.cat);n&&n.onclick()});try{if(v=document.cookie,v!=null&&v!="")for(w=v.split(";"),n=0;n<w.length;n++)b=w[n].split("="),e=b[0],e.charAt(0)==" "&&(e=e.substring(1)),e=="ecInfo"&&(ut=b[1],o=ut.split(","),o!=null&&o.length==2&&(ft=o[0],et=o[1],document.getElementById("emailEc").value=ft,document.getElementById("passwordEc").value=et))}catch(ot){}for(k=document.getElementById("FormEspaceClient"),k!=null&&(k.onsubmit=function(){try{var n=document.getElementById("emailEc").value,t=document.getElementById("passwordEc").value;tt("ecInfo",n+","+t,365)}catch(i){}return!0}),d=document.getElementById("mdpo"),d&&(d.onclick=function(n){n=n||event;var t=document.getElementById("emailEc");t&&(t.value==""?(alert("Merci de saisir votre email"),n.preventDefault()):this.href+="?email="+escape(t.value))}),g=document.getElementById("cookieFermer"),g&&(g.onclick=function(n){n=n||event;n.preventDefault();tt("cookieAlerte","ok",365);this.parentNode.style.display="none"}),nt=["emailEc","passwordEc"],n=0;n<nt.length;n++)y=document.getElementById(nt[n]),y&&(y.onmouseup=function(){this.blur();this.focus()},y.ondblclick=function(){this.select&&this.select()})}),function(){function n(n){n.style.border="1px solid red";n.style.outline&&(n.style.outline="red solid 1px");n.focus()}function t(n){n.style.border="1px solid black";n.style.outline&&(n.style.outline="black solid 1px")}function i(n){return n.getAttribute("required")=="true"||n.getAttribute("required")=="required"}function r(r){for(var f,u=1;u<arguments.length;u++)if(typeof arguments[u]=="function"&&!arguments[u]())return!1;for(f=r.getElementsByTagName("select"),u=0;u<f.length;u++)if(i(f[u])&&(t(f[u]),f[u].selectedIndex==0))return alert("Merci de bien vouloir renseigner tous les champs obligatoires dans le formulaire ci-dessous"),n(f[u]),!1;for(f=r.getElementsByTagName("input"),u=0;u<f.length;u++)if(i(f[u])){if(t(f[u]),f[u].value=="")return alert("Merci de bien vouloir renseigner tous les champs obligatoires dans le formulaire ci-dessous"),n(f[u]),!1;if(f[u].name.match("email")&&!f[u].value.match(/.*@.*/))return alert("Le format de votre email n'est pas correct, merci d'effectuer la correction"),n(f[u]),!1}return ORSYS.magify(r),!0}window.formValidation||(window.formValidation=r)}()