function makeNews(c,l){
      this.copy = c;
      this.link = l;
      this.write = writeNews;
   }

function writeNews(){
      var str = '<b><div style="float:left;"><a href="news.php" style="font-face: Arial; font-size:15px;">NEWS</a></b></div><div style="float:center; text-align:center;">';
      str += '<a href="' + this.link + '">';
      str += this.copy;
      str += '</a></div>';
      return str;
   }
var newsArray = new Array();
   newsArray[0] = new makeNews(
      "WILLOW featured in La Recherche",
       'la_recherche.pdf').write();
   
   newsArray[1] = new makeNews(
      "Olivier Duchenne earns best student paper honorable mention",
      'news.php').write();
   
   newsArray[2] = new makeNews(
      "Jean Ponce in the New York Times",
      'http://www.nytimes.com/2009/06/07/magazine/07wwln-medium-t.html').write();
   
   newsArray[3] = new makeNews(
      "Francis Bach and Andrew Zisserman awarded ERC grants",
      'news.php').write();

   newsArray[4] = new makeNews(
      "WILLOW on France Culture",
       'http://sites.radiofrance.fr/chaines/france-culture2/emissions/place_toile/fiche.php?diffusion_id=76825').write();

   newsArray[5] = new makeNews(
      "WILLOW co-organizes ENS/INRIA Summer School, Paris, 25-29 July 2011",
       'http://www.di.ens.fr/willow/events/cvml2011').write();
 
  newsArray[6] = new makeNews(
      "Sylvain Arlot gives in January 2011 one of the two Cours Peccot lectures at College de France",
      'http://www.di.ens.fr/~arlot/peccot.htm').write();

var nIndex = newsArray.length-1;
   var timerID = null;
   
   function rotateNews(){
      var len = newsArray.length-1;
      if(nIndex < 0)
         nIndex = len;
      document.getElementById('stories').innerHTML = 
         newsArray[nIndex];
      nIndex--;
      timerID = setTimeout('rotateNews()',6000);
   }
function pauseNews() {
      if (timerID != null) {
         clearTimeout(timerID);
         timerID = null;
      }
   }
   
   function playNews() {
      if (timerID == null) {
         timerID = setTimeout('rotateNews()', 1000);
      }
   }

