var AI={startingTime:new Date().valueOf(),BASEPATH:'/js/ai/',GLOBALS:{},i18n:{},l10n:function(k){if(typeof AI.i18n[k]=='string'){return AI.i18n[k];}return k;},title:function(){var def;function get(){return document.title;}def=get();return{get:get,set:function(t){if(typeof t=='string'&&t!='undefined'){document.title=t;}},reset:function(){AI.title.set(def);}};}(),alertOn:true,alert:function(txt){if(AI.alertOn){AI.alertOn=window.confirm(txt);}},setAlert:function(state){AI.alertOn=state;},require:function(url,cb,context,obj){var src=url.charAt(0)==="/"||url.substr(0,5)=="http:"||url.substr(0,6)=="https:"?url:AI.BASEPATH+url,listener=IS.IE?"onreadystatechange":"onload",elt=AI.DOM.createElement("script",{type:"text/javascript",src:src});if(cb){elt[listener]=function(){if(IS.IE&&!/loaded|complete/.test(window.event.srcElement.readyState)){return;}cb.call(context?context:this,obj);this[listener]=null;};}AI.DOM.getByTag('head').appendChild(elt);},getSimilarParentObject:function(obj){var i,context,all=['top','parent','opener'],hostname=window.location.hostname;for(i=0;i<all.length;i++){context=window[all[i]];try{if(context&&context!==self&&typeof context!=='undefined'&&context!==null&&context.location&&context.location.hostname===hostname&&context.AI&&typeof context.AI[obj]!=='undefined'){return context.AI[obj];}}catch(x){}}return false;},isWindowed:function(){return typeof top.isMainWidget!=='undefined'&&top.isMainWidget;}};var alerter=AI.alert;AI.isInsideFenetre=AI.isWindowed;AI.DEPRECATED=function(f){if(AI.console){AI.console.warning('DEPRECATED:'+f);}};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.utils={returnTrue:function(){return true;},returnFalse:function(){return false;},isObjectEmpty:function(o){for(var k in o){if(o.hasOwnProperty(k)){return false;}}return true;},getObjectLength:function(o){var r=0;AI.utils.forOwn(o,function(){r++;});return r;},isEmail:function(M){return!M.search(/^[\w\-][\w\-\.]+@[\w\-]+\.[a-zA-Z]{2,6}$/);},isValid:function(v){var T=typeof v;if(T=='string'){return v!=='';}else if(T=='number'){return!isNaN(v);}else if(T=='boolean'||T=='function'){return true;}else if(T=='object'){return v!==null;}return false;},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;},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:'')+(new Date().valueOf());},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=AI.utils['return'+(R?'True':'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;}},encoder:function(C,U){var f=encodeURIComponent;if(typeof f=='function'){return U?encodeURI(C):f(C);}return escape(C);},decoder:function(C){var f=decodeURIComponent;return typeof f=='function'?f(C):unescape(C);},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 String(v).replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<");},forceArray:function(){var i,j,E,R=[];for(i=0;i<arguments.length;i++){E=arguments[i];if(E){if(E.length&&E.length>0){for(j=0;j<E.length;j++){R.push(E[j]);}}else{R.push(E);}}}return R;},forOwn:function(obj,callback,context){var k,i=0;AI.utils.forOwnStopped=false;for(k in obj){if(AI.utils.forOwnStopped){break;}if(k&&obj.hasOwnProperty(k)){callback.call(context||obj,obj,k,obj[k],i++);}}}};var defined=AI.utils.defined;
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 D=document,i,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;i<T.length;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,CACHE_ELEMENTS:true};if(typeof AICONFIG!=='undefined'){AI.utils.forOwn(AICONFIG,function(o,k,v){this[k]=v;},O);}return O;}();
if(!Array.prototype.push){Array.prototype.push=function(){var m=this.length,i;for(i=0;i<arguments.length;i++){this[m+i]=arguments[i];}return this.length;};}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(o,from){if(!from){from=0;}else if(from<0){from=Math.max(0,this.length+from);}for(var i=from,m=this.length;i<m;i++){if(this[i]===o){return i;}}return-1;};}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(o,from){if(!from){from=this.length-1;}else if(from<0){from=Math.max(0,this.length+from);}for(var i=from;i>=0;i--){if(this[i]===o){return i;}}return-1;};}if(!Array.prototype.forEach){Array.prototype.forEach=function(f,o){var m=this.length,i;for(i=0;i<m;i++){f.call(o,this[i],i,this);}};}if(!Array.prototype.forEachObject){Array.prototype.forEachObject=function(f){var m=this.length,i;for(i=0;i<m;i++){f.call(this[i],this,i);}};}if(!Array.prototype.filter){Array.prototype.filter=function(f,o){var m=this.length,r=[],i;for(i=0;i<m;i++){if(f.call(o,this[i],i,this)){r.push(this[i]);}}return r;};}if(!Array.prototype.map){Array.prototype.map=function(f,o){var m=this.length,r=[],i;for(i=0;i<m;i++){r.push(f.call(o,this[i],i,this));}return r;};}if(!Array.prototype.some){Array.prototype.some=function(f,o){var m=this.length,i;for(i=0;i<m;i++){if(f.call(o,this[i],i,this)){return true;}}return false;};}if(!Array.prototype.every){Array.prototype.every=function(f,o){var m=this.length,i;for(i=0;i<m;i++){if(!f.call(o,this[i],i,this)){return false;}}return true;};}if(!Array.prototype.contains){Array.prototype.contains=function(obj){return this.indexOf(obj)!=-1;};}if(!Array.prototype.copy){Array.prototype.copy=function(obj){return this.concat();};}if(!Array.prototype.insertAt){Array.prototype.insertAt=function(o,i){this.splice(i,0,o);};}if(!Array.prototype.insertBefore){Array.prototype.insertBefore=function(o,o2){var i=this.indexOf(o2);if(i==-1){this.push(o);}else{this.splice(i,0,o);}};}if(!Array.prototype.insertAfter){Array.prototype.insertAfter=function(o,o2){var i=this.indexOf(o2);if(i==-1||i==(this.length-1)){this.push(o);}else{this.splice(i+1,0,o);}};}if(!Array.prototype.removeAt){Array.prototype.removeAt=function(i){return this.splice(i,1);};}if(!Array.prototype.remove){Array.prototype.remove=function(o){var i=this.indexOf(o);if(i!=-1){return this.splice(i,1);}return null;};}if(!Array.prototype.removeAll){Array.prototype.removeAll=function(){return this.splice(0,this.length);};}if(!Array.prototype.getLast){Array.prototype.getLast=function(){return this[this.length-1];};}if(!Array.prototype.getFirst){Array.prototype.getFirst=function(){return this[0];};}if(!Array.prototype.in_array){Array.prototype.in_array=function(item){return this.indexOf(item)!=-1;};}var forceArray=AI.utils.forceArray;
String.prototype.contains=function(s){return this.indexOf(s)!=-1;};String.prototype.toFirstUp=function(){return this.charAt(0).toUpperCase()+this.substr(1);};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};String.prototype.ltrim=function(){return this.replace(/^\s+/,"");};String.prototype.rtrim=function(){return this.replace(/\s+$/,"");};String.prototype.add=function(v,sep){var a;if(this==v){return this;}else if(this===''){return v;}else{if(!AI.utils.isValid(sep)){sep=",";}a=this.split(sep);}if(a.indexOf(v)!==-1){return this;}a.push(v);return a.join(sep);};String.prototype.remove=function(v,sep){var a,p;if(this==v||this===''){return '';}else{if(!AI.utils.isValid(sep)){sep=",";}a=this.split(sep);p=a.indexOf(v);if(p==-1){return this;}do{a.splice(p,1);}while((p=a.indexOf(v))!=-1);return a.join(sep);}};String.prototype.stripTags=function(){return this.replace(/<\/?[^>]+>/gi,"");};String.prototype.encodeRE=function(){return this.replace(/([.*+?\^${}()|\[\]\/\\])/g,'\\$1');};String.prototype.ellipse=function(maxi){if(this.length>maxi&&maxi>4){return this.substr(0,maxi-3)+'...';}return this;};String.camel={};String.hyphen={};String.toCamel=function(txt){var A,L,R;if(String.camel[txt]){return String.camel[txt];}A=txt.split("-");L=A.length;if(L==1){return A[0];}R=txt.indexOf("-")===0?A[0].charAt(0).toUpperCase()+A[0].substring(1):A[0];for(var p,i=1;i<L;i++){p=A[i];R+=p.charAt(0).toUpperCase()+p.substring(1);}String.camel[txt]=R;String.hyphen[R]=txt;return R;};String.toHyphen=function(txt){var i,R='';if(String.hyphen[txt]){return String.hyphen[txt];}for(i=0;i<txt.length;++i){if(txt.charAt(i)==txt.charAt(i).toUpperCase()){R=R+'-'+txt.charAt(i).toLowerCase();}else{R=R+txt.charAt(i);}}String.hyphen[txt]=R;String.camel[R]=txt;return R;};String.prototype.format=function(){var i,R=this.split('#');for(i=0;i<arguments.length;i++){R[i]=R[i]+arguments[i];}return R.join('');};String.prototype.trimLeft=function(){return this.replace(/^\s+/,"");};String.prototype.trimRight=function(){return this.replace(/\s+$/,"");};
Number.prototype.limit=function(vmin,vmax){if(vmax!==null&&typeof vmax=="number"&&this>vmax){return vmax;}else if(vmin!==null&&typeof vmin=="number"&&this<vmin){return vmin;}else{return+this;}};Number.prototype.inRange=function(vmin,vmax){return this>=vmin&&this<=vmax;};Number.prototype.betweenRange=function(vmin,vmax){return this>vmin&&this<vmax;};function intval(i){var R=parseInt(i,10)||0;R=isNaN(R)?0:R;return R;}AI.utils.toCurrency=function(S){var RgX=/^(.*\s)?([\-+\u00A3\u20AC]?\d+)(\d{3}\b)/;S=String(S);return S==(S=S.replace(RgX,"$1$2 $3"))?S:AI.utils.toCurrency(S);};function floatval(val,nb,currency){var R,F=parseFloat(val.toString().replace(',','.').replace(/\s/g,''))||0;nb=nb||2;R=F.toFixed(nb);if(currency===true){return AI.utils.toCurrency(R);}return Number(R);}
if(!Function.prototype.apply){Function.prototype.apply=function(scope,args){var i,r,a=[];scope=scope||window;args=args||[];for(i=0;i<args.length;i++){a[i]='args['+i+']';}scope.apply__=this;r=eval('scope.apply__('+a.join(',')+');');delete scope.apply__;return r;};}
AI.BROWSER=function(){var V,H,S,D=document,C=D.createElement('canvas'),W=window,N=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;}();var IS=AI.BROWSER;
AI.getElementDocument=function(el){var fn;if(el.ownerDocument){fn=function(e){return e.ownerDocument;};}else{fn=function(e){if(e.parentNode){while(e.parentNode){e=e.parentNode;}}return e.nodeType==9||(!e.nodeType&&!e.tagName)?e:null;};}AI.getElementDocument=fn;return fn(el);};AI.getDocumentWindow=function(doc){var fn=function(){return null;};if(doc.defaultView){fn=function(d){return d.defaultView;};}else if(doc.parentWindow){fn=function(d){return d.parentWindow;};}AI.getDocumentWindow=fn;return fn(doc);};AI.dCTN=function(t){return document.createTextNode(t);};AI.dCE=function(e){return document.createElement(e);};if(IS.IE){AI.dCE=function(e,n){return document.createElement(n?'<'+e+' name="'+n+'">':e);};}if(AI.config.CACHE_ELEMENTS===true){AI.dCECache={};AI.dCFCache=null;document.dCE=document.createElement;document.dCF=document.createDocumentFragment;document.createElement=function(nodeName){var e=nodeName.toLowerCase();if(!AI.dCECache[e]){AI.dCECache[e]=document.dCE(e);}return AI.dCECache[e].cloneNode(false);};document.createDocumentFragment=function(){if(!AI.dCFCache){AI.dCFCache=document.dCF();}return AI.dCFCache.cloneNode(false);};}if(window.Node&&Node.prototype&&!Node.prototype.contains){Node.prototype.contains=function(e){return!!(this.compareDocumentPosition(e)&16);};}var $dce=AI.dCE,$dct=AI.dCTN;
AI.DOM={getById:function(I,d){d=d||document;return typeof I=='string'?d.getElementById(I):I;},insertFirst:function(id,pere){var node=AI.DOM.getById(id),P=AI.DOM.getById(pere);if(node&&P){if(P.childNodes.length===0&&P.firstChild){return P.appendChild(node);}else{return P.insertBefore(node,P.firstChild);}}return null;},"moveBefore":function(source,cible){var S=AI.DOM.getById(source),C=AI.DOM.getById(cible),P;if(C&&S&&S.parentNode){P=S.parentNode;P.removeChild(S);return P.insertBefore(S,C);}return null;},"moveAfter":function(source,cible){var S=AI.DOM.getById(source),C=AI.DOM.getById(cible),P;if(S&&S.parentNode){P=S.parentNode;P.removeChild(S);return P.insertBefore(S,C?C.nextSibling:null);}return null;},"emptyTextNode":function(){return AI.dCTN('\u00a0');},"getInnerText":function(id){var node=AI.DOM.getById(id),R=[],i=0;if(!node){return '';}if(node.textContent){return node.textContent;}if(node.nodeType==document.TEXT_NODE){return node.data;}while(node.childNodes[i]){R.push(AI.DOM.getInnerText(node.childNodes[i]));i++;}return R.join('');},"flush":function(id,props){var node=AI.DOM.getById(id),i;if(!node){return null;}while(node.firstChild){if(props){for(i=props.length;i--;){node.firstChild[props]=null;}}node.removeChild(node.firstChild);}return node;},"flushQuick":function(id){var node=AI.DOM.getById(id),C;if(!node){return null;}C=node.cloneNode(false);node.parentNode.insertBefore(C,node);node.parentNode.removeChild(node);return node;},nodeChecker:function(node,css){return css&&node?function(e,n,c){return e&&e.nodeName&&e.nodeName.toUpperCase()==n&&AI.DOM.CSS.has(c,e);}:css?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(id,nodeName,cName){var sibling,check=AI.DOM.nodeChecker(nodeName,cName),node=AI.DOM.getById(id);if(node){nodeName=nodeName.toUpperCase();sibling=node.nextSibling;while(sibling){if(check(sibling,nodeName,cName)){return sibling;}sibling=sibling.nextSibling;}}return null;},precedent:function(id,nodeName,cName){var sibling,check=AI.DOM.nodeChecker(nodeName,cName),node=AI.DOM.getById(id);if(node){nodeName=nodeName.toUpperCase();sibling=node.previousSibling;while(sibling){if(check(sibling,nodeName,cName)){return sibling;}sibling=sibling.previousSibling;}}return null;},parent:function(id,nodeName,cName){var check=AI.DOM.nodeChecker(nodeName,cName),node=AI.DOM.getById(id);if(node){nodeName=nodeName.toUpperCase();while(node&&node.parentNode){if(check(node,nodeName,cName)){return node;}node=node.parentNode;}}return null;},"pix":function(){var p=0,i;for(i=arguments.length;i--;){p+=intval(arguments[i]);}return p+'px';},"hide":function(){for(var i=arguments.length;i--;){AI.DOM.CSS.add('cacher',arguments[i]);}},"show":function(){for(var i=arguments.length;i--;){AI.DOM.CSS.remove('cacher',arguments[i]);}},"isHide":function(id){return AI.DOM.CSS.has('cacher',id);},"toggle":function(){var i,node;for(i=arguments.length;i--;){node=AI.DOM.getById(arguments[i]);if(!AI.DOM.CSS.has('ne_pas_cacher',node)){AI.DOM[AI.DOM.isHide(node)?'show':'hide'](node);}}},"toggleChilds":function(id){var node=AI.DOM.getById(id),i;if(node&&node.childNodes){for(i=0;i<node.childNodes.length;i++){AI.DOM.toggle(node.childNodes[i]);}}},"fixedTableHeader":function(table,height){var thead=AI.DOM.getByTag('thead',0,table),tbody=AI.DOM.getByTag('tbody',0,table);height=height?height:table.parentNode.offsetHeight-2;height=intval(height)-intval(thead.offsetHeight);height=intval(height).limit(0,null);AI.DOM.CSS.setStyle(tbody,{"overflow":'hidden',"overflowX":'hidden',"overflowY":'auto',"height":height+'px'});},"centerToParentHorizontal":function(id){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);},"centerToParentVertical":function(id){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);},"centerToParent":function(id){var node=AI.DOM.getById(id);if(!node){return null;}AI.DOM.centerToParentHorizontal(node);AI.DOM.centerToParentVertical(node);return node;},getByTags:function(t,d){d=d||document;return d.getElementsByTagName(t);},getByTag:function(tag,idx,doc){return AI.DOM.getByTags(tag,doc)[idx||0];},createElement:function(tagName,attributs,style,childs,type,node){var i,m,name=attributs&&attributs.name?attributs.name:null,element=AI.dCE(tagName,name);function cb(o,k,v){if(k=='cls'||k=='cname'||k=='classname'){this.className=v;}else if(k=='html'){this.innerHTML=v;}else if(k=='noselection'||k=='disableSelection'){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'){childs=AI.utils.forceArray(v);}else{this[k]=v;}}if(attributs){AI.utils.forOwn(attributs,cb,element);}m=childs&&childs.length?childs.length:0;if(m>0){for(i=0;i<m;i++){element.appendChild(childs[i]);}}if(AI.utils.isValidString(type)&&AI.utils.isValidElement(node)){type=type.toLowerCase();if(['ib','before','insertbefore'].contains(type)){node.parentNode.insertBefore(element,node);}else if(['if','first','insertfirst'].contains(type)){AI.DOM.insertFirst(element,node);}else if(['rc','replace','replacechild'].contains(type)){node.parentNode.replaceChild(element,node);}else{node.appendChild(element);}}return AI.DOM.CSS.setStyle(element,style);}};if(IS.IE){AI.DOM.fixedTableHeader=function(table,height){var div=AI.DOM.createElement('div'),P=table.parentNode,tr=AI.DOM.getByTags('tr',AI.DOM.getByTag('thead',0,table)),i;height=height?height:table.parentNode.offsetHeight-2;for(i=tr.length;i--;){tr[i].style.position='relative';tr[i].style.setExpression('top','this.offsetParent.scrollTop');}height=intval(height).limit(0,null);AI.DOM.CSS.setStyle(div,{"height":height+'px',"overflow":'auto'});P.insertBefore(div,table);div.appendChild(table);table.style.width=(table.offsetWidth-16)+'px';};if((!document.getElementById||IS.major<6)&&document.all){AI.DOM.getById=function(id,doc){doc=doc||document;return typeof id=='string'?doc.all[id]:id;};}}AI.DOM.getMarginLeft=function(id){return AI.DOM.CSS.getStyleInt(id,'marginLeft');};AI.DOM.getMarginTop=function(id){return AI.DOM.CSS.getStyleInt(id,'marginTop');};AI.DOM.getMarginRight=function(id){return AI.DOM.CSS.getStyleInt(id,'marginRight');};AI.DOM.getMarginBottom=function(id){return AI.DOM.CSS.getStyleInt(id,'marginBottom');};AI.DOM.getPaddingLeft=function(id){return AI.DOM.CSS.getStyleInt(id,'paddingLeft');};AI.DOM.getPaddingTop=function(id){return AI.DOM.CSS.getStyleInt(id,'paddingTop');};AI.DOM.getPaddingRight=function(id){return AI.DOM.CSS.getStyleInt(id,'paddingRight');};AI.DOM.getPaddingBottom=function(id){return AI.DOM.CSS.getStyleInt(id,'paddingBottom');};AI.DOM.getBorderLeft=function(id){return AI.DOM.CSS.getStyle(id,"borderLeftStyle")=='none'?0:AI.DOM.CSS.getStyleInt(id,"borderLeftWidth");};AI.DOM.getBorderTop=function(id){return AI.DOM.CSS.getStyle(id,"borderTopStyle")=='none'?0:AI.DOM.CSS.getStyleInt(id,"borderTopWidth");};AI.DOM.getBorderRight=function(id){return AI.DOM.CSS.getStyle(id,"borderRightStyle")=='none'?0:AI.DOM.CSS.getStyleInt(id,"borderRightWidth");};AI.DOM.getBorderBottom=function(id){return AI.DOM.CSS.getStyle(id,"borderBottomStyle")=='none'?0:AI.DOM.CSS.getStyleInt(id,"borderBottomWidth");};var $=AI.DOM.getById,$E=AI.DOM.createElement,$tags=AI.DOM.getByTags,$tag=AI.DOM.getByTag;AI.gBI=AI.DOM.getById;var DOM=AI.DOM;DOM.head=AI.DOM.getByTag('head');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.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,V;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=function(){var loaded={},uid=0;function rgb2hex(rgbString){var result,rgb,hex='',digits='0123456789abcdef';if(typeof rgbString!='string'||typeof rgbString.match=='undefined'){return null;}result=rgbString.match(/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*/);if(result===null){return rgbString;}rgb=+result[1]<<16|+result[2]<<8|+result[3];while(rgb!==0){hex=digits.charAt(rgb&0xf)+hex;rgb>>>=4;}while(hex.length<6){hex='0'+hex;}return "#"+hex;}function _has_(cName,id){var node=AI.DOM.getById(id),c;if(!node||!node.className){return false;}c=node.className.split(' ');return c.contains(cName);}function _set_(cName){var node,i;for(i=1;i<arguments.length;i++){node=AI.DOM.getById(arguments[i]);if(node){node.className=cName;}}}function _add_(cName){var node,i,c;for(i=1;i<arguments.length;i++){node=AI.DOM.getById(arguments[i]);if(!node){continue;}if(!node.className){node.className=cName;}else{c=node.className.split(' ');if(!c.contains(cName)){c.push(cName);node.className=c.join(' ');}}}}function _remove_(cName){var node,i,c;for(i=1;i<arguments.length;i++){node=AI.DOM.getById(arguments[i]);if(!node||!node.className){continue;}c=node.className.split(' ');if(c.contains(cName)){c.remove(cName);node.className=c.join(' ');}}}function _getStyle_(id,prop){var dV,hyphen,val=null,node=AI.DOM.getById(id);if(!node){return null;}dV=(node.ownerDocument||document).defaultView;if(prop=='opacity'&&node.filters){try{return node.filters.item('DXImageTransform.Microsoft.Alpha').opacity/100;}catch(x){try{return node.filters.item('alpha').opacity/100;}catch(x){}}return '1';}else if(node.style[prop]){val=node.style[prop];}else if(node.currentStyle&&node.currentStyle[prop]){val=node.currentStyle[prop];}else if(dV&&dV.getComputedStyle){hyphen=String.toHyphen(prop);if((dV=dV.getComputedStyle(node,''))&&dV.getPropertyValue(hyphen)){val=dV.getPropertyValue(hyphen);}}if(val!==null){if(/^\s*rgb\s*\(/.test(val)){val=rgb2hex(val);}if(/^#/.test(val)){val=val.toLowerCase();}}return val;}function _getStyleInt_(id,prop){return parseInt(_getStyle_(id,prop),10);}return{has:_has_,set:_set_,add:_add_,remove:_remove_,getPropertyName:function(prop){var fn=function(p){return p;};if(document&&document.body&&document.body.style&&typeof document.body.style.styleFloat=='string'){fn=function(p){return p=='cssFloat'?'styleFloat':p;};}AI.DOM.CSS.getPropertyName=fn;return fn(prop);},setStyle:function(id,properties){var node=AI.DOM.getById(id);if(properties&&node){AI.utils.forOwn(properties,function(o,k,v){if(k=='opacity'){AI.DOM.CSS.setOpacity(this,v);}else{this.style[AI.DOM.CSS.getPropertyName(k)]=v;}},node);}return node;},getStyle:_getStyle_,getStyleInt:_getStyleInt_,setOpacity:function(eId,val){var elt=AI.DOM.getById(eId),fn=function(){};if(elt&&elt.style){if(typeof elt.style.opacity=='string'){fn=function(id,v){var e=AI.DOM.getById(id);if(e){e.style.opacity=v;}};}else if(typeof elt.style.MozOpacity=='string'){fn=function(id,v){var e=AI.DOM.getById(id);if(e){e.style.MozOpacity=v;}};}else if(typeof elt.style.KhtmlOpacity=='string'){fn=function(id,v){var e=AI.DOM.getById(id);if(e){e.style.KhtmlOpacity=v;}};}else if(typeof elt.style.filter=='string'){fn=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)+')');}}};}}AI.DOM.CSS.setOpacity=fn;return fn(elt,val);},removeOpacity:function(id){AI.DOM.CSS.setOpacity(id,1);},loadLink:function(url,id){var link;if(!loaded[url]){if(!AI.utils.isValidString(id)){id=String.toCamel(url.replace(/[^\w]/g,'-'))+uid++;}link=AI.DOM.createElement("LINK",{id:id,rel:'stylesheet',href:url});AI.DOM.getByTag('head').appendChild(link);loaded[url]=id;}},removeLink:function(url){var link;if(loaded[url]){link=AI.DOM.getById(loaded[url]);if(link&&link.parentNode){link.parentNode.removeChild(link);}delete loaded[url];}}};}();var $style=AI.DOM.CSS.setStyle;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;DOM._realCss=AI.DOM.CSS.getPropertyName;
AI.DOM.position=function(){function get(id){var node=AI.DOM.getById(id),pos={left:0,top:0,width:0,height:0};if(!node){return pos;}if(node.offsetWidth){pos.width=node.offsetWidth;}if(node.offsetHeight){pos.height=node.offsetHeight;}if(node.offsetParent){do{pos.left+=node.offsetLeft;pos.top+=node.offsetTop;}while((node=node.offsetParent));}return pos;}return{get:get,set:function(id,left,top){var node=AI.DOM.getById(id),style={};if(!node){return null;}if(typeof left=='object'){top=left.top;left=left.left;}if(AI.DOM.getStyle(node,'position')!='absolute'){style.position='absolute';}style.top=intval(top)+'px';style.left=intval(left)+'px';AI.DOM.CSS.setStyle(node,style);return node;},getCenter:function(id){var c=get(id);c.left=c.left+(c.width/2);c.top=c.top+(c.height/2);return c;}};}();
AI.DOM.getAreaWidth=function(el){return el.offsetWidth-AI.DOM.getBorderLeft(el)-AI.DOM.getBorderRight(el);};AI.DOM.getAreaHeight=function(el){return el.offsetHeight-AI.DOM.getBorderTop(el)-AI.DOM.getBorderBottom(el);};if(IS.IE){AI.DOM.getInsetRight=function(el){if(AI.DOM.CSS.getStyle(el,'overflowY')=='hidden'||el.clientWidth===0){return AI.DOM.getBorderRight(el);}return Math.max(0,el.offsetWidth-el.clientLeft-el.clientWidth);};AI.DOM.getInsetBottom=function(el){if(AI.DOM.CSS.getStyle(el,'overflowX')=='hidden'||el.clientHeight===0){return AI.DOM.getBorderBottom(el);}return Math.max(0,el.offsetHeight-el.clientTop-el.clientHeight);};}else{AI.DOM.getInsetRight=function(el){if(el.clientWidth===0){var ov=AI.DOM.CSS.getStyle(el,'overflow'),sbv=ov=="scroll"||ov=="-moz-scrollbars-vertical"?16:0;return Math.max(0,AI.DOM.getBorderRight(el)+sbv);}return Math.max(0,el.offsetWidth-el.clientWidth-AI.DOM.getBorderLeft(el));};AI.DOM.getInsetBottom=function(el){if(el.clientHeight===0){var ov=AI.DOM.CSS.getStyle(el,'overflow'),sbv=ov=="scroll"||ov=="-moz-scrollbars-horizontal"?16:0;return Math.max(0,AI.DOM.getBorderBottom(el)+sbv);}return Math.max(0,el.offsetHeight-el.clientHeight-AI.DOM.getBorderTop(el));};}AI.DOM.SCROLLBAR_SIZE=null;AI.DOM.getScrollBarSize=function(){if(AI.DOM.SCROLLBAR_SIZE){return AI.DOM.SCROLLBAR_SIZE;}var div=$E('div',{},{height:'100px',width:'100px',overflow:'scroll'},[],'ac',document.body),c=AI.DOM.getScrollBarSizeRight(div);if(c){AI.DOM.SCROLLBAR_SIZE=c;}document.body.removeChild(div);return c;};AI.DOM.getScrollBarSizeLeft=function(el){return 0;};AI.DOM.getScrollBarSizeTop=function(el){return 0;};AI.DOM.getScrollBarSizeRight=function(el){return AI.DOM.getInsetRight(el)-AI.DOM.getBorderRight(el);};AI.DOM.getScrollBarSizeBottom=function(el){return AI.DOM.getInsetBottom(el)-AI.DOM.getBorderBottom(el);};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;};if(IS.IE){AI.DOM.getClientBoxLeft=function(el){return el.getBoundingClientRect().left;};AI.DOM.getClientBoxTop=function(el){return el.getBoundingClientRect().top;};AI.DOM.getPageBoxLeft=function(el){return AI.DOM.getClientBoxLeft(el)+AI.DOM.getScrollLeftSum(el);};AI.DOM.getPageBoxTop=function(el){return AI.DOM.getClientBoxTop(el)+AI.DOM.getScrollTopSum(el);};}else if(IS.gecko){AI.DOM.getClientBoxLeft=function(el){return AI.DOM.getClientAreaLeft(el)-AI.DOM.getBorderLeft(el);};AI.DOM.getClientBoxTop=function(el){return AI.DOM.getClientAreaTop(el)-AI.DOM.getBorderTop(el);};AI.DOM.getPageBoxLeft=function(el){return AI.DOM.getPageAreaLeft(el)-AI.DOM.getBorderLeft(el);};AI.DOM.getPageBoxTop=function(el){return AI.DOM.getPageAreaTop(el)-AI.DOM.getBorderTop(el);};}else{AI.DOM.getPageBoxLeft=function(el){var sum=0;while(el&&el.nodeName!='BODY'){sum+=intval(el.offsetLeft);el=el.offsetParent;}return sum;};AI.DOM.getPageBoxTop=function(el){var sum=0;while(el&&el.nodeName!=='BODY'){sum+=intval(el.offsetTop);el=el.offsetParent;}return sum;};AI.DOM.getClientBoxLeft=function(el){var sum=el.offsetLeft;while(el&&el.nodeName!=='BODY'){el=el.offsetParent;if(el){sum+=el.offsetLeft-el.scrollLeft;}}return sum;};AI.DOM.getClientBoxTop=function(el){var sum=el.offsetTop;while(el&&el.nodeName!=='BODY'){el=el.offsetParent;if(el){sum+=el.offsetTop-el.scrollTop;}}return sum;};}if(IS.IE){AI.DOM.getClientBoxRight=function(el){return el.getBoundingClientRect().right;};AI.DOM.getClientBoxBottom=function(el){return el.getBoundingClientRect().bottom;};AI.DOM.getPageBoxRight=function(el){return AI.DOM.getClientBoxRight(el)+AI.DOM.getScrollLeftSum(el);};AI.DOM.getPageBoxBottom=function(el){return AI.DOM.getClientBoxBottom(el)+AI.DOM.getScrollTopSum(el);};}else{AI.DOM.getClientBoxRight=function(el){return AI.DOM.getClientBoxLeft(el)+el.offsetWidth;};AI.DOM.getClientBoxBottom=function(el){return AI.DOM.getClientBoxTop(el)+el.offsetHeight;};AI.DOM.getPageBoxRight=function(el){return AI.DOM.getPageBoxLeft(el)+el.offsetWidth;};AI.DOM.getPageBoxBottom=function(el){return AI.DOM.getPageBoxTop(el)+el.offsetHeight;};}if(IS.gecko){AI.DOM.getPageAreaLeft=function(el){return el.ownerDocument.getBoxObjectFor(el).x;};AI.DOM.getPageAreaTop=function(el){return el.ownerDocument.getBoxObjectFor(el).y;};AI.DOM.getClientAreaLeft=function(el){return AI.DOM.getPageAreaLeft(el)-AI.DOM.getScrollLeftSum(el);};AI.DOM.getClientAreaTop=function(el){return AI.DOM.getPageAreaTop(el)-AI.DOM.getScrollTopSum(el);};}else{AI.DOM.getPageAreaLeft=function(el){return AI.DOM.getPageBoxLeft(el)+AI.DOM.getBorderLeft(el);};AI.DOM.getPageAreaTop=function(el){return AI.DOM.getPageBoxTop(el)+AI.DOM.getBorderTop(el);};AI.DOM.getClientAreaLeft=function(el){return AI.DOM.getClientBoxLeft(el)+AI.DOM.getBorderLeft(el);};AI.DOM.getClientAreaTop=function(el){return AI.DOM.getClientBoxTop(el)+AI.DOM.getBorderTop(el);};}AI.DOM.getViewportHeight=function(){var height=-1;if((document.compatMode||IS.IE)&&!IS.opera){if(IS.strict){height=document.documentElement.clientHeight;}else{height=document.body.clientHeight;}}else{height=self.innerHeight;}return height;};AI.DOM.getViewportWidth=function(){var width=-1;if(document.compatMode||IS.IE){if(IS.strict){width=document.documentElement.clientWidth;}else{width=document.body.clientWidth;}}else{width=self.innerWidth;}return width;};AI.DOM.windowHeight=function(){return 0;};AI.DOM.windowWidth=function(){return 0;};if(self.innerHeight){AI.DOM.windowHeight=function(){return self.innerHeight;};AI.DOM.windowWidth=function(){return self.innerWidth;};}else if(document.documentElement){AI.DOM.windowHeight=function(){return document.documentElement.clientHeight;};AI.DOM.windowWidth=function(){return document.documentElement.clientWidth;};}else if(document.body){AI.DOM.windowHeight=function(){return document.body.clientHeight;};AI.DOM.windowWidth=function(){return document.body.clientWidth;};}AI.DOM.getOuterWidth=function(el){return el.offsetWidth+AI.DOM.getMarginLeft(el)+AI.DOM.getMarginRight(el);};AI.DOM.getOuterHeight=function(el){return el.offsetHeight+AI.DOM.getMarginTop(el)+AI.DOM.getMarginBottom(el);};AI.DOM.getBoxWidth=function(el){return intval(el.offsetWidth);};AI.DOM.getBoxHeight=function(el){return intval(el.offsetHeight);};AI.DOM.getBoxWidthSafe=function(el){var h=el.offsetHeight,v,o;if(h===0){o=el.style.height;el.style.height='1px';}v=el.offsetWidth;if(h===0){el.style.height=o;}return v;};AI.DOM.getBoxHeightSafe=function(el){var w=el.offsetWidth,v,o;if(w===0){o=el.style.width;el.style.width="1px";}v=el.offsetHeight;if(w===0){el.style.width=o;}return v;};AI.DOM.getInnerWidth=function(el){return AI.DOM.getAreaWidth(el)-AI.DOM.getPaddingLeft(el)-AI.DOM.getPaddingRight(el);};AI.DOM.getInnerHeight=function(el){return AI.DOM.getAreaHeight(el)-AI.DOM.getPaddingTop(el)-AI.DOM.getPaddingBottom(el);};
AI.HTML=function(){function fT(t){return t=='text'?'text':'value';}function sel(id,t){var n=AI.DOM.getById(id);if(n&&(n=n.options)){t=fT(t);if(n.selectedIndex!=-1){return n[n.selectedIndex][t];}}return '';}function sGIB(id,v,t){var n=AI.DOM.getById(id),i,index=-1;if(n&&(n=n.options)){t=fT(t);for(i=0;i<n.length;i++){if(n[i][t]==v){return i;}}}return-1;}function sSIB(id,v,t){var n=AI.DOM.getById(id);if(n){n.selectedIndex=sGIB(n,v,t);}}return{setAutocomplete:function(id,s){var n=AI.DOM.getById(id);s=s=='on'||s===true?'on':'off';try{n.setAttribute('autocomplete',s);}catch(x){}n.autocomplete=s;},safeFocus:function(id){var n=AI.DOM.getById(id),o,AC=AI.HTML.setAutocomplete;if(n){o=n.getAttribute('autocomplete');if(o!=='off'){AC(n,'off');}try{n.focus();}catch(x){}if(o!=='off'){AC(n,'on');}}},safeSelect:function(id){var n=AI.DOM.getById(id);if(typeof n.select=='function'){try{n.select();}catch(x){}}},noSelection:function(id,c){var n=AI.DOM.getById(id);n.onselectstart=function(){return false;};n.unselectable='on';n.style.MozUserSelect='none';n.style.cursor=c||'default';},checkedRadio:function(f,n){var i;f=AI.DOM.getById(f);if(f&&(f=f.elements)){for(i=0;i<f.length;i++){if(f[i].name==n&&f[i].checked===true){return f[i].value;}}}return '';},getValue:function(id){var name,frm,i,node=AI.DOM.getById(id);if(node){name=node.nodeName.toUpperCase();if(name=="INPUT"){if(node.type=="text"||node.type=="hidden"){return node.value;}else if(node.type=="checkbox"){if(node.checked){return node.value;}}else if(node.type=="radio"){if(node.checked){return node.value;}else{frm=node.form;if(frm){for(i=0;i<frm.elements.length;i++){if(frm.elements[i].type=="radio"&&frm.elements[i].name==node.name&&frm.elements[i].checked){return frm.elements[i].value;}}}}return null;}}else if(name=="SELECT"){return AI.HTML.select.value(node);}else if(name=="TEXTAREA"){return node.value;}AI.console.error("AI.HTML.getValue()type élément non géré:"+node.nodeName+"/"+(node.name||node.id));}return null;},select:{vider:function(id){var n=AI.DOM.getById(id),i;if(n&&(n=n.options)){n.selectedIndex=-1;for(i=n.length;i--;){n[i]=null;}n.length=0;}},remplir:function(id,o,s){var k,n=AI.DOM.getById(id);if(!n){return null;}AI.HTML.select.vider(n);AI.utils.forOwn(o,function(o,k,v){n.options[n.options.length]=new Option(v,k,false,false);});n.selectedIndex=s||0;return n;},value:function(id){return sel(id,'value');},text:function(id){return sel(id,'text');},getIndexByValue:function(id,v){return sGIB(id,v,'value');},getIndexByText:function(id,t){return sGIB(id,t,'text');},setIndexByValue:function(id,v){sSIB(id,v,'value');},setIndexByText:function(id,t){sSIB(id,t,'text');}}};}();var selectedValue=AI.HTML.select.value;
Error.prototype.toString=function(){return this.message;};if(typeof Error.prototype.lineNumber!=='undefined'&&typeof Error.prototype.fileName!=='undefined'){Error.prototype.toString=function(){var X=this.fileName.split('/');return '#'+this.lineNumber+':'+X[X.length-1]+' "'+this.message+'"';};}AI.console=AI.getSimilarParentObject('console')||function(){var dragged=false,dragX=0,dragY=0,actif=true,cE=AI.DOM.createElement,log=cE('ul',{id:'console_main'}),label=cE('h1',{noselection:'pointer',title:"Cliquez pour activer/désactiver les rapports d'erreurs dans la console"},{},[AI.dCTN('Console activée')]),container=cE('div',{id:'console_container',cls:'cacher'},{},[cE('div',{id:'console_boutons'},{},[cE('span',{cls:'actif',noselection:'pointer',title:'Activer/Désactiver',onclick:function(){AI.console.setActif(!actif);AI.DOM.CSS[actif?"remove":"add"]("inactif",this);return false;}}),cE('span',{cls:'fermer',noselection:'pointer',title:'Fermer',onclick:function(){AI.console.fermer();return false;}}),cE('span',{cls:'vider',noselection:'pointer',title:'Vider',onclick:function(){AI.console.vider();return false;}}),label]),log]);function message(mode,msg){var i,li,tmp=(''+msg).split(AI.consts.TEXT_BR);if(actif&&AI.utils.isValid(msg)){if(!AI.utils.isValidString(mode)){mode='info';}li=cE('li',{className:'console-'+mode});for(i=0;i<tmp.length;i++){if(i>0){li.appendChild(cE('br'));}li.appendChild(AI.dCTN(tmp[i]));}AI.DOM.insertFirst(li,log);if(mode!='info'){AI.DOM.show(container);}}return AI.console;}function messageHTML(html){if(actif&&AI.utils.isValid(html)){cE('li',{innerHTML:html,cls:'console-html'},{},[],'if',log);}return AI.console;}function onLabelMouseMove(e){var E=AI.EVT.fix(e);AI.DOM.CSS.setStyle(container,{top:(AI.EVT.getY(E)+dragY)+'px',left:(AI.EVT.getX(E)+dragX)+'px'});dragged=true;}function onLabelMouseUp(e){AI.EVT.remove(document,"mousemove",onLabelMouseMove);AI.EVT.remove(document,"mouseup",onLabelMouseUp);}function onLabelMouseDown(e){var E=AI.EVT.fix(e);dragged=false;dragX=AI.DOM.getX(container)-AI.EVT.getX(E);dragY=AI.DOM.getY(container)-AI.EVT.getY(E);AI.EVT.add(document,"mousemove",onLabelMouseMove);AI.EVT.add(document,"mouseup",onLabelMouseUp);AI.EVT.preventDefault(E);}function layout(){if(document.body&&AI&&AI.DOM&&AI.EVT){AI.DOM.CSS.loadLink('/js/ai/css/console.css','console');document.body.appendChild(container);label.onmousedown=onLabelMouseDown;message('info','Console activée');}else{window.setTimeout(layout,200);}}layout();function appendText(obj,tbl){tbl.push(AI.utils.escapeHTML(obj));}function appendNull(obj,tbl){tbl.push('<span class="console-null">',AI.utils.escapeHTML(obj),'</span>');}function appendBoolean(obj,tbl){tbl.push('<span class="console-boolean">',AI.utils.escapeHTML(obj),'</span>');}function appendString(obj,tbl){tbl.push('<span class="console-string">&quot;',AI.utils.escapeHTML(obj),'&quot;</span>');}function appendNumber(obj,tbl){tbl.push('<span class="console-number">',AI.utils.escapeHTML(obj),'</span>');}function appendFunction(obj,tbl){var r=/function?(.*?)\(/,m=r.exec(obj),n=m?m[1]:"function";if(n.trim()===''){n='function';}tbl.push('<span class="console-function">',AI.utils.escapeHTML(n),'()</span>');}function appendObjectFormatted(obj,tbl){var r=/\[object(.*?)\]/,m=r.exec(obj);tbl.push('<span class="console-object">',m?m[1]:obj,'</span>');if(typeof obj.length==='number'){tbl.push('['+obj.length+']');}}function appendSelector(obj,tbl){tbl.push('<span class="console-selectorTag">',AI.utils.escapeHTML(obj.nodeName.toLowerCase()),'</span>');if(obj.id){tbl.push('<span class="console-selectorId">#',AI.utils.escapeHTML(obj.id),'</span>');}if(obj.className){tbl.push('<span class="console-selectorClass">.',AI.utils.escapeHTML(obj.className),'</span>');}}function appendObject(obj,tbl){if(obj===undefined||typeof obj==='undefined'){appendNull("undefined",tbl);}else if(obj===null){appendNull("null",tbl);}else if(typeof obj=="string"){appendString(obj,tbl);}else if(typeof obj=="boolean"){appendBoolean(obj,tbl);}else if(typeof obj=="number"){appendNumber(obj,tbl);}else if(typeof obj=="function"){appendFunction(obj,tbl);}else if(obj.nodeType&&obj.nodeType==document.ELEMENT_NODE){appendSelector(obj,tbl);}else if(typeof obj=="object"){appendObjectFormatted(obj,tbl);}else{appendText(obj,tbl);}}function appendNode(node,tbl){var i,attr,child,val;if(node.nodeType==document.ELEMENT_NODE){tbl.push('<div class="console-element">','&lt;<span class="console-nodeTag">',node.nodeName.toLowerCase(),'</span>');for(i=0;i<node.attributes.length;i++){attr=node.attributes[i];if(!attr.specified){continue;}tbl.push('&nbsp;<span class="console-nodeName">',attr.nodeName.toLowerCase(),'</span>=&quot;<span class="console-nodeValue">',AI.utils.escapeHTML(attr.nodeValue),'</span>&quot;');}if(node.firstChild){tbl.push('&gt;</div><div class="console-nodeChildren">');for(child=node.firstChild;child;child=child.nextSibling){appendNode(child,tbl);}tbl.push('</div><div class="console-element">&lt;/<span class="console-nodeTag">',node.nodeName.toLowerCase(),'&gt;</span></div>');}else{tbl.push('/&gt;</div>');}}else if(node.nodeType==document.TEXT_NODE){val=node.nodeValue.trim();if(!(val===''||val=='\n'||val=='\t'||val=='\r'||val=='\r\n'||val=='\n\r')){tbl.push('<div class="console-nodeText">',AI.utils.escapeHTML(node.nodeValue),'</div>');}}}return{assert:function(truth,msg){if(!truth){message('error',msg);}return AI.console;},error:function(msg){return message('error',msg);},explore:function(obj){var i,name,value,shortName,html=[],pairs=[];AI.utils.forOwn(obj,function(o,k,v){pairs.push([k,v]);});if(pairs.length>0){if(typeof obj=="string"||AI.utils.isValidArray(obj)){pairs.sort(function(a,b){return parseInt(a[0],10)<parseInt(b[0],10)?-1:1;});}else{pairs.sort(function(a,b){return a[0]<b[0]?-1:1;});}}html.push('<table>');for(i=0;i<pairs.length;i++){name=pairs[i][0];value=pairs[i][1];shortName=name.substr(0,20);if(shortName!=name){shortName=shortName+'...';}html.push('<tr><td class="console-propertyNameCell" title="',AI.utils.escapeHTML(name),'"><span class="console-propertyName">',AI.utils.escapeHTML(shortName),'</span></td><td>');appendObject(value,html);html.push('</span></td></tr>');}html.push('</table>');messageHTML(html.join(''));return AI.console;},exploreNode:function(node,showNode){var html=[];appendSelector(node,html);if(showNode){appendNode(node,html);}messageHTML(html.join(''));return AI.console;},fermer:function(){AI.DOM.hide(container);return AI.console;},hide:function(){AI.DOM.hide(container);return AI.console;},html:function(html){return messageHTML(html);},info:function(msg){return message('info',msg);},setActif:function(s){actif=s;label.innerHTML=s?'Console activée':'Console désactivée';return AI.console;},show:function(){AI.DOM.show(container);return AI.console;},stop:function(msg){message('error',msg,true);throw new Error(msg);},toggle:function(){AI.DOM.toggle(container);return AI.console;},vider:function(){AI.DOM.flush(log);return AI.console;},warning:function(msg){return message('warning',msg);},selectorToText:function(node){var tbl=[];appendSelector(node,tbl);return tbl.join('');}};}();
AI.msgBox=function(){var original,container,all={},uid=0;function efface(cle,instant,essai){var boite,timeout,anime;if(!container){window.setTimeout(function(){efface(cle,instant,essai);},1000);return AI.msgBox;}if(!all[cle]){essai=parseInt(essai,10)+1;if(essai<=2){window.setTimeout(function(){efface(cle,instant,essai);},1000);}return AI.msgBox;}boite=all[cle][0];timeout=all[cle][1];delete all[cle];if(timeout){window.clearTimeout(timeout);}if(boite.firstChild){boite.firstChild.onclick=null;boite.removeChild(boite.firstChild);}function oncomplete(){container.removeChild(boite);}if(instant===true){oncomplete();}else{anime=new AI.ANIMATION({"onComplete":oncomplete});anime.addSubject(new AI.ANIMATION.numericalTransition(boite,'opacity',1,0));anime.addSubject(new AI.ANIMATION.numericalTransition(boite,'width',AI.DOM.CSS.getStyleInt(boite,'width'),0));anime.addSubject(new AI.ANIMATION.numericalTransition(boite,'height',AI.DOM.CSS.getStyleInt(boite,'height'),0));boite.style.overflow='hidden';anime.play();}return AI.msgBox;}function message(cName,msg,cle,html){var timeout,ms,close_button,boite,i,tmp;function closeMe(){return efface(cle);}cle=cle&&''!==cle?cle:'msgBox'+(uid++);if(!container){window.setTimeout(function(){message(cName,msg,cle,html);},500);return AI.msgBox;}if(all[cle]){efface(cle,true);}close_button=AI.DOM.createElement('span',{className:'msgBox-close',onclick:closeMe});boite=AI.DOM.createElement('div',{className:'msgBox-boite msgBox-'+cName},{},[close_button]);if(html){boite.appendChild(AI.DOM.createElement('div',{innerHTML:msg}));}else{tmp=msg.split(AI.consts.TEXT_BR);for(i=0;i<tmp.length;i++){if(i>0){boite.appendChild(AI.DOM.createElement('br'));}boite.appendChild(AI.dCTN(tmp[i]));}}AI.DOM.insertFirst(boite,container);switch(cName){case 'error':ms=60000;break;case 'process':ms=-1;break;case 'warning':ms=4000;break;default:ms=1500;break;}if(ms>0){timeout=window.setTimeout(closeMe,ms);}all[cle]=[boite,timeout];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:efface,effaceAll:function(){AI.utils.forOwn(all,function(o,k){efface(k,true);});return AI.msgBox;},info:function(msg,cle,html){return message('info',msg,cle,html);},warning:function(msg,cle,html){return message('warning',msg,cle,html);},error:function(msg,cle,html){return message('error',msg,cle,html);},process:function(msg,cle,html){return message('process',msg,cle,html);},resetParentContainer:function(){if(original){original.appendChild(container);}else{layout();}return AI.msgBox;},setParentContainer:function(id){var n=AI.DOM.getById(id);if(n&&container){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={msg:'NETTOYAGE DE LA MEMOIRE',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},X:0,Y:0,listeners:[],_keep_loading:true,onload:[],onunload:[],fix:function(e){return e||window.event;},add:function(S,T,H,scope,obj){var R=true,E,j,m,W,iL;if(AI.utils.isValidArray(T)){for(j=0,m=T.length;j<m;j++){R=R&&AI.EVT.add(S,T[j],H,scope,obj);}return R;}E=AI.DOM.getById(S);if(!E){return false;}scope=scope?scope:E;W=function(z){return H.call(scope,AI.EVT.fix(z),obj);};iL=AI.EVT.listeners.length;AI.EVT.bind(E,T,W);AI.EVT.listeners[iL]=[E,T,H,W,scope,obj];return true;},remove:function(S,T,H,scope){var R=true,E,j,m,L,iL;if(AI.utils.isValidArray(T)){for(j=0,m=T.length;j<m;j++){R=AI.EVT.remove(S,T[j],H)&&R;}return R;}E=AI.DOM.getById(S);if(!E){return false;}scope=scope?scope:E;L=null;iL=AI.EVT.getListenerIndex(E,T,H,scope);if(iL>=0){L=AI.EVT.listeners[iL];}if(!L){return false;}try{AI.EVT.unbind(E,T,L[3]);}catch(x){R=false;}delete AI.EVT.listeners[iL][3];delete AI.EVT.listeners[iL][2];delete AI.EVT.listeners[iL];return R;},stop:function(e){AI.EVT.stopPropagation(e);AI.EVT.preventDefault(e);return false;},getListenerIndex:function(E,T,H,scope){var i,L;scope=scope?scope:E;for(i=0;i<AI.EVT.listeners.length;i++){L=AI.EVT.listeners[i];if(L&&L[0]==E&&L[1]==T&&L[2]==H&&L[4]==scope){return i;}}return-1;},getTarget:function(e){var E=AI.EVT.fix(e);if(E&&E.srcElement){AI.EVT.getTarget=AI.EVT.getTarget_IE;return AI.EVT.getTarget(e);}else if(E&&E.target){AI.EVT.getTarget=AI.EVT.getTarget_W3C;return AI.EVT.getTarget(e);}return null;},getRealTarget:function(t){return t&&t.nodeType==document.TEXT_NODE?t.parentNode:t;},getTarget_W3C:function(e){var E=AI.EVT.fix(e),t=E&&E.target?E.target:null;return AI.EVT.getRealTarget(t);},getTarget_IE:function(e){var E=AI.EVT.fix(e),t=E&&E.srcElement?E.srcElement:null;return AI.EVT.getRealTarget(t);},getRelatedTarget:function(e){var E=AI.EVT.fix(e),t=E.relatedTarget;if(!t){if(E.type=="mouseout"){t=E.toElement;}else if(E.type=="mouseover"){t=E.fromElement;}}return AI.EVT.getRealTarget(t);},getX:function(e){var E=AI.EVT.fix(e),x=E.pageX;if(!x&&0!==x){x=E.clientX||0;x+=AI.EVT.getScroll('Left');}AI.EVT.X=x;return x;},getY:function(e){var E=AI.EVT.fix(e),y=E.pageY;if(!y&&0!==y){y=E.clientY||0;y+=AI.EVT.getScroll('Top');}AI.EVT.Y=y;return y;},getScroll:function(){return 0;},getCharCode:function(e){return e.charCode||(e.type=="keypress")?e.keyCode:0;},DOMLoaded:function(){var L=AI.EVT.onload,i,m,t;if(AI.EVT.DOMLoaded.OK){return true;}AI.EVT.DOMLoaded.OK=true;for(i=0,m=L.length;i<m;i++){try{L[i]();}catch(x){t='Erreur lors du chargement'+CR+x;try{AI.console.error(t);}catch(y){alert(t+CR+y);}}}try{AI.APPLI.dispatch('fully_loaded');}catch(x){}return true;},onUnLoad:function(){var K,L,U,i,m,j,n;AI.EVT.remove(document,'DOMContentLoaded',AI.EVT.DOMLoaded);AI.EVT.remove(window,'unload',AI.EVT.onUnLoad);if(AI.config.CACHE_ELEMENTS){document.createElement=document.dCE;document.createDocumentFragment=document.dCF;document.dCE=null;document.dCF=null;AI.utils.forOwn(AI.dCECache,function(o,k){delete o[k];});AI.dCFCache=null;AI.dCECache=null;}U=AI.EVT.onunload;for(i=0,m=U.length;i<m;i++){try{U[i]();}catch(x){}}if(AI.EVT.listeners&&AI.EVT.listeners.length>0){for(j=0,n=AI.EVT.listeners.length;j<n;j++){L=AI.EVT.listeners[j];if(L){AI.EVT.remove(L[0],L[1],L[2],L[4]);}}}},loader:function(f,o){if(AI.EVT.DOMLoaded.OK){f();}else{AI.EVT.onload.push(f);}},unloader:function(F){AI.EVT.onunload.push(F);}};if(document.addEventListener){AI.EVT.bind=function(E,T,F){E.addEventListener(T,F,false);};AI.EVT.unbind=function(E,T,F){E.removeEventListener(T,F,false);};AI.EVT.preventDefault=function(e){e.preventDefault();return false;};AI.EVT.stopPropagation=function(e){e.stopPropagation();return false;};AI.EVT.getWheelDelta=function(e){return-(e.detail||0);};AI.EVT.addWheel=function(E,F,S,B){return AI.EVT.add(E,"DOMMouseScroll",F,S,B);};AI.EVT.removeWheel=function(E,F){return AI.EVT.remove(E,"DOMMouseScroll",F);};AI.EVT.buttons={left:0,right:2,middle:1};}else if(document.attachEvent){AI.EVT.bind=function(E,T,F){E.attachEvent('on'+T,F);};AI.EVT.unbind=function(E,T,F){E.detachEvent('on'+T,F);};AI.EVT.preventDefault=function(e){e=AI.EVT.fix(e);e.returnValue=false;return false;};AI.EVT.stopPropagation=function(e){e=AI.EVT.fix(e);e.cancelBubble=true;return false;};AI.EVT.getWheelDelta=function(e){return e.wheelDelta?e.wheelDelta/40:0;};AI.EVT.addWheel=function(E,F,S,B,D){AI.EVT.add(E,'mousewheel',F,S,B,D);};AI.EVT.removeWheel=function(E,F){return AI.EVT.remove(E,"mousewheel",F);};AI.EVT.buttons={left:1,right:2,middle:4};AI.EVT.getScroll=function(S){var d=document[IS.strict?'documentElement':'body'];if(typeof d['scroll'+S]!='undefined'){return d['scroll'+S];}return 0;};}AI.EVT.add(window,'unload',AI.EVT.onUnLoad);if(document.addEventListener){AI.EVT.add(document,'DOMContentLoaded',AI.EVT.DOMLoaded);}window.onload=AI.EVT.DOMLoaded;var EVT=AI.EVT;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.XHR=AI.getSimilarParentObject('XHR')||function(){var requetes=[],defaultHandlers={},totalRequetes=0;function callDef(type,scope,a1,a2,a3){var i,dH=defaultHandlers;if(typeof dH[type]!='undefined'&&dH[type].length>0){for(i=0;i<dH[type].length;i++){dH[type][i].call(scope,a1,a2,a3);}}}function dispose(req){var i,r;if(req){requetes.remove(req);req.onreadystatechange=function(){};if(typeof req.abort=='function'){try{req.abort();}catch(e){}}callDef('dispose',this);for(i=requetes.length;i--;){r=requetes[i];if(r.parsed&&r.readyState==4){requetes.remove(r);}}}req=null;return null;}function createRequete(){return new XMLHttpRequest();}if(typeof XMLHttpRequest=='undefined'){createRequete=function(){var req=null;try{req=new ActiveXObject("Microsoft.XMLHTTP");}catch(x1){}return req;};}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',{}),unique=rConf(params,'unique',IS.IE6),scope=rConf(params,'scope',this),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(){}),req=createRequete(),content=null,queryString=[],K;if(''===url){return AI.console.error("L'url de l'appel XHR est requise");}if(!req){return AI.console.error("Impossible de créer l'objet XMLHttpRequest. Pas de gestion XHR");}totalRequetes++;requetes.push(req);if(unique&&'GET'==methode){datas.unique_AI_XHR=(new Date().getTime())+''+totalRequetes;}AI.utils.forOwn(datas,function(o,k,v){queryString.push(encodeURIComponent(k)+'='+encodeURIComponent(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',scope,req,arbitrary);_onprogress.call(scope,req,arbitrary);if(req.readyState==4){try{status=req.status;}catch(e){}if(status==200){callDef('load',scope,req,arbitrary);_onload.call(scope,req,arbitrary);}else{callDef('error',scope,req,arbitrary);_onerror.call(scope,req,arbitrary);}req=dispose(req);}}};callDef('init',scope,arbitrary);_oninit.call(scope,arbitrary);req.send(content);return req;}function parse(req){var r=null,t=(typeof req=='string'?req:req.responseText)||'';req.parsed=true;try{eval("r="+t);}catch(e){}return r;}AI.EVT.unloader(function(){for(var i=requetes.length;i--;){requetes[i]=dispose(requetes[i]);}requetes=null;});return{"send":__send__,dispose:dispose,parse:parse,setDefaultHandler:function(type,callback){if(typeof defaultHandlers[type]=='undefined'){defaultHandlers[type]=[];}defaultHandlers[type].push(callback);},getRequetes:function(){return requetes;},getTotalRequetes:function(){return totalRequetes;},"DEPRECATED_send":function(methode,url,vals,handler_ok,handler_erreur,handler_run,oScope,objAccompagne){var C,N;if(IS.gecko){C=arguments.callee.caller;N=C.name&&C.name!==''?C.name:'anonymous';AI.console.warning('('+N+')'+C.toString().substr(0,250));}DEPRECATED('AJAX_'+methode.toLowerCase()+'('+url+')');var datas={"methode":methode,"url":url};if(vals){datas.datas=vals;}if(handler_ok){datas.onload=handler_ok;}if(handler_erreur){datas.onerror=handler_erreur;}if(handler_run){datas.onprogress=handler_run;}if(oScope){datas.scope=oScope;}if(objAccompagne){datas.arbitrary=objAccompagne;}return __send__(datas);},"DEPRECATED_parse":function(R){var C,N;if(IS.gecko){C=arguments.callee.caller;N=C.name&&C.name!==''?C.name:'anonymous';AI.console.warning('('+N+')'+C.toString().substr(0,250));}DEPRECATED('XHR.parse()');return AI.XHR.parse(R);},"DEPRECATED_dispose":function(R){var C,N;if(IS.gecko){C=arguments.callee.caller;N=C.name&&C.name!==''?C.name:'anonymous';AI.console.warning('('+N+')'+C.toString().substr(0,250));}DEPRECATED('AJAX.dispose()');return AI.XHR.dispose(R);}};}();AI.AJAX=AI.XHR;var AJAX={"parse":AI.XHR.DEPRECATED_parse,"dispose":AI.XHR.DEPRECATED_dispose};function AJAX_get(url,handler_ok,handler_erreur,handler_run,oScope,objAccompagne){return AI.XHR.DEPRECATED_send('GET',url,null,handler_ok,handler_erreur,handler_run,oScope,objAccompagne);}function AJAX_post(url,datas,handler_ok,handler_erreur,handler_run,oScope,objAccompagne){return AI.XHR.DEPRECATED_send('POST',url,datas,handler_ok,handler_erreur,handler_run,oScope,objAccompagne);}
AI.ANIMATION=function(opt){var me=this,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 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);}}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;}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.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'&&IS.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 style=getStyle(state);for(var 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'&&IS.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})$/;var Animation=AI.ANIMATION;
