// JavaScript Document

var container,news,obj,count;	
  var i=0;
  var speed=100;
  var scroller;
  var tops=new Array();
  var newsheight=0;
  var containerheight=0;
  news=new Array();
  count=0;

function newsscroll()
{
	var v;

	for(v=0;v<news.length;v++)
		{
			tops[v]=tops[v]-1;
			news[v].style.top=tops[v]+'px';
	//		alert(tops[v]);
			if(tops[v]<=-newsheight)
			{
				if(tops.length>2)
					tops[v]=newsheight*(tops.length-1);
				else
					tops[v]=containerheight;//newsheight*(tops.length);

			}
		}

		scroller=setTimeout('newsscroll()',speed);
}


function initnews() {
container=document.getElementById('newscontainer');
containerheight=container.offsetHeight;
do
{
	obj=document.getElementById('news'+count);	
	if(obj!=null)
	{
		obj.className='news_element';
		newsheight=obj.offsetHeight;
		tops[count]=(obj.offsetHeight*count);
		obj.style.top= tops[count]+ 'px';

		news[count]=obj;
		count++;
	}
}while(obj!=null);

if(count>0)
{
   newsscroll();
container.onmouseover=function(){
   clearTimeout(scroller);
 }
container.onmouseout=function(){
   newsscroll();
  }
}

}