function GetXmlHttpObject(){var objXMLHttp=null;if(window.XMLHttpRequest)objXMLHttp=new XMLHttpRequest;else if(window.ActiveXObject)objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");return objXMLHttp}function stateChanged(fonction,xmlHttp){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")fonction(xmlHttp.responseText)}
function htmlData(url,type,fonction,param,name){var xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("Browser does not support HTTP Request");return}url=url+"&l="+langue+"&sid="+name+Math.random();if(type=="GET"){xmlHttp.open("GET",url,true);xmlHttp.send(param)}else{xmlHttp.open("POST",url,true);if(param!=""){xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.setRequestHeader("Content-length",param.length);xmlHttp.setRequestHeader("Connection","close")}xmlHttp.send(param)}xmlHttp.onreadystatechange=
function(){stateChanged(fonction,xmlHttp)}}
function refresh_home_list_geo(val){var selected_index;var select;var tab;var tab2;var f;var tab_select_group;var total_select_group;var tab_select_option;var total_select_option;var option;var optgroup;var doc=eval("("+val+")");for(var cpt_obj=0;cpt_obj<doc.obj.length;cpt_obj++){var tab=doc.obj[cpt_obj];select=0;selected_index=1;f=document.getElementById(tab["element"]);if(tab["element"]=="selnbpers_geo")document.getElementById("selnbroom_geo").style.display="none";if(tab["element"]=="selnbroom_geo")document.getElementById("selnbpers_geo").style.display=
"none";f.style.display="block";while(f.hasChildNodes())f.removeChild(f.firstChild);option=document.createElement("option");option.value="";option.appendChild(document.createTextNode(tab["title"]));f.appendChild(option);tab_select_group=tab["select"];total_select_group=tab_select_group.length;for(var i=0;i<total_select_group;i++){if(tab_select_group[i]["line"]=="")continue;if(tab["element"]!="seltypeloc_geo"&&tab["element"]!="selnbpers_geo"&&tab["element"]!="selnbroom_geo"){optgroup=document.createElement("optgroup");
optgroup.label="------------------------------";f.appendChild(optgroup)}tab_select_option=String(tab_select_group[i]["line"]).split("*/*");total_select_option=tab_select_option.length;for(var j=0;j<total_select_option;j++){if(tab_select_option[j]=="")continue;if(tab_select_option[j].indexOf("__")>0){tab2=String(tab_select_option[j]).split("__");var option=document.createElement("option");option.value=tab2[0];option.appendChild(document.createTextNode(tab2[1]));if(tab["element"]!="seltypeloc_geo"&&
tab["element"]!="selnbpers_geo"&&tab["element"]!="selnbroom_geo")optgroup.appendChild(option);else f.appendChild(option);if(tab2[0]==tab["selected"])select=selected_index}selected_index++}}f.selectedIndex=select;if(tab["disabled"]==0)f.disabled=true;else f.disabled=false;if(tab["region"])document.frm_holidays.selregion.value=tab["region"];if(tab["departement"])document.frm_holidays.seldepartement.value=tab["departement"]}disabled_geo_form(false)}
function refresh_home_geo(){disabled_geo_form(true);var str="selcontinent="+document.getElementById("selcontinent_geo").value;str+="&selpays="+document.getElementById("selpays_geo").value;str+="&regdept="+document.getElementById("regdept_geo").value;str+="&selville="+document.getElementById("selville_geo").value;str+="&proom="+document.getElementById("proom").value;htmlData("script/async_geo.html","POST",refresh_home_list_geo,str,"geo")}
function disabled_geo_form(type){if(type){document.getElementById("home_geo_shadow").style.width=document.getElementById("home_geo_tab").clientWidth;document.getElementById("home_geo_shadow").style.height=document.getElementById("home_geo_tab").clientHeight;document.getElementById("home_geo_shadow").style.cursor="wait"}else{document.getElementById("home_geo_shadow").style.width=0;document.getElementById("home_geo_shadow").style.height=0;document.getElementById("home_geo_shadow").style.cursor="auto"}}
;function waiting_shadow(a){if(!a){document.getElementById("div_shadow2").style.width=document.getElementById("main_tab").clientWidth;document.getElementById("div_shadow2").style.height=document.getElementById("main_tab").clientHeight;if(document.getElementById("loading_img")){document.getElementById("DivLoad").style.display="block";document.getElementById("loading_img").src=document.getElementById("loading_img").src;document.getElementById("loading_img").style.display=""}else document.getElementById("DivLoad").style.visibility=
"visible"}}function Add_Event(a,b,d,c){a.addEventListener?a.addEventListener(b,d,c?c:false):a.attachEvent("on"+b,d)}function GetScrollPage(){var a,b;if(window.innerWidth)with(window){a=pageXOffset;b=pageYOffset}else{a=document.documentElement&&document.documentElement.clientWidth?document.documentElement:document.body;with(a){a=scrollLeft;b=scrollTop}}return{top:b,left:a}}
function ObjGetPosition(a){var b=0,d=0;if(a=typeof a=="object"?a:document.getElementById(a)){b=0;d=a.offsetTop;if(a.offsetParent)for(;a=a.offsetParent;)if(a.offsetParent){b+=a.offsetLeft;d+=a.offsetTop}}return{left:b,top:d}}var IdTimer_1,IdTimer_2,O_DivScroll,Rapport=0.25,Mini=2*Rapport;
function DIV_Scroll(a){var b=document.getElementById(a);if(this.Obj=b){b.style.position="absolute";a=ObjGetPosition(a);this.PosX=a.left;this.PosY=a.top;this.DebX=this.PosX;this.DebY=this.PosY;this.NewY=this.NewX=0;this.Move=DIV_Deplace}}
function DIV_Deplace(a,b){if(a!=null){this.PosX=a;this.Obj.style.left=parseInt(a)+"px";this.Obj.style.width=document.getElementById("main_tab").clientWidth>document.body.clientWidth?document.getElementById("main_tab").clientWidth:document.body.clientWidth}if(b!=null){this.PosY=document.body.clientHeight>160?b+(document.body.clientHeight-160)/7:b;this.Obj.style.top=parseInt(b)+"px"}}
function DIV_Replace(a,b){var d=(a-O_DivScroll.PosX)*Rapport,c=(b-O_DivScroll.PosY)*Rapport;if(c<Mini&&c>-Mini&&d<Mini&&d>-Mini){clearInterval(IdTimer_1);O_DivScroll.Move(a,b)}else O_DivScroll.Move(O_DivScroll.PosX+d,O_DivScroll.PosY+c)}function DIV_CheckScroll(){var a=GetScrollPage();O_DivScroll.NewX=O_DivScroll.DebX;O_DivScroll.NewY=a.top+O_DivScroll.DebY;clearInterval(IdTimer_1);IdTimer_1=setInterval("DIV_Replace("+O_DivScroll.NewX+","+O_DivScroll.NewY+")",10);return true}
function DIV_InitScroll(){O_DivScroll=new DIV_Scroll("DivLoad");if(O_DivScroll.Obj)IdTimer_2=setInterval("DIV_CheckScroll()",100)}
function create_loading(a){a=DetectFlashVer(6,6,6)?'\t<div id="DivLoad" style="position:absolute; visibility:hidden; z-index:2000;"><center><div style="position:relative; width:160px; height:160px; vertical-align:middle;"><object \tcodebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="160" height="160"><param name="movie" value="script/loading.swf"><param name="quality" value="high"><param name="wmode" value="transparent"><embed \tsrc="script/loading.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="160" height="160"wmode="transparent"></embed></object></div></center></div>':'\t<div id="DivLoad" style="display:none; z-index:2000;"><center><div style="position:relative; width:160px; height:160px; vertical-align:middle;"><img id="loading_img" src="'+
a+'"></div></center></div>';document.write(a);Add_Event(window,"load",DIV_InitScroll);window.onunload=function(){document.getElementById("DivLoad").style.display="none"}}var isIE=navigator.appVersion.indexOf("MSIE")!=-1?true:false,isWin=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,isOpera=navigator.userAgent.indexOf("Opera")!=-1?true:false;
function ControlVersion(){var a,b;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(d){}if(!a)try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(c){}if(!a)try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(g){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(f){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
a="WIN 2,0,0,11"}catch(e){a=-1}return a}
function GetSwfVer(){var a=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){a=navigator.plugins["Shockwave Flash"+(navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"")].description.split(" ");var b=a[2].split("."),d=b[0];b=b[1];var c=a[3];if(c=="")c=a[4];if(c[0]=="d")c=c.substring(1);else if(c[0]=="r"){c=c.substring(1);if(c.indexOf("d")>0)c=c.substring(0,c.indexOf("d"))}a=d+"."+b+"."+c}}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=
-1)a=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)a=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)a=2;else if(isIE&&isWin&&!isOpera)a=ControlVersion();return a}
function DetectFlashVer(a,b,d){versionStr=GetSwfVer();if(versionStr==-1)return false;else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else versionArray=versionStr.split(".");var c=versionArray[0],g=versionArray[1],f=versionArray[2];if(c>parseFloat(a))return true;else if(c==parseFloat(a))if(g>parseFloat(b))return true;else if(g==parseFloat(b))if(f>=parseFloat(d))return true;return false}}
function AC_AddExtension(a,b){return a.indexOf("?")!=-1?a.replace(/\?/,b+"?"):a+b}function AC_Generateobj(a,b,d){var c="";if(isIE&&isWin&&!isOpera){c+="<object ";for(var g in a)c+=g+'="'+a[g]+'" ';for(g in b)c+='><param name="'+g+'" value="'+b[g]+'" /> ';c+="></object>"}else{c+="<embed ";for(g in d)c+=g+'="'+d[g]+'" ';c+="> </embed>"}document.write(c)}
function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}
function AC_GetArgs(a,b,d,c,g){var f={};f.embedAttrs={};f.params={};f.objAttrs={};for(var e=0;e<a.length;e+=2)switch(a[e].toLowerCase()){case "classid":break;case "pluginspage":f.embedAttrs[a[e]]=a[e+1];break;case "src":case "movie":a[e+1]=AC_AddExtension(a[e+1],b);f.embedAttrs.src=a[e+1];f.params[d]=a[e+1];break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblClick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":case "codebase":f.objAttrs[a[e]]=
a[e+1];break;case "id":case "width":case "height":case "align":case "vspace":case "hspace":case "class":case "title":case "accesskey":case "name":case "tabindex":f.embedAttrs[a[e]]=f.objAttrs[a[e]]=a[e+1];break;default:f.embedAttrs[a[e]]=f.params[a[e]]=a[e+1]}f.objAttrs.classid=c;if(g)f.embedAttrs.type=g;return f};var a,champdate;a=Date.prototype;a.getDayNum=function(){return this.getDate()};a.setDayNum=function(b){this.setDate(b)};a.getMonthNum=function(){return this.getMonth()+1};a.setMonthNum=function(b){this.setMonth(b-1)};a.getYearNum=function(){return this.getFullYear()};a.setYearNum=function(b){this.setYear(b)};a.getDayOfWeekNum=function(){var b=this.getDay();if(b==7)return 1;return b==6?0:b+1};a.setDayMonthYear=function(b,d,c){this.setFullYear(c);this.setMonth(d-1);this.setDate(b);this.setHours(12)};
a.addDay=function(){this.setDate(this.getDate()+1)};a.addMonth=function(){this.setMonth(this.getMonth()+1)};a.addYear=function(){this.setYear(this.getFullYear()+1)};a.subtractYear=function(){this.setYear(this.getFullYear()-1)};a.copyTo=function(b){b.setTime(this.getTime())};a.monthIsLessThan=function(b){var d=this.getYearNum(),c=b.getYearNum();return d<c?true:d==c?this.getMonthNum()<b.getMonthNum():false};
a.monthIsGreaterThan=function(b){var d=this.getYearNum(),c=b.getYearNum();return d>c?true:d==c?this.getMonthNum()>b.getMonthNum():false};a.monthIsSameAs=function(b){if(this.getYearNum()==b.getYearNum())return this.getMonthNum()==b.getMonthNum();return false};a.dayIsSameAs=function(b){return this.getDayNum()==b.getDayNum()&&this.getMonthNum()==b.getMonthNum()&&this.getYearNum()==b.getYearNum()};
Date.isDate=function(b,d,c){if(c>999&&c<1E4){var e=new Date(c,d-1,b);return e.getDate()==b&&e.getMonth()==d-1&&e.getFullYear()==c}return false};
function Calendar(){this.width=210;this.height=250;this.y=this.x=50;this.todaysDate=new Date;this.selectedDate=new Date;this.earliestDate=new Date;this.earliestDate.setDayMonthYear(1,1,1E3);this.latestDate=new Date;this.latestDate.setDayMonthYear(1,1,3E3);this.viewDate=new Date;this.counterDate=new Date;this.outputWindow={};this.getFormDay=new Function;this.getFormMonth=new Function;this.getFormYear=new Function;this.setFormDate=new Function;this.id=Math.ceil(Math.random()*99999);this.styleSheetPath=
this.outputHtml="";this.showTodayControl=true;this.todayText="Today";this.closeText="Close"}a=Calendar.prototype;a.setBrand=function(){this.stylesheetPath="../script/calendrier/availability.css";this.stylesheetPathColours="../script/calendrier/calendar.css"};a.setTodaysDate=function(b,d,c){this.todaysDate.setDayMonthYear(b,d,c)};a.setSelectedDate=function(b,d,c){this.selectedDate.setDayMonthYear(b,d,c);this.setViewDate(b,d,c)};
a.setEarliestDate=function(b,d,c){this.earliestDate.setDayMonthYear(b,d,c)};a.setLatestDate=function(b,d,c){this.latestDate.setDayMonthYear(b,d,c)};a.setViewDate=function(b,d,c){this.viewDate.setDayMonthYear(b,d,c)};a.writeLn=function(b){this.outputHtml+=b+"\n"};a.writeTableStart=function(){this.writeLn('<table width="200" border="0" cellspacing="0" cellpadding="0"><tr><td class="tableborder">');this.writeLn('<table width="200" border="0" cellspacing="1" cellpadding="2">')};
a.writeYearTableStart=function(){this.writeLn('<table width="200" border="0" cellspacing="0" cellpadding="1"><tr><td>');this.writeLn('<table width="200" border="0" cellspacing="0" cellpadding="0" style="margin-top:4px;">')};a.writeTableDivider=function(){this.writeLn("</td></tr><tr><td>")};a.writeTableEnd=function(){this.writeLn("</table>");this.writeLn("</td></tr></table>")};
a.writeCalendar=function(){this.outputHtml="";this.writeLn("<html><head>");this.writeLn('<link rel="StyleSheet" href="'+this.stylesheetPath+'" type="text/css">');this.stylesheetPathColours&&this.writeLn('<link rel="StyleSheet" href="'+this.stylesheetPathColours+'" type="text/css">');this.writeLn("<style>td {text-align:center;}</style>");this.writeLn("</head>");this.writeLn('<body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"><center>');this.writeLn('<table border="0" width="100" cellspacing="0" cellpadding="2"><tr><td class="background" align="center">');
this.writeYearControls();this.writeTableDivider();this.writeMonth();if(this.showTodayControl=true){this.writeTableDivider();this.writeTodayControl()}this.writeTableDivider();this.writeCloseControl();this.writeLn("</td></tr></table>");this.writeLn("</center></body></html>");this.outputWindow.innerHTML=this.outputHtml;this.outputHtml=""};
a.writeYearControls=function(){this.writeYearTableStart();var b=this.earliestDate.getYearNum(),d=this.viewDate.getYearNum(),c=this.latestDate.getYearNum();this.writeLn("<tr>");d>b?this.writeLn('<td background="../script/calendrier/calprevious.gif" class="yearbuttonprev" width="75"><a href="javascript:calendar.viewPreviousYear()">'+this.prevText+"</a></td>"):this.writeLn('<td width="75" class="yearbuttonprev">&nbsp;</td>');this.writeLn('<td width="50" class="year">'+this.viewDate.getYearNum()+"</td>");
d<c?this.writeLn('<td background="../script/calendrier/calnext.gif" class="yearbuttonnext" align="left" width="75"><a href="javascript:calendar.viewNextYear()">'+this.nextText+"</a></td>"):this.writeLn('<td width="75" class="yearbuttonnext">&nbsp;</td>');this.writeLn("</tr>");this.writeTableEnd()};
a.writeMonthControls=function(){this.viewDate.copyTo(this.counterDate);this.counterDate.setMonthNum(1);this.writeTableStart();this.writeLn("<tr>");for(var b=1;b<=12;b++){if(this.counterDate.monthIsLessThan(this.earliestDate)||this.counterDate.monthIsGreaterThan(this.latestDate))this.writeLn('<td class="disabledmonth">'+this.monthsText[b-1]+"</td>");else this.counterDate.monthIsSameAs(this.viewDate)?this.writeLn('<td class="viewmonth">'+this.monthsText[b-1]+"</td>"):this.writeLn('<td class="month"><a href="javascript:calendar.viewMonth('+
b+')">'+this.monthsText[b-1]+"</a></td>");b==6&&this.writeLn("</tr><tr>");this.counterDate.addMonth()}this.writeLn("</tr>");this.writeTableEnd()};a.writeMonth=function(){this.viewDate.copyTo(this.counterDate);this.writeTableStart();this.writeLn('<tr align="center">');for(var b=0;b<7;b++)this.writeLn('<td width="25" class="dayofweek">'+this.dayText[b]+"</td>");for(this.writeLn("</tr>");this.counterDate.getMonthNum()==this.viewDate.getMonthNum();)this.writeWeek();this.writeTableEnd()};
a.writeWeek=function(){this.writeLn("<tr>");var b=this.counterDate.getDayOfWeekNum();this.writeBlankDays(b);for(b=b;b<7;b++)if(this.counterDate.getMonthNum()==this.viewDate.getMonthNum())this.writeDay();else break;this.writeBlankDays(7-b);this.writeLn("</tr>")};
a.writeDay=function(){var b=this.counterDate.getDayNum(),d=this.counterDate.getMonthNum(),c=this.counterDate.getYearNum();if(this.counterDate.dayIsSameAs(this.selectedDate))this.writeLn('<td class="selectedday"><a href="javascript:calendar.selectDay('+b+","+d+","+c+')">'+this.counterDate.getDayNum()+"</td>");else this.counterDate>=this.earliestDate&&this.counterDate<=this.latestDate?this.writeLn('<td class="day"><a href="javascript:calendar.selectDay('+b+","+d+","+c+')">'+this.counterDate.getDayNum()+
"</a></td>"):this.writeLn('<td class="disabledday">'+this.counterDate.getDayNum()+"</td>");this.counterDate.addDay()};a.writeBlankDays=function(b){b>0&&this.writeLn('<td colspan="'+b+'" class="blankday">&nbsp;</td>')};a.writeCloseControl=function(){this.writeTableStart();this.writeLn('<tr><td class="control"><a href="javascript:calendar.close()">&nbsp; &nbsp; &nbsp; &nbsp; '+this.closeText+" &nbsp; &nbsp; &nbsp; &nbsp;</a></td></tr>");this.writeTableEnd()};
a.writeTodayControl=function(){this.writeTableStart();this.writeLn('<tr><td class="control"><a href="javascript:calendar.selectToday()" onclick="javascript:calendar.selectDay('+day+","+month+","+year+'); window.close();">&nbsp; &nbsp; &nbsp; '+this.todayText+" &nbsp; &nbsp; &nbsp;</a></td></tr>");this.writeTableEnd()};function isIEPC(){return navigator.platform.indexOf("Win")!=-1&&navigator.appVersion.indexOf("MSIE")!=-1}a=Calendar.prototype;
a.show=function(b,d){champdate=b;var c=this.getFormDay(b),e=this.getFormMonth(b);b=this.getFormYear(b);if(Date.isDate(c,e,b)){this.setSelectedDate(c,e,b);if(this.selectedDate.monthIsLessThan(this.earliestDate))this.earliestDate.copyTo(this.viewDate);else if(this.selectedDate.monthIsGreaterThan(this.latestDate)){this.latestDate.copyTo(this.viewDate);alert(this.latestDate+"\n"+this.viewDate)}}isIEPC()&&this.close();this.outputWindow=d;this.viewDate.setDayNum(1);this.writeCalendar();this.outputWindow.focus()};
a.open=function(b){champdate=b;var d=this.getFormDay(b),c=this.getFormMonth(b);b=this.getFormYear(b);if(Date.isDate(d,c,b)){this.setSelectedDate(d,c,b);if(this.selectedDate.monthIsLessThan(this.earliestDate))this.earliestDate.copyTo(this.viewDate);else if(this.selectedDate.monthIsGreaterThan(this.latestDate)){this.latestDate.copyTo(this.viewDate);alert(this.latestDate+"\n"+this.viewDate)}}isIEPC()&&this.close();this.outputWindow=window.open("javascript:''","calendar"+this.id,"width="+this.width+",height="+
this.height+",top="+this.x+",left="+this.y+",noresize");this.viewDate.setDayNum(1);this.writeCalendar();this.outputWindow.focus()};a.close=function(){this.outputWindow&&this.outputWindow.close&&this.outputWindow.close()};a.selectDay=function(b,d,c){this.setSelectedDate(b,d,c);this.setFormDate(b,d,c,champdate);this.close()};a.viewMonth=function(b){this.viewDate.setMonthNum(b);this.writeCalendar()};
a.selectToday=function(){this.todaysDate.copyTo(this.viewDate);this.todaysDate.copyTo(this.selectedDate);this.setFormDate(this.selectedDate.getDayNum(),this.selectedDate.getMonthNum(),this.selectedDate.getYearNum(),champdate);this.viewDate.setDayNum(1);this.writeCalendar()};a.viewPreviousYear=function(){this.viewDate.subtractYear();this.viewDate.setMonthNum(12);this.writeCalendar()};a.viewNextYear=function(){this.viewDate.addYear();this.viewDate.setMonthNum(1);this.writeCalendar()};var calendExp=new CalendarPopup(-110,-160,"calendardiv");var calendTrn=new CalendarPopup(-110,-337,"calendardiv");calendExp.setCssPrefix("CAL_STYLE");calendExp.setYearSelectStartOffset(0);calendExp.setWeekStartDay(6);calendTrn.setCssPrefix("CAL_STYLE");calendTrn.setYearSelectStartOffset(0);calendTrn.setWeekStartDay(6);today=new Date;mo=today.getMonth()+1;day=today.getDate()-1;year=today.getFullYear();
if(day==0){mo--;if(mo==0){mo=12;year=year-1}if(mo==2)if(year%4==0)day=29;else day=28;else if(mo==1||mo==3||mo==5||mo==7||mo==8||mo==10||mo==12)day=31;else day=30}date=year+"-"+mo+"-"+day;calendExp.addDisabledDates(null,date);calendTrn.addDisabledDates(null,date);
function startup(day,today,month,imgpath){calendExp.setDayHeaders(day[6],day[0],day[1],day[2],day[3],day[4],day[5]);calendTrn.setDayHeaders(day[6],day[0],day[1],day[2],day[3],day[4],day[5]);calendExp.setTodayText(today);calendTrn.setTodayText(today);calendExp.setImgPath(imgpath);calendTrn.setImgPath(imgpath);calendExp.setMonthNames(month[0],month[1],month[2],month[3],month[4],month[5],month[6],month[7],month[8],month[9],month[10],month[11]);calendTrn.setMonthNames(month[0],month[1],month[2],month[3],
month[4],month[5],month[6],month[7],month[8],month[9],month[10],month[11])}function validDate(data){if(data!=""){var TabDate=new Array;TabDate=data.split("/");if(TabDate[0].length==1)TabDate[0]="0"+TabDate[0];if(TabDate[1].length==1)TabDate[1]="0"+TabDate[1];if(TabDate[2].length==2)TabDate[2]="20"+TabDate[2];data=TabDate[0]+"/"+TabDate[1]+"/"+TabDate[2];return data}else return""}
function calendar(champ,id,type){if(document.saisie.btheadt[0].checked)calendTrn.select(champ,id,type);else calendExp.select(champ,id,type)}function calendmaj(idin,idout){idin.value=idout.value}var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(x){return(x<0||x>9?"":"0")+x}function isDate(val,format){var date=getDateFromFormat(val,format);if(date==0)return false;return true}function compareDates(date1,dateformat1,date2,dateformat2){var d1=getDateFromFormat(date1,dateformat1);var d2=getDateFromFormat(date2,dateformat2);if(d1==0||d2==0)return-1;else if(d1>d2)return 1;return 0}
function formatDate(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object;if(y.length<4)y=""+(y-0+1900);value["y"]=""+y;value["yyyy"]=y;value["yy"]=y.substring(2,4);value["M"]=M;value["MM"]=LZ(M);value["MMM"]=MONTH_NAMES[M-1];value["NNN"]=MONTH_NAMES[M+
11];value["d"]=d;value["dd"]=LZ(d);value["E"]=DAY_NAMES[E+7];value["EE"]=DAY_NAMES[E];value["H"]=H;value["HH"]=LZ(H);if(H==0)value["h"]=12;else if(H>12)value["h"]=H-12;else value["h"]=H;value["hh"]=LZ(value["h"]);if(H>11)value["K"]=H-12;else value["K"]=H;value["k"]=H+1;value["KK"]=LZ(value["K"]);value["kk"]=LZ(value["k"]);if(H>11)value["a"]="PM";else value["a"]="AM";value["m"]=m;value["mm"]=LZ(m);value["s"]=s;value["ss"]=LZ(s);while(i_format<format.length){c=format.charAt(i_format);token="";while(format.charAt(i_format)==
c&&i_format<format.length)token+=format.charAt(i_format++);if(value[token]!=null)result=result+value[token];else result=result+token}return result}function _isInteger(val){var digits="1234567890";for(var i=0;i<val.length;i++)if(digits.indexOf(val.charAt(i))==-1)return false;return true}function _getInt(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var token=str.substring(i,i+x);if(token.length<minlength)return null;if(_isInteger(token))return token}return null}
function getDateFromFormat(val,format){val=val+"";format=format+"";var i_val=0;var i_format=0;var c="";var token="";var token2="";var x,y;var now=new Date;var year=now.getYear();var month=now.getMonth()+1;var date=1;var hh=now.getHours();var mm=now.getMinutes();var ss=now.getSeconds();var ampm="";while(i_format<format.length){c=format.charAt(i_format);token="";while(format.charAt(i_format)==c&&i_format<format.length)token+=format.charAt(i_format++);if(token=="yyyy"||token=="yy"||token=="y"){if(token==
"yyyy"){x=4;y=4}if(token=="yy"){x=2;y=2}if(token=="y"){x=2;y=4}year=_getInt(val,i_val,x,y);if(year==null)return 0;i_val+=year.length;if(year.length==2)if(year>70)year=1900+(year-0);else year=2E3+(year-0)}else if(token=="MMM"||token=="NNN"){month=0;for(var i=0;i<MONTH_NAMES.length;i++){var month_name=MONTH_NAMES[i];if(val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase())if(token=="MMM"||token=="NNN"&&i>11){month=i+1;if(month>12)month-=12;i_val+=month_name.length;break}}if(month<
1||month>12)return 0}else if(token=="EE"||token=="E")for(var i=0;i<DAY_NAMES.length;i++){var day_name=DAY_NAMES[i+1];if(val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()){i_val+=day_name.length;break}}else if(token=="MM"||token=="M"){month=_getInt(val,i_val,token.length,2);if(month==null||month<1||month>12)return 0;i_val+=month.length}else if(token=="dd"||token=="d"){date=_getInt(val,i_val,token.length,2);if(date==null||date<1||date>31)return 0;i_val+=date.length}else if(token==
"hh"||token=="h"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<1||hh>12)return 0;i_val+=hh.length}else if(token=="HH"||token=="H"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<0||hh>23)return 0;i_val+=hh.length}else if(token=="KK"||token=="K"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<0||hh>11)return 0;i_val+=hh.length}else if(token=="kk"||token=="k"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<1||hh>24)return 0;i_val+=hh.length;hh--}else if(token=="mm"||token==
"m"){mm=_getInt(val,i_val,token.length,2);if(mm==null||mm<0||mm>59)return 0;i_val+=mm.length}else if(token=="ss"||token=="s"){ss=_getInt(val,i_val,token.length,2);if(ss==null||ss<0||ss>59)return 0;i_val+=ss.length}else if(token=="a"){if(val.substring(i_val,i_val+2).toLowerCase()=="am")ampm="AM";else if(val.substring(i_val,i_val+2).toLowerCase()=="pm")ampm="PM";else return 0;i_val+=2}else if(val.substring(i_val,i_val+token.length)!=token)return 0;else i_val+=token.length}if(i_val!=val.length)return 0;
if(month==2)if(year%4==0&&year%100!=0||year%400==0){if(date>29)return 0}else if(date>28)return 0;if(month==4||month==6||month==9||month==11)if(date>30)return 0;if(hh<12&&ampm=="PM")hh=hh-0+12;else if(hh>11&&ampm=="AM")hh-=12;var newdate=new Date(year,month-1,date,hh,mm,ss);return newdate.getTime()}
function parseDate(val){var preferEuro=arguments.length==2?arguments[1]:false;generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");var checkList=new Array("generalFormats",preferEuro?"dateFirst":"monthFirst",preferEuro?"monthFirst":"dateFirst");var d=null;for(var i=0;i<checkList.length;i++){var l=window[checkList[i]];for(var j=0;j<l.length;j++){d=
getDateFromFormat(val,l[j]);if(d!=0)return new Date(d)}}return null}
function getAnchorPosition(anchorname){var useWindow=false;var coordinates=new Object;var x=0,y=0;var use_gebi=false,use_css=false,use_layers=false;if(document.getElementById)use_gebi=true;else if(document.all)use_css=true;else if(document.layers)use_layers=true;if(use_gebi&&document.all){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname])}else if(use_gebi){var o=document.getElementById(anchorname);x=AnchorPosition_getPageOffsetLeft(o);
y=AnchorPosition_getPageOffsetTop(o)}else if(use_css){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname])}else if(use_layers){var found=0;for(var i=0;i<document.anchors.length;i++)if(document.anchors[i].name==anchorname){found=1;break}if(found==0){coordinates.x=0;coordinates.y=0;return coordinates}x=document.anchors[i].x;y=document.anchors[i].y}else{coordinates.x=0;coordinates.y=0;return coordinates}coordinates.x=x;coordinates.y=
y;return coordinates}
function getAnchorWindowPosition(anchorname){var coordinates=getAnchorPosition(anchorname);var x=0;var y=0;if(document.getElementById)if(isNaN(window.screenX)){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop}else{x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}else if(document.all){x=coordinates.x-document.body.scrollLeft+
window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop}else if(document.layers){x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}coordinates.x=x;coordinates.y=y;return coordinates}function AnchorPosition_getPageOffsetLeft(el){var ol=el.offsetLeft;while((el=el.offsetParent)!=null)ol+=el.offsetLeft;return ol}
function AnchorPosition_getWindowOffsetLeft(el){return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(el){var ot=el.offsetTop;while((el=el.offsetParent)!=null)ot+=el.offsetTop;return ot}function AnchorPosition_getWindowOffsetTop(el){return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop}
function PopupWindow_getXYPosition(anchorname){var coordinates;if(this.type=="WINDOW")coordinates=getAnchorWindowPosition(anchorname);else coordinates=getAnchorPosition(anchorname);this.x=coordinates.x;this.y=coordinates.y}function PopupWindow_setSize(width,height){this.width=width;this.height=height}function PopupWindow_populate(contents){this.contents=contents;this.populated=false}function PopupWindow_setUrl(url){this.url=url}
function PopupWindow_setWindowProperties(props){this.windowProperties=props}
function PopupWindow_refresh(){if(this.divName!=null)if(this.use_gebi)document.getElementById(this.divName).innerHTML=this.contents;else if(this.use_css)document.all[this.divName].innerHTML=this.contents;else{if(this.use_layers){var d=document.layers[this.divName];d.document.open();d.document.writeln(this.contents);d.document.close()}}else if(this.popupWindow!=null&&!this.popupWindow.closed){if(this.url!="")this.popupWindow.location.href=this.url;else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);
this.popupWindow.document.close()}this.popupWindow.focus()}}
function PopupWindow_showPopup(anchorname){this.getXYPosition(anchorname);this.x+=this.offsetX;this.y+=this.offsetY;if(!this.populated&&this.contents!=""){this.populated=true;this.refresh()}if(this.divName!=null)if(this.use_gebi){document.getElementById(this.divName).style.left=this.x-15;document.getElementById(this.divName).style.top=this.y+178;document.getElementById(this.divName).style.visibility="visible"}else if(this.use_css){document.all[this.divName].style.left=this.x;document.all[this.divName].style.top=
this.y;document.all[this.divName].style.visibility="visible"}else{if(this.use_layers){document.layers[this.divName].left=this.x;document.layers[this.divName].top=this.y;document.layers[this.divName].visibility="visible"}}else{if(this.popupWindow==null||this.popupWindow.closed){if(this.x<0)this.x=0;if(this.y<0)this.y=0;if(screen&&screen.availHeight)if(this.y+this.height>screen.availHeight)this.y=screen.availHeight-this.height;if(screen&&screen.availWidth)if(this.x+this.width>screen.availWidth)this.x=
screen.availWidth-this.width;var avoidAboutBlank=window.opera||document.layers&&!navigator.mimeTypes["*"]||navigator.vendor=="KDE"||document.childNodes&&!document.all&&!navigator.taintEnabled;this.popupWindow=window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"")}this.refresh()}}
function PopupWindow_hidePopup(){if(this.divName!=null)if(this.use_gebi)document.getElementById(this.divName).style.visibility="hidden";else if(this.use_css)document.all[this.divName].style.visibility="hidden";else{if(this.use_layers)document.layers[this.divName].visibility="hidden"}else if(this.popupWindow&&!this.popupWindow.closed){this.popupWindow.close();this.popupWindow=null}}
function PopupWindow_isClicked(e){try{if(this.divName!=null){if(this.use_layers){var clickX=e.pageX;var clickY=e.pageY;var t=document.layers[this.divName];if(clickX>t.left&&clickX<t.left+t.clip.width&&clickY>t.top&&clickY<t.top+t.clip.height)return true;else return false}else if(document.all){var t=window.event.srcElement;while(t.parentElement!=null){if(t.id==this.divName)return true;if(t.name=="ajout_intervale_du")return true;else if(t.name=="ajout_intervale_au")return true;else if(t.name=="filtre_du")return true;
else if(t.name=="filtre_au")return true;else if(t.name=="periode_du")return true;else if(t.name=="periode_au")return true;else if(t.name=="supp_resa_ant")return true;else if(t.name=="attente_arrhes")return true;else if(t.name=="debut")return true;else if(t.name=="fin")return true;else if(t.name=="begin")return true;t=t.parentElement}return false}else if(this.use_gebi){if(e.srcElement!=""&&e.srcElement!=null)var t=e.srcElement;else var t=e.originalTarget;while(t.parentNode!=null){if(t.id==this.divName)return true;
if(t.name=="ajout_intervale_du")return true;else if(t.name=="ajout_intervale_au")return true;else if(t.name=="filtre_du")return true;else if(t.name=="filtre_au")return true;else if(t.name=="periode_du")return true;else if(t.name=="periode_au")return true;else if(t.name=="supp_resa_ant")return true;else if(t.name=="attente_arrhes")return true;else if(t.name=="debut")return true;else if(t.name=="fin")return true;else if(t.name=="begin")return true;t=t.parentNode}return false}return false}return false}catch(error){return true}}
function PopupWindow_hideIfNotClicked(e){if(this.autoHideEnabled&&!this.isClicked(e))this.hidePopup()}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(e){for(var i=0;i<popupWindowObjects.length;i++)if(popupWindowObjects[i]!=null){var p=popupWindowObjects[i];p.hideIfNotClicked(e)}}
function PopupWindow_attachListener(){if(document.layers)document.captureEvents(Event.MOUSEUP);window.popupWindowOldEventListener=document.onmouseup;if(window.popupWindowOldEventListener!=null)document.onmouseup=new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");else document.onmouseup=PopupWindow_hidePopupWindows}
function PopupWindow(){if(!window.popupWindowIndex)window.popupWindowIndex=0;if(!window.popupWindowObjects)window.popupWindowObjects=new Array;if(!window.listenerAttached){window.listenerAttached=true;PopupWindow_attachListener()}this.index=popupWindowIndex++;popupWindowObjects[this.index]=this;this.divName=null;this.popupWindow=null;this.width=0;this.height=0;this.populated=false;this.visible=false;this.autoHideEnabled=false;this.contents="";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
if(arguments.length>0){this.type="DIV";this.divName=arguments[0]}else this.type="WINDOW";this.use_gebi=false;this.use_css=false;this.use_layers=false;if(document.getElementById)this.use_gebi=true;else if(document.all)this.use_css=true;else if(document.layers)this.use_layers=true;else this.type="WINDOW";this.offsetX=0;this.offsetY=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.setUrl=PopupWindow_setUrl;this.setWindowProperties=PopupWindow_setWindowProperties;
this.refresh=PopupWindow_refresh;this.showPopup=PopupWindow_showPopup;this.hidePopup=PopupWindow_hidePopup;this.setSize=PopupWindow_setSize;this.isClicked=PopupWindow_isClicked;this.autoHide=PopupWindow_autoHide;this.hideIfNotClicked=PopupWindow_hideIfNotClicked}
function CalendarPopup(){var c;if(arguments.length>2){c=new PopupWindow(arguments[2]);c.offsetX=arguments[0];c.offsetY=arguments[1]}else{c=new PopupWindow;c.setSize(150,175);c.offsetX=-100;c.offsetY=-160}c.autoHide();c.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");c.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");c.dayHeaders=new Array("S","M","T","W","T","F",
"S");c.returnFunction="CP_tmpReturnFunction";c.returnMonthFunction="CP_tmpReturnMonthFunction";c.returnQuarterFunction="CP_tmpReturnQuarterFunction";c.returnYearFunction="CP_tmpReturnYearFunction";c.weekStartDay=0;c.isShowYearNavigation=false;c.displayType="date";c.disabledWeekDays=new Object;c.disabledDatesExpression="";c.yearSelectStartOffset=2;c.currentDate=null;c.todayText="Today";c.ImgPath="";c.cssPrefix="";c.isShowYearNavigationInput=false;window.CP_targetInput=null;window.CP_dateFormat="MM/dd/yyyy";
c.setReturnFunction=CP_setReturnFunction;c.setReturnMonthFunction=CP_setReturnMonthFunction;c.setReturnQuarterFunction=CP_setReturnQuarterFunction;c.setReturnYearFunction=CP_setReturnYearFunction;c.setMonthNames=CP_setMonthNames;c.setMonthAbbreviations=CP_setMonthAbbreviations;c.setDayHeaders=CP_setDayHeaders;c.setWeekStartDay=CP_setWeekStartDay;c.setDisplayType=CP_setDisplayType;c.setDisabledWeekDays=CP_setDisabledWeekDays;c.addDisabledDates=CP_addDisabledDates;c.setYearSelectStartOffset=CP_setYearSelectStartOffset;
c.setTodayText=CP_setTodayText;c.setImgPath=CP_setImgPath;c.showYearNavigation=CP_showYearNavigation;c.showCalendar=CP_showCalendar;c.hideCalendar=CP_hideCalendar;c.getStyles=getCalendarStyles;c.refreshCalendar=CP_refreshCalendar;c.getCalendar=CP_getCalendar;c.select=CP_select;c.setCssPrefix=CP_setCssPrefix;c.showYearNavigationInput=CP_showYearNavigationInput;return c}
function CP_tmpReturnFunction(y,m,d){if(window.CP_targetInput!=null){var dt=new Date(y,m-1,d,0,0,0);window.CP_targetInput.value=formatDate(dt,window.CP_dateFormat)}else alert("Use setReturnFunction() to define which function will get the clicked results!")}function CP_tmpReturnMonthFunction(y,m){alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , month="+m)}
function CP_tmpReturnQuarterFunction(y,q){alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , quarter="+q)}function CP_tmpReturnYearFunction(y){alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+y)}function CP_setReturnFunction(name){this.returnFunction=name}function CP_setReturnMonthFunction(name){this.returnMonthFunction=name}
function CP_setReturnQuarterFunction(name){this.returnQuarterFunction=name}function CP_setReturnYearFunction(name){this.returnYearFunction=name}function CP_setMonthNames(){for(var i=0;i<arguments.length;i++)this.monthNames[i]=arguments[i]}function CP_setMonthAbbreviations(){for(var i=0;i<arguments.length;i++)this.monthAbbreviations[i]=arguments[i]}function CP_setDayHeaders(){for(var i=0;i<arguments.length;i++)this.dayHeaders[i]=arguments[i]}function CP_setWeekStartDay(day){this.weekStartDay=day}
function CP_showYearNavigation(){this.isShowYearNavigation=arguments.length>0?arguments[0]:true}function CP_setDisplayType(type){if(type!="date"&&type!="week-end"&&type!="month"&&type!="quarter"&&type!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false}this.displayType=type}function CP_setYearSelectStartOffset(num){this.yearSelectStartOffset=num}
function CP_setDisabledWeekDays(){this.disabledWeekDays=new Object;for(var i=0;i<arguments.length;i++)this.disabledWeekDays[arguments[i]]=true}
function CP_addDisabledDates(start,end){if(arguments.length==1)end=start;if(start==null&&end==null)return;if(this.disabledDatesExpression!="")this.disabledDatesExpression+="||";if(start!=null){start=parseDate(start);start=""+start.getFullYear()+LZ(start.getMonth()+1)+LZ(start.getDate())}if(end!=null){end=parseDate(end);end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate())}if(start==null)this.disabledDatesExpression+="(ds<="+end+")";else if(end==null)this.disabledDatesExpression+="(ds>="+
start+")";else this.disabledDatesExpression+="(ds>="+start+"&&ds<="+end+")"}function CP_setTodayText(text){this.todayText=text}function CP_setImgPath(text){this.ImgPath=text}function CP_setCssPrefix(val){this.cssPrefix=val}function CP_showYearNavigationInput(){this.isShowYearNavigationInput=arguments.length>0?arguments[0]:true}function CP_hideCalendar(){if(arguments.length>0)window.popupWindowObjects[arguments[0]].hidePopup();else this.hidePopup()}
function CP_refreshCalendar(index){var calObject=window.popupWindowObjects[index];if(arguments.length>1)calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));else calObject.populate(calObject.getCalendar());calObject.refresh()}
function CP_showCalendar(anchorname){if(false&&this.currentDate==null)this.currentDate=new Date(parseDate("2004-06-16"));if(arguments.length>1)if(arguments[1]==null||arguments[1]=="")this.currentDate=new Date;else this.currentDate=new Date(parseDate(arguments[1]));this.populate(this.getCalendar());this.showPopup(anchorname)}
function CP_select(inputobj,linkname,format){var selectedDate=arguments.length>3?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return}if(inputobj.type!="text"&&inputobj.type!="hidden"&&inputobj.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");
window.CP_targetInput=null;return}window.CP_targetInput=inputobj;this.currentDate=null;var time=0;if(selectedDate!=null)time=getDateFromFormat(selectedDate,format);else if(inputobj.value!="")time=getDateFromFormat(inputobj.value,format);if(selectedDate!=null||inputobj.value!="")if(time==0)this.currentDate=null;else this.currentDate=new Date(time);window.CP_dateFormat=format;this.showCalendar(linkname)}
function getCalendarStyles(){var result="";var p="";if(this!=null&&typeof this.cssPrefix!="undefined"&&this.cssPrefix!=null&&this.cssPrefix!="")p=this.cssPrefix;result+="<STYLE>\n";result+="."+p+"cpYearNavigation,."+p+"cpMonthNavigation { background-color:#C0C0C0; text-align:center; vertical-align:center; text-decoration:none; color:#000000; font-weight:bold;}\n";result+="."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+
p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText { font-family:arial; font-size:8pt;}\n";result+="TD."+p+"cpDayColumnHeader { text-align:right; border:solid thin #C0C0C0;border-width:0 0 1 0;}\n";result+="."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate { text-align:right; text-decoration:none;}\n";result+="."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+
p+"cpCurrentDateDisabled { color:#D0D0D0; text-align:right; text-decoration:line-through;}\n";result+="."+p+"cpCurrentMonthDate, .cpCurrentDate { color:#000000;}\n";result+="."+p+"cpOtherMonthDate { color:#808080;}\n";result+="TD."+p+"cpCurrentDate { color:white; background-color: #C0C0C0; border-width:1; border:solid thin #800000;}\n";result+="TD."+p+"cpCurrentDateDisabled { border-width:1; border:solid thin #FFAAAA;}\n";result+="TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled { border:solid thin #C0C0C0; border-width:1 0 0 0;}\n";
result+="A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled { height:20px;}\n";result+="A."+p+"cpTodayText { color:black;}\n";result+="."+p+"cpTodayTextDisabled { color:#D0D0D0;}\n";result+="."+p+"cpBorder { border:solid thin #808080;}\n";result+="</STYLE>\n";return result}
function CP_getCalendar(){var now=new Date;if(this.type=="WINDOW")var windowref="window.opener.";else var windowref="";var result="";if(this.type=="WINDOW"){result+="<HTML><HEAD><TITLE>Calendrier</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result+='<CENTER><DIV style="position:absolute; background-color:white"><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n'}else{result+='<DIV style="position:absolute; background-color:white"><TABLE CLASS="'+
this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result+="<TR><TD ALIGN=CENTER>\n";result+="<CENTER>\n"}if(this.displayType=="date"||this.displayType=="week-end"){if(this.currentDate==null)this.currentDate=now;if(arguments.length>0)var month=arguments[0];else var month=this.currentDate.getMonth()+1;if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1])var year=arguments[1];else var year=this.currentDate.getFullYear();var daysinmonth=new Array(0,
31,28,31,30,31,30,31,31,30,31,30,31);if(year%4==0&&year%100!=0||year%400==0)daysinmonth[2]=29;var current_month=new Date(year,month-1,1);var display_year=year;var display_month=month;var display_date=1;var weekday=current_month.getDay();var offset=0;offset=weekday>=this.weekStartDay?weekday-this.weekStartDay:7-this.weekStartDay+weekday;if(offset>0){display_month--;if(display_month<1){display_month=12;display_year--}display_date=daysinmonth[display_month]-offset+1}var next_month=month+1;var next_month_year=
year;if(next_month>12){next_month=1;next_month_year++}var last_month=month-1;var last_month_year=year;if(last_month<1){last_month=12;last_month_year--}var date_class;if(this.type!="WINDOW")result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";var refresh="javascript:"+windowref+"CP_refreshCalendar";if(this.isShowYearNavigation){result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+
"("+this.index+","+last_month+","+last_month_year+');">&lt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+"</SPAN></TD>";result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');">&gt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';
result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+"("+this.index+","+month+","+(year-1)+');">&lt;</A></TD>';if(this.isShowYearNavigationInput)result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+"("+this.index+","+month+',this.value-0);"></TD>';else result+='<TD CLASS="'+this.cssPrefix+
'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'cpYearNavigation">'+year+"</SPAN></TD>";result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+"("+this.index+","+month+","+(year+1)+');">&gt;</A></TD>'}else{result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+"("+this.index+","+last_month+","+last_month_year+');"><IMG BORDER=0 SRC="'+this.ImgPath+
'calendar/previous.gif"></A></TD>\n';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+" "+year+"</SPAN></TD>\n";result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');"><IMG BORDER=0 SRC="'+this.ImgPath+'calendar/following.gif"></A></TD>\n'}result+="</TR></TABLE>\n";result+=
"<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";result+="<TR>\n";for(var j=0;j<7;j++)result+='<TD CLASS="'+this.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'cpDayColumnHeader">'+this.dayHeaders[(this.weekStartDay+j)%7]+"</TD>\n";result+="</TR>\n";for(var row=1;row<=6;row++){result+="<TR>\n";for(var col=1;col<=7;col++){var disabled=false;if(this.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval("disabled=("+
this.disabledDatesExpression+")")}var dateClass="";if(display_month==this.currentDate.getMonth()+1&&display_date==this.currentDate.getDate()&&display_year==this.currentDate.getFullYear())dateClass="cpCurrentDate";else if(display_month==month)dateClass="cpCurrentMonthDate";else dateClass="cpOtherMonthDate";if(disabled||this.disabledWeekDays[col-1])result+=' <TD CLASS="'+this.cssPrefix+dateClass+'"><SPAN CLASS="'+this.cssPrefix+dateClass+'Disabled">'+display_date+"</SPAN></TD>\n";else{var selected_date=
display_date;var selected_month=display_month;var selected_year=display_year;if(this.displayType=="week-end"){var d=new Date(selected_year,selected_month-1,selected_date,0,0,0,0);d.setDate(d.getDate()+(7-col));selected_year=d.getYear();if(selected_year<1E3)selected_year+=1900;selected_month=d.getMonth()+1;selected_date=d.getDate()}result+=' <TD CLASS="'+this.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+this.returnFunction+"("+selected_year+","+selected_month+","+selected_date+");"+windowref+
"CP_hideCalendar('"+this.index+'\');" CLASS="'+this.cssPrefix+dateClass+'">'+display_date+"</A></TD>\n"}display_date++;if(display_date>daysinmonth[display_month]){display_date=1;display_month++}if(display_month>12){display_month=1;display_year++}}result+="</TR>"}var current_weekday=now.getDay()-this.weekStartDay;if(current_weekday<0)current_weekday+=7;result+="<TR>\n";result+=' <TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'cpTodayText">\n';if(this.disabledDatesExpression!=""){var ds=""+now.getFullYear()+
LZ(now.getMonth()+1)+LZ(now.getDate());eval("disabled=("+this.disabledDatesExpression+")")}if(disabled||this.disabledWeekDays[current_weekday+1])result+=' <SPAN CLASS="'+this.cssPrefix+'cpTodayTextDisabled">'+this.todayText+"</SPAN>\n";else result+=' <A CLASS="'+this.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+this.returnFunction+"('"+now.getFullYear()+"','"+(now.getMonth()+1)+"','"+now.getDate()+"');"+windowref+"CP_hideCalendar('"+this.index+"');\">"+this.todayText+"</A>\n";result+=" <BR>\n";
result+=" </TD></TR></TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="month"||this.displayType=="quarter"||this.displayType=="year"){if(arguments.length>0)var year=arguments[0];else if(this.displayType=="year")var year=now.getFullYear()-this.yearSelectStartOffset;else var year=now.getFullYear();if(this.displayType!="year"&&this.isShowYearNavigation){result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+
this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year-1)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/prev.gif"></A></TD>\n';result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+"</TD>\n";result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year+1)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/next.gif"></A></TD>\n';
result+="</TR></TABLE>\n"}}if(this.displayType=="month"){result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<4;i++){result+="<TR>";for(var j=0;j<3;j++){var monthindex=i*3+j;result+='<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnMonthFunction+"("+year+","+(monthindex+1)+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+"</A></TD>"}result+=
"</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="quarter"){result+="<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<2;i++){result+="<TR>";for(var j=0;j<2;j++){var quarter=i*2+j+1;result+='<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnQuarterFunction+"("+year+","+quarter+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+"</A><BR><BR></TD>"}result+=
"</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="year"){var yearColumnSize=4;result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year-yearColumnSize*2)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/prev.gif"></A></TD>\n';result+=' <TD CLASS="'+
this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year+yearColumnSize*2)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/next.gif"></A></TD>\n';result+="</TR></TABLE>\n";result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<yearColumnSize;i++){for(var j=0;j<2;j++){var currentyear=year+j*yearColumnSize+i;result+='<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+
this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnYearFunction+"("+currentyear+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+currentyear+"</A></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}result+='</DIV><iframe style="width:151; height:105%; border:0" src="javascript:false"></iframe>';if(this.type=="WINDOW")result+="</BODY></HTML>\n";return result};var calendExp=new CalendarPopup(-110,-160,"calendardiv");var calendTrn=new CalendarPopup(-110,-342,"calendardiv");calendExp.setCssPrefix("CAL_STYLE");calendExp.setYearSelectStartOffset(0);calendExp.setWeekStartDay(6);calendTrn.setCssPrefix("CAL_STYLE");calendTrn.setYearSelectStartOffset(0);calendTrn.setWeekStartDay(6);today=new Date;mo=today.getMonth()+1;day=today.getDate()-1;year=today.getFullYear();
if(day==0){mo--;if(mo==0){mo=12;year=year-1}if(mo==2)if(year%4==0)day=29;else day=28;else if(mo==1||mo==3||mo==5||mo==7||mo==8||mo==10||mo==12)day=31;else day=30}datedeb=year+"-"+mo+"-"+day;date=year+"-"+mo+"-"+day;year++;mo=mo+6;if(mo>12){year++;mo-=12}datefinexp=year+"-"+mo+"-1";calendExp.addDisabledDates(datefinexp,null);calendExp.addDisabledDates(null,datedeb);calendTrn.addDisabledDates(datefinexp,null);calendExp.addDisabledDates(null,datedeb);
function startup(day,today,month,imgpath){calendExp.setDayHeaders(day[6],day[0],day[1],day[2],day[3],day[4],day[5]);calendTrn.setDayHeaders(day[6],day[0],day[1],day[2],day[3],day[4],day[5]);calendExp.setTodayText(today);calendTrn.setTodayText(today);calendExp.setImgPath(imgpath);calendTrn.setImgPath(imgpath);calendExp.setMonthNames(month[0],month[1],month[2],month[3],month[4],month[5],month[6],month[7],month[8],month[9],month[10],month[11]);calendTrn.setMonthNames(month[0],month[1],month[2],month[3],
month[4],month[5],month[6],month[7],month[8],month[9],month[10],month[11])}function validDate(data){if(data!=""){var TabDate=new Array;TabDate=data.split("/");if(TabDate[0].length==1)TabDate[0]="0"+TabDate[0];if(TabDate[1].length==1)TabDate[1]="0"+TabDate[1];if(TabDate[2].length==2)TabDate[2]="20"+TabDate[2];data=TabDate[0]+"/"+TabDate[1]+"/"+TabDate[2];return data}else return""}
function calendar(champ,id,type){if(document.saisie.btheadt[0].checked)calendTrn.select(champ,id,type);else calendExp.select(champ,id,type)}function calendmaj(idin,idout){idin.value=idout.value}var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(x){return(x<0||x>9?"":"0")+x}function isDate(val,format){var date=getDateFromFormat(val,format);if(date==0)return false;return true}function compareDates(date1,dateformat1,date2,dateformat2){var d1=getDateFromFormat(date1,dateformat1);var d2=getDateFromFormat(date2,dateformat2);if(d1==0||d2==0)return-1;else if(d1>d2)return 1;return 0}
function formatDate(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object;if(y.length<4)y=""+(y-0+1900);value["y"]=""+y;value["yyyy"]=y;value["yy"]=y.substring(2,4);value["M"]=M;value["MM"]=LZ(M);value["MMM"]=MONTH_NAMES[M-1];value["NNN"]=MONTH_NAMES[M+
11];value["d"]=d;value["dd"]=LZ(d);value["E"]=DAY_NAMES[E+7];value["EE"]=DAY_NAMES[E];value["H"]=H;value["HH"]=LZ(H);if(H==0)value["h"]=12;else if(H>12)value["h"]=H-12;else value["h"]=H;value["hh"]=LZ(value["h"]);if(H>11)value["K"]=H-12;else value["K"]=H;value["k"]=H+1;value["KK"]=LZ(value["K"]);value["kk"]=LZ(value["k"]);if(H>11)value["a"]="PM";else value["a"]="AM";value["m"]=m;value["mm"]=LZ(m);value["s"]=s;value["ss"]=LZ(s);while(i_format<format.length){c=format.charAt(i_format);token="";while(format.charAt(i_format)==
c&&i_format<format.length)token+=format.charAt(i_format++);if(value[token]!=null)result=result+value[token];else result=result+token}return result}function _isInteger(val){var digits="1234567890";for(var i=0;i<val.length;i++)if(digits.indexOf(val.charAt(i))==-1)return false;return true}function _getInt(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var token=str.substring(i,i+x);if(token.length<minlength)return null;if(_isInteger(token))return token}return null}
function getDateFromFormat(val,format){val=val+"";format=format+"";var i_val=0;var i_format=0;var c="";var token="";var token2="";var x,y;var now=new Date;var year=now.getYear();var month=now.getMonth()+1;var date=1;var hh=now.getHours();var mm=now.getMinutes();var ss=now.getSeconds();var ampm="";while(i_format<format.length){c=format.charAt(i_format);token="";while(format.charAt(i_format)==c&&i_format<format.length)token+=format.charAt(i_format++);if(token=="yyyy"||token=="yy"||token=="y"){if(token==
"yyyy"){x=4;y=4}if(token=="yy"){x=2;y=2}if(token=="y"){x=2;y=4}year=_getInt(val,i_val,x,y);if(year==null)return 0;i_val+=year.length;if(year.length==2)if(year>70)year=1900+(year-0);else year=2E3+(year-0)}else if(token=="MMM"||token=="NNN"){month=0;for(var i=0;i<MONTH_NAMES.length;i++){var month_name=MONTH_NAMES[i];if(val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase())if(token=="MMM"||token=="NNN"&&i>11){month=i+1;if(month>12)month-=12;i_val+=month_name.length;break}}if(month<
1||month>12)return 0}else if(token=="EE"||token=="E")for(var i=0;i<DAY_NAMES.length;i++){var day_name=DAY_NAMES[i+1];if(val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()){i_val+=day_name.length;break}}else if(token=="MM"||token=="M"){month=_getInt(val,i_val,token.length,2);if(month==null||month<1||month>12)return 0;i_val+=month.length}else if(token=="dd"||token=="d"){date=_getInt(val,i_val,token.length,2);if(date==null||date<1||date>31)return 0;i_val+=date.length}else if(token==
"hh"||token=="h"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<1||hh>12)return 0;i_val+=hh.length}else if(token=="HH"||token=="H"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<0||hh>23)return 0;i_val+=hh.length}else if(token=="KK"||token=="K"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<0||hh>11)return 0;i_val+=hh.length}else if(token=="kk"||token=="k"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<1||hh>24)return 0;i_val+=hh.length;hh--}else if(token=="mm"||token==
"m"){mm=_getInt(val,i_val,token.length,2);if(mm==null||mm<0||mm>59)return 0;i_val+=mm.length}else if(token=="ss"||token=="s"){ss=_getInt(val,i_val,token.length,2);if(ss==null||ss<0||ss>59)return 0;i_val+=ss.length}else if(token=="a"){if(val.substring(i_val,i_val+2).toLowerCase()=="am")ampm="AM";else if(val.substring(i_val,i_val+2).toLowerCase()=="pm")ampm="PM";else return 0;i_val+=2}else if(val.substring(i_val,i_val+token.length)!=token)return 0;else i_val+=token.length}if(i_val!=val.length)return 0;
if(month==2)if(year%4==0&&year%100!=0||year%400==0){if(date>29)return 0}else if(date>28)return 0;if(month==4||month==6||month==9||month==11)if(date>30)return 0;if(hh<12&&ampm=="PM")hh=hh-0+12;else if(hh>11&&ampm=="AM")hh-=12;var newdate=new Date(year,month-1,date,hh,mm,ss);return newdate.getTime()}
function parseDate(val){var preferEuro=arguments.length==2?arguments[1]:false;generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");var checkList=new Array("generalFormats",preferEuro?"dateFirst":"monthFirst",preferEuro?"monthFirst":"dateFirst");var d=null;for(var i=0;i<checkList.length;i++){var l=window[checkList[i]];for(var j=0;j<l.length;j++){d=
getDateFromFormat(val,l[j]);if(d!=0)return new Date(d)}}return null}
function getAnchorPosition(anchorname){var useWindow=false;var coordinates=new Object;var x=0,y=0;var use_gebi=false,use_css=false,use_layers=false;if(document.getElementById)use_gebi=true;else if(document.all)use_css=true;else if(document.layers)use_layers=true;if(use_gebi&&document.all){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname])}else if(use_gebi){var o=document.getElementById(anchorname);x=AnchorPosition_getPageOffsetLeft(o);
y=AnchorPosition_getPageOffsetTop(o)}else if(use_css){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname])}else if(use_layers){var found=0;for(var i=0;i<document.anchors.length;i++)if(document.anchors[i].name==anchorname){found=1;break}if(found==0){coordinates.x=0;coordinates.y=0;return coordinates}x=document.anchors[i].x;y=document.anchors[i].y}else{coordinates.x=0;coordinates.y=0;return coordinates}coordinates.x=x;coordinates.y=
y;return coordinates}
function getAnchorWindowPosition(anchorname){var coordinates=getAnchorPosition(anchorname);var x=0;var y=0;if(document.getElementById)if(isNaN(window.screenX)){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop}else{x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}else if(document.all){x=coordinates.x-document.body.scrollLeft+
window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop}else if(document.layers){x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}coordinates.x=x;coordinates.y=y;return coordinates}function AnchorPosition_getPageOffsetLeft(el){var ol=el.offsetLeft;while((el=el.offsetParent)!=null)ol+=el.offsetLeft;return ol}
function AnchorPosition_getWindowOffsetLeft(el){return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(el){var ot=el.offsetTop;while((el=el.offsetParent)!=null)ot+=el.offsetTop;return ot}function AnchorPosition_getWindowOffsetTop(el){return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop}
function PopupWindow_getXYPosition(anchorname){var coordinates;if(this.type=="WINDOW")coordinates=getAnchorWindowPosition(anchorname);else coordinates=getAnchorPosition(anchorname);this.x=coordinates.x;this.y=coordinates.y}function PopupWindow_setSize(width,height){this.width=width;this.height=height}function PopupWindow_populate(contents){this.contents=contents;this.populated=false}function PopupWindow_setUrl(url){this.url=url}
function PopupWindow_setWindowProperties(props){this.windowProperties=props}
function PopupWindow_refresh(){if(this.divName!=null)if(this.use_gebi)document.getElementById(this.divName).innerHTML=this.contents;else if(this.use_css)document.all[this.divName].innerHTML=this.contents;else{if(this.use_layers){var d=document.layers[this.divName];d.document.open();d.document.writeln(this.contents);d.document.close()}}else if(this.popupWindow!=null&&!this.popupWindow.closed){if(this.url!="")this.popupWindow.location.href=this.url;else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);
this.popupWindow.document.close()}this.popupWindow.focus()}}
function PopupWindow_showPopup(anchorname){this.getXYPosition(anchorname);this.x+=this.offsetX;this.y+=this.offsetY;if(!this.populated&&this.contents!=""){this.populated=true;this.refresh()}if(this.divName!=null)if(this.use_gebi){document.getElementById(this.divName).style.left=this.x-15;document.getElementById(this.divName).style.top=this.y+178;document.getElementById(this.divName).style.visibility="visible"}else if(this.use_css){document.all[this.divName].style.left=this.x;document.all[this.divName].style.top=
this.y;document.all[this.divName].style.visibility="visible"}else{if(this.use_layers){document.layers[this.divName].left=this.x;document.layers[this.divName].top=this.y;document.layers[this.divName].visibility="visible"}}else{if(this.popupWindow==null||this.popupWindow.closed){if(this.x<0)this.x=0;if(this.y<0)this.y=0;if(screen&&screen.availHeight)if(this.y+this.height>screen.availHeight)this.y=screen.availHeight-this.height;if(screen&&screen.availWidth)if(this.x+this.width>screen.availWidth)this.x=
screen.availWidth-this.width;var avoidAboutBlank=window.opera||document.layers&&!navigator.mimeTypes["*"]||navigator.vendor=="KDE"||document.childNodes&&!document.all&&!navigator.taintEnabled;this.popupWindow=window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"")}this.refresh()}}
function PopupWindow_hidePopup(){if(this.divName!=null)if(this.use_gebi)document.getElementById(this.divName).style.visibility="hidden";else if(this.use_css)document.all[this.divName].style.visibility="hidden";else{if(this.use_layers)document.layers[this.divName].visibility="hidden"}else if(this.popupWindow&&!this.popupWindow.closed){this.popupWindow.close();this.popupWindow=null}}
function PopupWindow_isClicked(e){try{if(this.divName!=null){if(this.use_layers){var clickX=e.pageX;var clickY=e.pageY;var t=document.layers[this.divName];if(clickX>t.left&&clickX<t.left+t.clip.width&&clickY>t.top&&clickY<t.top+t.clip.height)return true;else return false}else if(document.all){var t=window.event.srcElement;while(t.parentElement!=null){if(t.id==this.divName)return true;if(t.name=="ajout_intervale_du")return true;else if(t.name=="ajout_intervale_au")return true;else if(t.name=="filtre_du")return true;
else if(t.name=="filtre_au")return true;else if(t.name=="periode_du")return true;else if(t.name=="periode_au")return true;else if(t.name=="supp_resa_ant")return true;else if(t.name=="attente_arrhes")return true;else if(t.name=="debut")return true;else if(t.name=="fin")return true;else if(t.name=="begin")return true;t=t.parentElement}return false}else if(this.use_gebi){if(e.srcElement!=""&&e.srcElement!=null)var t=e.srcElement;else var t=e.originalTarget;while(t.parentNode!=null){if(t.id==this.divName)return true;
if(t.name=="ajout_intervale_du")return true;else if(t.name=="ajout_intervale_au")return true;else if(t.name=="filtre_du")return true;else if(t.name=="filtre_au")return true;else if(t.name=="periode_du")return true;else if(t.name=="periode_au")return true;else if(t.name=="supp_resa_ant")return true;else if(t.name=="attente_arrhes")return true;else if(t.name=="debut")return true;else if(t.name=="fin")return true;else if(t.name=="begin")return true;t=t.parentNode}return false}return false}return false}catch(error){return true}}
function PopupWindow_hideIfNotClicked(e){if(this.autoHideEnabled&&!this.isClicked(e))this.hidePopup()}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(e){for(var i=0;i<popupWindowObjects.length;i++)if(popupWindowObjects[i]!=null){var p=popupWindowObjects[i];p.hideIfNotClicked(e)}}
function PopupWindow_attachListener(){if(document.layers)document.captureEvents(Event.MOUSEUP);window.popupWindowOldEventListener=document.onmouseup;if(window.popupWindowOldEventListener!=null)document.onmouseup=new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");else document.onmouseup=PopupWindow_hidePopupWindows}
function PopupWindow(){if(!window.popupWindowIndex)window.popupWindowIndex=0;if(!window.popupWindowObjects)window.popupWindowObjects=new Array;if(!window.listenerAttached){window.listenerAttached=true;PopupWindow_attachListener()}this.index=popupWindowIndex++;popupWindowObjects[this.index]=this;this.divName=null;this.popupWindow=null;this.width=0;this.height=0;this.populated=false;this.visible=false;this.autoHideEnabled=false;this.contents="";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
if(arguments.length>0){this.type="DIV";this.divName=arguments[0]}else this.type="WINDOW";this.use_gebi=false;this.use_css=false;this.use_layers=false;if(document.getElementById)this.use_gebi=true;else if(document.all)this.use_css=true;else if(document.layers)this.use_layers=true;else this.type="WINDOW";this.offsetX=0;this.offsetY=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.setUrl=PopupWindow_setUrl;this.setWindowProperties=PopupWindow_setWindowProperties;
this.refresh=PopupWindow_refresh;this.showPopup=PopupWindow_showPopup;this.hidePopup=PopupWindow_hidePopup;this.setSize=PopupWindow_setSize;this.isClicked=PopupWindow_isClicked;this.autoHide=PopupWindow_autoHide;this.hideIfNotClicked=PopupWindow_hideIfNotClicked}
function CalendarPopup(){var c;if(arguments.length>2){c=new PopupWindow(arguments[2]);c.offsetX=arguments[0];c.offsetY=arguments[1]}else{c=new PopupWindow;c.setSize(150,175);c.offsetX=-100;c.offsetY=-160}c.autoHide();c.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");c.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");c.dayHeaders=new Array("S","M","T","W","T","F",
"S");c.returnFunction="CP_tmpReturnFunction";c.returnMonthFunction="CP_tmpReturnMonthFunction";c.returnQuarterFunction="CP_tmpReturnQuarterFunction";c.returnYearFunction="CP_tmpReturnYearFunction";c.weekStartDay=0;c.isShowYearNavigation=false;c.displayType="date";c.disabledWeekDays=new Object;c.disabledDatesExpression="";c.yearSelectStartOffset=2;c.currentDate=null;c.todayText="Today";c.ImgPath="";c.cssPrefix="";c.isShowYearNavigationInput=false;window.CP_targetInput=null;window.CP_targetInput2=null;
window.CP_dateFormat="MM/dd/yyyy";c.setReturnFunction=CP_setReturnFunction;c.setReturnMonthFunction=CP_setReturnMonthFunction;c.setReturnQuarterFunction=CP_setReturnQuarterFunction;c.setReturnYearFunction=CP_setReturnYearFunction;c.setMonthNames=CP_setMonthNames;c.setMonthAbbreviations=CP_setMonthAbbreviations;c.setDayHeaders=CP_setDayHeaders;c.setWeekStartDay=CP_setWeekStartDay;c.setDisplayType=CP_setDisplayType;c.setDisabledWeekDays=CP_setDisabledWeekDays;c.addDisabledDates=CP_addDisabledDates;
c.setYearSelectStartOffset=CP_setYearSelectStartOffset;c.setTodayText=CP_setTodayText;c.setImgPath=CP_setImgPath;c.showYearNavigation=CP_showYearNavigation;c.showCalendar=CP_showCalendar;c.hideCalendar=CP_hideCalendar;c.getStyles=getCalendarStyles;c.refreshCalendar=CP_refreshCalendar;c.getCalendar=CP_getCalendar;c.select=CP_select;c.setCssPrefix=CP_setCssPrefix;c.showYearNavigationInput=CP_showYearNavigationInput;return c}
function CP_tmpReturnFunction(y,m,d){if(window.CP_targetInput!=null){var dt=new Date(y,m-1,d,0,0,0);window.CP_targetInput.value=d;today=new Date;mo=today.getMonth()+1;window.CP_targetInput2.value=m-mo+12*(y-today.getFullYear())}else alert("Use setReturnFunction() to define which function will get the clicked results!")}function CP_tmpReturnMonthFunction(y,m){alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , month="+m)}
function CP_tmpReturnQuarterFunction(y,q){alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , quarter="+q)}function CP_tmpReturnYearFunction(y){alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+y)}function CP_setReturnFunction(name){this.returnFunction=name}function CP_setReturnMonthFunction(name){this.returnMonthFunction=name}
function CP_setReturnQuarterFunction(name){this.returnQuarterFunction=name}function CP_setReturnYearFunction(name){this.returnYearFunction=name}function CP_setMonthNames(){for(var i=0;i<arguments.length;i++)this.monthNames[i]=arguments[i]}function CP_setMonthAbbreviations(){for(var i=0;i<arguments.length;i++)this.monthAbbreviations[i]=arguments[i]}function CP_setDayHeaders(){for(var i=0;i<arguments.length;i++)this.dayHeaders[i]=arguments[i]}function CP_setWeekStartDay(day){this.weekStartDay=day}
function CP_showYearNavigation(){this.isShowYearNavigation=arguments.length>0?arguments[0]:true}function CP_setDisplayType(type){if(type!="date"&&type!="week-end"&&type!="month"&&type!="quarter"&&type!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false}this.displayType=type}function CP_setYearSelectStartOffset(num){this.yearSelectStartOffset=num}
function CP_setDisabledWeekDays(){this.disabledWeekDays=new Object;for(var i=0;i<arguments.length;i++)this.disabledWeekDays[arguments[i]]=true}
function CP_addDisabledDates(start,end){if(arguments.length==1)end=start;if(start==null&&end==null)return;if(this.disabledDatesExpression!="")this.disabledDatesExpression+="||";if(start!=null){start=parseDate(start);start=""+start.getFullYear()+LZ(start.getMonth()+1)+LZ(start.getDate())}if(end!=null){end=parseDate(end);end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate())}if(start==null)this.disabledDatesExpression+="(ds<="+end+")";else if(end==null)this.disabledDatesExpression+="(ds>="+
start+")";else this.disabledDatesExpression+="(ds>="+start+"&&ds<="+end+")"}function CP_setTodayText(text){this.todayText=text}function CP_setImgPath(text){this.ImgPath=text}function CP_setCssPrefix(val){this.cssPrefix=val}function CP_showYearNavigationInput(){this.isShowYearNavigationInput=arguments.length>0?arguments[0]:true}function CP_hideCalendar(){if(arguments.length>0)window.popupWindowObjects[arguments[0]].hidePopup();else this.hidePopup()}
function CP_refreshCalendar(index){var calObject=window.popupWindowObjects[index];if(arguments.length>1)calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));else calObject.populate(calObject.getCalendar());calObject.refresh()}
function CP_showCalendar(anchorname){if(false&&this.currentDate==null)this.currentDate=new Date(parseDate("2004-06-16"));if(arguments.length>1)if(arguments[1]==null||arguments[1]=="")this.currentDate=new Date;else this.currentDate=new Date(parseDate(arguments[1]));this.populate(this.getCalendar());this.showPopup(anchorname)}
function CP_select(inputobj,inputobj2,linkname,format){var selectedDate=arguments.length>3?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return}window.CP_targetInput=inputobj;window.CP_targetInput2=inputobj2;this.currentDate=null;var time=0;
if(selectedDate!="")time=getDateFromFormat(selectedDate,format);else if(inputobj.value!=""&&inputobj2.value!=""){today=new Date;mo=today.getMonth()+1;result=today.getFullYear()+(mo+parseInt(inputobj2.value))/12;y=Math.floor(result);m=Math.round(12*(result-y));d=inputobj.value;time=new Date(y,m-1,d,0,0,0)}if(selectedDate!=null||inputobj.value!="")if(time==0)this.currentDate=null;else this.currentDate=new Date(time);window.CP_dateFormat=format;this.showCalendar(linkname)}
function getCalendarStyles(){var result="";var p="";if(this!=null&&typeof this.cssPrefix!="undefined"&&this.cssPrefix!=null&&this.cssPrefix!="")p=this.cssPrefix;result+="<STYLE>\n";result+="."+p+"cpYearNavigation,."+p+"cpMonthNavigation { background-color:#C0C0C0; text-align:center; vertical-align:center; text-decoration:none; color:#000000; font-weight:bold;}\n";result+="."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+
p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText { font-family:arial; font-size:8pt;}\n";result+="TD."+p+"cpDayColumnHeader { text-align:right; border:solid thin #C0C0C0;border-width:0 0 1 0;}\n";result+="."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate { text-align:right; text-decoration:none;}\n";result+="."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+
p+"cpCurrentDateDisabled { color:#D0D0D0; text-align:right; text-decoration:line-through;}\n";result+="."+p+"cpCurrentMonthDate, .cpCurrentDate { color:#000000;}\n";result+="."+p+"cpOtherMonthDate { color:#808080;}\n";result+="TD."+p+"cpCurrentDate { color:white; background-color: #C0C0C0; border-width:1; border:solid thin #800000;}\n";result+="TD."+p+"cpCurrentDateDisabled { border-width:1; border:solid thin #FFAAAA;}\n";result+="TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled { border:solid thin #C0C0C0; border-width:1 0 0 0;}\n";
result+="A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled { height:20px;}\n";result+="A."+p+"cpTodayText { color:black;}\n";result+="."+p+"cpTodayTextDisabled { color:#D0D0D0;}\n";result+="."+p+"cpBorder { border:solid thin #808080;}\n";result+="</STYLE>\n";return result}
function CP_getCalendar(){var now=new Date;if(this.type=="WINDOW")var windowref="window.opener.";else var windowref="";var result="";if(this.type=="WINDOW"){result+="<HTML><HEAD><TITLE>Calendrier</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result+='<CENTER><DIV style="position:absolute; background-color:white"><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n'}else{result+='<DIV style="position:absolute; background-color:white"><TABLE CLASS="'+
this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result+="<TR><TD ALIGN=CENTER>\n";result+="<CENTER>\n"}if(this.displayType=="date"||this.displayType=="week-end"){if(this.currentDate==null)this.currentDate=now;if(arguments.length>0)var month=arguments[0];else var month=this.currentDate.getMonth()+1;if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1])var year=arguments[1];else var year=this.currentDate.getFullYear();var daysinmonth=new Array(0,
31,28,31,30,31,30,31,31,30,31,30,31);if(year%4==0&&year%100!=0||year%400==0)daysinmonth[2]=29;var current_month=new Date(year,month-1,1);var display_year=year;var display_month=month;var display_date=1;var weekday=current_month.getDay();var offset=0;offset=weekday>=this.weekStartDay?weekday-this.weekStartDay:7-this.weekStartDay+weekday;if(offset>0){display_month--;if(display_month<1){display_month=12;display_year--}display_date=daysinmonth[display_month]-offset+1}var next_month=month+1;var next_month_year=
year;if(next_month>12){next_month=1;next_month_year++}var last_month=month-1;var last_month_year=year;if(last_month<1){last_month=12;last_month_year--}var date_class;if(this.type!="WINDOW")result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";var refresh="javascript:"+windowref+"CP_refreshCalendar";if(this.isShowYearNavigation){result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+
"("+this.index+","+last_month+","+last_month_year+');">&lt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+"</SPAN></TD>";result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');">&gt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';
result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+"("+this.index+","+month+","+(year-1)+');">&lt;</A></TD>';if(this.isShowYearNavigationInput)result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+"("+this.index+","+month+',this.value-0);"></TD>';else result+='<TD CLASS="'+this.cssPrefix+
'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'cpYearNavigation">'+year+"</SPAN></TD>";result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+"("+this.index+","+month+","+(year+1)+');">&gt;</A></TD>'}else{result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+"("+this.index+","+last_month+","+last_month_year+');"><IMG BORDER=0 SRC="'+this.ImgPath+
'calendar/previous.gif"></A></TD>\n';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+" "+year+"</SPAN></TD>\n";result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');"><IMG BORDER=0 SRC="'+this.ImgPath+'calendar/following.gif"></A></TD>\n'}result+="</TR></TABLE>\n";result+=
"<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";result+="<TR>\n";for(var j=0;j<7;j++)result+='<TD CLASS="'+this.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'cpDayColumnHeader">'+this.dayHeaders[(this.weekStartDay+j)%7]+"</TD>\n";result+="</TR>\n";for(var row=1;row<=6;row++){result+="<TR>\n";for(var col=1;col<=7;col++){var disabled=false;if(this.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval("disabled=("+
this.disabledDatesExpression+")")}var dateClass="";if(display_month==this.currentDate.getMonth()+1&&display_date==this.currentDate.getDate()&&display_year==this.currentDate.getFullYear())dateClass="cpCurrentDate";else if(display_month==month)dateClass="cpCurrentMonthDate";else dateClass="cpOtherMonthDate";if(disabled||this.disabledWeekDays[col-1])result+=' <TD CLASS="'+this.cssPrefix+dateClass+'"><SPAN CLASS="'+this.cssPrefix+dateClass+'Disabled">'+display_date+"</SPAN></TD>\n";else{var selected_date=
display_date;var selected_month=display_month;var selected_year=display_year;if(this.displayType=="week-end"){var d=new Date(selected_year,selected_month-1,selected_date,0,0,0,0);d.setDate(d.getDate()+(7-col));selected_year=d.getYear();if(selected_year<1E3)selected_year+=1900;selected_month=d.getMonth()+1;selected_date=d.getDate()}result+=' <TD CLASS="'+this.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+this.returnFunction+"("+selected_year+","+selected_month+","+selected_date+");"+windowref+
"CP_hideCalendar('"+this.index+'\');" CLASS="'+this.cssPrefix+dateClass+'">'+display_date+"</A></TD>\n"}display_date++;if(display_date>daysinmonth[display_month]){display_date=1;display_month++}if(display_month>12){display_month=1;display_year++}}result+="</TR>"}var current_weekday=now.getDay()-this.weekStartDay;if(current_weekday<0)current_weekday+=7;result+="<TR>\n";result+=' <TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'cpTodayText">\n';if(this.disabledDatesExpression!=""){var ds=""+now.getFullYear()+
LZ(now.getMonth()+1)+LZ(now.getDate());eval("disabled=("+this.disabledDatesExpression+")")}if(disabled||this.disabledWeekDays[current_weekday+1])result+=' <SPAN CLASS="'+this.cssPrefix+'cpTodayTextDisabled">'+this.todayText+"</SPAN>\n";else result+=' <A CLASS="'+this.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+this.returnFunction+"('"+now.getFullYear()+"','"+(now.getMonth()+1)+"','"+now.getDate()+"');"+windowref+"CP_hideCalendar('"+this.index+"');\">"+this.todayText+"</A>\n";result+=" <BR>\n";
result+=" </TD></TR></TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="month"||this.displayType=="quarter"||this.displayType=="year"){if(arguments.length>0)var year=arguments[0];else if(this.displayType=="year")var year=now.getFullYear()-this.yearSelectStartOffset;else var year=now.getFullYear();if(this.displayType!="year"&&this.isShowYearNavigation){result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+
this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year-1)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/prev.gif"></A></TD>\n';result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+"</TD>\n";result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year+1)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/next.gif"></A></TD>\n';
result+="</TR></TABLE>\n"}}if(this.displayType=="month"){result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<4;i++){result+="<TR>";for(var j=0;j<3;j++){var monthindex=i*3+j;result+='<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnMonthFunction+"("+year+","+(monthindex+1)+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+"</A></TD>"}result+=
"</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="quarter"){result+="<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<2;i++){result+="<TR>";for(var j=0;j<2;j++){var quarter=i*2+j+1;result+='<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnQuarterFunction+"("+year+","+quarter+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+"</A><BR><BR></TD>"}result+=
"</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="year"){var yearColumnSize=4;result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year-yearColumnSize*2)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/prev.gif"></A></TD>\n';result+=' <TD CLASS="'+
this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year+yearColumnSize*2)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/next.gif"></A></TD>\n';result+="</TR></TABLE>\n";result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<yearColumnSize;i++){for(var j=0;j<2;j++){var currentyear=year+j*yearColumnSize+i;result+='<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+
this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnYearFunction+"("+currentyear+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+currentyear+"</A></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}result+='</DIV><iframe style="width:151; height:105%; border:0" src="javascript:false"></iframe>';if(this.type=="WINDOW")result+="</BODY></HTML>\n";return result};/*

Milonic DHTML Menu - JavaScript Website Navigation System.
Version 5.788 - Built: Monday January 14 2008 - 18:57
Copyright 2008 (c) Milonic Solutions Limited. All Rights Reserved.
This is a commercial software product, please visit http://www.milonic.com/ for more information.
See http://www.milonic.com/license.php for Commercial License Agreement
All Copyright statements must always remain in place in all files at all times

*******  PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE  ******* 

License Details:
 Number: 207296
    URL: iha.com
   Type: Professional
  Dated: Tuesday January 22 2008

*/

lNum=207296;lURL="iha.com";lVer="5.788";_$t_="Please visit www.milonic.com for details on how to remove this evaluation message";_mD=2;_d=document;_dB=_d.body;_n=navigator;_L=location;_nv=$tL(_n.appVersion);_nu=$tL(_n.userAgent);_ps=parseInt(_n.productSub);_cls=_toL=X_=Y_=_n=null;_W=window;_wp=_W.createPopup;ie=(_d.all)?1:0;ie4=(!_d.getElementById&&ie)?1:0;ie5=(!ie4&&ie&&!_wp)?1:0;ie55=(!ie4&&ie&&_wp)?1:0;ie7=(_nu.indexOf("msie 7")!=-1)?1:0;ns6=(_nu.indexOf("gecko")!=-1)?1:0;konq=(_nu.indexOf("konqueror")!=-1)?1:0;sfri=(_nu.indexOf("safari")!=-1)?1:0;if(sfri&&_d.evaluate)sfri=0;if(konq||sfri){_ps=0;ns6=0}ns4=(_d.layers)?1:0;ns61=(_ps>=20010726)?1:0;ns7=(_ps>=20020823)?1:0;ns72=(_ps>=20040804)?1:0;ff15=(_ps>=20060000)?1:0;op=(_W.opera)?1:0;if(op||konq){ie=0;ie7=0;}op5=(_nu.indexOf("opera 5")!=-1)?1:0;op6=(_nu.indexOf("opera 6")!=-1||_nu.indexOf("opera/6")!=-1)?1:0;op7=(_nu.indexOf("opera 7")!=-1||_nu.indexOf("opera/7")!=-1)?1:0;_OpV=(op&&_W.opera.version)?_W.opera.version():0;if(_OpV)op7=1;mac=(_nv.indexOf("mac")!=-1)?1:0;if(ns6||ns4||op||sfri)mac=0;ns60=0;if(ns6&&!ns61)ns60=1;if(op7)op=0;IEDtD=0;if(!op&&((_d.all||ns7)&&_d.compatMode=="CSS1Compat")||(mac&&_d.doctype&&_d.doctype.name.indexOf(".dtd")!=-1))IEDtD=1;_jv="javascript:;";inEditMode=_rstC=inDragMode=_d.dne=lcl=$R1=$mD=_mcnt=_sL=_sT=_ofMT=_oldbW=_bW=_oldbH=_bl=_el=_st=_en=_cKA=$BW=0;_mtX="";_startM=_c=1;_trueItemRef=focusedMenu=t_=_itemRef=_mn=-1;_zi=_aN=_bH=999;if(op)ie55=0;B$="absolute";$O="menu";$5="hidden";$_O="scroll";function $c(v){if(_d.getElementById)return _d.getElementById(v);if(_d.all)return _d.all[v]}function _StO(f,m){return setTimeout(f,m)}_m=[];_mi=[];_sm=[];_tsm=[];_cip=[];$S3="2E636F6D2F";$S4="646D2E706870";$S5=4048;_MT=_StO("",0);_oMT=_StO("",0);_cMT=_StO("",0);_mst=_StO("",0);_Mtip=_StO("",0);$u="undefined ";_Lhr=_L.href;$6="visible";if(op5){$5=$tU($5);$6=$tU($6)}function M_hideLayer(){}function _oTree(){}function mmMouseMove(){}function _TtM(){}function _IdM(){}function _ocURL(){}function mmClick(){}function autoOT(){}function _iF0C(){}function showtip(){}function isEditMode(){}function hidetip(){}function mmVisFunction(){}function doMenuResize(){}function _tMR(){}function _maxm(){}function $9(ap){if(ie55){try{if(ap.filters){return 1}}catch(e){}}else return false}function _p8(a,d){var t=[];for(_a=0;_a<a.length;_a++){if(a[_a]!=d){t[t.length]=a[_a]}}return t}function copyOf(w){for(_cO in w){this[_cO]=w[_cO]}}function $tL(v){if(v)return v.toLowerCase()}function $tU(v){if(v)return v.toUpperCase()}function $pU(v){if(v)return parseInt(v)}_lDd=0;function _gLd(){if(_d.readyState&&_d.readyState!="complete"){setTimeout("_gLd()",50);return}_lDd=1;_oldbH=0}if(!_d.readyState)_d.addEventListener('DOMContentLoaded',_gLd,false);else setTimeout("_gLd()",50);function drawMenus(){_startM=1;_oldbH=0;_oldbW=0;_baL=0;if(_W.buildAfterLoad)_baL=1;for(_y=_mcnt;_y<_m.length;_y++)o$(_y,1,_baL);if(_W._pageIsXML){var G=$c(_menuContainer);if(!G){G=_d.createElement("div");G.id=_menuContainer;_dB.appendChild(G)}G.innerHTML=_mtX}}_$S={menu:0,text:1,url:2,showmenu:3,status:4,onbgcolor:5,oncolor:6,offbgcolor:7,offcolor:8,offborder:9,separatorcolor:10,padding:11,fontsize:12,fontstyle:13,fontweight:14,fontfamily:15,high3dcolor:16,low3dcolor:17,pagecolor:18,pagebgcolor:19,headercolor:20,headerbgcolor:21,subimagepadding:22,subimageposition:23,subimage:24,onborder:25,ondecoration:26,separatorsize:27,itemheight:28,image:29,imageposition:30,imagealign:31,overimage:32,decoration:33,type:34,target:35,align:36,imageheight:37,imagewidth:38,openonclick:39,closeonclick:40,keepalive:41,onfunction:42,offfunction:43,onbold:44,onitalic:45,bgimage:46,overbgimage:47,onsubimage:48,separatorheight:49,separatorwidth:50,separatorpadding:51,separatoralign:52,onclass:53,offclass:54,itemwidth:55,pageimage:56,targetfeatures:57,visitedcolor:58,pointer:59,imagepadding:60,valign:61,clickfunction:62,bordercolor:63,borderstyle:64,borderwidth:65,overfilter:66,outfilter:67,margin:68,pagebgimage:69,swap3d:70,separatorimage:71,pageclass:72,menubgimage:73,headerborder:74,pageborder:75,title:76,pagematch:77,rawcss:78,fileimage:79,clickcolor:80,clickbgcolor:81,clickimage:82,clicksubimage:83,imageurl:84,pagesubimage:85,dragable:86,clickclass:87,clickbgimage:88,imageborderwidth:89,overseparatorimage:90,clickseparatorimage:91,pageseparatorimage:92,menubgcolor:93,opendelay:94,tooltip:95,disabled:96,dividespan:97,tipdelay:98,tipfollow:99,tipmenu:100,menustyle:101,pageoncolor:102,id:103,overpageimage:104,nowrap:105,overflow:106,hotkey:107,leftimage:108,rightimage:109,overleftimage:110,overrightimage:111,pageleftimage:112,pagerightimage:113,nobreadcrumb:114,custom:115,subimagecss:116,onsubimagecss:117};function mm_style(){for($i in _$S)this[$i]=_n;this.built=0}_$M={items:0,name:1,top:2,left:3,itemwidth:4,screenposition:5,style:6,alwaysvisible:7,align:8,orientation:9,keepalive:10,openstyle:11,margin:12,overflow:13,position:14,overfilter:15,outfilter:16,menuwidth:17,itemheight:18,followscroll:19,menualign:20,mm_callItem:21,mm_obj_ref:22,mm_built:23,menuheight:24,ignorecollision:25,divides:26,zindex:27,opendelay:28,resizable:29,minwidth:30,maxwidth:31,mm_fixheight:32,C:33,rawcss:34};function menuname(name){for($i in _$M)this[$i]=_n;this.name=$tL(name);_c=1;_mn++}function f_(i){_mi[_bl]=[];_mi[_bl][0]=_mn;i=i.split(";");_sc="";for(var a=0;a<i.length;a++){var p=i[a].indexOf("`");if(p!=-1){_sc=";";_tI=i[a];if(p==i[a].lastIndexOf("`")){for(var b=a;b<i.length;b++){if(i[b+1]){_tI+=";"+i[b+1];a++;if(i[b+1].indexOf("`")!=-1)b=i.length}}}i[a]=_tI.replace(/`/g,"")}p=i[a].indexOf("=");if(p==-1){if(i[a])_si=_si+";"+i[a]+_sc}else{_si=i[a].slice(p+1);_w=i[a].slice(0,p);if(_w=="showmenu")_si=$tL(_si)}if(i[a]&&_$S[_w])_mi[_bl][_$S[_w]]=_si}var S=_x[6];if(_mi[_bl][101])S=eval(_mi[_bl][101]);for($i in S)if(S[$i]){var v=_mi[_bl][_$S[$i]];if(!v&&v!="")_mi[_bl][_$S[$i]]=S[$i]}_m[_mn][0][_c-2]=_bl;_c++;_bl++}_c=0;function ami(t){_t=this;if(_c==1){_c++;_m[_mn]=[];_x=_m[_mn];for($i in _t)_x[_$M[$i]]=_t[$i];_x[21]=-1;_x[0]=[];if(!_x[12])_x[12]=0;var s=_m[_mn][6];var m=_m[_mn];if(m[15]==_n)m[15]=s.overfilter;if(m[16]==_n)m[16]=s.outfilter;if(m[13]==_n)m[13]=s.overflow;s[65]=(s.borderwidth)?$pU(s.borderwidth):0;s[64]=s.borderstyle;s[63]=s.bordercolor;if(_W.ignoreCollisions)m[25]=1;if(!s.built){_WzI=_zi;if(_W.menuZIndex){_WzI=_W.menuZIndex;_zi=_WzI}lcl++;var v=s.visitedcolor;if(v&&!_W._pageIsXML){_oC=s.offcolor;if(!_oC)_oC="#000000";if(!v)v="#ff0000";_d.write("<style>.g_"+lcl+":link{color:"+_oC+"}.g_"+lcl+":visited{color:"+v+"}</style>");s.g_="g_"+lcl}s.built=1}}f_(t)}menuname.prototype.aI=ami;
// fonctions async
function BasketGetXmlHttpObject()
{
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	
	}
	return objXMLHttp
}

function BasketstateChanged(fonction, xmlHttp)
{
	
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") fonction(xmlHttp.responseText);
}

function BaskethtmlData(url, type, fonction, param, name)
{	
	var xmlHttp=BasketGetXmlHttpObject()
	
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	}
	
	url=url+"&sid="+name+Math.random();
	
	if (type=="GET") { 
		xmlHttp.open("GET",url,true) ;
		xmlHttp.send(param);
	} else {
		xmlHttp.open("POST",url,true);
		if (param!="") {
			xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			xmlHttp.setRequestHeader("Content-length", param.length);
			xmlHttp.setRequestHeader("Connection", "close");
		}
		xmlHttp.send(param);
	}
	
	xmlHttp.onreadystatechange= function() { 
		BasketstateChanged(fonction, xmlHttp);
	}
}

function refresh_basket (n_annonce, type, form) {
	
	var menu_cookie = document.cookie;
	if (menu_cookie=="") return;
	var str = "n_annonce="+n_annonce+"&type="+type+"&form="+form;
	BaskethtmlData('script/async_basket.html', "POST", refresh_count_basket, str, "basket");
	
}

function refresh_count_basket (val) {
		
	if (val=="") return;
	
	var doc = eval('(' + val + ')'); 
	
	var tab = doc.obj[0];
	
	var style = "";
	if (tab["count"]!="0") {
		document.getElementById("basket_count").style.color="green"; 
		document.getElementById("basket_count").style.fontSize="12px"; 
		document.getElementById("basket_count").style.fontWeight="bold";
	} else {
		document.getElementById("basket_count").style.color=""; 
		document.getElementById("basket_count").style.fontSize=""; 
		document.getElementById("basket_count").style.fontWeight="";
	}
	
	document.getElementById("basket_count2").innerHTML=tab["count"];
	if (tab["form"]!="undefined") eval('document.'+tab["form"]+'.submit();');
}function ihagradient (obj1, obj2, start, end, type, quality, width2) {
	var gbase = document.getElementById(obj1);
	var width = gbase.clientWidth;
	var height = gbase.clientHeight;	
	gbase.style.background = start;	
	var gbase2 = document.getElementById(obj2);	
	var degrad_height = height/quality;
	var degrad_width = width/quality;
	if (width2>0) {width=width2; degrad_width = width2/quality;}	
	if(type=='vertical') {
		for(i = 0; i < height/degrad_height; i++) {
			var g = document.createElement('div');
			g.style.fontSize = '0px';
			g.style.overflow = 'hidden';
			g.style.height = degrad_height+'px';
			g.style.width = width + 'px';
			g.style.background = end;
			g.style.opacity = i/(height/degrad_height);
			g.style.filter = 'alpha(opacity=' + i/(height/(100*degrad_height)) + ')';
			gbase2.appendChild(g);
		}
	} else {
		for(i = (width/degrad_width); i > 1; i--) {
			var g = document.createElement('div');
			g.style.cssText = 'float:left;';
			g.style.height = height + 'px';
			g.style.width = degrad_width+'px';
			g.style.fontSize = '0px';
			g.style.overflow = 'hidden';
			g.style.background = end;
			g.style.opacity = i/(width/degrad_width);
			g.style.filter = 'alpha(opacity=' + i/(width/(100*degrad_width)) + ')';
			gbase2.appendChild(g);
		}
	}
	document.getElementById(obj1).appendChild(gbase2);
}