function popscroll(page, hauteur, largeur){
    //
    var top=(screen.height-hauteur)/2;
    var left=(screen.width-largeur)/2;
    window.open(page,"","top="+top+",left="+left+",width="+600+",height="+600+",menubar=no,scrollbars=yes,statusbar=no");
}

function popconst(page){
    // popup centrée pour les messages en construction
    var top=(screen.height-200)/2;
    var left=(screen.width-200)/2;
    window.open(page,"","top="+top+",left="+left+",width="+300+",height="+200+",menubar=no,scrollbars=yes,statusbar=no");
}

function rotatecontent(){
  //get current message index (to show it):
  curcontentindex=(curcontentindex<messages.length-1)? curcontentindex+1 : 0
  //get previous message index (to hide it):
  prevcontentindex=(curcontentindex==0)? messages.length-1 : curcontentindex-1
  messages[prevcontentindex].style.display="none" //hide previous message
  messages[curcontentindex].style.display="inline" //show current message
}

function getElementByClass(classname){
  var inc=0
  var alltags=document.all? document.all : document.getElementsByTagName("*")
  for (i=0; i<alltags.length; i++){
    if (alltags[i].className==classname)
      messages[inc++]=alltags[i]
  }
}   

var curcontentindex=0
var messages=new Array()

if (document.getElementById){
  document.write('<style type="text/css">\n')
  document.write('.dyncontent{display:none;}\n')
  document.write('</style>\n')
}

window.onload=function(){
  if (document.all || document.getElementById){
    getElementByClass("dyncontent")
    setInterval("rotatecontent()", 3000)
  }
}
