
var AEBW;if(typeof AEBW=="undefined"||!AEBW){AEBW={};AEBW.control={};AEBW.DOM=(document.getElementById?true:false);AEBW.IE=(document.all&&!AEBW.DOM?true:false);var proto=AEBW.prototype;AEBW.$=function(){var elements=new Array();for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=='string')
element=document.getElementById(element);if(arguments.length==1)
return element;elements.push(element);}
return elements;};AEBW.HTTPRequest=function(){if(window.XMLHttpRequest){return new XMLHttpRequest();}else if(window.ActiveXObject){return new ActiveXObject('Microsoft.XMLHTTP');}else return null;};AEBW.getObject=function(div_){if(AEBW.DOM)return document.getElementById(div_);if(AEBW.IE)return document.all[div_];return(null);};AEBW.writeObject=function(div_,html_){var Obj=AEBW.getObject(div_);if(Obj)
Obj.innerHTML=html_;};AEBW.findPos=function(obj){var curleft=curtop=0;if(typeof(obj.offsetParent)!="undefined"){do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}while(obj=obj.offsetParent);}else return[obj.x,obj.y];return[curleft,curtop];};}
if(!AEBW.control){AEBW.control={};}
if(!AEBW.control.notebook)
{AEBW.control.notebook=function(name,pg)
{this.s_nom_boite=name;this.s_box_current=pg;this.s_onglet_current=name+pg;};var proto=AEBW.control.notebook.prototype;proto.s_box_current="";proto.s_onglet_current="";proto.openBoite=function(pg)
{var s_nom_onglet=this.s_nom_boite+pg;if(this.s_box_current!=""){var d_boite_courante=document.getElementById(this.s_box_current);d_boite_courante.className="pageHidden";}
if(this.s_onglet_current!=""){var li_onglet_current=document.getElementById(this.s_onglet_current);li_onglet_current.className="notebooktitle";}
var d_boite=document.getElementById(pg);d_boite.className="page";var li_onglet=document.getElementById(s_nom_onglet);li_onglet.className="notebooktitlecurrent";this.s_box_current=pg;this.s_onglet_current=s_nom_onglet;};}
if(!AEBW.control){AEBW.control={};}
if(!AEBW.control.table)
{AEBW.control.table=function(name)
{this._id=name;this._table=document.getElementById(name);this._NbColums=this._table.tHead.rows[0].cells.length;this._NbRows=this._table.tBodies[0].rows.length;};var proto=AEBW.control.table.prototype;proto._NbRows=0;proto._NbColums=0;proto._table={};proto.addRow=function()
{this._table.tBodies[0].appendChild(document.createElement('tr'));this._NbRows=this._NbRows+1;for(var i=0;i<this._NbColums;i++){var td;td=document.createElement('td');td.innerHTML="&nbsp;";this._table.tBodies[0].rows[this._NbRows-1].appendChild(td);}};proto.delRow=function(row)
{if((row>=0)&&(row<this._NbRows))
{this._table.tBodies[0].deleteRow(row);this._NbRows=this._NbRows-1;}else
alert('delRow out of range '+this._NbRows+'  rmove '+row);};proto.getCell=function(row,col)
{return this._table.tBodies[0].rows[row].cells[col];};proto.cleanTable=function(){for(var r=0;r<this._NbRows;r++){for(var c=0;c<this._NbColums;c++){var td=this._table.tBodies[0].rows[r].cells[c];td.innerHTML="&nbsp;";}}};}
if(!AEBW.control){AEBW.control={};}
if(!AEBW.control.button)
{AEBW.control.button=function()
{}}
if(!AEBW.control){AEBW.control={};}
if(!AEBW.control.calendar)
{var cell=null;var row=null;AEBW.control._C=null;AEBW.control.calendar=function(name,cl){this.td=new Date();this.mn=['January','February','March','April','May','June','July','August','September','October','November','December'];this.wd=['Su','Mo','Tu','We','Th','Fr','Sa'];this._name=name;this._class=cl;this.element=document.getElementById(name);this._table=document.createElement("table");this._div=document.createElement("div");this._div.className="calendar";this._table.calendar=this;this._table.className=cl;this._table.border=0;this.element.appendChild(this._div);this._div.appendChild(this._table);this._caption=document.createElement("caption");this._thead=document.createElement("thead");this._tbody=document.createElement("tbody");this._tfoot=document.createElement("tfoot");this._table.appendChild(this._caption);this._table.appendChild(this._thead);this._table.appendChild(this._tbody);this.onSelect=null;this.onChange=null;this._table.cellSpacing=0;this._table.cellPadding=0;this._table.setAttribute("border",0);this.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));this._active=null;this.create();};var proto=AEBW.control.calendar.prototype;proto.addEvent=function(e,evn,f){e.onclick=f;};AEBW.control.calendar._add_evs=function(c){with(AEBW.control.calendar.prototype){addEvent(c,'',onMouseClick);};};proto.getElement=function(e)
{var f=null;if(!e)
{e=window.event;f=e.srcElement;}else f=e.currentTarget;return f;};proto.onMouseClick=function(e){var f=null;if(!e){e=window.event;f=e.srcElement;while((f.nodeType==1)&&!/^TD$/i.test(f.tagName)){f=f.parentNode;}}else
f=e.currentTarget;if(f.onHandler)f.onHandler();};proto._onNextMonth=function(){var cal=this.calendar;if(cal.date)
{var date=new Date(cal.date);date.setMonth(date.getMonth()+1);cal.setDate(date);if(cal.onChange)cal.onChange(date);}else{var date=new Date();date.setMonth(date.getMonth()+1);alert('Bad case ins onNextMonth');cal.setDate(date);}};proto._onPrevMonth=function(){var cal=this.calendar;if(cal.date)
{var date=new Date(cal.date);date.setMonth(date.getMonth()-1);cal.setDate(date);if(cal.onChange)cal.onChange(date);}else
alert('Bad case ins onPrevMonth');};proto._onNextYear=function(){var cal=this.calendar;if(cal.date)
{var date=new Date(cal.date);date.setFullYear(date.getFullYear()+1);cal.setDate(date);if(cal.onChange)cal.onChange(date);}else
alert('Bad case ins onNextYear');};proto._onPrevYear=function(){var cal=this.calendar;if(cal.date)
{var date=new Date(cal.date);date.setFullYear(date.getFullYear()-1);cal.setDate(date);if(cal.onChange)cal.onChange(date);}else
alert('Bad case ins onPrevYaer');};proto.removeEvent=function(e,evn,f){if(e.detachEvent){e.detachEvent("on"+evn,f);}else if(e.removeEventListener){e.removeEventListener(evn,f,true);}else{e["on"+evn]=null;}};proto.Draw=function()
{var head=this._thead;var cal=this;var hh=function(text,cs,nt)
{cell=document.createElement('td');cell.calendar=cal;if(row)row.appendChild(cell);cell.colSpan=cs;cell.className='calendar_item';cell.innerHTML='<a href="javascript:void(0)"><span class="calendar_item">'+text+'</span></a>';with(AEBW.control.calendar){_add_evs(cell);}
return cell;};row=document.createElement("tr");head.appendChild(row);cell=hh('?',1,1);cell.className="calendar help";cell=hh(', ',6,1);cell.className="calendar date";row=document.createElement("tr");head.appendChild(row);cell=hh('&#x00ab;',1,-2);cell.className="calendar py";cell.onHandler=this._onPrevYear;cell=hh('&#x2039;',1,-1);cell.onHandler=this._onPrevMonth;cell.className="calendar pm";cell=hh('today',3,0);cell=hh('&#x203a;',1,1);cell.onHandler=this._onNextMonth;cell.className="calendar nm";cell=hh('&#x00bb;',1,2);cell.className="calendar ny";cell.onHandler=this._onNextYear;row=document.createElement("tr");head.appendChild(row);for(s=0;s<7;s++){var cell=document.createElement("th");cell.innerHTML=this.wd[s];row.appendChild(cell);}
row=document.createElement('tr');this._tbody.appendChild(row);for(i=1;i<=42;i++)
{var x='&nbsp;';var cell=document.createElement('td');cell.onclick=this.onMouseClick;cell.calendar=this;cell.className="day";cell.innerHTML='<a href="javascript:void(0);">'+x+'</a>';row.appendChild(cell);if(((i)%7==1)||((i%7)==0))cell.className+=" weekend";if(((i)%7==0)&&(i<36))
{row=document.createElement('tr');this._tbody.appendChild(row);}}};proto._init=function(date){var todaydate=new Date()
var scanfortoday=(date.getFullYear()==todaydate.getFullYear()&&(date.getMonth()+1)==todaydate.getMonth()+1)?todaydate.getDate():0
var mn=this.mn;var dim=[31,0,31,30,31,30,31,31,30,31,30,31];var oD=new Date(date);oD.setDate(1);oD.od=oD.getDay()+1;dim[1]=(((oD.getFullYear()%100!=0)&&(oD.getFullYear()%4==0))||(oD.getFullYear()%400==0))?29:28;var row=this._tbody.firstChild;this.date=new Date(date);for(i=0;i<6;i++,row=row.nextSibling)
{var cell=row.firstChild;for(j=1;j<8;j++,cell=cell.nextSibling)
{var k=i*7+j;var x=((k-oD.od>=0)&&(k-oD.od<dim[date.getMonth()]))?k-oD.od+1:'&nbsp;';if(cell){var a=cell.firstChild;if(x==scanfortoday){this.addClass(cell,'today');}else this.removeClass(cell,"today");if((k-oD.od>=0)&&(k-oD.od<dim[date.getMonth()])){this.addClass(cell,"nav");cell.onHandler=this._onSelect;cell.monthDay=x;}else{this.removeClass(cell,"nav");cell.onclick=null;cell.monthDay=null;}
a.innerHTML=x;}else{break;}}}};proto.create=function(){if(this._tbody.rows.length==0){this.Draw(this.td.getFullYear(),this.td.getMonth()+1,this.td.getDay());this._init(this.td);}};proto._onSelect=function(){var cal=this.calendar;if(cal._active){cal.removeClass(cal._active,"active");}
cal._active=this;cal.addClass(this,"active");if(cal.onSelect&&this.monthDay){var dt=new Date(cal.date);dt.setDate(this.monthDay);cal.onSelect(dt);}};proto.setDate=function(date){this._init(date);var row=this._thead.firstChild;var cell=row.firstChild;cell=cell.nextSibling;var sp=cell.firstChild;var x=this.mn[date.getMonth()]+' , '+date.getFullYear();sp.innerHTML=x;};proto.removeClass=function(el,className){if(!(el&&el.className)){return;}
var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}
el.className=ar.join(" ");};proto.addClass=function(el,className){this.removeClass(el,className);el.className+=" "+className;};}
if(!AEBW.control){AEBW.control={};}
if(!AEBW.control.menubar){AEBW.control.menubar=function(div_,direction){this._dir=direction;this._div=AEBW.getObject(div_);this._submenus=new Array();var ul=this._div.getElementsByTagName("ul");if(ul){var k=0;for(i=0;i<ul.length;i++){var n=ul.item(i);if(n.className=="horizontalSubMenu"){n.style.display="none";n.style.visibility="hidden";n.style.width="";n.style.right="";n.style.left="";this._submenus[k++]=new AEBW.control.menu(this._div,n.parentNode,n);}else{this._menu=new AEBW.control.menu(this._div,n.parentNode,n);}}}};}
if(!AEBW.control.menu)
{AEBW.control.menu=function(_div,_pli,_ul){var li_pos=AEBW.findPos(_pli);if(_div!=_pli){var act=_pli.getElementsByTagName("a").item(0);li_pos=AEBW.findPos(act);_pli.onmouseover=function(){_ul.style.visibility="visible";_ul.style.display="block";};_pli.onmouseout=function(){_ul.style.visibility="hidden";_ul.style.display="none";};}
var d_p=AEBW.findPos(_div);var x=li_pos[0]-d_p[0];_ul.style.left=x+"px";_ul.style.top=_pli.offsetHeight+"px";};var proto=AEBW.control.menu.prototype;proto.initialize=function(menu,direction){this._dir=direction;this._div=AEBW.getObject(menu);};}
