function ajustEmbedObject() { mesure = document.getElementById('obj_100_percent'); if (mesure) { mesure.style.display = 'block'; height=window.innerWidth;//Firefox if (document.body.clientHeight) { height=document.body.clientHeight;//IE } mesure.style.display = 'block'; document.getElementById('embed_doc').style.height = parseInt(height-mesure.offsetTop-16)+"px" mesure.style.display = 'none'; } } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i'); firstDayDate = new Date(year,month - 1,1); day = 1 - firstDayDate.getDay() ; sunday = day; daysInMonth = this.getDaysInMonth(); while ( day < daysInMonth ) { document.write(''); for ( j = 0 ; j < 7 ; j ++ ) { this.m_Sundays[day] = sunday; if ( day > daysInMonth || day < 1 ){ document.write(' '); } else { document.write(''); if ( this.m_Events[day] != undefined ) { document.write('' + day + ''); } else { document.write(day); } document.write(''); } day ++; } sunday += 7; document.write(''); } document.writeln(''); } Calendar.prototype.getMonthName = function() { var month_name = new Array(); month_name[1] = 'Janvier'; month_name[2] = 'Février'; month_name[3] = 'Mars'; month_name[4] = 'Avril'; month_name[5] = 'Mai'; month_name[6] = 'Juin'; month_name[7] = 'Juillet'; month_name[8] = 'Août'; month_name[9] = 'Septembre'; month_name[10] = 'Octobre'; month_name[11] = 'Novembre'; month_name[12] = 'Décembre'; return month_name[this.m_Month]; } Calendar.prototype.showViewSelector = function() { document.writeln('Jour'); document.writeln('Semaine'); document.writeln('Mois'); } Calendar.prototype.showMonthSelector = function() { next_month = this.m_Month + 1 == 13 ? 1 : this.m_Month + 1; next_year = next_month == 1 ? this.m_Year + 1 : this.m_Year; prev_month = this.m_Month - 1 == 0 ? 12 : this.m_Month - 1; prev_year = next_month == 12 ? this.m_Year - 1 : this.m_Year; document.writeln('
'); document.writeln('<< Précédent'); document.writeln('' + this.getMonthName() + ''); document.writeln(''); document.writeln('
'); } Calendar.prototype.showHeader = function() { document.writeln('
'); document.writeln('' +'' +'' +'' +'' +'' +'' +'' +'
DLMMJVS
'); } Calendar.prototype.getSunday = function(aDay) { return this.m_Sundays[aDay]; } Calendar.prototype.hasEvents = function(aDay) { return aDay != undefined && this.m_Events[aDay] != undefined; } Calendar.prototype.getDaysInMonth = function() { var month = this.m_Month; var year = this.m_Year; var daysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31] if ( ( month == 2) && ( year % 4 == 0 ) && ( ( year % 100 != 0 ) || ( year % 400 == 0 ) ) ) { return 29; } else { return daysInMonth[month - 1]; } } function show(day) { if ( view == 'day' && day != current_day ) { hideDay(current_day); showDay(day); } if ( view == 'week' ) { sunday = calendar.getSunday(day) current_sunday = calendar.getSunday(current_day) if ( sunday != current_sunday ) { hideWeek(current_sunday); showWeek(sunday); } } current_day = day; } function showDay(aDay) { if ( calendar.hasEvents(aDay) ) { obj = document.getElementById( 'a' + aDay ).style.display = 'none'; obj = document.getElementById( 'span' + aDay ).style.display = 'block'; obj = document.getElementById( 'day_' + aDay ).style.display = 'block'; } } function hideDay(aDay) { if ( calendar.hasEvents(aDay) ) { obj = document.getElementById( 'a' + aDay ).style.display = 'block'; obj = document.getElementById( 'span' + aDay ).style.display = 'none'; obj = document.getElementById( 'day_' + aDay ).style.display = 'none'; } } function showWeek(aSunday) { for ( i = aSunday ; i < aSunday + 7 ; i ++ ) { showDay(i) } } function hideWeek(aSunday) { for ( i = aSunday ; i < aSunday + 7 ; i ++ ) { hideDay(i) } } function showMonth() { for ( i = 0 ; i < calendar.getDaysInMonth() ; i ++ ) { showDay(i); } } function hideMonth() { for ( i = 0 ; i < calendar.getDaysInMonth() ; i ++ ) { hideDay(i); } } function doNothing() {} function changeView(aView, updateSession) { if (updateSession == undefined) updateSession = true; if ( aView != view ) { if ( updateSession ) { Http.get({ url: "/public/dynamic/changeSession.php?view="+aView, callback: doNothing, cache: Http.Cache.GetNoCache }); } // RESET if ( view == 'day' ) { hideDay(current_day); } if ( view == 'week' ) { hideWeek(calendar.getSunday(current_day)); } if ( view == 'month' ) { hideMonth(); } if ( view != undefined ) { document.getElementById('view_' + view).style.display = 'block'; document.getElementById('view_' + view + 'o').style.display = 'none'; } view = aView; // SET if ( view == 'day' ) { showDay(current_day); } if ( view == 'week' ) { showWeek(calendar.getSunday(current_day)); } if ( view == 'month' ) { showMonth(); } viewobj = document.getElementById('view_' + view); if (viewobj != undefined ) { viewobj.style.display = 'none'; document.getElementById('view_' + view + 'o').style.display = 'block'; } } } function showContent(obj) { divs = obj.getElementsByTagName('div'); divs[0].style.display = 'block'; } function hideContent(obj) { divs = obj.getElementsByTagName('div'); divs[0].style.display = 'none'; }