	var chuflashnews = {
	  
	  MoveObject: function(myX,myY)
	  {
	    this.X = myX;
	    this.Y = myY;
	    this.CSS.left=this.X;
	    this.CSS.top=this.Y;
	  },
	  
	  MoveObjectUp: function(mystep)
	  {
	    this.Y -= mystep;
	    this.CSS.top=this.Y;
	  },
	  
	  MoveObjectDown: function(mystep)
	  {
	    this.Y += mystep;
	    this.CSS.top=this.Y;
	  },
	  
	  CreateObject: function(DivId,MyObject)
	  {
	    
	    if (MyObject)
	    this.Object = MyObject;
	    else
	    this.Object = (document.all)?document.all[DivId]:document.getElementById(DivId);
	    
	    if (this.Object)
	    {
	      this.CSS    = this.Object.style;
	      this.Height = this.Object.offsetHeight;
	      // correction bug IE
	      if(document.all) this.Height -= 16;
	      this.Width  = this.Object.offsetWidth;
	      this.X      = this.Object.offsetTop;
	      this.Y      = this.Object.offsetLeft;
	      this.Move   = chuflashnews.MoveObject;
	      this.Up     = chuflashnews.MoveObjectUp;
	      this.Down   = chuflashnews.MoveObjectDown;
	    }
	    return this;
	  },
	  
	  DelTextNode: function(MyObject)
	  {
	    var node = MyObject.firstChild;
	    var next;
	    
	    while (node)
	    {
	      next = node.nextSibling;
	      if (node.nodeType == 3)
		MyObject.removeChild(node);
	      node = next;
	    }
	  },
	  
	  CreateChildren: function(MyObject,HoriSpacer,VertSpacer)
	  {
	    var i=0;
	    var MyChildren = new Array();
	    
	    if (document.getElementById)
	    {
	      chuflashnews.DelTextNode(MyObject);
	      for (i=0;i<MyObject.childNodes.length;i++)
		{
		  MyChildren[i] = new chuflashnews.CreateObject(0,MyObject.childNodes[i]);
		  MyChildren[i].Move((i+1)*HoriSpacer,(i+1)*VertSpacer);
		}
	      return MyChildren;
	    }
	    if (document.all)
	    {
	      for (i=0;i<MyObject.children.length;i++)
	      {
		MyChildren[i] = new chuflashnews.CreateObject(0,MyObject.children(i));
		MyChildren[i].Move((i+1)*HoriSpacer,(i+1)*VertSpacer);
	      }
	      return MyChildren;
	    }
	  },
	  
	  ScrollUp: function()
	  {
	    var MyInterval = this.Interval1;
	    if(!this.isMouseOver) {
	      this.stop();
	      // si on a pas encore fait un tour de boucle des articles
	      if (this.Children[this.FirstChildren].Y<-this.threshold)
		{
		  MyInterval = this.Interval2;
		  this.Children[this.FirstChildren].Down(this.TotalHeight);
		  if (this.FirstChildren<this.Children.length-1)
		    {
		      this.FirstChildren++;
		      this.threshold += this.Children[this.FirstChildren].Height/*-this.Step/**/;
		      // correction bug IE
		      //if(document.all) this.threshold -= 1;
		    }
		  else
		    { 
		      this.FirstChildren = 0;
		      this.threshold = this.Children[this.FirstChildren].Height/*-this.Step/**/;
		      // correction bug IE
		      //if(document.getElementById) this.threshold += this.Spacer;
		      if(document.all) this.threshold += this.Spacer;
		    }
		}
	      for (var i=0;i<this.Children.length;i++)
		{
		  this.Children[i].Up(this.Step);    
		}
	    }
	    this.ProcessId = setTimeout(this.name + '.start()', MyInterval);
	  },
	  
	  
	  ScrollStop: function()
	  {
	    if (this.ProcessId)
	    clearTimeout(this.ProcessId);
	    this.ProcessId = null;
	  },

	  MouseOver: function()
	  {
	    this.isMouseOver = true;
	  },

	  MouseOut: function()
	  {
	    this.isMouseOver = false;
	  },

	  Box: function(BoxName, DivId, myStep, myTempo1, myTempo2, mySpacer)
	  {
	    this.name          = BoxName;
	    this.Step          = myStep ? myStep : 1;
	    this.Interval1     = myTempo1 ? myTempo1 : 50;
	    this.Interval2     = myTempo2 ? myTempo2 : 2000;
	    this.Spacer        = mySpacer ? mySpacer : 0;
	    this.ProcessId     = null;
	    this.Container     = new chuflashnews.CreateObject(DivId);
	    this.isMouseOver   = false;
	    this.Children      = chuflashnews.CreateChildren(this.Container.Object,0,mySpacer);
	    this.FirstChildren = 0;
	    this.LastChildren  = this.Children.length-1;
	    this.threshold     = this.Children[0].Height-this.Step/**/+this.Spacer;
	    var myHeight       = 0;
	    for (var i=0;i<this.Children.length;i++) 
	    {
	      myHeight += (this.Children[i].Height + this.Spacer + this.Step);
	    }
	    this.TotalHeight = myHeight /*+this.Step/**/;
	    // correction bug IE
	    if(document.all) this.TotalHeight += this.Spacer;
	    this.Container.visibility = 'visible';
	    
	    this.start = chuflashnews.ScrollUp;
	    this.stop  = chuflashnews.ScrollStop;
	    this.mouseOver = chuflashnews.MouseOver;
	    this.mouseOut  = chuflashnews.MouseOut;
	    
	  }
	  
	  
	}
      

