var blogentry = new Array(); var curmonth = "4"; var curyear = "2024"; var months = new Array(); months[1] = new Array("janvier", "31"); months[2] = new Array("février"); months[3] = new Array("mars", "31"); months[4] = new Array("avril", "30"); months[5] = new Array("mai", "31"); months[6] = new Array("juin", "30"); months[7] = new Array("juillet", "31"); months[8] = new Array("août", "31"); months[9] = new Array("septembre", "30"); months[10] = new Array("octobre", "31"); months[11] = new Array("novembre", "30"); months[12] = new Array("décembre", "31"); var nbdays = 30; function changeMonth(action,cat,menu) { with (document) { if (action == "n") { for (i = 28; i < 43; i++) { var dayval = getElementById("cal"+i); if (dayval.hasChildNodes()) { if (dayval.childNodes[0].data == nbdays) {daystart = i + 1; break;} } } while (daystart > 7) { daystart = daystart-7; } curmonth++; if (curmonth == 13) {curmonth = 1; curyear++;} if (curmonth == 2) { if ((curyear % 4 == 0) && ((!(curyear % 100 == 0)) || (curyear % 400 == 0))) {nbdays = 29;} else {nbdays = 28;} } else {nbdays = months[curmonth][1];} } else if (action == "p") { curmonth--; if (curmonth == 0) {curmonth=12; curyear--;} for (i = 1; i < 8; i++) { var dayval = getElementById("cal"+i); if (dayval.hasChildNodes()) { if (dayval.childNodes[0].data == "1" || dayval.childNodes[0].nodeName == "A") {daystart = i - 1; break;} } } if (daystart == 0) daystart = 7; if (curmonth == 2) { if ((curyear % 4 == 0) && ((!(curyear % 100 == 0)) || (curyear % 400 == 0))) {nbdays = 29;} else {nbdays = 28;} } else {nbdays = months[curmonth][1];} days = nbdays; while (days > 1) { daystart--; if (daystart == 0) daystart = 7; days--; } } var http_request = false; if (window.XMLHttpRequest) { http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { try {http_request = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {try {http_request = new ActiveXObject("Microsoft.XMLHTTP");} catch (e) {}} } if (!http_request) { alert("Erreur : XMLHTTP impossible ! Utilisez un autre navigateur."); return false; } var url = 'http://old.univ-paris-est.fr/script/fetch_info-'+curyear+'-'+curmonth+'-'+menu+'.data'; http_request.onreadystatechange = function() {getEntries(http_request,cat);}; http_request.open('GET', url, true); http_request.send(null); } } function getEntries(http_request,cat) { if (http_request.readyState == 4) { if (http_request.status == 200) { var redac = new Array(); if (http_request.responseText != "") { redac = http_request.responseText.split('|'); } with (document) { var caltit = getElementById("calpage"); while (caltit.hasChildNodes()) { caltit.removeChild(caltit.firstChild); } var boldtext = createElement("a"); var newcaltit = createTextNode(months[curmonth][0]+" "+curyear); boldtext.appendChild(newcaltit); var newcaltiturl = "http://old.univ-paris-est.fr/fr/"+cat+"/"+curyear+"/"; if (curmonth < 10) newcaltiturl += "0"; newcaltiturl += curmonth+"/"; boldtext.setAttribute("class","caltitle"); boldtext.setAttribute("href",newcaltiturl); caltit.appendChild(boldtext); for (i = 1; i < 43; i++) { var rmday = getElementById("cal"+i); while (rmday.hasChildNodes()) { rmday.removeChild(rmday.firstChild); } rmday.className = 'emptytd'; } for (i = 1; i <= nbdays; i++) { var newday = getElementById("cal"+daystart); var dayfound = 0; for (j = 0; j < redac.length; j++) { if (redac[j] == i) { var newlink = createElement("a"); var daytn = createTextNode(i); newlink.appendChild(daytn); if (redac[j].length == 1) {var curday = "0" + redac[j];} else {var curday = redac[j];} var newurl = "http://old.univ-paris-est.fr/fr/"+cat+"/"+curyear+"/"; if (curmonth < 10) newurl += "0"; newurl += curmonth+"/"+curday+"/"; newlink.setAttribute("href",newurl); newlink.setAttribute("class","callink"); newday.appendChild(newlink); dayfound = 1; break; } } if (dayfound == 0) { var daytn = createTextNode(i); newday.appendChild(daytn); } if (curyear == 2024 && curmonth == 4 && i == 27) {newday.className='caltoday';} else {newday.className='caltd';} daystart++; } } } } }