function align()
  {

    var lmt = document.getElementById('centrage');
    var container = document.documentElement;

    xdiv=1000;
    xscreen=document.body.clientWidth;
    xposdiv=(xscreen-xdiv)/2;
    document.getElementById("centrage").style.left=xposdiv+"px";
    document.getElementById("centrage").style.width=xdiv+"px";

    if(lmt && container)
    {
        var containerHeight;
        if (container.innerWidth)
        {
	      //containerHeight = container.innerHeight;
      }
      else
      {
	      //containerHeight = container.clientHeight;
      }
        var lmtHeight;
        if (lmt.innerWidth)
        {
	      //lmtHeight = lmt.innerHeight;
      }
      else
      {
	      //lmtHeight = lmt.offsetHeight;
      }
      var y = Math.ceil((containerHeight - lmtHeight) / 2);
      if(y < 0)
      {
        y = 0;
      }
      lmt.style.position = "relative";
      //lmt.style.top = y + "px";
    }
    if (document.getElementById)
    {
      document.body.style.visibility = 'visible';
    }
  }

  function addevent(obj,evt,fn,capt){
    if(obj.addEventListener)
    {
      obj.addEventListener(evt, fn, capt);
      return true;
    }
    else if(obj.attachEvent)
    {
      obj.attachEvent('on'+evt, fn);
      return true;
    }
    else return false;
  }

  function change_page(typ) {
    if (typ=="moins" && document.moins.deb.value>=2) {
      document.moins.deb.value=parseInt(document.moins.deb.value)-1;
      document.moins.fin.value=parseInt(document.moins.fin.value)-1;
      document.moins.action="bulletin"+parseInt(document.moins.act.value)+".php";
      document.moins.submit() ;
    }
    else if (typ=="plus") {
      document.plus.deb.value=parseInt(document.plus.deb.value)+1;  
      document.plus.fin.value=parseInt(document.plus.fin.value)+1;
      if (document.plus.act.value>0) 
        document.plus.action="bulletin"+parseInt(document.plus.act.value)+".php";
      else 
        document.plus.action="bulletin.php";
      document.plus.submit() ;
    }
  }

  function change_bulletin(num) {
      if (num==undefined) num="";
      document.bull.action="bulletin"+num+".php";
      document.bull.submit() ;
  }

function afficheSite() {
  document.getElementById("centrage").style.visibility="visible";
}

var largecran=screen.width;
var hautecran=screen.height;

if (document.getElementById && document.getElementsByTagName)
{
  addevent(window, 'load', align, false);
  addevent(window, 'resize', align, false);
}



