(function() {
  var len = location.href.length;
  if ((location.href != "http://www.houtesiplou.be/") && (len >= 9) && (location.href.substring(len-9) != "/rectorat")) { return; }

  var now = new Date();
  var m = now.getMonth();
  var d = now.getDate();
  if (((m == 11) && (d >= 21)) || ((m == 0) && (d <= 3))) { // [ 21 Décembre .. 3 Janvier ]

    var xmlhttp1 = new XMLHttpRequest();
    xmlhttp1.onreadystatechange = function() {
      if ((xmlhttp1.readyState == 4) && (xmlhttp1.status == 200)) {
        var contentNode = document.getElementById('content');
        var hspMasNode1 = document.createElement('div');
        hspMasNode1.className = "center";
        hspMasNode1.innerHTML = xmlhttp1.responseText;
        contentNode.insertBefore(hspMasNode1, contentNode.childNodes[0]);
      }
    }
    xmlhttp1.open("GET", "/metadata/hspmas1.xml",true);
    xmlhttp1.send();

    var xmlhttp2 = new XMLHttpRequest();
    xmlhttp2.onreadystatechange = function() {
      if ((xmlhttp2.readyState == 4) && (xmlhttp2.status == 200)) {
        var contentNode = document.getElementById('content');
        var hspMasNode2 = document.createElement('div');
        hspMasNode2.className = "center";
        hspMasNode2.innerHTML = xmlhttp2.responseText;
        contentNode.appendChild(hspMasNode2, contentNode.lastChild);
      }
    }
    xmlhttp2.open("GET", "/metadata/hspmas2.xml",true);
    xmlhttp2.send();

  }
})();


