
if(!Function.prototype.apply){ Function.prototype.apply=function(o,p){if(!o){o=window;}if(!p){p=[];}var a=[];for(var i=0;i<p.length;++i){a[i]='p['+i+']';}o.__apply__=this;var r=eval('o.__apply__('+a.join(',')+')');o.__apply__=null;return r;};}if(!Function.prototype.call){ Function.prototype.call=function(s){var a=[];for(var i=1;i<arguments.length;++i){a[i-1]=arguments[i];}return this.apply(s,a);};}Function.prototype.bind=function(o){var m=this;var a=arguments;return function(){var p=[];for(var i=0;i<arguments.length;++i){p.push(arguments[i]);}for(var j=1;j<a.length;++j){p.push(a[j]);}m.apply(o,p);};};Function.prototype.bindAsEventListener=function(o){var m=this;return function(e){m.call(o,e||window.event);};};Function.EMPTY=function(){};
if(!Array.prototype.push){Array.prototype.push=function(){var l=this.length;for(var i=0;i<arguments.length;++i){this[l+i]=arguments[i];}return this.length;};}if(!Array.prototype.pop){Array.prototype.pop=function(){if(this.length===0){return null;}var t=this[this.length-1];--this.length;return t;};}
if(typeof(EventListener)=="undefined"){ function EventListener(){}}EventListener.patch=function(o){if(o.addEventListener){ return;}var e=EventListener._;if(o.prototype){if(o.prototype.addEventListener){ return;}o.prototype.__refObj=o;o.prototype.addEventListener=e.A;o.prototype.removeEventListener=e.R;o.prototype.dispatchEvent=e.D;}else{if(o.addEventListener){ return;}o.__refObj=o;o.addEventListener=e.A;o.removeEventListener=e.R;o.dispatchEvent=e.D;}};EventListener._={ D:function(e){if(!this._events){ return;}var es=this._events[e];if(!es){return true;}for(var i=0,l=es.length;i<l;++i){  var f=es[i];if(typeof(f)=="function"&&f.apply(this)===false){return false;}}return true;}, A:function(e,f,p){if(!f){return;}if(!this._events){this._events=[];}if(!this._events[e]){this._events[e]=[];var fo=this.__refObj["on"+e];if(fo){this._events[e].push(fo);}this.__refObj["on"+e]=new Function(e,"return this.dispatchEvent('"+e+"')");}this._events[e].push(f);}, R:function(e,f,p){if(!f||!this._events[e]){return;}var fs=this._events[e];for(var i=0;i<fs.length;++i){if(fs[i]===f){fs[i]=null;}}}};EventListener.patch(window);EventListener.patch(document);
String.prototype.trim=function(){return this.replace(String._RE,"");};String.prototype.compareTo=function(v){if(this==v){return 0;}if(this>v){return 1;}return-1;};String._RE=/(^\s*)|(\s*$)/g;
var ArrayUtil={ addAll:function( a, s){if(!a){return;}for(var i=0,l=s.length;i<l;++i){a.push(s[i]);}}, forEach:function( a, f, c){if(!a){return;}c=c||window;for(var i=0,l=a.length;i<l;++i){f.call(c,a[i],i,a);}}, indexOf:function( a, v, i){if(!a){return;}for(i=i||0;i<a.length;++i){if(a[i]===v){return i;}}return-1;}};
var XPathUtil={  RE1:/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/,RE2:/\s+/,getElementsBySelector:function( s, d){if(!d){d=document;} var v0=s.split(',');var founds=[];for(var i0=0;i0<v0.length;++i0){var currentContext=[document],t,bits,tagName,id,element,elements,found,v=v0[i0].trim().split(XPathUtil.RE2);for(var i=0;i<v.length;++i){t=v[i].trim();if(t.indexOf('#')>-1){ bits=t.split('#');tagName=bits[0];id=bits[1];element=d.getElementById(id);if(element){if(tagName&&element.nodeName.toLowerCase()!=tagName){ return[];} currentContext=[element];}else{currentContext=[];}continue;}if(t.indexOf('.')>-1){ bits=t.split('.');tagName=bits[0];var className=bits[1];if(!tagName){tagName='*';} found=[];for(var h=0;h<currentContext.length;++h){if(tagName=='*'){elements=getAllChildren(currentContext[h]);}else{elements=currentContext[h].getElementsByTagName(tagName);}ArrayUtil.addAll(found,elements);}currentContext=[];for(var k=0;k<found.length;++k){if(found[k].className&&found[k].className.match(new RegExp('\\b'+className+'\\b'))){currentContext.push(found[k]);}}continue;} var r=t.match(XPathUtil.RE1);if(r){tagName=r[1];if(!tagName){tagName='*';}var attrName=r[2],attrOperator=r[3],attrValue=r[4]; found=[];for(var l=0;l<currentContext.length;++l){if(tagName=='*'){elements=getAllChildren(currentContext[l]);}else{elements=currentContext[l].getElementsByTagName(tagName);}ArrayUtil.addAll(found,elements);}currentContext=[];var checkFunction; switch(attrOperator){case '=': checkFunction=function(e){return(e.getAttribute(attrName)==attrValue);};break;case '~': checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b')));};break;case '|': checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?')));};break;case '^': checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)===0);};break;case '$': checkFunction=function(e){return(e.getAttribute(attrName).lastIndexOf(attrValue)==e.getAttribute(attrName).length-attrValue.length);};break;case '*': checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)>-1);};break;default: checkFunction=function(e){return e.getAttribute(attrName);};}currentContext=[];for(var j=0;j<found.length;++j){if(checkFunction(found[j])){currentContext.push(found[j]);}} continue;}if(!currentContext[0]){return[];} tagName=t;found=[];for(var g=0;g<currentContext.length;++g){elements=currentContext[g].getElementsByTagName(tagName);ArrayUtil.addAll(found,elements);}currentContext=found;}ArrayUtil.addAll(founds,currentContext);}return founds;},getParentByNodeName:function(o,t){t=t.toLowerCase();var r=o;while(r&&r.nodeName&&r.nodeName.toLowerCase()!=t){r=r.parentNode;}return r;},getNextSiblingByNodeName:function(o,t){t=t.toLowerCase();var r=o;while(r&&r.nodeName&&r.nodeName.toLowerCase()!=t){r=r.nextSibling;}return r;},getFirstChildByNodeName:function(o,t){t=t.toLowerCase();var c=o.childNodes;for(var i=0,l=c.length;i<l;++i){if(c[i]&&c[i].nodeName&&c[i].nodeName.toLowerCase()==t){return c[i];}}return null;},getChildrenByNodeName:function(o,t){if(!o){return[];} var elementParts=t.split("@");t=elementParts[0].toLowerCase();var attributs=[];for(var k=1;k<elementParts.length;++k){var a=elementParts[k].split("=");attributs.push([a[0].toLowerCase(),a[1]]);}var result=[];var childNodes=o.childNodes;for(var i=0;i<childNodes.length;++i){if(childNodes[i]&&childNodes[i].nodeName&&childNodes[i].nodeName.toLowerCase()==t){ var ok=true;for(var j=0;j<attributs.length;++j){var attributeValue=null;if(childNodes[i].getAttributeNode){if(childNodes[i].getAttributeNode(attributs[j][0])){attributeValue=childNodes[i].getAttributeNode(attributs[j][0]).value;}}else{attributeValue=DomUtil.getAttribute(childNodes[i],attributs[j][0]);}ok=false;if(attributeValue!==null&&typeof(attributeValue)!="undefined"&&attributeValue==attributs[j][1]){ok=true;}else{ok=false;break;}}if(ok){result[result.length]=childNodes[i];}}}return result;},getChildren:function(o){var childNodes=o.childNodes;var result=[];for(var i=0;i<childNodes.length;++i){if(childNodes[i].nodeType==1){result.push(childNodes[i]);}}return result;},getElementsByXPath:function(xPath,root){var result=new Array();if(typeof(root)=="undefined"){root=document.getElementsByNodeName("body")[0];}var indexSlash=xPath.indexOf("/");if(indexSlash===0){xPath=xPath.substring(1,xPath.length);indexSlash=xPath.indexOf("/");}var element="";var otherElements="";if(indexSlash!=-1){element=xPath.substring(0,indexSlash);otherElements=xPath.substring(indexSlash+1,xPath.length);}else{element=xPath.substring(0,xPath.length);} elements=DomUtil.getChildrenByNodeName(root,element);if(otherElements!==""){for(var i=0;i<elements.length;++i){result.addAll(DomUtil.getElementsByXPath(otherElements,elements[i]));}}else{for(var j=0;j<elements.length;++j){result.push(elements[j]);}}return result;},getIndex:function(domObj){var children=DomUtil.getChildren(domObj.parentNode);for(var i=0;i<children.length;++i){if(children[i]==domObj){return i;}}return-1;}};
var I18N=(function(){ function _(br){this.setBundleRessource(br);} return _;})();I18N.TRANS_LANG_CODE={"fr":"fr_FR","en":"en_UK","es":"es_ES","de":"de_DE","nl":"nl_NL"};I18N.prototype={  get:function(k){var m=this.br[k];if(typeof(m)=="undefined"||m===null){ return "";}if(typeof(m)!="string"){return m;}for(var i=1,l=arguments.length;i<l;++i){m=m.replace(new RegExp("\\{"+(i-1)+"\\}","g"),arguments[i]);} m=m.replace(I18N._REdelParam,"");return m;}, brDef:null, br:null, setBundleRessource:function( br, e){if(!br){br=[];}if(e&&this.brDef){ for(var l in this.brDef){if(typeof(l)!="string"||typeof(this.brDef[l])!="object"||!br[l]){continue;}for(var r in this.brDef[l]){if(typeof(r)!="string"||typeof(this.brDef[l][r])!="string"||typeof(br[l][r])!="undefined"){continue;}br[l][r]=this.brDef[l][r];}}} this.brDef=br; this.br=br[I18N.getLang()];if(!this.br){  this.br=br[I18N.defLang];}if(!this.br){  for(var i in br){this.br=br[i];break;}}if(!this.br){  this.br=[];}}}; I18N.defLang="fr_FR"; I18N.lang=null;I18N.getLang=function(){var s=I18N,l=I18N.lang;if(!l){ l=document.getElementsByTagName("html")[0].lang;if(!l){ l=navigator.language;} if(!l){l=navigator.browserLanguage;} if(s.TRANS_LANG_CODE[l]){l=s.TRANS_LANG_CODE[l];}I18N.lang=l=l.replace("-","_");}return l;}; I18N.getCntCode=function(){return I18N.getLang().split("_")[1];}; I18N._REdelParam=/{\d+}/g; I18N.setup=function( o, f, e){if(!o||!o.i18nDef){return;}if(o.i18n&&!f){ return;}if(!o.i18n||e){o.i18n=new I18N(o.i18nDef);}else{o.i18n.setBundleRessource(o.i18nDef,e);}if(o.i18nSetup){o.i18nSetup(f);}};
if(typeof(HTMLElement)=="undefined"){ HTMLElement=function(){}; HTMLElement.patch=function(o){if(!o){return;}if(o._HTMLElement_patch){ return o;}o._HTMLElement_patch=true;for(var i in HTMLElement.prototype){o[i]=HTMLElement.prototype[i];}return o;};}else{HTMLElement.patch=function(o){return o;};} HTMLElement.prototype.getAbsolutePos=function(){var r={x:0,y:0},o=this;while(o){r.x+=o.offsetLeft;r.y+=o.offsetTop;o=o.offsetParent;}return r;}; HTMLElement.prototype.getAbsoluteLeftPos=function(){return this.getAbsolutePos().x;}; HTMLElement.prototype.getAbsoluteTopPos=function(){return this.getAbsolutePos().y;};
var CUi={ _:function(className,obj){return(function( o, opt){if(!o||o["_x"+className]){return;}var c=window[className];this.constructor=c; I18N.setup(c);  EventListener.patch(o); EventListener.patch(this);HTMLElement.patch(o);this.el=o;this.el.className+=" CUi_"+className;this.el["_"+className]=this;this.opt=opt?opt:{};if(this._){ this._();}});},create:function(n,d){var o=CUi._(n);for(var p in d){o[p]=d[p];}o=window[n]=o;o.className=n; o.i18nDef={}; if(o.init){o.init();}return o;}};
var ObjectUtil={ forEach:function( o, f, c){if(!o){return;}c=c||o;for(var p in o){f.call(c,o[p],p,o);}},extend:function(s,d){for(var p in s){d[p]=s[p];}return s;}};
var UiBuilder=CUi.create("UiBuilder",{prototype:{_:function(){this.list={_d:[]};this.timer={};}, register:function( o){if(!o){return;}if(o.push){for(var i=0;i<o.length;++i){this.register(o[i]);}return;}else if(!o.selectors){return;}if(o.isValid&&o.isValid()===false){return;}var v=o.selectors,s=o.starter,l=this.list,d=o.delay,e=this;if(!d){d=20;}if(!s){s="_d";}else if(!l[s]){l[s]=[];}ObjectUtil.forEach(v,function(def,sel){l[s][sel]=def;},this);if(s!="_d"){this.timer[s]=setInterval(function(){e.runStarter(s);},d);}}, runStarter:function( s, f){if(this.timer[s]!==null&&(document.getElementById(s)||f)){clearInterval(this.timer[s]);this.timer[s]=null;this.build(s);}}, runStarters:function(f){ObjectUtil.forEach(this.timer,function(o,l){this.runStarter(l,f);},this);},build:function( s){var o=this.list[s||'_d'];for(var e in o){var l=XPathUtil.getElementsBySelector(e,this.el);if(!l){continue;}for(var i=0;i<l.length;++i){if(!l[i]){continue;}try{if(o[e](l[i],l)===false){break;}}catch(e){throw e;}}}}}});var uiBuilder=new UiBuilder(document);window.addEventListener("load",function(){uiBuilder.runStarters(true);uiBuilder.build();},false);
function Is(){var n=navigator; var a=n.userAgent.toLowerCase(),t=this;function c(v){return a.indexOf(v)!=-1;}  t.major=parseInt(n.appVersion,10);t.minor=parseFloat(n.appVersion);t.gecko=c('gecko');t.mac=c("mac");if(c("msie")&&!c("opera")){t.ie=true;t.ie3=t.major<4;t.ie4=t.major==4&&c("msie 4");t.ie4up=t.major>=4;t.ie5=t.major==4&&c("msie 5.0");t.ie5_5=t.major==4&&c("msie 5.5");t.ie5up=!t.ie3&&!t.ie4;t.ie5_5up=!t.ie3&&!t.ie4&&!t.ie5;t.ie6=t.major==4&&c("msie 6.");t.ie6up=!t.ie3&&!t.ie4&&!t.ie5&&!t.ie5_5;t.ie7=t.ie6up&&c("msie 7.");}else if(c("opera")){t.opera=true;t.opera2=c("opera 2")||c("opera/2");t.opera3=c("opera 3")||c("opera/3");t.opera4=c("opera 4")||c("opera/4");t.opera5=c("opera 5")||c("opera/5");t.opera5up=!t.opera2&&!t.opera3&&!t.opera4;}else{t.safari=/safari/i.test(a); t.khtml=/konqueror|safari|khtml/i.test(a);}  if(c('mozilla')&&!c('spoofer')&&!c('compatible')&&!c('opera')&&!c('webtv')&&!c('hotjava')){t.nav=true;t.nav2=t.major==2;t.nav3=t.major==3;t.nav4=t.major==4;t.nav4up=t.major>=4;t.navonly=c(";nav")||c("; nav");t.nav6=t.major==5;t.nav7=t.major>=5&&t.major<8;t.nav8=t.major>=8;}t.webtv=c("webtv");t.TVNavigator=c("navio")||c("navio_aoltv");t.AOLTV=t.TVNavigator;   if(c("aol")){t.aol=true;t.aol3=t.ie3;t.aol4=t.ie4;t.aol5=c("aol 5");t.aol6=c("aol 6");}if(c("hotjava")){t.hotjava=true;t.hotjava3=t.major==3;t.hotjava3up=t.major>=3;} if(t.nav2||t.ie3){t.js=1.0;}else if(t.nav3){t.js=1.1;}else if(t.opera5up){t.js=1.3;}else if(t.opera){t.js=1.1;}else if((t.nav4&&t.minor<=4.05)||t.ie4){t.js=1.2;}else if((t.nav4&&t.minor>4.05)||t.ie5){t.js=1.3;}else if(t.hotjava3up){t.js=1.4;}else if(t.nav6||t.gecko){t.js=1.5;}     else if(t.nav6up){t.js=1.5;} else if(t.ie5up){t.js=1.3;} else{t.js=0.0;} t.win=c("win")||c("16bit");  t.win95=c("win95")||c("windows 95"); t.win16=c("win16")||c("16bit")||c("windows 3.1")||c("windows 16-bit");t.win31=c("windows 3.1")||c("win16")||c("windows 16-bit");    t.win98=c("win98")||c("windows 98");t.winnt=c("winnt")||c("windows nt");t.win32=t.win95||t.winnt||t.win98||t.major>=4&&n.platform=="Win32"||c("win32")||c("32bit");t.winme=c("win 9x 4.90");t.win2k=c("windows nt 5.0");t.winXP=c("windows nt 5.1");t.os2=c("os/2")||n.appVersion.indexOf("OS/2")!=-1||c("ibm-webexplorer"); if(t.mac&&t.ie5up){t.js=1.4;}if(t.mac){t.mac68k=c("68k")||c("68000");t.macppc=c("ppc")||c("powerpc");t.macosx=c("os x");}t.sun=c("sunos");t.risc=c("risc");t.beos=c("beos");t.sun4=c("sunos 4");t.sun5=c("sunos 5");t.suni86=t.sun&&c("i86");t.irix=c("irix"); t.irix5=c("irix 5");t.irix6=c("irix 6")||c("irix6");t.hpux=c("hp-ux");t.hpux9=t.hpux&&c("09.");t.hpux10=t.hpux&&c("10.");t.aix=c("aix"); t.aix1=c("aix 1");t.aix2=c("aix 2");t.aix3=c("aix 3");t.aix4=c("aix 4");t.linux=c("inux");t.sco=c("sco")||c("unix_sv");t.unixware=c("unix_system_v");t.mpras=c("ncr");t.reliant=c("reliantunix");t.dec=c("dec")||c("osf1")||c("dec_alpha")||c("alphaserver")||c("ultrix")||c("alphastation");t.sinix=c("sinix");t.freebsd=c("freebsd");t.netbsd=c("netbsd");t.bsd=c("bsd");t.unix=c("x11")||t.sun||t.irix||t.hpux||t.sco||t.unixware||t.mpras||t.reliant||t.dec||t.sinix||t.aix||t.linux||t.bsd||t.freebsd;t.vms=c("vax")||c("openvms");t.java=n.javaEnabled();t.supported=true;} var is=new Is();window.is=is;
var StylesheetPatcher={patch:function(p){if(!p){p=[];var o=document.getElementsByTagName("link");for(var j=0;j<o.length;++j){p.push(o[j].href);}}if(!p.push){p=[p];}var s=null,t=null,R=/\.css$/i,a="";if(is.opera&&is.mac){s="_operaMac";}else if(is.opera){s="_opera";}else if(is.safari){s="_safari";}else if(is.ie7){s="_ie7";}else if(is.ie6){s="_ie6";t=s;}else if(is.ie5_5){s="_ie55";t=s;}else if(is.ie5){s="_ie50";t=s;}else if(is.ie&&is.mac){s="_ie52Mac";}else if(is.gecko&&is.mac){s="_geckoMac";}for(var i=0;i<p.length;++i){if(this.isSupportAdvancedUi()){a+='<link href="'+p[i].replace(R,"_script.css")+'" rel="stylesheet" type="text/css" />';}if(s){a+='<link href="'+p[i].replace(R,s+".css")+'" rel="stylesheet" type="text/css" />';}if(t&&this.isSupportAdvancedUi()){a+='<link href="'+p[i].replace(R,"_script"+t+".css")+'" rel="stylesheet" type="text/css" />';}}document.write(a);},patchAll:function(){ var l=document.getElementsByTagName("link");var p=[];for(var i=0;i<l.length;++i){p.push(l.href);}StylesheetPatcher.patch(p);},isSupportAdvancedUi:function(){return!is.ie||!is.mac;}};
if(!window.XMLHttpRequest){ if(window.ActiveXObject){window.XMLHttpRequest=function(){var a=['Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP'];for(var i=0;i<a.length;++i){try{return new ActiveXObject(a[i]);}catch(e){}}return null;};}}
var AjaxRequest=(function(){function _(u){EventListener.patch(this);this.transport=new XMLHttpRequest();this.params=[];this.headers={'X-Requested-With':'XMLHttpRequest','If-Modified-Since':'Sat, 1 Jan 2000 00:00:00 GMT'};this.setUrl(u);}return _;})();AjaxRequest._RE=/^http:\/\/([^\/]+)/;AjaxRequest.prototype={isSupported:function(){if(!this.transport){return false;}var r=AjaxRequest._RE.exec(this.url);return!r||!r[1]||r[1]==location.host;},method:"get",asynchronous:true,setMethod:function(m){if(!m){this.method="get";}else{this.method=m.toLowerCase();}},setUrl:function(u){if(!u){return;}u=u.split("?");this.url=u[0];if(!u[1]){return;}u=u[1].split("&");for(var i=0;i<u.length;++i){var p=u[i].split("=");this.params[p[0]]=p[1];}},setParameters:function(o){this.params=o;},getQueryParameters:function(){var p=[];for(var i in this.params){if(typeof this.params[i]!="string"){continue;}p.push(i+"="+this.params[i]);}p.push("_xmlHttpReqTm="+new Date().getTime());return p.join("&");},send:function( xml){ if(this.transport.overrideMimeType){this.headers['Connection']='close';}var u=this.url;var p=this.getQueryParameters();if(this.method.toLowerCase()=="get"||typeof xml=="string"){ if(p){u+="?"+p;}p=null; if(typeof xml=="string"){ p=xml;this.headers['Content-Type']='text/xml';this.method="post";}}else{ if(!p){p=null;}this.method="post";this.headers["Content-type"]="application/x-www-form-urlencoded";}try{this.transport.open(this.method,u,this.asynchronous);var a=this.headers;for(var h in a){if(typeof a[h]=="function"||typeof a[h]=="object"){continue;}this.transport.setRequestHeader(h,a[h]);}if(this.asynchronous){this.transport.onreadystatechange=this.respond.bind(this);}this.transport.send(p);}catch(e){return e;}},respond:function(){this.dispatchEvent("statechange");var r=this.dispatchEvent(AjaxRequest.EVENT[this.transport.readyState]);if(this.transport.readyState==4){ this.transport.onreadystatechange=Function.EMPTY;}return r;}};AjaxRequest.EVENT=['uninitialized','loading','loaded','interactive','complete']; AjaxRequest.HTTPCODE={  "200":"requête accomplie","201":"document créé","202":"requête accepté","203":"information partielle","204":"aucune réponse","205":"RAZ du contenu","206":"contenu partiel", "301":"données transférées à une adresse","302":"trouvé","303":"autre adresse en POST","304":"non modifié", "400":"mauvaise requête","401":"accès non autorisé","402":"paiement requis","403":"accès interdit","404":"non trouvé", "500":"erreur interne","501":"service demandé non supporté","502":"mauvaise retransmition","503":"service indisponible","504":"Timeout de la retransmition"};AjaxRequest.PROGRESS_STATUS=['Non initialisé','Envoi des données','Transfert effectué','Réception des données','Réception terminée'];
var DomUtil={cloneAttributes:function(source,target){var a=source.attributes;for(var i=0,l=a.length;i<l;++i){ var s=a[i];if(s.nodeName.toLowerCase()=="class"){ target.className=s.nodeValue;}else{target.setAttribute(s.nodeName,s.nodeValue);}}},cloneElement:function(source){if(!source){return null;}var clone=null;   if(source.nodeType===1){ clone=document.createElement(source.nodeName);DomUtil.cloneAttributes(source,clone);DomUtil.cloneChildNodes(source,clone); if(clone.nodeName=="INPUT"){if(clone.type=="text"||clone.type=="file"||clone.type=="password"){clone.defaultValue=clone.value;}else if(clone.type=="radio"||clone.type=="checkbox"){clone.defaultChecked=clone.checked;}}}else if(source.nodeType==3){ clone=document.createTextNode(source.data);}source=source.nextSibling;return clone;},cloneChildNodes:function( source, target){var c=source.childNodes;for(var i=0,l=c.length;i<l;++i){target.appendChild(DomUtil.cloneElement(c.item(i)));}}, insertAfter:function( n, r){var p=r.parentNode;if(r.nextSibling){r.parentNode.insertBefore(n,r.nextSibling);}else{r.parentNode.appendChild(n);}}, appendChildFirst:function( p, n){if(p.firstChild){p.insertBefore(n,p.firstChild);}else{p.appendChild(n);}}, addClassName:function(o, c){if(!DomUtil.containsClassName(o,c)){o.className+=" "+c;}}, removeClassName:function(o, c){o.className=o.className.replace(new RegExp("(^|\\s)"+c+"($|\\s)")," ");}, toogleClassName:function(o, c){if(DomUtil.containsClassName(o,c)){DomUtil.removeClassName(o,c);}else{DomUtil.addClassName(o,c);}return o;}, containsClassName:function( o, c){return new RegExp("(^|\\s)"+c+"($|\\s)").test(o.className);},replaceNode:function( target, x, id){if(!x){return;}if(id){if(!x.getElementById){var t=x;x=new(function(){this.data=t;this.getElementById=function(id){var o=this.data.getElementsByTagName("*");for(var i=0,l=o.length;i<l;++i){if(o[i].getAttribute("id")==id){return o[i];}}return null;};});}x=x.getElementById(id);if(!x){return;}}x=x.cloneNode(true);try{x=DomUtil.cloneElement(x);var p=target.parentNode;p.replaceChild(x,target);}catch(e){alert(e);}return x;}};
var HtmlObjectLoader=(function(){ function _(objectToReplace,urlSource,idSource){this.objectToReplace=objectToReplace;if(!objectToReplace){return;}this.http=new AjaxRequest(urlSource?urlSource:objectToReplace.href);this.idSource=(idSource?idSource:objectToReplace.id);this.http.addEventListener("complete",this.updateContent.bind(this),false);}return _;})();if(is.ie&&is.mac){HtmlObjectLoader.prototype={setDisplayProgress:Function.EMPTY,load:Function.EMPTY,displayProgress:Function.EMPTY,updateContent:Function.EMPTY,loadIframe:Function.EMPTY};}else{HtmlObjectLoader.prototype={setDisplayProgress:function(b){if(!this.http){return;}this.displayProgressStatus=b;if(!this.progressStatus&&b){this.progressStatus=document.createElement("p");this.progressStatus.className="progressStatus";this.http.addEventListener("statechange",this.displayProgress.bind(this),false);}else{this.http.removeEventListener("statechange",this.displayProgress.bind(this),false);}},load:function(){if(!this.http||!this.http.isSupported()){this.loadIframe();return;}if(this.displayProgressStatus){this.objectToReplace.innerHTML="";this.objectToReplace.appendChild(this.progressStatus);}var error=this.http.send();if(error&&this.displayProgressStatus){this.progressStatus.innerHTML="R\xE9cup\xE9ration des donn\xE9es impossible";this.progressStatus.title=error;}},displayProgress:function(){this.progressStatus.innerHTML="";this.progressStatus.appendChild(document.createTextNode(AjaxRequest.PROGRESS_STATUS[this.http.transport.readyState]));if(this.http.transport.readyState==4){try{this.progressStatus.appendChild(document.createTextNode(" Status : "+AjaxRequest.HTTPCODE[this.http.transport.status]));}catch(e){this.progressStatus.innerHTML='<span title="'+e+'"> - </span>';}}},updateContent:function(){DomUtil.replaceNode(this.objectToReplace,this.http.transport.responseXML,this.idSource);},loadIframe:function(){if(!this.http){return;}var u=this.http.getQueryParameters();if(u){u="?"+u;}u=this.http.url+u;var o=document.createElement("iframe");o.src=u;o.id=this.objectToReplace.id;o.className="HtmlObjectLoader_iframe";this.objectToReplace.parentNode.insertBefore(o,this.objectToReplace);this.objectToReplace.parentNode.removeChild(this.objectToReplace);}};}
if(!window.getComputedStyle){ function ComputedStyle(obj){this.obj=obj;this.getPropertyValue=function(cssProperty){var props=cssProperty.split("-");for(var i=1;i<props.length;++i){props[i]=props[i].substring(0,1).toUpperCase()+props[i].substring(1);}var val=this.obj.currentStyle[props.join("")];return val;};}window.getComputedStyle=function(obj,imp){return new ComputedStyle(obj);};} window.stopEvent=function(e){if(typeof(e)=="undefined"){e=window.event;}if(typeof(e)=="undefined"){return;}e.cancelBubble=true;e.returnValue=false;if(e.stopPropagation){e.stopPropagation();}if(e.preventDefault){e.preventDefault();}return false;};if(typeof(window.pageYOffset)=="undefined"){window.getPageYOffset=function(){var s=parseInt(document.documentElement.scrollTop,10);if(s===0){s=parseInt(document.body.scrollTop,10);}return s;};}else{window.getPageYOffset=function(){return parseInt(window.pageYOffset,10);};}if(typeof(window.pageXOffset)=="undefined"){window.getPageXOffset=function(){var s=parseInt(document.documentElement.scrollLeft,10);if(s===0){s=parseInt(document.body.scrollLeft,10);}return s;};}else{window.getPageXOffset=function(){return parseInt(window.pageXOffset,10);};}if(typeof(window.innerHeight)=="undefined"){window.getInnerHeight=function(){var s=parseInt(document.documentElement.clientHeight,10);if(s===0){s=parseInt(document.body.clientHeight,10);}return s;};}else{window.getInnerHeight=function(){return parseInt(window.innerHeight,10);};}if(typeof(window.innerWidth)=="undefined"){
		window.getInnerWidth=function(){
		var s=parseInt(document.documentElement.clientWidth,10);
		if(s===0){
			s=parseInt(document.body.clientWidth,10);
		}
		return s;
	};
}else{
	window.getInnerWidth=function(){
		return parseInt(window.innerWidth,10);
	};
}
Date.NB_DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31]; 
Date.SECOND=1000 ;
Date.MINUTE=60*Date.SECOND;
Date.HOUR=60*Date.MINUTE;
Date.DAY=24*Date.HOUR;
Date.WEEK=7*Date.DAY;
Date.prototype.clone=function(){
	return new Date(this.getTime());
}; 
Date.prototype.getNbDaysInMonth=function(m){
	var y=this.getFullYear();
	if(typeof m=="undefined"){
		m=this.getMonth();
	}
	if(m==1&&((0===(y%4))&&((0!==(y%100))||(0===(y%400))))){
		return 29;
	}
	return Date.NB_DAYS_IN_MONTH[m];
};
Date.NOW=new Date();
Date.prototype.getDayOfYear=function(){
	var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
	var then=new Date(this.getFullYear(),0,0,0,0,0);
	var time=now-then;
	return Math.floor(time/Date.DAY);
}; 
Date.prototype.getWeekNumber=function(){
	var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
	var DoW=d.getDay();
	d.setDate(d.getDate()-(DoW+6)%7+3); 
	var ms=d.valueOf(); 
	d.setMonth(0);
	d.setDate(4); 
	return Math.round((ms-d.valueOf())/(7*864e5))+1;
}; 
Date.prototype.equalsTo=function(d){
	return this.getFullYear()==d.getFullYear()&&this.getMonth()==d.getMonth()&&this.getDate()==d.getDate()&&this.getHours()==d.getHours()&&this.getMinutes()==d.getMinutes();
};
var DateFormat=(function(){function _(p){I18N.setup(DateFormat);if(!p){p=DateFormat.i18n.br.timeFormatShort;}this.pattern=p;}return _;})();DateFormat._RE1=/\W+/;DateFormat._RE2=/%./g;DateFormat._RE3=/%./g;DateFormat.prototype={parse:function(str){var today=new Date(),y=0,m=-1,d=0,a=str.split(DateFormat._RE1),b=this.pattern.match(DateFormat._RE2),i=0,j=0,hr=0,min=0;for(i=0;i<a.length;++i){if(!a[i]){continue;}switch(b[i]){case "%d":case "%e":d=parseInt(a[i],10);break;case "%M":m=parseInt(a[i],10)-1;break;case "%Y":case "%y":y=parseInt(a[i],10);if(y<100){y+=y>29?1900:2000;}break;case "%b":case "%B":for(j=0;j<12;++j){if(DateFormat.i18n.br.MONTH[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12){hr+=12;}else if(/am/i.test(a[i])&&hr>=12){hr-=12;}break;case "%m":min=parseInt(a[i],10);break;}}if(isNaN(y)){y=today.getFullYear();}if(isNaN(m)){m=today.getMonth();}if(isNaN(d)){d=today.getDate();}if(isNaN(hr)){hr=today.getHours();}if(isNaN(min)){min=today.getMinutes();}if(y!==0&&m!=-1&&d!==0){return new Date(y,m,d,hr,min,0);}y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(DateFormat.i18n.br.MONTH[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}if(t!=-1){if(m!=-1){d=m+1;}m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y===0){y=parseInt(a[i],10);if(y<100){y+=y>29?1900:2000;}}else if(d===0){d=a[i];}}if(y===0){y=today.getFullYear();}if(m!=-1&&d!==0){return new Date(y,m,d,hr,min,0);}return today;}, format:function(d){var m=d.getMonth(),D=d.getDate(),y=d.getFullYear(),wn=d.getWeekNumber(),w=d.getDay(),hr=d.getHours(),dy=d.getDayOfYear(),min=d.getMinutes(),sec=d.getSeconds();var pm=(hr>=12);var ir=pm?(hr-12):hr;if(ir===0){ir=12;}var t=wn<10?("0"+wn):wn;var s={"%a":DateFormat.i18n.br.DAY_AB[w], "%A":DateFormat.i18n.br.DAY[w], "%b":DateFormat.i18n.br.MONTH_AB[m], "%B":DateFormat.i18n.br.MONTH[m],  "%C":1+Math.floor(y/100), "%d":D<10?("0"+D):D, "%e":D,   "%H":hr<10?("0"+hr):hr, "%I":ir<10?("0"+ir):ir, "%j":dy<100?(dy<10?("00"+dy):("0"+dy)):dy, "%k":hr, "%l":ir, "%M":m<9?("0"+(1+m)):(1+m), "%m":min<10?("0"+min):min, "%n":"\n", "%p":pm?"PM":"AM","%P":pm?"pm":"am",  "%S":Math.floor(d.getTime()/1000),"%s":sec<10?("0"+sec):sec, "%t":"\t",  "%U":t,"%W":t,"%V":t,"%u":w+1, "%w":w,   "%y":(''+y).substr(2,2), "%Y":y, "%%":"%" };return DateFormat.REPLACE(this.pattern,s);}};if(typeof(is)!="undefined"&&!is.ie5&&!(is.ie&&is.mac)&&!is.khtml){DateFormat.REPLACE=function(x,s){return x.replace(DateFormat._RE3,function(p){return s[p]||p;});};}else{DateFormat.REPLACE=function(x,s){var a=x.match(DateFormat._RE3);if(!a){return x;}for(var i=0;i<a.length;++i){var t=s[a[i]];if(typeof(t)=="undefined"){continue;}var r=new RegExp(a[i],'g');x=x.replace(r,t);}return x;};} DateFormat.i18nDef={};
DateFormat.i18nDef["fr_FR"]={ DAY_AB:["dim","lun","mar","mer","jeu","ven","sam"], DAY_FL:["d","l","m","m","j","v","s"], DAY:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], MONTH_AB:["jan","f\xE9v","mar","avr","mai","juin","juil","ao\xFBt","sep","oct","nov","d\xE9c"], MONTH:["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xF9t","septembre","octobre","novembre","d\xE9cembre"], firstDayWeek:6, dayFormatLong:"%A %e %B", dayFormatShort:"%d/%M/%Y", timeFormatLong:"%A %e %B %Hh %Mm %ss", timeFormatShort:"%d/%M/%Y %H:%m:%s"};
var ShortcutManager=(function(r){function _( k, e){this.fct={N:[],CTRL_:[],ALT_:[],SHIFT_:[]};document.addEventListener("keydown",this.run.bind(this),false);if(k){this.register(k);}this.enabled=e;}return _;})();ShortcutManager.getCode=function(e){if(e.keyCode!==0){return e.keyCode;}return e.charCode;};ShortcutManager.prototype={run:function(e){if(!this.enabled){return;}if(!e){e=event;}var c=ShortcutManager.getCode(e)+""; if(this.runFcts(this.fct.N[c],e)===false){return false;}var f;if(e.ctrlKey){f=this.fct.CTRL_[c];}if(e.altKey){f=this.fct.ALT_[c];}if(e.shiftKey){f=this.fct.SHIFT_[c];}if(this.runFcts(f,e)===false){return false;}},runFcts:function( f, e){for(var i=0;f&&i<f.length;++i){if(f[i]&&f[i](e)===false){return window.stopEvent(e);}}},enabled:false,disable:function(){this.enabled=false;},enable:function(){this.enabled=true;}, register:function(k,m){for(var c in k){if(ShortcutManager.CODE[c]){this.add(ShortcutManager.CODE[c],k[c],m);}else if(ShortcutManager.MODIFIER[c]){this.register(k[c],c);}}}, add:function( c, f, m){c=c+"";var a=this.fct[m];if(!a){a=this.fct.N;}if(!a[c]){a[c]=[];}a[c].push(f);},remove:function(c,f,m){var a=this.fct[m];if(!a){a=this.fct.N;}if(!a[c]){return;}for(var i=a[c].length-1;i>=0;--i){if(a[c][i]==f){a[c][i]=null;}}}};ShortcutManager.CODE={ENTER:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,STOPSCROLL:145,PAUSE:19,SWIFT:16,CRTL:17,ALT:18,WIN:91, WINRIGHT:92,CONTEXT:93,MAJ:20,TAB:9, BSPACE:8,DELETE:46,SPACE:32, LOCKN:144,ESC:27,UP:38,DOWN:40,LEFT:37,RIGHT:39,PUP:33,PDOWN:34,HOME:36,END:35};ShortcutManager.MODIFIER={ALT_:"altKey",CTRL_:"ctrlKey",SHIFT_:"shiftKey "};
var DatePicker=CUi.create("DatePicker",{prototype:{ _:function(){ var s=this,e=this.el,o=this.opt; e.setAttribute("autocomplete","off"); if(!o.format){I18N.setup(DateFormat); o.format=DateFormat.i18n.get("dayFormatShort");}s.df=new DateFormat(o.format); if(o.trigger){var b=DatePicker.BUTTON.cloneNode(true);s.button=b;b.innerHTML=s.button.title=DatePicker.i18n.get("button");b._DatePicker=s;b.onclick=DatePicker._static.F;DomUtil.insertAfter(b,e);}else{ e.className="DatePicker_trigger";} if(typeof o.showOnClick=="undefined"||o.showOnClick===null){ o.showOnClick=true;}if(typeof o.shortcut=="undefined"||o.shortcut===null){ o.shortcut=true;}if(o.showOnClick){e.onclick=DatePicker._static.F;}if(o.showOnFocus){e.onfocus=DatePicker._static.F;}if(o.shortcut){ s.inputShortcutManager=new ShortcutManager({CTRL_:{SPACE:DatePicker.prototype.show.bind(this)}}); s.shortcutManager=new ShortcutManager({UP:this.goToPrevWeek.bind(this),DOWN:this.goToNextWeek.bind(this),LEFT:this.goToPrevDay.bind(this),RIGHT:this.goToNextDay.bind(this),PUP:this.goToPrevMonth.bind(this),PDOWN:this.goToNextMonth.bind(this),ENTER:this.selectDate.bind(this),ESC:this.hide.bind(this),HOME:this.goToday.bind(this)});s.current=new Date();e.addEventListener("focus",function(){if(!s.inputShortcutManager){return;}s.inputShortcutManager.enable();},false);e.addEventListener("blur",function(){if(!s.inputShortcutManager){return;}s.inputShortcutManager.disable();},false);}},goToday:function( e){this.showMonth(new Date(),e);return false;},goToNextDay:function( e){var d=this.current.clone();d.setDate(d.getDate()+1);this.showMonth(d,e);},goToPrevDay:function( e){var d=this.current.clone();d.setDate(d.getDate()-1);this.showMonth(d,e);},goToNextWeek:function( e){var d=this.current.clone();d.setDate(d.getDate()+7);this.showMonth(d,e);},goToPrevWeek:function( e){var d=this.current.clone();d.setDate(d.getDate()-7);this.showMonth(d,e);}, changeMonth:function( e, i){var d=this.current.clone();  d.setDate(1); d.setMonth(d.getMonth()+i); if(this.current.getDate()>d.getNbDaysInMonth()){ d.setDate(d.getNbDaysInMonth());}else{ d.setDate(this.current.getDate());}this.showMonth(d,e);},goToNextMonth:function( e){this.changeMonth(e,1);},goToPrevMonth:function( e){this.changeMonth(e,-1);},show:function(){DatePicker.showCal(this);},hide:function(){DatePicker.hideCal(this);},isEnable:function(d){return (d.getTime()>Date.NOW.getTime()&&d.getDay()>=6);},showDate:function(d){if(!d){d=new Date();}d.setHours(23);d.setMinutes(0);d.setSeconds(0);this.showMonth(d);},showMonth:function( ref, e){window.stopEvent(e);if(!ref){ref=this.current;}var d=ref.clone();
if(!this.isEnable(ref)){ 
	for(var k=1;k<32;++k){
		d.setDate(k);
		if(this.isEnable(d)){
			ref=d.clone();break;
		}
	}
	if(!this.isEnable(d)){
		window.stopEvent(e);
		//return false;
	}
}
d.setDate(1);
var r=ref.clone();
var caption=DateFormat.i18n.br.MONTH[ref.getMonth()]+" "+ref.getFullYear();
try{this.cal.caption.innerHTML=caption;}
catch(e){this.cal.month.innerHTML=""; this.cal.caption.appendChild(document.createTextNode(caption));} 
while(d.getDay()!=DateFormat.i18n.br.firstDayWeek){
	d.setDate(d.getDate()-1);
}
this.cal.table.style.display="none";
var j=this.cal.days;
var l=j.length;
for(var i=0;i<l;++i){
	var o=j[i],cn="";
	if(d.getTime()==r.getTime()){
		cn="current";
	}else{
		cn=(d.getMonth()<r.getMonth()?"prev":d.getMonth()>r.getMonth()?"next":"");
	}
	if(!this.isEnable(d)){
		cn+=" disabled";
		o._disabled=true;
	}else{
		o._disabled=false;
	}
	try{o.innerHTML=d.getDate();}
	catch(e){
		o.innerHTML="";
		o.appendChild(document.createTextNode(d.getDate()));
	}
	o._d=d.getTime();
	o.parentNode.className=cn;
	d.setDate(d.getDate()+1);
	this.current=ref;
}
this.cal.table.style.display="block";
return false;},selectDate:function( l, e){
	l._d=parseInt(l._d,10);
	var d;
	if(l&&l._d){ 
		d=new Date(l._d);
		if(!this.isEnable(d)){
			window.stopEvent(e);
			l.blur();
			return false;
		}
	}else{
		d=this.current;
		if(!this.isEnable(d)){
			try{window.stopEvent(l);}
			catch(e){}
			return;}
		}
		this.current.setDate(1);
		this.current.setFullYear(d.getFullYear());
		this.current.setMonth(d.getMonth());
		this.current.setDate(d.getDate());
		d=this.current;
		var oldValue=this.el.value;
		this.el.value=this.df.format(d);
		var of=this.el.onfocus;
		this.el.onfocus=Function.EMPTY;
		this.el.focus();
		this.el.select();
		DatePicker.hideCal();
		function F(o,f){
			return(function(){o.onfocus=f;});
		}
		window.status=(this.el.value+" "+oldValue);
		if(this.el.value!=oldValue){
			this.dispatchEvent("change");
		}
		setTimeout(F(this.el,of),100);
		return false;
	}
},_static:{F:function(){this._DatePicker.show();return false;}}, CAL:null, NOW:new Date(), currentPicker:null, BUTTON:document.createElement("a"), getCal:function(o){ var D=DatePicker;var br=D.i18n.br,fdBr=DateFormat.i18n.br,C=D.CAL;if(!C){var b=['<p id="DatePicker_caption"><strong></strong> <a href="javascript:void(0)" title="',br.goToPrevMonthTitle,'" id="DatePicker_c_mPrev">',br.goToPrevMonth,'</a> <a href="javascript:void(0)" title="',br.goToNextMonthTitle,'" id="DatePicker_c_mNext">',br.goToNextMonth,'</a></p><table><thead><tr>'];var c=fdBr.firstDayWeek;for(var i=0;i<7;++i){b.push('<th>');b.push(fdBr.DAY_FL[c]);if(++c>6){c=0;}b.push('</th>');}b.push('</tr></thead><tbody>');for(var w=0;w<6;++w){b.push("<tr>");for(var j=0;j<7;++j){b.push('<td><a href="javascript:void(0)" onclick="DatePicker.currentPicker.selectDate(this,event);return false"></a></td>');}b.push("</tr>");}var N=Date.NOW;var ajdh=new Date(N.getFullYear(),N.getMonth(),N.getDate(),23,59,59,999);b.push('</tbody></table><p><a href="javascript:void(0)" title="',br.todayTitle,'" onclick="this._d=\''+ajdh.getTime()+'\';return DatePicker.currentPicker.selectDate(this,event)" id="DatePicker_c_today">',br.today,'</a></p>');var t=document.createElement("div");t.id="DatePicker";t.innerHTML=b.join('');document.body.appendChild(t);C=D.CAL={div:t,caption:t.firstChild.firstChild,table:t.firstChild.nextSibling,days:t.firstChild.nextSibling.tBodies[0].getElementsByTagName("a")};var lf=t.firstChild.getElementsByTagName("a");lf[0].onclick=function(e){D.currentPicker.goToPrevMonth(e);return false;};lf[1].onclick=function(e){D.currentPicker.goToNextMonth(e);return false;};}var p=o.el.getAbsolutePos();C.div.style.left=p.x+"px";C.div.style.top=p.y+"px";C.table._DatePicker=o;D.currentPicker=o;return C;}, hideCal:function(){document.onclick=Function.EMPTY;var o=DatePicker.currentPicker;if(!o){return;}if(o.cal){if(o.shortcutManager){o.shortcutManager.disable();}o.cal.div.style.display="none";o.cal=null;}}, showCal:function(o){if(DatePicker.currentPicker!=o){DatePicker.hideCal();}o.cal=DatePicker.getCal(o);  o.dateToShow=o.df.parse(o.el.value);o.dispatchEvent("beforeshow"); o.cal.div.style.display="block";o.showDate(o.dateToShow); setTimeout('document.onclick=DatePicker.hideCal',100);if(o.shortcutManager){o.shortcutManager.enable();}}, init:function(){EventListener.patch(document);var D=DatePicker;D.NOW.setHours(0);D.NOW.setMinutes(0);D.NOW.setSeconds(0);D.BUTTON.href="javascript:void(0)";D.BUTTON.className="DatePicker_button";}});
DatePicker.i18nDef["fr_FR"]={ button:"Afficher le calendrier",goToPrevMonth:"mois pr&eacute;c.",goToPrevMonthTitle:"Voir le mois pr&eacute;c&eacute;dent",goToNextMonth:"mois suiv.",goToNextMonthTitle:"Voir le mois suivant",today:"Aujourd\'hui",todayTitle:"Prendre la date d\'aujourd\'hui"};
var PopupOpener=(function(){function FC(){this._PopupOpener.open();return false;} function _(l,p){var self=this;this.domObj=l;this.properties=p?p:{};if(typeof this.properties.resizable=="undefined"){this.properties.resizable=true;}if(typeof this.properties.scrollbars=="undefined"){this.properties.scrollbars=true;}if(!l){return;} this.domObj._PopupOpener=this; this.domObj.onclick=FC;} return _;})(); PopupOpener.prototype={ getPropertiesString:function(){var p=[],a=this.properties;for(var i in a){if(typeof(i)=="string"&&a[i]!==false){p.push(i+(a[i]===true?"":"="+a[i]));}}return p.join(",");}, open:function(){if(this.popup){this.popup.close();}this.popup=window.open(this.domObj.href,this.domObj.target,this.getPropertiesString());this.center();this.popup.focus();}, center:function(){if(this.popup){try{this.popup.moveTo(Math.round((screen.width-this.properties.width)/2),Math.round((screen.height-this.properties.height)/2));}catch(e){}}}};
var Oas=(function(){function _(sitePage,listPos,query){this.sitePage=sitePage;this.listPos=listPos.replace(/\s+/,"");this.query=query;this.rn=Math.random()+"";this.rns=this.rn.substring(2,11);if(is.mac&&is.ie){return;}}return _;})(); Oas.url='http://medias.voyages-sncf.com/RealMedia/ads/';Oas.version=11;Oas.rn=Math.random()+"";Oas.rns=Oas.rn.substring(2,11);Oas.prototype={normal:function(pos){var a=document.createElement("a");a.href=this.getUrl('click_nx.ads',this.rns,pos);a.target="_top";a.innerHTML='<img src="'+this.getUrl('adstream_nx.ads',this.rns,pos)+'" alt="Click !" />';return a;}, getUrl:function( u, s,pos){return Oas.url+u+'/'+this.sitePage+'/1'+s+'@'+this.listPos+'!'+pos+this.query;},ad:function(pos){try{ var oldDW=document.write;document._writeBuffer=[];document._flushBuffer=function(){var a=document._writeBuffer.join("");document._writeBuffer=[];return a;};document.write=function(o){document._writeBuffer.push(o);};if(Oas.version>=11&&typeof(OAS_RICH)!='undefined'){ OAS_RICH(pos);var div=document.createElement("div");div.innerHTML=document._flushBuffer();return div.firstChild;}else{return this.normal(pos);}document.write=oldDW;return document._flushBuffer();}catch(e){}return "";},insertOasScript:function(){var url=Oas.url+'adstream_mjx.ads/'+this.sitePage+'/1'+this.rns+'@'+this.listPos+this.query;document.write('\x3Cscript type="text/javascript" src="'+url+'"\x3E\x3C/script\x3E');}, appendPubTo:function( o){var t=this.listPos.split(",");for(var i=0;i<t.length;++i){var p=document.createElement("div");p.id="pub_"+t[i];p.appendChild(this.ad(t[i]));o.appendChild(p);}}};
var Session=(function(){ function _(d){if(!d){d=document;}this.el=d;this.el._Session=this;}return _;})();Session.prototype={ getAttribute:function(k,d){var c=this.el.cookie;if(!c){return d;}c=c.split(";");k=escape(k);for(var i=0;i<c.length;++i){var p=c[i].split("=");if(p.length>1&&k==p[0].trim()){return unescape(p[1].trim());}}return d;}, setAttribute:function(k,v,o){var a=[];if(v===null||typeof(v)=="undefined"){v="";}a.push(escape(k)+"="+escape(v+""));  var e,p,d;if(o){e=o.expires;p=o.path;d=o.domain;if(o.persist){e=Session.PERSIST;}if(o.secure){a.push("secure");}}if(e){if(typeof(e)!="Date"){e=new Date(e);}a.push("expires="+e.toGMTString());}if(p){a.push("path="+p);}else{a.push("path=/");}if(d){a.push("domain="+d);}this.el.cookie=a.join("; ");},removeAttribute:function(k,o){if(!o){o=[];}o.expires=Session.EXPIRE;this.setAttribute(k,null,o);}, getAttributeNames:function(){var t=this.el.cookie.split(";"),r=[];for(var i=0;i<t.length;++i){var v=t[i].split("=");r.push(unescape(v[0].trim()));}return r;},check:function(){this.setAttribute(Session.CHECKKEY,"test");if(this.getAttribute(Session.CHECKKEY)!="test"){return false;}this.removeAttribute(Session.CHECKKEY);return true;}};Session.CHECKKEY="__js_Session_test_cookie";Session.EXPIRE=new Date(1);Session.PERSIST=new Date(2105,1,1,1,1,1);var session=new Session(document);
var WebAndStats=(function(){ function _(o){if(!o.pageUrl){o.pageUrl=window.document.URL;}if(!o.userGroup){o.userGroup="";}if(!o.params){o.params="";}var n=escape(navigator.appName);if(n.substring(0,9)=="Microsoft"){n="Internet Explorer";}var w="na";if(typeof(window.innerWidth)=='number'){w=window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){ w=document.documentElement.clientWidth;}else if(document.body&&document.body.clientWidth){ w=document.body.clientWidth;}var p="na";if(navigator.plugins&&navigator.plugins[0]&&navigator.plugins[0].name){p=[];for(var j=0;j<navigator.plugins.length;++j){p.push(navigator.plugins[j].name);}p=p.join(":");}var d=new Date();var u=["SITE_ID="+o.siteId,"REFERRER="+escape(document.referrer),"NAV_NAME="+escape(n),"NAV_VERSION="+(is.ie7?7:is.ie6?6:is.ie5_5||is.ie5?5:is.ie4?4:is.nav8?8:is.nav7?7:is.nav6?6:parseFloat(navigator.appVersion)),"NAV_LANGUAGE="+(navigator.language?navigator.language:navigator.browserLanguage?navigator.browserLanguage:"na"),"NAV_PLUGINS="+escape(p),"SYS_NAME="+(is.winXP?"WinXP":is.win2k?"Win2000":is.winnt?"WinNT":is.win98?"Win98":is.win95?"Win95":is.linux?"Linux":is.sun?"SunOs":is.mac?"Mac":is.risc?"RISC":is.netbsd?"NetBSD":is.freebsd?"FreeBSD":is.irix?"IRIX":is.hpux?"HP-UX":is.aix?"AIX":is.beos?"BeOS":navigator.platform),"LOCAL_DATE="+d.getHours(),"JAVA_ENABLE="+(navigator.javaEnabled()?navigator.javaEnabled():"na"),"JS_VERSION="+is.js,"SCREEN_SIZE_LG="+(screen&&screen.width?screen.width:"na"),"SCREEN_SIZE_HT="+(screen&&screen.height?screen.height:"na"),"SCREEN_COLOR="+Math.abs(!screen?0:screen.colorDepth?screen.colorDepth:screen.pixelDepth?screen.pixelDepth:0),"WINDOW_WIDTH="+w,"PAGE_TITLE="+escape(document.title),"PAGE_NAME="+escape(o.pageName?o.pageName:""),"PAGE_URL="+escape(o.pageUrl),"HANDLE_PARAM="+(o.handleParam?"YES":"NO"),"GALLERY_NAME="+escape(o.galleryName?o.galleryName:""),"GALLERY_PRODUCTID="+escape(o.galleryProductId?o.galleryProductId:""),"NAV_COOKIE="+session.check(),"JS_LOADED=YES","LOCAL_TIME="+escape(d),"USER_GROUP="+escape(o.userGroup),"PARAMETERS="+escape(o.params)]; this.tracker=new Image();this.tracker.src="http://apu0800.audientia.net:80/scripts/stats.asp?"+u.join("&");}return _;})();
var BookingPanel=(function(){function F(){this._BookingPanel.select();return false;} function _( o, e){if(!o){return;}this.domObj=o;this.domObj._BookingPanel=this; this._ExpressBooking=e; var h=o.getElementsByTagName("h3")[0];h._BookingPanel=this;h.onclick=F; this.optionsLabel=BookingPanel.LABELS[o.id];}return _;})();BookingPanel.prototype={ refreshOptions:function(){ if(!this._ExpressBooking.epack){return;}var o=this._ExpressBooking.epack.options;for(var i=0;i<o.length;++i){if(!this.optionsLabel[o[i].id]){ DomUtil.addClassName(o[i].parentNode,"disabled");o[i].disabled=true;continue;}o[i].disabled=false;DomUtil.removeClassName(o[i].parentNode,"disabled"); o[i].nextSibling.nodeValue=' '+this.optionsLabel[o[i].id];o[i].checked=true;}return true;}, select:function(){DomUtil.addClassName(this.domObj,"current");this._ExpressBooking.resetTabs(this);this.refreshOptions();}, deselect:function(){DomUtil.removeClassName(this.domObj,"current");}};BookingPanel.LABELS={fm_bookingtrain:{PackageType_fm_bookingtrain:"Train seul",PackageType_2:"Train & Hôtel",PackageType_5:"Train & Voiture",PackageType_1:"Train & Hôtel & Voiture"},fm_bookingvol:{PackageType_fm_bookingvol:"Vol seul",PackageType_2:"Vol / Train & Hôtel",PackageType_5:"Vol / Train & Voiture",PackageType_1:"Vol / Train & Hôtel & Voiture"},fm_bookinghotel:{PackageType_fm_bookinghotel:"Hotel seul",PackageType_2:"Train / Vol & Hôtel"},fm_bookingvoiture:{PackageType_fm_bookingvoiture:"Voiture seule",PackageType_5:"Train / Vol & Voiture"}};
var Epackage=(function(){function ACTIVE(){  var o=this._Epackage.epackOpts;for(var i=0;i<o.length;++i){if(o[i].checked&&this._Epackage.defaultOpts[o[i].value]){this._Epackage.desactive();return true;}}this._Epackage.active();return true;} function _(o,e){if(!o){return;} this.domObj=o;this.domObj._Epackage=this; this._ExpressBooking=e; this.options=[];var t=o.elements["PackageType"];for(var i=0;i<t.length;++i){t[i]._form=t[i]._Epackage=this;t[i].onchange=t[i].onclick=Epackage.ONCHANGE_OPTION;this.options.push(t[i]);}if(this.options[0]){this.optionsContainer=this.options[0].parentNode.parentNode;}}return _;})();Epackage.ONCHANGE_OPTION=function(){this._Epackage.changeOption();};Epackage.RFRR={fm_bookingtrain:{PackageType_2:"-30013",PackageType_5:"-30012",PackageType_1:"-30011"},fm_bookingvol:{PackageType_2:"-30009",PackageType_5:"-30008",PackageType_1:"-30007"},fm_bookinghotel:{PackageType_2:"-30005"},fm_bookingvoiture:{PackageType_5:"-30003"}};Epackage.prototype={ select:function(){var c=this._ExpressBooking.current;if(!c){return;} if(c.domObj.id=="fm_bookingtrain"){this.domObj.elements["TransportationSearchType"].value="Train";}else{this.domObj.elements["TransportationSearchType"].value="";}DomUtil.addClassName(c.domObj,"epackage");DomUtil.addClassName(this.domObj,"current");}, deselect:function(c){if(!c){c=this._ExpressBooking.current;}if(!c){return;}DomUtil.removeClassName(c.domObj,"epackage");DomUtil.removeClassName(this.domObj,"current");},changeOption:function(){for(var i=0;i<this.options.length;++i){var o=this.options[i];if(o.checked){o._form.select();  this.domObj.elements.rfrr.value=Epackage.RFRR[this._ExpressBooking.current.domObj.id][o.id];}}},addBookingPanel:function( p){var n="PackageType_"+p.domObj.id;   var d=document.createElement("div");  d.innerHTML='<label for="'+n+'"><input type="radio" name="PackageType" id="'+n+'" value="'+p.domObj.id+'" /> '+p.domObj.id+"</label>";var l=d.firstChild;DomUtil.appendChildFirst(this.optionsContainer,l);var i=l.getElementsByTagName("input")[0]; i._form=p;i._Epackage=this;i.onchange=i.onclick=Epackage.ONCHANGE_OPTION;this.options.push(l.firstChild);}};
var ExpressBooking=(function(){function _( p, epackForm){ var panels=[];for(var j=0;j<p.length;++j){if(p[j].id.indexOf("epack")!=-1){ this.epack=new Epackage(p[j],this);}else{ panels.push(p[j]);}}var c;for(var i=0;i<panels.length;++i){var f=panels[i];var b=new BookingPanel(f,this);this.panels.push(b);if(this.epack){this.epack.addBookingPanel(b);}if(DomUtil.containsClassName(f,"current")){ c=b;}}if(!c){c=this.panels[0];DomUtil.addClassName(c.domObj,"current");}c.select();}return _;})();ExpressBooking.prototype={panels:[], resetTabs:function( t){this.current=t;var p=this.panels;for(var i=0;i<p.length;++i){if(this.epack){this.epack.deselect();}if(p[i]!=t){p[i].deselect();}}}};

var FormUtil={ getQueryData: function(f){var m=FormUtil.getMap(f);var q=[];for(var n in m){q.push(escape(n)+"="+escape(m[n]));}return q.join("&");}, getMap:function(f){var q=[];for(var n in f.elements){var el=f.elements[n];if(typeof(el)!="object"){continue;}var v=FormUtil.getValue(el);if(v===null){continue;}q[el.name]=v;}return q;}, getValue: function( e){if(!e){return null;}if(e.getValue){return e.getValue();}if(e.type=="checkbox"||e.type=="radio"){e.getValue=function(){var a=this.form.elements[this.name];if(typeof(a.length)=="undefined"){a=[this._elmnts];}var v=[];for(var i=0;i<a.length;++i){if(a[i].checked){v.push(a[i].value);}}return(v.length===0?"":v.length==1?v[0]:v);};}else if(e.type=="select-multiple"){e.getValue=function(){var v=[];for(var i=0,l=this.options.length;i<l;++i){if(this.options[i].selected&&this.options[i].value.length>0){v.push(this.options[i].value);}}return(v.length===0?"":v.length==1?v[0]:v);};}else if(e.type=="select-one"){e.getValue=function(){if(this.selectedIndex==-1){return "";}return this.options[this.selectedIndex].value;};}else if(typeof(e.value)!="undefined"){e.getValue=function(){return this.value;};}else{return null;}return e.getValue();}};
var XMLHttpRequestForm=(function(){ function _(fm,o){if(!fm){return;}this.domObj=fm;this.domObj._XMLHttpRequestForm=this;this.http=new AjaxRequest();if(o){this.objectToReplace=o;this.http.addEventListener("complete",this.updateContent.bind(this),false);}if(typeof this.domObj.onsubmit=="function"){this.http.addEventListener("complete",this.domObj.onsubmit.bind(this.domObj),false);}this.domObj.onsubmit=function(){this._XMLHttpRequestForm.submit();return false;};}return _;})();XMLHttpRequestForm.prototype={setDisplayProgress:function(b){this.displayProgressStatus=b;if(!this.progressStatus&&b){this.progressStatus=document.createElement("p");this.progressStatus.className="progressStatus";this.http.addEventListener("statechange",this.displayProgress.bind(this),false);}else{this.http.removeEventListener("statechange",this.displayProgress.bind(this),false);}},submit:function(){var m=FormUtil.getMap(this.domObj);this.http.setUrl(this.domObj.action);this.http.setMethod(this.domObj.method);this.http.headers['content-type']=(this.domObj.enctype?this.domObj.enctype:"application/x-www-form-urlencoded");this.http.setParameters(m);if(this.displayProgressStatus){this.objectToReplace.innerHTML="";this.objectToReplace.appendChild(this.progressStatus);}var error=this.http.send();if(error&&this.displayProgressStatus){this.progressStatus.innerHTML="R\xE9cup\xE9ration des donn\xE9es impossible";this.progressStatus.title=error;}},displayProgress:function(){this.progressStatus.innerHTML="";this.progressStatus.appendChild(document.createTextNode(AjaxRequest.PROGRESS_STATUS[this.http.transport.readyState]));if(this.http.transport.readyState==4){try{this.progressStatus.appendChild(document.createTextNode(" Status : "+AjaxRequest.HTTPCODE[this.http.transport.status]));}catch(e){this.progressStatus.appendChild(document.createTextNode(e));}}},updateContent:function(){DomUtil.replaceNode(this.objectToReplace,this.http.transport.responseXML,this.objectToReplace.id);}};
var UserAccount={SESSION_KEY:/^.+Session$/,initForm:function(){var f=document.getElementById("fm_userAccount");if(!f){return;}UserAccount.uiDef.selectors["#fm_userAccount"](f);},uiDef:{starter:"d_userAccount",selectors:{"#d_userAccount":function(o){if(!session.check()){ var pElm=document.createElement("p");pElm.className="error nocookie";pElm.innerHTML="cookie non activé";o.appendChild(pElm);return;} var urlLoginForm="/"+I18N.getCntCode()+"/customer/userAccountLogin.xml";var n=session.getAttributeNames();for(var i=0;i<n.length;++i){if(UserAccount.SESSION_KEY.exec(n[i])){ urlLoginForm="/dynamic/_SvCustomerAccountLogin?_CMD=cmdLoginForm";break;}}var f=new HtmlObjectLoader(o,urlLoginForm);f.setDisplayProgress(true);f.http.addEventListener("complete",UserAccount.initForm,false);f.load();},"#fm_userAccount":function(o){ var i=document.getElementById("username");if(i){i.onfocus=function(){if(this.value==this.defaultValue){this.value="";}};i.onblur=function(){if(this.value===""){this.value=this.defaultValue;}};}var f=new XMLHttpRequestForm(o,o.parentNode); f.http.addEventListener("complete",UserAccount.initForm,false);f.setDisplayProgress(true);}}}};uiBuilder.register(UserAccount.uiDef);
StylesheetPatcher.patch(['/css/home/style.css']); var p_home={STATIC:{FSMBT:function(){this.form.submit();},FSMBT2:function(){var input=this._input;var inputs=input.form.elements[input.name];for(i=0;i<inputs.length;i++){inputs[i].checked=false;}input.checked=true;input.form.submit();},CAL_OPT:{trigger:true,shortcut:true,showOnFocus:true,showOnClick:true,format:"%d/%M/%Y"},CAL_RETOUR:function(p){return function(){if(this.el.value===""){this.dateToShow=this.df.parse(p.el.value);}};}},uiDef:[{starter:"nli_f_infosLegales",isValid:StylesheetPatcher.isSupportAdvancedUi,selectors:{ "#d_ecartExpediaVol,#d_ecartExpediaHotel,#d_ecartExpediaODM":function(o){var p=new HtmlObjectLoader(o,o.getElementsByTagName("a")[0].href); p.load();}, "#fm_bookingtrain,#fm_bookingvol,#fm_bookinghotel,#fm_bookingvoiture,#fm_bookingepack":function(o,a){new ExpressBooking(a);return false;}, "#optionrecherche_train,#optionrecherche_vol,#optionrecherche_hotel,#optionrecherche_epack":function(o){var t=o.getElementsByTagName("input");for(var j=0;j<t.length;++j){t[j].onclick=t[j].onchange=p_home.STATIC.FSMBT;t[j].parentNode._input=t[j];t[j].parentNode.onclick=p_home.STATIC.FSMBT2;}}, "#$date_debut,#$date_fin,#$date_debut1#FromDate_fly,#ToDate_fly,#InDate,#OutDate,#FromDate_car,#ToDate_car,#FromDate_epack,#ToDate_epack":function(o){var d=new DatePicker(o,p_home.STATIC.CAL_OPT);if(p_home.STATIC.prevInitedCal){ d.addEventListener("beforeshow",p_home.STATIC.CAL_RETOUR(p_home.STATIC.prevInitedCal),false);p_home.STATIC.prevInitedCal=null;}else{p_home.STATIC.prevInitedCal=d;}}, "#$date_debut0":function(o){if(o.value===""){o.value=o._DatePicker.df.format(new Date());}}, "#$date_debut,#$date_fin":function(o){var h=new Date().getHours()+1;if(h>23){h=0;}o.selectedIndex=h;}}},{starter:"nli_f_infosLegales",selectors:{ "#email":function(o){o.onfocus=function(){if(this.value==this.defaultValue){this.value="";}};o.onblur=function(){if(this.value===""){this.value=this.defaultValue;}};}, "#nli_f_cgv":function(o){new PopupOpener(o.firstChild,{width:700,height:560});},"#nli_f_cgv":function(o){new PopupOpener(o.firstChild,{width:790,height:560});},"#nli_f_cgv":function(o){new PopupOpener(o.firstChild,{width:520,height:280});}, "#l_main":function(o){if(is.ie5_5up||is.gecko||is.opera5up){return true;}var p=document.createElement("div");p.className="messageError";var aff='Nous vous invitons &#224; <a href="http://';if(is.ie){aff+='windowsupdate.microsoft.com';}else{aff+='http://www.mozilla.org';}aff+='/" target="_blank">t&#233;l&#233;charger ici</a> la derni&#232;re version de votre navigateur nécessaire pour tout paiement en ligne';p.innerHTML=aff;o.insertBefore(p,o.firstChild);}, "body":function(o){ new WebAndStats({siteId:"F8F1FF0F3F",pageUrl:'http://www.voyages-sncf.com/homepage.html',handleParam:false,params:session.getAttribute("VSC_LB")}); function openPopup(){window.open("/homepage/site_under/site_under_homepage_vsc.htm?H=450&L=750","_blank","width=750,height=450,resizable=0,toolbar=0,scrollbars=0,status=0,top="+parseInt((screen.height-450)/2,10)+",left="+parseInt((screen.width-750)/2,10)+",true");}if(is.ie&&is.win){var v=session.setAttribute("SiteUnder"),p=location.pathname,d=new Date();d.setTime(d.getTime()+24*3600*1000);o={expires:d,domain:p.substring(0,p.lastIndexOf('/'))+'/'};switch(v){case "VSC":session.setAttribute("SiteUnder","VSC2",o);window.unload=openPopup;break;case "VSC2": break;default:session.setAttribute("SiteUnder","VSC",o);window.unload=openPopup;}}else{var tx=20;t=Math.floor(1+Math.random()*100);if(t<=tx){window.unload=openPopup;}} var img=new Image();img.src='http://www.smartadserver.com/track/pixt.asp?2688;1039;'+Math.round(Math.random()*10000000000);}, "#pub_home":function(o){if(is.ie&&is.mac){return;}if(!p_home.oas){return;} o.appendChild(p_home.oas.ad('Position1')); o=document.createElement("div");o.id="pub_skyscraper";o.appendChild(p_home.oas.ad('Right'));document.body.appendChild(o);}}}], init:function(){ p_home.oas=new Oas("VSC-HOME/home","Position1,Right","?");p_home.oas.insertOasScript();}};p_home.init();uiBuilder.register(p_home.uiDef);

