var alerter=function(){var a=true;return function(T){if(a){a=window.confirm(T);}};}(),AI={BASEPATH:'/js/ai/',GLOBALS:{},i18n:{},l10n:function(k){if(typeof AI.i18n[k]=='string'){return AI.i18n[k];}return k;},title:function(){var def='';return{get:function(){return document.title;},set:function(t){if(typeof t=='string'&&t!='undefined'){document.title=t;}},reset:function(){AI.title.set(def);},init:function(){def=AI.title.get();}};}(),requireDatas:{},requireDatasId:0,require:function(U,F,C,A){var src=U.charAt(0)==="/"||U.substr(0,5)=="http:"||U.substr(0,6)=="https:"?U:AI.BASEPATH+U,id='AIrequiredJS'+(AI.requireDatasId++),e=AI.DOM.createElement("SCRIPT",{id:id,type:"text/javascript",src:src});if(F){AI.requireDatas[id]=[F,C,A];e.onload=e.onreadystatechange=function(E){var w,d=AI.requireDatas[this.id];if((!E&&(w=window.event)&&(w=w.srcElement)||(E&&E.type=='readystatechange'&&(w=E.target)))&&!/loaded|complete/.test(w.readyState)){return;}d[0].call(d[1]?d[1]:this,d[2]);delete AI.requireDatas[this.id];this.onload=this.onreadystatechange=null;};}(AI.head||(AI.head=AI.DOM.getByTag('head'))).appendChild(e);},getSimilarParentObject:function(O){var i,c,w=window,a=['top','parent','opener'];for(i=0;i<a.length;i++){c=w[a[i]];try{if(c&&c!==w.self&&typeof c!=='undefined'&&c!==null&&c.location&&w.location&&c.location.hostname===w.location.hostname&&c.AI&&typeof c.AI[O]!=='undefined'){return c.AI[O];}}catch(x){}}return false;},isWindowed:function(){return top&&typeof top.isMainWidget!=='undefined'&&top.isMainWidget;}};AI.title.init();AI.global=this;AI.requireOLD=function(U,F,C,A){var src=U.charAt(0)==="/"||U.substr(0,5)=="http:"||U.substr(0,6)=="https:"?U:AI.BASEPATH+U,listener=AI.BROWSER.IE?"onreadystatechange":"onload",e=AI.DOM.createElement("SCRIPT",{type:"text/javascript",src:src});AI.console.error('Require:'+U);if(F){e[listener]=function(){if(AI.BROWSER.IE&&!/loaded|complete/.test(window.event.srcElement.readyState)){return;}F.call(C?C:this,A);this[listener]=null;AI.console.warning('EndRequire/'+U+'/'+listener+'/');};}AI.DOM.getByTag('head').appendChild(e);};AI.startingTime=new Date().valueOf();AI.DEPRECATED=function(f){if(AI.console){AI.console.warning('DEPRECATED:'+f);}};AI.isInsideFenetre=AI.isWindowed;AI.fixIESelect=function(){};AI.bench=function(){var H=0,T='',E=0;return{init:function(t){T=t||'';H=new Date().valueOf();},end:function(){E=new Date().valueOf()-H;return E;},setText:function(t){T=t;},getText:function(){return T;},getTime:function(){return E;}};}();
AI.features=function(){var E,T,D=document,F={rgba:false,canvas:false,strict:D.compatMode==='CSS1Compat',quirks:D.compatMode!=='CSS1Compat',SVG:!!(D&&(T=D.implementation)&&typeof T.hasFeature=='function'&&T.hasFeature("http://www.w3.org/TR/SVG11/feature#CoreAttribute",'1.1')),isMethod:function(O,M){var t;if(O&&M in O){t=typeof O[M];return!!(((t==='function'||t==='object')&&O[M])||t==='unknown');}return false;},isGlobalProperty:function(P){var t,o,w=window;if(P in w){o=w[P];t=typeof o;return!!(o&&(t==='function'||t==='object'));}return false;},isProperty:function(O,P){var t,o;if(P in O){o=O[P];t=typeof o;return!!(o&&(t==='function'||t==='object'));}return false;}};if(F.isMethod(D,'createElement')){E=D.createElement('P');T=/^rgba/;if(E&&E.style&&typeof T.test=="function"){try{E.style.color='rgba(1,1,1,0.5)';F.rgba=T.test(E.style.color);}catch(e){}}E=D.createElement('CANVAS');F.canvas=!!(E&&E.getContext&&E.getContext("2d"));}E=null;return F;}();
AI.utils={isObjectEmpty:function(O){for(var k in O){if(AI.utils.hasOwnProp(O,k)){return false;}}return true;},getObjectLength:function(O){var r=0;AI.utils.forOwn(O,function(){r++;});return r;},isValidNumber:function(V){return typeof V==='number'&&!isNaN(V);},isValidString:function(V){return typeof V==='string'&&V!=='';},isValidArray:function(V){return typeof V==='object'&&V!==null&&V instanceof Array;},isArray:function(V){return Object.prototype.toString.call(V)==='[object Array]';},isValidObject:function(V){return typeof V==='object'&&V!==null&&!(V instanceof Array);},isValidElement:function(V){return typeof V==='object'&&V!==null||V.nodeType!==document.ELEMENT_NODE;},uniqid:function(P){return(P?P:'')+parseInt(Math.random()*1000,10)+(new Date().valueOf())+parseInt(Math.random()*1000,10);},Cookies:{enabled:function(){var R,d=document,s='AItestcookie=test';d.cookie=s;R=(d.cookie.indexOf(s)!==-1);if(R){d.cookie=s+';expires=Fri,02-Jan-1970 00:00:00 GMT';}AI.utils.Cookies.enabled=R?function(){return true;}:function(){return false;};return R;},set:function(N,V,D){var d=new Date();D=D||30;d.setTime(d.getTime()+(D*24*60*60*1000));document.cookie=N+"="+V+";expires="+d.toGMTString()+";path=/";},get:function(N){var i,c,s=document.cookie.split(';');N+='=';for(i=0;i<s.length;i++){c=s[i];while(c.charAt(0)===' '){c=c.substring(1,c.length);}if(c.indexOf(N)===0){return c.substring(N.length,c.length);}}return null;}},escapeHTML:function(V){function rc(c){switch(c){case "<":return "&lt;";case ">":return "&gt;";case "&":return "&amp;";case "'":return "&#39;";case '"':return "&quot;";}return "?";}return String(V).replace(/[<>&"']/g,rc);},unescapeHTML:function(V){return(''+V).replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<");},forceArray:function(){var a,i,I=arguments.length,j,J,r=[];for(i=0;i<I;i++){a=arguments[i];if(a){J=a.length;if(J&&J>0){for(j=0;j<J;j++){r.push(a[j]);}}else{r.push(a);}}}return r;},hasOwnProp:function(O,P){var fn;if(AI.features.isMethod(O,'hasOwnProperty')){fn=function(o,p){return o.hasOwnProperty(p);};}else{fn=function(o,p){var k=o.constructor.prototype[p];return typeof k=='undefined'||k!==o[p];};}return(AI.utils.hasOwnProp=fn)(O,P);},forOwn:function(O,F,C,A){var k,i=0;AI.utils.forOwnStopped=false;for(k in O){if(AI.utils.forOwnStopped){break;}if(k&&AI.utils.hasOwnProp(O,k)){F.call(C||O,O,k,O[k],i++,A);}}},injectObject:function(S,C){for(var k in S){if(k&&AI.utils.hasOwnProp(S,k)){C[k]=S[k];}}return C;},deepMerge:function(){var args=Array.prototype.slice.call(arguments);function mixin(mix){var i,m,obj;function unlink(O){var i,m,r;if(AI.utils.isArray(O)){r=[];for(i=0,m=O.length;i<m;i++){r[i]=unlink(O[i]);}}else if(O!==null&&typeof O=='object'){r={};AI.utils.forOwn(O,function(o,k,v){r[k]=unlink(v);});}else{return O;}return r;}function cb(o,k,v){var m=mix[k];mix[k]=m&&typeof v=='object'&&typeof m=='object'?mixin(m,v):unlink(v);}for(i=1,m=arguments.length;i<m;i++){obj=arguments[i];if(typeof obj=='object'){AI.utils.forOwn(obj,cb);}}return mix;}args.unshift({});return mixin.apply(null,args);}};AI.utils.DEPRECATED=function(msg,delay){if(AI.console&&AI.console.error){if(delay){msg='(delayé)-'+msg;}AI.console.error(msg);}else{window.setTimeout(function(){AI.utils.DEPRECATED(msg,true);},1000);}};AI.utils.regFeature=/^(object|function|unknown)$/i;AI.utils.isObjectProperty=function(O,P){var t;AI.utils.DEPRECATED('AI.utils.isObjectProperty est DEPRECATED,utiliser AI.features.isProperty');if(O){t=typeof O[P];return!!((t=='object'||t=='function')&&O[P]);}return false;};AI.utils.isMethod=function(M){var o=window[M],t=typeof o;AI.utils.DEPRECATED('AI.utils.isMethod est DEPRECATED,utiliser AI.features.isMethod');return!!(o&&AI.utils.regFeature.test(t));};AI.utils.areFeatured=function(O){var a,i,l=arguments.length,r=AI.utils.regFeature;AI.utils.DEPRECATED('AI.utils.areFeatured est DEPRECATED,utiliser AI.features.isGlobalProperty ou AI.features.isObjectProperty');O=window[O];if(!O||l<2||typeof O=='undefined'||O===null){return false;}for(i=1;i<l;i++){a=O[arguments[i]];if(!(r.test(typeof a)&&a)){return false;}}return true;};AI.utils.isValid=function(v){var T=typeof v;AI.utils.DEPRECATED('AI.utils.isValid est DEPRECATED,lui préférer une version courte adaptée au contexte');if(T=='string'){return v!=='';}else if(T=='number'){return AI.utils.isValidNumber(v);}else if(T=='boolean'||T=='function'){return true;}else if(T=='object'){return v!==null;}return false;};AI.utils.encoder=function(C,U){var f=encodeURIComponent;AI.utils.DEPRECATED('AI.utils.encoder est DEPRECATED.');if(typeof f=='function'){return U?encodeURI(C):f(C);}return window.escape(C);};AI.utils.decoder=function(C){var f=decodeURIComponent;AI.utils.DEPRECATED('AI.utils.decoder est DEPRECATED.');return typeof f=='function'?f(C):window.unescape(C);};
AI.consts={INTERNAL_TARGET:'AIcontenu',SHOW_NONE:0,SHOW_LABEL:1,SHOW_ICON:2,SHOW_BOTH:3,BLANK_URL:'/blank.html',BASE_DIR:'http://images.internet-ai.com',BASE_PICTO:'/pictos',BASE_WIDGET:'/widgets',BLANK_IMG:'/blank.gif',SILENT:'SILENT',FRAME:'FRAME',OPAQUE:'OPAQUE',COPIE:'COPIE',TRANSLUCIDE:'TRANSLUCIDE',MINIMIZED:0,MAXIMIZED:1,FIT:1,RESIZE:2,POS_SAVE:1,POS_REMOVE:2,DRAG_WAIT:1,DRAG_LISTEN:2,DRAG_MOVE:3,HORIZONTAL:0,VERTICAL:1,WINDOW_CONTENEUR_BUTTONS:'100px',TEXT_BR:'[BR]',DATE_FORMAT_FR:'d/m/Y',DATE_FORMAT_US:'m/d/Y',DATE_FORMAT:'d/m/Y'};var CR="\n";(function(){var i,m,d=document,t=['ELEMENT_NODE','ATTRIBUTE_NODE','TEXT_NODE','CDATA_SECTION_NODE','ENTITY_REFERENCE_NODE','ENTITY_NODE','PROCESSING_INSTRUCTION_NODE','COMMENT_NODE','DOCUMENT_NODE','DOCUMENT_TYPE_NODE','DOCUMENT_FRAGMENT_NODE','DOCUMENT_NOTATION_MODE'];for(i=0,m=t.length;i<m;i++){if(typeof d[t[i]]=='undefined'||d[t[i]]===null){d[t[i]]=1+i;}}}());AI.consts.UNDEF=0;AI.consts.LOADING=1;AI.consts.LOADED=2;AI.consts.ERR=3;
AI.config=function(){var O=AI.getSimilarParentObject('config');if(O){return O;}O={WINDOW_MOVE:AI.consts.FRAME,WINDOW_MOVE_ANIMATED:false,WINDOW_MAXIMIZE_ANIMATED:false,WINDOW_RESIZE:AI.consts.FRAME,WINDOW_RESIZE_ANIMATED:false,BUREAU_MOVE:AI.consts.OPAQUE,MENU_CLOSE_TIME:5000,BUREAU_FOND_POSITION:'top_left',BUREAU_FOND_REPEAT:true,BUREAU_FOND_COULEUR:'white',BUREAU_FOND_COULEUR_CUSTOM:'',BUREAU_FOND_URL:'',BUTTON_BUREAU_COULEUR:'#000000',BUTTON_BUREAU_SHADOW:'#FFFFFF',BUTTON_BUREAU_CLICK_OPEN:'double',BUTTON_BUREAU_MODIFIER:'CTRL',icons32:[]};if(typeof AICONFIG!=='undefined'){AI.utils.forOwn(AICONFIG,function(o,k,v){this[k]=v;},O);}return O;}();
if(![].indexOf){Array.prototype.indexOf=function(S,F){var i,m=this.length;if(!F){F=0;}else if(F<0){F=Math.max(0,this.length+F);}for(i=F;i<m;i++){if(this[i]===S){return i;}}return-1;};}if(![].lastIndexOf){Array.prototype.lastIndexOf=function(S,F){var i;if(!F){F=this.length-1;}else{if(F<0){F=this.length+F;}if(F<0){F=-1;}else if(F>=this.length){F=this.length-1;}}for(i=F;i>=0;i--){if(this[i]===S){return i;}}return-1;};}if(!Array.prototype.forEach){Array.prototype.forEach=function(F){var i,m=this.length;for(i=0;i<m;i++){if(i in this){F.call(this[i],this[i],i,this);}}};}if(!Array.prototype.forEachObject){Array.prototype.forEachObject=function(F){var i,m=this.length;for(i=0;i<m;i++){if(i in this){F.call(this[i],this,i);}}};}if(![].filter){Array.prototype.filter=function(F,C){var i,r=[],m=this.length;for(i=0;i<m;i++){if((i in this)&&F.call(C,this[i],i,this)){r.push(this[i]);}}return r;};}if(![].map){Array.prototype.map=function(F,C){var i,r=[],m=this.length;for(i=0;i<m;i++){r.push(F.call(C,this[i],i,this));}return r;};}if(![].some){Array.prototype.some=function(F,C){var i,m=this.length;for(i=0;i<m;i++){if((i in this)&&F.call(C,this[i],i,this)){return true;}}return false;};}if(![].every){Array.prototype.every=function(F,C){var i,m=this.length;for(i=0;i<m;i++){if((i in this)&&!F.call(C,this[i],i,this)){return false;}}return true;};}Array.prototype.contains=function(O){return this.indexOf(O)!=-1;};Array.prototype.insertAt=function(O,I){this.splice(I,0,O);};Array.prototype.insertBefore=function(N,R){var i=this.indexOf(R);if(i==-1){this.push(N);}else{this.splice(i,0,N);}};Array.prototype.insertAfter=function(N,R){var i=this.indexOf(R);if(i==-1||i==(this.length-1)){this.push(N);}else{this.splice(i+1,0,N);}};Array.prototype.removeAt=function(I){return this.splice(I,1);};Array.prototype.remove=function(E){var i=this.indexOf(E);if(i!=-1){return this.removeAt(i);}return null;};Array.prototype.removeAll=function(){return this.splice(0,this.length);};Array.prototype.getLast=function(){if(this.length>0){return this[this.length-1];}return null;};Array.prototype.getFirst=function(){if(this.length>0){return this[0];}return null;};Array.prototype.in_array=Array.prototype.inArray=function(E){return this.indexOf(E)!=-1;};if(!Array.prototype.push){Array.prototype.push=function(){var i,m=arguments.length,b=this.length;for(i=0;i<m;i++){this[b+i]=arguments[i];}return this.length;};}
String.prototype.contains=function(s){return this.indexOf(s)!=-1;};if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};}if(!String.prototype.ltrim){String.prototype.ltrim=function(){return this.replace(/^\s+/,"");};}if(!String.prototype.trim){String.prototype.rtrim=function(){return this.replace(/\s+$/,"");};}String.prototype.add=function(v,S){var a;if(this==v){return this;}else if(this===''){return v;}if(!AI.utils.isValidString(S)){S=",";}a=this.split(S);if(a.indexOf(v)!==-1){return this;}a.push(v);return a.join(S);};String.prototype.remove=function(v,S){var a,p;if(this==v||this===''){return '';}if(!AI.utils.isValidString(S)){S=",";}a=this.split(S);p=a.indexOf(v);if(p==-1){return this;}do{a.splice(p,1);}while((p=a.indexOf(v))!=-1);return a.join(S);};String.prototype.ellipsis=function(M){if(this.length>M&&M>4){return this.substr(0,M-3)+'...';}return this;};AI.camelStr=AI.hyphenStr={};String.toCamel=function(T){var i,m,a,r;if(AI.camelStr[T]){return AI.camelStr[T];}a=T.split("-");m=a.length;if(m==1){return a[0];}r=T.indexOf("-")===0?a[0].charAt(0).toUpperCase()+a[0].substring(1):a[0];for(i=1;i<m;i++){r+=a[i].charAt(0).toUpperCase()+a[i].substring(1);}AI.camelStr[T]=r;AI.hyphenStr[r]=T;return r;};String.toHyphen=function(T){var i,m,r='';if(AI.hyphenStr[T]){return AI.hyphenStr[T];}for(i=0,m=T.length;i<m;++i){if(T.charAt(i)==T.charAt(i).toUpperCase()){r+='-'+T.charAt(i).toLowerCase();}else{r+=T.charAt(i);}}AI.hyphenStr[T]=r;AI.camelStr[r]=T;return r;};String.prototype.toFirstUp=function(){return this.charAt(0).toUpperCase()+this.substr(1);};String.prototype.ellipse=String.prototype.ellipsis;String.prototype.encodeRE=function(){return this.replace(/([.*+?\^${}()|\[\]\/\\])/g,'\\$1');};String.prototype.stripTags=function(){return this.replace(/<\/?[^>]+>/gi,"");};
Number.prototype.limit=function(m,M){if(M!==null&&typeof M=="number"&&this>M){return M;}else if(m!==null&&typeof m=="number"&&this<m){return m;}return+this;};function intval(i){var r=parseInt(i,10)||0;r=isNaN(r)?0:r;return r;}AI.utils.toCurrency=function(S){var r=/^(.*\s)?([\-+\u00A3\u20AC]?\d+)(\d{3}\b)/;S=''+S;return S==(S=S.replace(r,"$1$2 $3"))?S:AI.utils.toCurrency(S);};AI.utils.numberToFixed=(function(){function P(I,S,C){var r=""+I;while(r.length<S){r=C+r;}return r;}function U(N,D){var t,s=""+Math.round(N*Math.pow(10,D)),d,f;if(/\D/.test(s)){return ""+N;}s=P(s,1+D,"0");d=s.substring(0,t=(s.length-D));f=s.substring(t);if(f){f="."+f;}return d+f;}return function(N,D,C){var n=parseFloat((N||'0').toString().replace(',','.').replace(/[^0-9e\.\-+]/g,''))||0,u=U(Math.abs(n),D);if(isNaN(u)){u=0;}u=(n<0?"-":"")+u;if(C===true){return AI.utils.toCurrency(u);}return Number(u);};})();AI.utils.oldnumberToFixed=function(nb,digits,currency){var t,debut,fin,n=parseFloat((nb||'0').toString().replace(',','.').replace(/[^0-9\.\-+]/g,''))||0,s=""+Math.round(Math.abs(n)*Math.pow(10,digits));if(isNaN(n)||/\D/.test(s)){s='0';}while(s.length<digits+1){s='0'+s;}t=s.length-digits;debut=s.substring(0,t);fin=s.substring(t);if(fin){fin="."+fin;}s=debut+fin;n=(n<0?"-":"")+s;if(currency===true){return AI.utils.toCurrency(n);}return Number(n);};Number.prototype.inRange=function(m,M){return this>=m&&this<=M;};Number.prototype.betweenRange=function(m,M){return this>m&&this<M;};function floatval(val,D,C){var R,F=parseFloat(val.toString().replace(',','.').replace(/\s/g,''))||0;D=D||2;R=F.toFixed(D);if(C===true){return AI.utils.toCurrency(R);}return Number(R);}
if(!Function.prototype.apply){Function.prototype.apply=function(C,A){var i,m,r,a=[];C=C||window;A=A||[];for(i=0,m=A.length;i<m;i++){a[i]='A['+i+']';}C.$apply=this;r=eval('C.$apply('+a.join(',')+');');delete C.$apply;return r;};}
AI.BROWSER=function(){var V,W=window,D=document,C=D.createElement('canvas'),N=W.navigator,uA=N.userAgent,R={engine:null,version:0,major:0,minor:0,revision:0,build:0,mshtml:false,gecko:false,opera:false,khtml:false,safari3:false,IE:false,IE6:false,IE7:false,strict:D.compatMode==='CSS1Compat',quirks:D.compatMode!=='CSS1Compat',runLocally:W.location.protocol==='file:',SVG:!!D.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#CoreAttribute",'1.1'),canvas:!!C.getContext,VML:false,XPath:!!D.evaluate};/*@cc_on R.IE=true;R.VML=true;if(@_jscript_version==5.6){R.IE6=true;try{D.execCommand("BackgroundImageCache",false,true);}catch(e){}}else if(@_jscript_version==5.7)R.IE7=true;@*/if(W.opera){R.engine='opera';if(/Opera[\s\/]([0-9\.]*)/.test(uA)){V=RegExp.$1;V=V.substring(0,3)+'.'+V.substring(3);}}else if(typeof N.vendor==='string'&&N.vendor==='KDE'){R.engine='khtml';if(/KHTML\/([0-9-\.]*)/.test(uA)){V=RegExp.$1;}}else if(W.controllers&&typeof N.product==='string'&&N.product==='Gecko'){R.engine='gecko';if(/rv\:([^\);]+)(\)|;)/.test(uA)){V=RegExp.$1;}}else if(W.devicePixelRatio&&W.getMatchedCSSRules){R.engine='safari3';V='3';}else if(R.IE){R.engine='mshtml';if(/MSIE\s+([^\);]+)(\)|;)/.test(uA)){V=RegExp.$1;}}if(R.engine){R[R.engine]=true;}if(V){V=V.split('.');R.major=V[0]||0;R.minor=V[1]||0;R.revision=V[2]||0;R.build=V[3]||0;R.version=V;}return R;}();
AI.getElementDocument=function(E){var f;if(E.ownerDocument){f=function(e){return e.ownerDocument;};}else{f=function(e){if(e.parentNode){while(e.parentNode){e=e.parentNode;}}return e.nodeType==9||(!e.nodeType&&!e.tagName)?e:null;};}return(AI.getElementDocument=f)(E);};AI.getDocumentWindow=function(D){var f=function(){return null;};if(D.defaultView){f=function(d){return d.defaultView;};}else if(D.parentWindow){f=function(d){return d.parentWindow;};}return(AI.getDocumentWindow=f)(D);};AI.getElementWindow=function(E){var d=AI.getElementDocument(E);return d?AI.getDocumentWindow(d):null;};AI.dCTN=function(T){return document.createTextNode(T);};AI.dCE=function(E,N){var d=document,i='AIfoobar',f=d.createElement('IFRAME');f.name=i;f.style.display='none';(d.body||d.documentElement).appendChild(f);if(!window.frames[i]){AI.dCE=function(e,n){return document.createElement(n?'<'+e+' name="'+n+'">':e);};}else{AI.dCE=function(e,n){var E=document.createElement(e);if(n){E.name=n;}return E;};}f.parentNode.removeChild(f);return AI.dCE(E,N);};if(!AI.features.isMethod(document,'importNode')){document.importNode=function(E,D){var n,i,m,t,a,A,r=null,d=document;switch(E.nodeType){case 1:n=d.createElement(E.nodeName);A=E.attributes;if(A&&A.length>0){for(i=0,m=A.length;i<m;i++){a=A[i].nodeName;n.setAttribute(a,E.getAttribute(a));}}if(D&&E.childNodes&&E.childNodes.length>0){for(i=0,m=E.childNodes.length;i<m;i++){t=d.importNode(E.childNodes[i],D);if(t){n.appendChild(t);}}}r=n;break;case 3:case 4:r=d.createTextNode(E.nodeValue);break;case 8:r=d.createComment(E.nodeValue);break;}return r;};}var $dce=AI.dCE,$dct=AI.dCTN;
AI.DOM={isNode:function(E,N){return E&&E.nodeName&&E.nodeName.toUpperCase()===N.trim().toUpperCase();},getBody:function(D){var f=function(){return null;};if(AI.features.isProperty((D||document),'body')){f=function(d){return(d||document).body;};}else{f=function(d){return AI.DOM.getByTag('BODY',0,(d||document))||null;};}return(AI.DOM.getBody=f)(D);},getDocumentElement:function(D){var f=function(d){return AI.DOM.getBody(d);};if(AI.features.strict&&AI.features.isProperty((D||document),'documentElement')){f=function(d){return(d||document).documentElement;};}return(AI.DOM.getDocumentElement=f)(D);},getById:function(E,D){var z,f=AI.features,isM=f.isMethod,fn=function(){return null;},n='AICheckGBI',d=D||document,b=d.body||d.documentElement,e=d.createElement('A');if(typeof E!=='string'){return E;}e.name=n;if(isM(d,'getElementById')&&isM(b,'appendChild')&&isM(b,'removeChild')){b.appendChild(e);z=d.getElementById(n);if(z&&f.isProperty(d,'all')){fn=function(i,d){var n;if(typeof i!=='string'){return i;}n=(d||document).all[i];return n&&n.id==i?n:null;};}else{fn=function(i,d){var n;if(typeof i!=='string'){return i;}n=(d||document).getElementById(i);return n&&n.id==i?n:null;};}b.removeChild(e);}return(AI.DOM.getById=fn)(E,D);},insertFirst:function(E,P){var r=null,n=this.getById(E),p=P?this.getById(P):n?n.parentNode:null;if(n&&p&&p.childNodes){if(p.childNodes.length===0&&!P.firstChild){r=p.appendChild(n);}else{r=p.insertBefore(n,p.firstChild);}}return r;},insertAfter:function(S,C){var s=this.getById(S),c=this.getById(C);if(c.nextSibling){return c.parentNode.insertBefore(s,c.nextSibling);}return c.parentNode.appendChild(s);},moveBefore:function(S,C){var p,s=this.getById(S),c=this.getById(C);if(c&&s&&(p=s.parentNode)){p.removeChild(s);return p.insertBefore(s,c);}return null;},moveAfter:function(S,C){var p,s=this.getById(S),c=this.getById(C);if(s&&(p=s.parentNode)){p.removeChild(s);return p.insertBefore(s,c?c.nextSibling:null);}return null;},emptyTextNode:function(){return AI.dCTN('\u00a0');},getInnerText:function(E){var n=this.getById(E),r=[],i=0;if(!n){return '';}if(n.data&&n.nodeType==3){return n.data;}if(n.textContent){return n.textContent;}if(n.innerText){return n.innerText;}if(n.childNodes){while(n.childNodes[i]){r.push(this.getInnerText(n.childNodes[i]));i++;}}return r.join('');},flush:function(E,P){var i,n=this.getById(E);if(!n){return null;}while(n.firstChild){if(P){for(i=P.length;i--;){n.firstChild[P]=null;}}n.removeChild(n.firstChild);}return n;},nodeChecker:function(N,C){return C&&N?function(e,n,c){return e&&e.nodeName&&e.nodeName.toUpperCase()==n&&AI.DOM.CSS.has(c,e);}:C?function(e,n,c){return AI.DOM.CSS.has(c,e);}:function(e,n,c){return e&&e.nodeName&&e.nodeName.toUpperCase()==n;};},suivant:function(E,N,C){var s,c=this.nodeChecker(N,C),n=this.getById(E);if(n){N=N.toUpperCase();s=n.nextSibling;while(s){if(c(s,N,C)){return s;}s=s.nextSibling;}}return null;},xxxsuivant:function(id,nodeName,cName){var sibling,check=AI.DOM.nodeChecker(nodeName,cName),node=AI.DOM.getById(id);AI.console.error('start/'+id+'/'+node+'/');if(node){AI.console.error('node found:/'+node+'/');nodeName=nodeName.toUpperCase();AI.console.error('nodeName=/'+nodeName+'/');sibling=node;AI.console.error('sibling original:/'+sibling+'/');while(sibling){AI.console.info('while start');if(check(sibling,nodeName,cName)){AI.console.warning('found:/'+sibling+'/');return sibling;}AI.console.error('sibling checked,not ok:/'+sibling+'/');sibling=sibling.nextSibling;AI.console.info('while end');}}AI.console.error('end,rien found');return null;},precedent:function(E,N,C){var s,c=this.nodeChecker(N,C),n=this.getById(E);if(n){N=N.toUpperCase();s=n.previousSibling;while(s){if(c(s,N,C)){return s;}s=s.previousSibling;}}return null;},parent:function(E,N,C){var c=this.nodeChecker(N,C),n=this.getById(E);if(n){N=N.toUpperCase();while(n&&n.parentNode){if(c(n,N,C)){return n;}n=n.parentNode;}}return null;},parentId:function(E,S){var n=this.getById(E);if(n){while(n&&n.parentNode){if(n.id==S){return n;}n=n.parentNode;}}return null;},hide:function(){for(var i=arguments.length;i--;){this.CSS.add('cacher',arguments[i]);}},show:function(){for(var i=arguments.length;i--;){this.CSS.remove('cacher',arguments[i]);}},isHide:function(E){return this.CSS.has('cacher',E);},isShown:function(E){return!this.isHide(E);},toggle:function(){var i,n;for(i=arguments.length;i--;){n=this.getById(arguments[i]);if(!this.CSS.has('ne_pas_cacher',n)){this[this.isHide(n)?'show':'hide'](n);}}},toggleChilds:function(E){var i,m,n=this.getById(E);if(n&&n.childNodes){for(i=0,m=n.childNodes.length;i<m;i++){this.toggle(n.childNodes[i]);}}},getViewportHeight:function(){var h=-1;if((document.compatMode||AI.BROWSER.IE)&&!AI.BROWSER.opera){if(AI.BROWSER.strict){h=document.documentElement.clientHeight;}else{h=document.body.clientHeight;}}else{h=window.innerHeight;}return h;},getViewportWidth:function(){var w=-1;if(document.compatMode||AI.BROWSER.IE){if(AI.BROWSER.strict){w=document.documentElement.clientWidth;}else{w=document.body.clientWidth;}}else{w=window.innerWidth;}return w;},getByTags:function(N,D){var f=AI.features,isM=f.isMethod,fn=function(){return null;},d=AI.DOM.getById(D)||document;if(isM(d,'getElementsByTagName')){fn=function(n,d){return(AI.DOM.getById(d)||document).getElementsByTagName(n);};}else if(f.isProperty(d,'all')&&isM(d.all,'tags')){fn=function(n,d){return(AI.DOM.getById(d)||document).all.tags(n);};}return(this.getByTags=fn)(N,D);},getArrayByTags:function(N,D){var i,m,r=[],a=AI.DOM.getByTags(N,D);for(i=0,m=a.length;i<m;i++){r[i]=a[i];}return r;},getByTag:function(N,I,D){var a=this.getByTags(N,D);if(a){return a[I||0];}return null;},createElement:function(N,A,S,C,type,node){var i,m,n=A&&A.name?A.name:null,e=AI.dCE(N,n);function cb(o,k,v){if(k=='cls'||k=='cname'||k=='classname'){if(k=='cls'){var xx=AI&&AI.console&&AI.console?AI.console.warning:alerter;xx('AI.DOM.createElement()ne pas utiliser "cls" mais "className"');}if(k=='cname'){var xx=AI&&AI.console&&AI.console?AI.console.warning:alerter;xx('AI.DOM.createElement()ne pas utiliser "cname" mais "className"');}if(k=='classname'){var xx=AI&&AI.console&&AI.console?AI.console.warning:alerter;xx('AI.DOM.createElement()ne pas utiliser "classname" mais "className"');}this.className=v;}else if(k=='html'){this.innerHTML=v;}else if(k=='noselection'||k=='disableSelection'){if(k=='disableSelection'){var xx=AI&&AI.console&&AI.console?AI.console.warning:alerter;xx('AI.DOM.createElement()ne pas utiliser "disableSelection" mais "noselection"');}if(v!==false){AI.HTML.noSelection(this,typeof v=='boolean'?'default':v);}}else if(k=='autocomplete'){AI.HTML.setAutocomplete(this,v);}else if(k=='childs'){C=AI.utils.forceArray(v);}else{this[k]=v;}}if(A){AI.utils.forOwn(A,cb,e);}m=C&&C.length?C.length:0;if(m>0){for(i=0;i<m;i++){e.appendChild(C[i]);}}if(AI.utils.isValidString(type)&&AI.utils.isValidElement(node)){var xx=AI&&AI.console&&AI.console?AI.console.warning:alerter;xx('AI.DOM.createElement va faire disparaitre les paramètres "type" et "node",préparer la transition');type=type.toLowerCase();if(['ib','before','insertbefore'].contains(type)){node.parentNode.insertBefore(e,node);}else if(['if','first','insertfirst'].contains(type)){AI.DOM.insertFirst(e,node);}else if(['rc','replace','replacechild'].contains(type)){node.parentNode.replaceChild(e,node);}else{node.appendChild(e);}}return S?AI.DOM.CSS.setStyle(e,S):e;}};var $=AI.DOM.getById,$E=AI.DOM.createElement,$tags=AI.DOM.getByTags,$tag=AI.DOM.getByTag,DOM=AI.DOM;DOM.getX=function(id){var node=AI.DOM.getById(id),C=0;if(!node){return 0;}if(node.offsetParent){while(node.offsetParent){C+=node.offsetLeft;node=node.offsetParent;}}return C;};DOM.getY=function(id){var node=AI.DOM.getById(id),C=0;if(!node){return 0;}if(node.offsetParent){while(node.offsetParent){C+=node.offsetTop;node=node.offsetParent;}}return C;};AI.DOM.flushQuick=function(id){return AI.DOM.flush(id);};AI.DOM.pix=function(){var p=0,i;for(i=arguments.length;i--;){p+=intval(arguments[i]);}return p+'px';};AI.DOM.centerToParentHorizontal=function(id){window.setTimeout(function(){var node=AI.DOM.getById(id),P,W;if(node){P=node.parentNode;W=P&&P.nodeName&&P.nodeName.toUpperCase()==='BODY'?AI.DOM.getViewportWidth():P.offsetWidth;node.style.left=intval((W-node.offsetWidth)/2)+'px';}},1);};AI.DOM.centerToParentVertical=function(id){window.setTimeout(function(){var node=AI.DOM.getById(id),P,W;if(node){P=node.parentNode;W=P&&P.nodeName&&P.nodeName.toUpperCase()==='BODY'?AI.DOM.getViewportHeight():P.offsetHeight;node.style.top=intval((W-node.offsetHeight)/2)+'px';}},1);};AI.DOM.centerToParent=function(id){var node=AI.DOM.getById(id);if(!node){return null;}AI.DOM.centerToParentHorizontal(node);AI.DOM.centerToParentVertical(node);return node;};AI.DOM.getScrollLeftSum=function(el){var sum=0,p=el.parentNode;while(p&&p.nodeType&&p.nodeType==document.ELEMENT_NODE){sum+=p.scrollLeft;p=p.parentNode;}return sum;};AI.DOM.getScrollTopSum=function(el){var sum=0,p=el.parentNode;while(p&&p.nodeType&&p.nodeType==document.ELEMENT_NODE){sum+=p.scrollTop;p=p.parentNode;}return sum;};AI.gBI=AI.DOM.getById;DOM.head=AI.DOM.getByTag('HEAD');
AI.DOM.whitespace=function(){function isAll(node){return!(/[^\t\n\r]/.test(node.data));}function isIgnorable(node){return(node.nodeType==document.COMMENT_NODE)||((node.nodeType==document.TEXT_NODE)&&isAll(node));}function nodeBefore(sib){while((sib=sib.previousSibling)){if(!isIgnorable(sib)){return sib;}}return null;}function nodeAfter(sib){while((sib=sib.nextSibling)){if(!isIgnorable(sib)){return sib;}}return null;}function lastChild(par){var res=par.lastChild;while(res){if(!isIgnorable(res)){return res;}res=res.previousSibling;}return null;}function firstChild(par){var res=par.firstChild;while(res){if(!isIgnorable(res)){return res;}res=res.nextSibling;}return null;}function dataOf(txt){var data=txt.data.replace(/[\t\n\r]+/g,' ');if(data.charAt(0)===' '){data=data.substring(1,data.length);}if(data.charAt(data.length-1)===' '){data=data.substring(0,data.length-1);}return data;}function clean(id,recursif){var E=AI.DOM.getById(id),i,node;if(E&&E.childNodes){for(i=E.childNodes.length-1;i>=0;i--){node=E.childNodes[i];if(node.nodeType==document.TEXT_NODE){if(isIgnorable(node)){E.removeChild(node);}}else if(node.nodeType==document.ELEMENT_NODE&&recursif){clean(node,recursif);}}}}return{nodeBefore:nodeBefore,nodeAfter:nodeAfter,lastChild:lastChild,firstChild:firstChild,isIgnorable:isIgnorable,dataOf:dataOf,clean:clean};}();DOM.cleanWhitespace=AI.DOM.whitespace.clean;
AI.DOM.CSS={loaded:{},uid:0,rgb2hex:function(RGB){var r,rgb,h='',d='0123456789abcdef';if(typeof RGB!='string'||typeof RGB.match=='undefined'){return RGB;}r=RGB.match(/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*/);if(r===null){return RGB;}rgb=+r[1]<<16|+r[2]<<8|+r[3];while(rgb!==0){h=d.charAt(rgb&0xf)+h;rgb>>>=4;}while(h.length<6){h='0'+h;}return "#"+h;},has:function(C,E){var f=AI.features,n=AI.DOM.getById(E),fn=function(C,E){if(arguments.length!=2){AI.console.error('DEPRECATED AI.DOM.CSS.has('+C+')ne peut manipuler que un élément à la fois,pas('+(arguments.length-1)+')');}var n=AI.DOM.getById(E);if(!n||!n.className){return false;}return n.className.split(' ').contains(C);};if(n&&f.isProperty(n,'classList')&&f.isMethod(n.classList,'contains')){fn=function(C,E){if(arguments.length!=2){AI.console.error('DEPRECATED AI.DOM.CSS.has('+C+')ne peut manipuler que un élément à la fois,pas('+(arguments.length-1)+')');}var n=AI.DOM.getById(E);if(n){return n.classList.contains(C);}return false;};}return(AI.DOM.CSS.has=fn)(C,E);},set:function(C,E){if(arguments.length!=2){AI.console.error('ATTENTION AI.DOM.CSS.set('+C+')ne peut manipuler que un élément à la fois,pas('+(arguments.length-1)+')');}var n=AI.DOM.getById(E);if(n){n.className=C.replace(/[\n\r\t\s]/g,' ');}},add:function(C,E){var f=AI.features,n=AI.DOM.getById(E),fn=function(C,E){if(arguments.length!=2){AI.console.error('DEPRECATED AI.DOM.CSS.has('+C+')ne peut manipuler que un élément à la fois,pas('+(arguments.length-1)+')');}var c,n=AI.DOM.getById(E);if(n){if(!n.className){n.className=C;}else{c=n.className.split(' ');if(!c.contains(C)){c.push(C);n.className=c.join(' ');}}}};if(n&&f.isProperty(n,'classList')&&f.isMethod(n.classList,'add')){fn=function(C,E){if(arguments.length!=2){AI.console.error('DEPRECATED AI.DOM.CSS.has('+C+')ne peut manipuler que un élément à la fois,pas('+(arguments.length-1)+')');}var i,m,c=(' '+C).trim().split(' '),n=AI.DOM.getById(E);if(n){for(i=0,m=c.length;i<m;i++){if(c[i]!==''){n.classList.add(c[i]);}}}};}return(AI.DOM.CSS.add=fn)(C,E);},remove:function(C,E){var f=AI.features,n=AI.DOM.getById(E),fn=function(C,E){if(arguments.length!=2){AI.console.error('DEPRECATED AI.DOM.CSS.has('+C+')ne peut manipuler que un élément à la fois,pas('+(arguments.length-1)+')');}var c,n=AI.DOM.getById(E);if(n&&n.className){c=n.className.split(' ');if(c.contains(C)){c.remove(C);n.className=c.join(' ');}}};if(n&&f.isProperty(n,'classList')&&f.isMethod(n.classList,'remove')){fn=function(C,E){if(arguments.length!=2){AI.console.error('DEPRECATED AI.DOM.CSS.has('+C+')ne peut manipuler que un élément à la fois,pas('+(arguments.length-1)+')');}var n=AI.DOM.getById(E);if(n){n.classList.remove(C);}};}return(AI.DOM.CSS.remove=fn)(C,E);},toggle:function(C,E){var f=AI.features,n=AI.DOM.getById(E),fn=function(C,E){var n=AI.DOM.getById(E);if(n){AI.DOM.CSS[AI.DOM.CSS.has(C,E)?'remove':'add'](C,E);}};if(n&&f.isProperty(n,'classList')&&f.isMethod(n.classList,'toggle')){fn=function(C,E){var n=AI.DOM.getById(E);if(n){n.classList.toggle(C);}};}return(AI.DOM.CSS.toggle=fn)(C,E);},getPropertyName:function(P){var d=document,f=function(p){return p;};if(d&&(d=d.documentElement)&&(d=d.style)&&typeof d.styleFloat=='string'){f=function(p){return p==='cssFloat'?'styleFloat':p;};}this.getPropertyName=f;return f(P);},setStyle:function(E,P){var n=AI.DOM.getById(E);if(P&&n){AI.utils.forOwn(P,function(o,k,v){if(k=='opacity'){AI.DOM.CSS.setOpacity(this,v);}else{this.style[AI.DOM.CSS.getPropertyName(k)]=v;}},n);}return n;},getStyle:function(E,P){var d,h,v=null,n=AI.DOM.getById(E);if(!n){return '';}d=(n.ownerDocument||document).defaultView;if(P=='opacity'&&n.filters){try{return n.filters.item('DXImageTransform.Microsoft.Alpha').opacity/100;}catch(x){try{return n.filters.item('alpha').opacity/100;}catch(e){}}return '1';}else if(n.style[P]){v=n.style[P];}else if(n.currentStyle&&n.currentStyle[P]){v=n.currentStyle[P];}else if(d&&d.getComputedStyle){h=String.toHyphen(P);if((d=d.getComputedStyle(n,''))&&(d=d.getPropertyValue(h))){v=d;}}if(v!==null){if(/^\s*rgb\s*\(/.test(v)){v=AI.DOM.CSS.rgb2hex(v);}if(/^#/.test(v)){v=v.toLowerCase();}}return v;},getStyleInt:function(E,P){return intval(this.getStyle(E,P));},setOpacity:function(E,V){var n=AI.DOM.getById(E),f=function(){};if(n&&n.style){if(typeof n.style.opacity=='string'){f=function(id,v){var e=AI.DOM.getById(id);if(e){e.style.opacity=v;}};}else if(typeof n.style.MozOpacity=='string'){f=function(id,v){var e=AI.DOM.getById(id);if(e){e.style.MozOpacity=v;}};}else if(typeof n.style.KhtmlOpacity=='string'){f=function(id,v){var e=AI.DOM.getById(id);if(e){e.style.KhtmlOpacity=v;}};}else if(typeof n.style.filter=='string'){f=function(id,v){var e=AI.DOM.getById(id);if(e){if(e.currentStyle&&!e.currentStyle.hasLayout){e.style.zoom=1;}if(e.style.filter.indexOf('alpha(opacity=')==-1){e.style.filter+=' alpha(opacity='+Math.round(v*100)+')';}else{e.style.filter=e.style.filter.replace(new RegExp('alpha\\(opacity=[^\\)]+\\)','i'),(v>=0.9999)?'':'alpha(opacity='+Math.round(v*100)+')');}}};}}this.setOpacity=f;return f(E,V);},loadLink:function(U,id){var l,h;if(!this.loaded[U]){if(!id||id==''){id=String.toCamel(U.replace(/[^\w]/g,'-'))+this.uid++;}l=AI.DOM.createElement("LINK",{id:id,rel:'stylesheet',href:U});h=AI.DOM.getByTag('HEAD');if(h){h.appendChild(l);}this.loaded[U]=id;}},removeLink:function(U){var l;if(this.loaded[U]){l=AI.DOM.getById(this.loaded[U]);if(l&&l.parentNode){l.parentNode.removeChild(l);}delete this.loaded[U];}},getMarginLeft:function(E){return this.getStyleInt(E,'marginLeft');},getMarginTop:function(E){return this.getStyleInt(E,'marginTop');},getMarginRight:function(E){return this.getStyleInt(E,'marginRight');},getMarginBottom:function(E){return this.getStyleInt(E,'marginBottom');},getPaddingLeft:function(E){return this.getStyleInt(E,'paddingLeft');},getPaddingTop:function(E){return this.getStyleInt(E,'paddingTop');},getPaddingRight:function(E){return this.getStyleInt(E,'paddingRight');},getPaddingBottom:function(E){return this.getStyleInt(E,'paddingBottom');},getBorderLeft:function(E){return this.getStyle(E,'borderLeftStyle')=='none'?0:this.getStyleInt(E,'borderLeftWidth');},getBorderTop:function(E){return this.getStyle(E,'borderTopStyle')=='none'?0:this.getStyleInt(E,'borderTopWidth');},getBorderRight:function(E){return this.getStyle(E,'borderRightStyle')=='none'?0:this.getStyleInt(E,'borderRightWidth');},getBorderBottom:function(E){return this.getStyle(E,'borderBottomStyle')=='none'?0:this.getStyleInt(E,'borderBottomWidth');}};(function(){var i,t=['getMarginLeft','getMarginTop','getMarginRight','getMarginBottom','getPaddingLeft','getPaddingTop','getPaddingRight','getPaddingBottom','getBorderLeft','getBorderTop','getBorderRight','getBorderBottom'];for(i=t.length;i--;){AI.DOM[t[i]]=(function(method){return function(elt){AI.console.warning('AI.DOM.'+method+' est DEPRECATED,utiliser AI.DOM.CSS.'+method);return AI.DOM.CSS[method](elt);};}(t[i]));}}());var $style=AI.DOM.CSS.setStyle;AI.DOM.CSS.removeOpacity=function(id){AI.DOM.CSS.setOpacity(id,1);};DOM.hasCSS=function(e,C){return AI.DOM.CSS.has(C,e);};DOM.setCSS=function(e,C){return AI.DOM.CSS.set(C,e);};DOM.addCSS=function(e,C){return AI.DOM.CSS.add(C,e);};DOM.removeCSS=function(e,C){return AI.DOM.CSS.remove(C,e);};DOM.setOpacity=AI.DOM.CSS.setOpacity;DOM.removeOpacity=AI.DOM.CSS.removeOpacity;DOM.getStyle=AI.DOM.CSS.getStyle;DOM.getStyleInt=AI.DOM.CSS.getStyleInt;
AI.DOM.position={get:function(E){var n=AI.DOM.getById(E),p={left:0,top:0,width:0,height:0,offsetWidth:0,offsetHeight:0,clientWidth:0,clientHeight:0,scrollTop:0,scrollWidth:0,scrollHeight:0};if(n){AI.utils.forOwn(p,function(o,k,v,i,a){if(!(['left','top','width','height'].contains(k))&&k in a){this[k]=intval(a[k]);}},p,n);p.width=p.offsetWidth;p.height=p.offsetHeight;if(n.offsetParent){do{p.left+=n.offsetLeft;p.top+=n.offsetTop;}while((n=n.offsetParent));}}return p;},set:function(E,L,T){var n=AI.DOM.getById(E);if(!n){return null;}if(typeof L=='object'){T=L.top;L=L.left;}if(AI.DOM.CSS.getStyle(n,'position')!='absolute'){n.style.position='absolute';}n.style.top=intval(T)+'px';n.style.left=intval(L)+'px';return n;},getCenter:function(E){var c=AI.DOM.position.get(E);c.left=c.left+(c.width/2);c.top=c.top+(c.height/2);return c;}};
AI.HTML=function(){function sel(E,T){var n=AI.DOM.getById(E);if(n&&(n=n.options)){T=T=='text'?'text':'value';if(n.selectedIndex!=-1){return n[n.selectedIndex][T];}}return '';}function sGIB(E,V,T){var i,m,n=AI.DOM.getById(E);if(n&&(n=n.options)){T=T=='text'?'text':'value';for(i=0,m=n.length;i<m;i++){if(n[i][T]==V){return i;}}}return-1;}function sSIB(E,V,T){var n=AI.DOM.getById(E);if(n){n.selectedIndex=sGIB(n,V,T);}}return{setAutocomplete:function(E,S){var n=AI.DOM.getById(E);S=S=='on'||S===true?'on':'off';try{n.setAttribute('autocomplete',S);}catch(x){}n.autocomplete=S;},safeFocus:function(E){var n=AI.DOM.getById(E);if(n&&AI.features.isMethod(n,'focus')){n.focus();}},safeSelect:function(E){var n=AI.DOM.getById(E);if(n&&AI.features.isMethod(n,'select')){n.select();}},noSelection:function(E,C){var n=AI.DOM.getById(E);if(n){n.onselectstart=function(){return false;};n.unselectable='on';n.style.MozUserSelect='none';n.style.cursor=C||'default';}},checkedRadio:function(F,N){var i,m,f=AI.DOM.getById(F);if(f&&(f=f.elements)){for(i=0,m=f.length;i<m;i++){if(f[i].name==N&&f[i].checked===true){return f[i].value;}}}return '';},getValue:function(E){var n,f,i,m,e=AI.DOM.getById(E);if(e&&e.nodeName){n=e.nodeName.toUpperCase();if(n=="INPUT"){if(e.type=="text"||e.type=="hidden"){return e.value;}else if(e.type=="checkbox"){if(e.checked){return e.value;}}else if(e.type=="radio"){if(e.checked){return e.value;}else{if((f=e.form)&&(f=f.elements)){for(i=0,m=f.length;i<m;i++){if(f[i].type=="radio"&&f[i].name==e.name&&f[i].checked===true){return f[i].value;}}}}return null;}}else if(n=="SELECT"){return AI.HTML.select.value(e);}else if(n=="TEXTAREA"){return e.value;}AI.console.error("AI.HTML.getValue()type élément non géré:"+e.nodeName+"/"+n+'/'+e.name+'/'+e.id);}return null;},select:{vider:function(E){var i,n=AI.DOM.getById(E);if(n&&n.nodeName==='SELECT'&&(n=n.options)){n.selectedIndex=-1;for(i=n.length;i--;){n[i]=null;}n.length=0;}},remplir:function(E,O,S){var n=AI.DOM.getById(E);if(!n||n.nodeName!=='SELECT'){return null;}AI.HTML.select.vider(n);AI.utils.forOwn(O,function(o,k,v,i){this.options[this.options.length]=new Option(v,k);if(typeof S=='string'&&k==S){S=i;}},n);if(S){n.selectedIndex=S;}return n;},value:function(E){return sel(E,'value');},text:function(E){return sel(E,'text');},getIndexByValue:function(E,V){return sGIB(E,V,'value');},getIndexByText:function(E,T){return sGIB(E,T,'text');},setIndexByValue:function(E,V){sSIB(E,V,'value');},setIndexByText:function(E,T){sSIB(E,T,'text');}}};}();var selectedValue=AI.HTML.select.value;
AI.console=AI.getSimilarParentObject('console')||{actif:true,created:false,dragX:0,dragY:0,eltLog:null,eltLabel:null,eltContainer:null,mousemove:function(E){var C=AI.console,c=C.eltContainer,e=AI.EVT.fix(E);if(c){c.style.top=(AI.EVT.getY(e)+C.dragY)+'px';c.style.left=(AI.EVT.getX(e)+C.dragX)+'px';}},mouseup:function(E){var d=AI.DOM.getDocumentElement(),C=AI.console;AI.EVT.remove(d,"mousemove",C.mousemove);AI.EVT.remove(d,"mouseup",C.mouseup);},mousedown:function(E){var e=AI.EVT.fix(E),d=AI.DOM.getDocumentElement(),C=AI.console,p=AI.DOM.position.get(C.eltContainer);C.dragX=p.left-AI.EVT.getX(e);C.dragY=p.top-AI.EVT.getY(e);AI.EVT.add(d,"mousemove",AI.console.mousemove);AI.EVT.add(d,"mouseup",AI.console.mouseup);return AI.EVT.preventDefault(e);},insertContainer:function(){var cE=AI.DOM.createElement,C=AI.console;if(!C.created){AI.DOM.CSS.loadLink('/js/ai/css/console.css','console');C.eltLog=cE('UL',{id:'console_main'});C.eltLabel=cE('H1',{noselection:'pointer',title:"Cliquez pour activer/désactiver les rapports d'erreurs dans la console",onmousedown:C.mousedown,childs:[AI.dCTN('Console activée')]});C.eltContainer=cE('DIV',{id:'console_container',className:'cacher',childs:[cE('DIV',{id:'console_boutons',childs:[cE('SPAN',{className:'actif',noselection:'pointer',title:'Activer/Désactiver',onclick:function(){var C=AI.console;C.setActif(!C.actif);AI.DOM.CSS[C.actif?"remove":"add"]("inactif",this);return false;}}),cE('SPAN',{className:'fermer',noselection:'pointer',title:'Fermer',onclick:function(){AI.console.hide();return false;}}),cE('SPAN',{className:'vider',noselection:'pointer',title:'Vider',onclick:function(){AI.console.vider();return false;}}),C.eltLabel]}),C.eltLog]});document.body.appendChild(C.eltContainer);C.created=true;}},message:function(M,T){var i,li,m,tmp=(''+T).split(AI.consts.TEXT_BR),cE=AI.DOM.createElement;if(this.actif&&T){this.insertContainer();li=cE('LI',{className:'console-'+M});for(i=0,m=tmp.length;i<m;i++){if(i>0){li.appendChild(cE('BR'));}li.appendChild(AI.dCTN(tmp[i]));}AI.DOM.insertFirst(li,this.eltLog);if(M!='info'){AI.DOM.show(this.eltContainer);}}return this;},error:function(T){return AI.console.message('error',T);},warning:function(T){return AI.console.message('warning',T);},info:function(T){return AI.console.message('info',T);},setActif:function(S){AI.console.actif=S;AI.console.eltLabel.innerHTML=S?'Console activée':'Console désactivée';return AI.console;},vider:function(){AI.DOM.flush(AI.console.eltLog);return AI.console;},hide:function(){AI.DOM.hide(AI.console.eltContainer);return AI.console;},show:function(){AI.DOM.show(AI.console.eltContainer);return AI.console;},toggle:function(){AI.DOM.toggle(AI.console.eltContainer);return AI.console;},explore:function(obj,txt,autoInsert){var cE=AI.DOM.createElement,ul=cE('UL'),title=cE('DIV',{innerHTML:txt||obj});this.insertContainer();AI.utils.forOwn(obj,function(o,k,v){var type=typeof v,val=v,cE=AI.DOM.createElement,li=cE('LI');li.appendChild(cE('SPAN',{title:k,innerHTML:k}));li.appendChild(cE('DIV',{innerHTML:val}));if(v===null){type='null';}if(v&&v.nodeType&&v.nodeType==document.ELEMENT_NODE){type='node';}li.className='console-'+type;if(type=='object'||type=='node'){li.firstChild.style.cursor='pointer';li.firstChild.onclick=function(e){var li=this.parentNode;if(AI.DOM.isNode(li.lastChild,'UL')){li.removeChild(li.lastChild);}else{li.appendChild(AI.console.explore(v,k,false));}return false;};}ul.appendChild(li);});if(autoInsert===false){return ul;}AI.DOM.insertFirst(cE('LI',{className:'console-explore',childs:[title,ul]}),this.eltLog);return this.show();}};(function(){var i,t=['assert','exploreNode','fermer','html','selectorToText'];for(i=t.length;i--;){AI.console[t[i]]=(function(method){return function(elt){AI.console.warning('DEPRECATED AI.console.'+method+'()');return AI.console;};})(t[i]);}}());
AI.msgBox=function(){var original,container,all={},uid=0;function message(T,M,K,H,D){var toid,ms,e,i,tmp,a=new AI.ANIMATION();function closeMe(){return AI.msgBox.efface(K);}K=K&&''!==K?K:'msgBox'+(uid++);if(!container){window.setTimeout(function(){message(T,M,K,H,D);},500);return AI.msgBox;}if(all[K]){AI.msgBox.efface(K,true);}e=AI.DOM.createElement('DIV',{className:'msgBox-boite msgBox-'+T,childs:[AI.DOM.createElement('SPAN',{className:'msgBox-close',onclick:closeMe})]});if(H){e.appendChild(AI.DOM.createElement('DIV',{innerHTML:M}));}else{tmp=M.split(AI.consts.TEXT_BR);for(i=0;i<tmp.length;i++){if(i>0){e.appendChild(AI.DOM.createElement('BR'));}e.appendChild(AI.dCTN(tmp[i]));}}AI.DOM.insertFirst(e,container);switch(T){case 'error':ms=60000;break;case 'process':ms=-1;break;case 'warning':ms=4000;break;default:ms=D?D:1500;break;}if(ms>0){toid=window.setTimeout(closeMe,ms);}all[K]=[e,toid,a];return AI.msgBox;}function layout(){if(document.body){container=container?container:AI.DOM.createElement('DIV',{className:'msgBox'});original=document.body;original.appendChild(container);}else{window.setTimeout(layout,50);}}layout();return{efface:function(K,I,N){var e,toid,a,t=AI.ANIMATION.numericalTransition;function oncomplete(){if(e&&e.parentNode){e.parentNode.removeChild(e);}if(K in all){delete all[K];}}if(!(K in all)){return AI.msgBox;}if(!container){window.setTimeout(function(){AI.msgBox.efface(K,I,N);},1000);return AI.msgBox;}e=all[K][0];toid=all[K][1];a=all[K][2];if(a){a.stop();}if(toid){window.clearTimeout(toid);}if(e.firstChild){e.firstChild.onclick=null;e.removeChild(e.firstChild);}if(I===true){oncomplete();}else{a=a.setOnComplete(oncomplete).addSubject(new t(e,'opacity',1,0)).addSubject(new t(e,'width',e.offsetWidth,1)).addSubject(new t(e,'height',e.offsetHeight,1));e.style.overflow='hidden';a.play();}return AI.msgBox;},effaceAll:function(){AI.utils.forOwn(all,function(o,k){AI.msgBox.efface(k,true);});return AI.msgBox;},info:function(M,K,H,D){return message('info',M,K,H,D);},warning:function(M,K,H,D){return message('warning',M,K,H,D);},error:function(M,K,H,D){return message('error',M,K,H,D);},process:function(M,K,H,D){return message('process',M,K,H,D);},resetParentContainer:function(){if(original){if(container.parentNode){container.parentNode.removeChild(container);}container=original.ownerDocument.importNode(container,false);original.appendChild(container);}else{layout();}return AI.msgBox;},setParentContainer:function(E){var n=AI.DOM.getById(E);if(n&&container){AI.msgBox.effaceAll();if(container.parentNode){container.parentNode.removeChild(container);}container=n.ownerDocument.importNode(container,true);n.appendChild(container);}else{AI.msgBox.resetParentContainer();}return AI.msgBox;}};}();AI.msgBox.setPos=function(t,l){AI.console.error('DEPRECATED AI.msgBox.setPos()');};
AI.EVT={X:0,Y:0,listeners:[],stopLoad:false,onload:[],onunload:[],unloadActif:false,fix:function(E){return E||window.event;},add:function(I,T,L,C,A){var r=true,i,m,e,w;if(I instanceof Array){for(i=0,m=I.length;i<m;i++){r=r&&this.add(I[i],T,L,C,A);}return r;}if(T instanceof Array){for(i=0,m=T.length;i<m;i++){r=r&&this.add(I,T[i],L,C,A);}return r;}e=AI.DOM.getById(I);if(!e){return false;}C=C?C:e;w=(function(l,c,a){return function(z){return l.call(c,AI.EVT.fix(z),a);};})(L,C,A);this.bind(e,T,w);this.listeners.push([e,T,L,w,C,A]);return true;},remove:function(I,T,L,C){var e,i,m,l=null,r=true;if(AI.utils.isValidArray(T)){for(i=0,m=T.length;i<m;i++){r=this.remove(I,T[i],L,C)&&r;}return r;}e=AI.DOM.getById(I);if(!e){return false;}C=C?C:e;i=this.getListenerIndex(e,T,L,C);if(i>=0){l=this.listeners[i];}if(!l){return false;}this.unbind(e,T,l[3]);delete this.listeners[i];return true;},stop:function(E){this.stopPropagation(E);this.preventDefault(E);return false;},getListenerIndex:function(E,T,L,C){var i,m,l;C=C?C:E;for(i=0,m=this.listeners.length;i<m;i++){l=this.listeners[i];if(l&&l[0]==E&&l[1]==T&&l[2]==L&&l[4]==C){return i;}}return-1;},getTarget:function(E){var isP=AI.features.isProperty,f=function(){return null;};if(E&&isP(E,'target')){f=function(e){var t=e&&e.target?e.target:null;return t&&t.nodeType==3?t.parentNode:t;};}else if(isP(window,"event")&&isP(window.event,'srcElement')){f=function(){var e=window.event,t=e&&e.srcElement?e.srcElement:null;return t&&t.nodeType==3?t.parentNode:t;};}return(this.getTarget=f)(E);},getParentTarget:function(E,N,C){return AI.DOM.parent(this.getTarget(E),N,C);},getRelatedTarget:function(E){var e=this.fix(E),t=e.relatedTarget;if(!t){if(e.type=="mouseout"){t=e.toElement;}else if(e.type=="mouseover"){t=e.fromElement;}}return t&&t.nodeType==3?t.parentNode:t;},getX:function(E){var e=this.fix(E),x=e.pageX;if(!x&&0!==x){x=(e.clientX||0)+this.getScroll('Left');}this.X=x;return x;},getY:function(E){var e=this.fix(E),y=e.pageY;if(!y&&0!==y){y=(e.clientY||0)+this.getScroll('Top');}this.Y=y;return y;},getScroll:function(S){var d=AI.DOM.getDocumentElement(document);if(typeof d['scroll'+S]!='undefined'){return d['scroll'+S];}return 0;},getKeyboardKey:function(E){var e=AI.EVT.fix(E);return e.type=='keypress'?e.charCode||e.keyCode||e.which:e.which||e.keyCode;},DOMLoaded:function(){var i,m,t,L=AI.EVT.onload;if(AI.EVT.DOMLoaded.OK){return true;}AI.EVT.keys.listen();AI.EVT.remove(document,'DOMContentLoaded',AI.EVT.DOMLoaded);AI.EVT.DOMLoaded.OK=true;for(i=0,m=L.length;i<m;i++){if(!AI.EVT.stopLoad){try{L[i]();}catch(x){t='Erreur lors du chargement'+"\n"+x;if(AI&&AI.console){AI.console.error(t);}else{throw new Error(t);}}}}return true;},onUnLoadDEPRECATED:function(){var L,i;AI.EVT.remove(window,'unload',AI.EVT.onUnLoad);L=AI.EVT.onunload;for(i=0;i<L.length;i++){try{L[i]();}catch(x){}}if(AI.EVT.listeners&&AI.EVT.listeners.length>0){for(i=0;i<AI.EVT.listeners.length;i++){L=AI.EVT.listeners[i];if(L){AI.EVT.remove(L[0],L[1],L[2],L[4]);}}}},loader:function(F){if(this.DOMLoaded.OK){if(!AI.EVT.stopLoad){F();}}else{this.onload.push(F);}},unloaderDEPRECATED:function(F){if(AI.EVT.unloadActif){AI.EVT.add(window,'unload',AI.EVT.onUnLoad);}AI.EVT.unloadActif=true;AI.EVT.onunload.push(F);},bind:function(E,T,L){var isM=AI.features.isMethod,f=function(){};if(isM(E,'addEventListener')){f=function(e,t,l){e.addEventListener(t,l,false);};}else if(isM(E,'attachEvent')){f=function(e,t,l){e.attachEvent('on'+t,l);};}return(this.bind=f)(E,T,L);},unbind:function(E,T,L){var isM=AI.features.isMethod,f=function(){};if(isM(E,'removeEventListener')){f=function(e,t,l){e.removeEventListener(t,l,false);};}else if(isM(E,'detachEvent')){f=function(e,t,l){e.detachEvent('on'+t,l);};}return(this.unbind=f)(E,T,L);},preventDefault:function(E){var f=function(){return false;};if(AI.features.isMethod(E,'preventDefault')){f=function(e){e.preventDefault();return false;};}else if(window.event&&'returnValue' in window.event){f=function(){window.event.returnValue=false;return false;};}return(this.preventDefault=f)(E);},stopPropagation:function(E){var f=function(){return false;};if(E&&AI.features.isMethod(E,'stopPropagation')){f=function(e){e.stopPropagation();return false;};}else if(window.event&&'cancelBubble' in window.event){f=function(){window.event.cancelBubble=true;return false;};}return(this.stopPropagation=f)(E);},CUSTOM:{listeners:{},add:function(N,T,F,C){var o=AI.EVT.CUSTOM,n=AI.DOM.getById(N),ctx=C||n;if(!(T in o.listeners)){o.listeners[T]=[];}o.listeners[T].push({node:n,fn:F,ctx:ctx});},remove:function(N,T,F,C){var o=AI.EVT.CUSTOM,n=AI.DOM.getById(N),ctx=C||n;if(!(T in o.listeners)){o.listeners[T]=[];}o.listeners[T]=o.listeners[T].filter(function(listener){return listener.node!==n&&listener.fn!=F&&listener.ctx!=ctx;});},fire:function(N,T,A,D,C){var i,fn,el,ctx,evt={},o=AI.EVT.CUSTOM,node=AI.DOM.getById(N);AI.utils.forOwn(A,function(o,k,v){this[k]=v;},evt);evt.type=T;evt.target=node;evt.preventDefault=function(){D=null;};if(T in o.listeners){for(i=0;i<o.listeners[T].length;i++){el=o.listeners[T][i].node;if(el===node){fn=o.listeners[T][i].fn;ctx=o.listeners[T][i].ctx;fn.call(ctx,evt);}}}if(typeof D=='function'){D.call(C||node,evt);}}},buttons:{left:0,right:2,middle:1},getWheelDelta:function(E){return-(E.detail||0);},addWheel:function(E,F,C,A){return this.add(E,"DOMMouseScroll",F,C,A);},removeWheel:function(E,F){return AI.EVT.remove(E,"DOMMouseScroll",F);}};if(document.attachEvent){AI.EVT=AI.utils.injectObject(AI.EVT,{getWheelDelta:function(e){return e.wheelDelta?e.wheelDelta/40:0;},addWheel:function(E,F,C,A){AI.EVT.add(E,'mousewheel',F,C,A);},removeWheel:function(E,F){return AI.EVT.remove(E,"mousewheel",F);},buttons:{left:1,right:2,middle:4}});}AI.EVT.add(document,'DOMContentLoaded',AI.EVT.DOMLoaded);window.onload=AI.EVT.DOMLoaded;AI.EVT.mouseEnter=function(E,L,C,A){function W(e,d){var r=AI.EVT.getRelatedTarget(e);if(this!==r&&!AI.utils.isAChildOf(this,r)){d[0].call(d[1],e,d[2]);}return false;}AI.EVT.add(E,'mouseover',W,E,[L,C,A]);return W;};AI.EVT.mouseLeave=function(E,L,C,A){function W(e,d){var r=AI.EVT.getRelatedTarget(e);if(this!==r&&!AI.utils.isAChildOf(this,r)){d[0].call(d[1],e,d[2]);}return false;}AI.EVT.add(E,'mouseout',W,E,[L,C,A]);return W;};AI.utils.isAChildOf=function(P,C){if(P===C){return false;}while(C&&C!==P){C=C.parentNode;}return C===P;};var EVT=AI.EVT;AI.EVT.touches={esc:27,enter:13,tab:9,space:32,up:38,down:40,left:37,right:39,shift:16,ctrl:17,alt:18,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,del:46,backspace:8,insert:45,home:36,end:35,pageup:33,pagedown:34,numlock:144,numpad_0:96,numpad_1:97,numpad_2:98,numpad_3:99,numpad_4:100,numpad_5:101,numpad_6:102,numpad_7:103,numpad_8:104,numpad_9:105,numpad_divide:111,numpad_multiply:106,numpad_minus:109,numpad_plus:107,_0:48,_1:49,_2:50,_3:51,_4:52,_5:53,_6:54,_7:55,_8:56,_9:57};AI.EVT.getCharCode=function(E){AI.console.error('AI.EVT.getCharCode(E)est DEPRECATED,lui préférer AI.EVT.getKeyboardKey(E)');return AI.EVT.getKeyboardKey(E);};AI.EVT.onUnLoad=AI.EVT.onUnLoadDEPRECATED;AI.EVT.unloader=AI.EVT.unloaderDEPRECATED;AI.EVT.stopEvent=AI.EVT.stop;AI.EVT.addEvent=AI.EVT.add;AI.EVT.removeEvent=AI.EVT.remove;AI.EVT.addEventMouseWheel=AI.EVT.addWheel;AI.EVT.getPageX=AI.EVT.getX;AI.EVT.getPageY=AI.EVT.getY;
AI.EVT.keys={CTRL:false,SHIFT:false,ALT:false,toid:null,toidStop:function(){var K=AI.EVT.keys;K.CTRL=false;K.SHIFT=false;K.ALT=false;if(K.toid){K.toid=window.clearTimeout(K.toid);}},toidStart:function(){this.toidStop();this.toid=window.setTimeout(this.toidStop,500);},keydown:function(E){var e=AI.EVT.fix(E);this.toidStart();this.CTRL=!!e.ctrlKey;this.SHIFT=!!e.shiftKey;this.ALT=!!e.altKey;if(parent&&parent!=self&&parent.AI){parent.AI.EVT.keys.keydown(e);}return true;},keyup:function(){this.toidStop();if(parent&&parent!=self&&parent.AI){parent.AI.EVT.keys.keyup();}return true;},listen:function(){var d=AI.DOM.getDocumentElement();AI.EVT.add(d,'keydown',this.keydown,this);AI.EVT.add(d,'keyup',this.keyup,this);},stop:function(){var d=AI.DOM.getDocumentElement();AI.EVT.remove(d,'keydown',this.keydown,this);AI.EVT.remove(d,'keyup',this.keyup,this);}};
AI.XHR=AI.getSimilarParentObject('XHR')||function(){var defaultHandlers={},requetes=[],totalRequetes=0,esc=function(S){var f,isM=AI.features.isMethod;if(isM(window,'encodeURIComponent')){f=function(s){return window.encodeURIComponent(s);};}else if(isM(window,'escape')){f=function(s){return window.escape(s);};}else{f=function(s){return s;};}return(esc=f)(S);},createRequete=function(){var f,isM=AI.features.isMethod;if(isM(window,'XMLHttpRequest')){f=function(){return new window.XMLHttpRequest();};}else if(isM(window,'createRequest')){f=function(){return window.createRequest();};}else if(isM(window,'ActiveXObject')){f=function(){var r=null;try{r=new window.ActiveXObject("Microsoft.XMLHTTP");}catch(e){}return r;};}else{if(AI&&AI.console){AI.console.stop('Pas de support XMLHttpRequest');}f=function(){return null;};}return(createRequete=f)();};function callDef(T,C,F,a1,a2,a3){var i,m,dH=defaultHandlers;if(typeof dH[T]!='undefined'&&dH[T].length>0){for(i=0,m=dH[T].length;i<m;i++){dH[T][i].call(C,a1,a2,a3);}}if(typeof F==='function'){F.call(C,a1,a2,a3);}}function dispose(R){var i,r;if(R){requetes.remove(R);R.onreadystatechange=function(){};if(typeof R.abort==='function'){try{R.abort();}catch(e){}}callDef('dispose',this);for(i=requetes.length;i--;){r=requetes[i];if(r.parsed&&r.readyState==4){requetes.remove(r);}}}R=null;return null;}function send(params){var rConf=function(params,key,defaut){return typeof params[key]=='undefined'?defaut:params[key];},url=rConf(params,'url',''),methode=rConf(params,'methode','').toUpperCase()=='POST'?'POST':'GET',charset=rConf(params,'charset','UTF-8'),datas=rConf(params,'datas',{}),scope=rConf(params,'scope',this),context=rConf(params,'context',scope),arbitrary=rConf(params,'arbitrary',null),_oninit=rConf(params,'oninit',function(){}),_onload=rConf(params,'onload',function(){}),_onerror=rConf(params,'onerror',function(){}),_onprogress=rConf(params,'onprogress',function(){}),_onfinish=rConf(params,'onfinish',function(){}),waitForResponse='onload' in params||'onerror' in params||'onfinish' in params,req=createRequete(),content=null,queryString=[];if(typeof params.scope!='undefined'){AI.console.error('AI.XHR.send("scope")est DEPRECATED,utiliser "context"');}if(typeof params.unique!='undefined'){AI.console.error('AI.XHR.send("unique")est inutile,à supprimer');}if(typeof url!='string'||''===url){return AI.console.stop("L'url de l'appel XHR est requise");}if(!req){return AI.console.stop("Impossible de créer l'objet XMLHttpRequest. Pas de gestion XHR");}totalRequetes++;requetes.push(req);if('GET'==methode){datas.uidAIXHR=''+(new Date().getTime())+totalRequetes;}AI.utils.forOwn(datas,function(o,k,v){queryString.push(esc(k)+'='+esc(v));});queryString=queryString.join('&');if('GET'==methode&&queryString!==''){url+=((url.indexOf('?')>-1)?'&':'?')+queryString;}req.open(methode,url,true);req.setRequestHeader('User-Agent','XMLHTTP/1.0');if('POST'==methode){req.setRequestHeader('Content-Type','application/x-www-form-urlencoded;charset='+charset);content=queryString;}req.onreadystatechange=function(){var status=0;if(req){callDef('progress',context,_onprogress,req,arbitrary);if(req.readyState==4){try{status=req.status;}catch(e){}if(status==200){callDef('load',context,_onload,req,arbitrary);}else{callDef('error',context,_onerror,req,arbitrary);}callDef('finish',context,_onfinish,req,arbitrary);req=dispose(req);}}};callDef('init',context,_oninit,waitForResponse,url,queryString);req.send(content);return req;}AI.EVT.unloader(function(){for(var i=requetes.length;i--;){requetes[i]=dispose(requetes[i]);}requetes=null;});return{send:send,dispose:dispose,parseJSONFallback:function(D){var r=null;try{eval("r="+D);}catch(e){}return r;},parseJSON:function(D){var f=AI.features;if(f.isProperty(window,"JSON")&&f.isMethod(window.JSON,'parse')){AI.XHR.parseJSON=function(d){try{return window.JSON.parse(d);}catch(e){}return AI.XHR.parseJSONFallback(d);};}else{AI.XHR.parseJSON=AI.XHR.parseJSONFallback;}return AI.XHR.parseJSON(D);},parse:function(R){var d=(typeof R=='string'?R:R.responseText)||'';R.parsed=true;return AI.XHR.parseJSON(d);},setDefaultHandler:function(T,C){if(typeof defaultHandlers[T]=='undefined'){defaultHandlers[T]=[];}defaultHandlers[T].push(C);},getRequetes:function(){return requetes;},getTotalRequetes:function(){return totalRequetes;}};}();AI.AJAX=AI.XHR;
AI.ANIMATION=function(opt){var subjects=[],target=0,state=0,intervalId=null,step=opt&&opt.step?opt.step:10,duration=opt&&opt.duration?opt.duration:400,transition=opt&&opt.transition?opt.transition:AI.ANIMATION.tx.easeInOut,onComplete=opt&&opt.onComplete?opt.onComplete:function(){},onStart=opt&&opt.onStart?opt.onStart:function(){},onStep=opt&&opt.onStep?opt.onStep:function(){},scope=opt&&opt.scope?opt.scope:this,linked=opt&&opt.linked?opt.linked:null,starting=false,interval=duration/step;function propagate(){var i,value=transition(state);for(i=0;i<subjects.length;i++){if(subjects[i].setState){subjects[i].setState(value);}else{subjects[i](value);}}return this;}function onTimerEvent(){var movement=(interval/duration)*(state<target?1:-1);if(starting===true){onStart.call(this,state,linked);starting=false;}if(Math.abs(movement)>=Math.abs(state-target)){state=target;}else{state+=movement;}propagate();onStep.call(scope,state,linked);if(target==state){clearInterval(intervalId);intervalId=null;onComplete.call(scope,target,linked);}}this.seekTo=function(dest){return this.seekFromTo(state,dest);};this.seekFromTo=function(from,dest){starting=true;target=Math.max(0,Math.min(1,dest));state=Math.max(0,Math.min(1,from));if(!intervalId){intervalId=setInterval(onTimerEvent,interval);}return this;};this.jumpTo=function(dest){target=state=Math.max(0,Math.min(1,dest));starting=true;onTimerEvent();return this;};this.toggle=function(){this.seekTo(1-target);return this;};this.addSubject=function(subject){subjects.push(subject);return this;};this.removeSubject=function(subject){subjects.remove(subject);return this;};this.clearSubjects=function(){subjects=[];return this;};this.play=function(){return this.seekFromTo(0,1);};this.stop=function(){target=state=1;onTimerEvent();return this;};this.reverse=function(){return this.seekFromTo(1,0);};this.setInterval=function(I){interval=I;return this;};this.setDuration=function(D){duration=D;return this;};this.setTransition=function(T){transition=T;return this;};this.setOnComplete=function(O){onComplete=O;return this;};this.setScope=function(S){scope=S;return this;};return this;};AI.ANIMATION.makeEaseIn=function(a){return function(state){return Math.pow(state,a*2);};};AI.ANIMATION.makeEaseOut=function(a){return function(state){return 1-Math.pow(1-state,a*2);};};AI.ANIMATION.tx={easeInOut:function(pos){return((-Math.cos(pos*Math.PI)/2)+0.5);},linear:function(x){return x;},easeIn:AI.ANIMATION.makeEaseIn(1.5),easeOut:AI.ANIMATION.makeEaseOut(1.5)};AI.ANIMATION.numericalTransition=function(E,P,F,T,U){var els=AI.utils.forceArray(E),property=P=='opacity'&&AI.BROWSER.IE?'filter':P,from=parseFloat(F),dest=parseFloat(T),units=U||'px';function getStyle(state){state=from+((dest-from)*state);if(property=='filter'){return "alpha(opacity="+Math.round(state*100)+")";}if(property=='opacity'){return state;}return Math.round(state)+units;}this.setState=function(state){var i,style=getStyle(state);for(i=0;i<els.length;i++){els[i].style[property]=style;}};return this;};AI.ANIMATION.widgetNumericalTransition=function(W,prop,T){var els=AI.utils.forceArray(W),from=parseFloat(W['get'+prop]()),dest=parseFloat(T);function getStyle(state){state=Math.round(from+((dest-from)*state));return Math.round(state);}this.setState=function(state){var i,style=getStyle(state);for(i=0;i<els.length;i++){els[i]['set'+prop](style);}};return this;};AI.ANIMATION.colorTransition=function(E,P,F,T){var els=AI.utils.forceArray(E),property=P=='opacity'&&AI.BROWSER.IE?'filter':P,from,dest;function expandColor(color){var hexColor,R,G,B;hexColor=AI.ANIMATION.parseColor(color);if(hexColor){R=parseInt(hexColor.slice(1,3),16);G=parseInt(hexColor.slice(3,5),16);B=parseInt(hexColor.slice(5,7),16);return[R,G,B];}return[255,255,255];}from=expandColor(F);dest=expandColor(T);function getStyle(color,state){return AI.ANIMATION.toColorPart(Math.round(from[color]+((dest[color]-from[color])*state)));}this.setState=function(state){var i,color='#'+getStyle(0,state)+getStyle(1,state)+getStyle(2,state);for(i=0;i<els.length;i++){els[i].style[property]=color;}};return this;};AI.ANIMATION.toColorPart=function(str){var digits=str.toString(16);if(str<16){return '0'+digits;}return digits;};AI.ANIMATION.parseColor=function(string){var color='#',match=AI.ANIMATION.rgbRe.exec(string),i;if(match){for(i=1;i<=3;i++){color+=AI.ANIMATION.toColorPart(Math.max(0,Math.min(255,intval(match[i]))));}return color;}match=AI.ANIMATION.hexRe.exec(string);if(match){if(match[1].length==3){for(i=0;i<3;i++){color+=match[1].charAt(i)+match[1].charAt(i);}return color;}return '#'+match[1];}return false;};AI.ANIMATION.rgbRe=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i;AI.ANIMATION.hexRe=/^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;AI.ANIMATION.highlightUID=0;AI.ANIMATION.highlightRunning={};AI.ANIMATION.highlight=function(E,O){var o,t,e=AI.DOM.getById(E),f=O&&'color' in O?O.color:'#FFFF80',h=AI.ANIMATION.highlightRunning;function get(e){var d,n=e;do{d=AI.DOM.getStyle(n,'backgroundColor');if(d&&(d!='transparent'&&d!='inherit')){return d;}n=n.parentNode;}while(n&&n.nodeName!='HTML');return d;}if(!e.id){e.id='AIhighlight'+(AI.ANIMATION.highlightUID++);}if(e.id in h){h[e.id].stop();}o=AI.DOM.getStyle(e,'backgroundColor');t=get(e);AI.ANIMATION.highlightRunning[e.id]=new AI.ANIMATION({duration:O&&'duration' in O?O.duration:1000,onComplete:(function(E,O){return function(){E.style.backgroundColor=O&&O!='transparent'&&O!='inherit'?O:'';delete AI.ANIMATION.highlightRunning[E.id];};})(e,o)}).addSubject(new AI.ANIMATION.colorTransition(e,'backgroundColor',f,t)).play();};var Animation=AI.ANIMATION;