var dtop=0;
var dheight=0;
var r=2;
var i=1;
var dtop=90;
var txt="";

var stiri=new Array(["","",""],
					["","Visit us to the International Ferro-Alloys Conference!<br><br>","<div align='right' class='text10blue'><a href='news.php'><img src='img/readmore.gif' width='66' height='10' alt='' border='0'></a></div>"],
					["","ELSID aims to dominate regional metallurgical supply<br><br>","<div align='right' class='text10blue'><a href='news.php#id1'><img src='img/readmore.gif' width='66' height='10' alt='' border='0'></a></div>"],
					["","National Foundery Conference - Campina<br><br>","<div align='right' class='text10blue'><a href='news.php#id2'><img src='img/readmore.gif' width='66' height='10' alt='' border='0'></a></div>"]
					);

function init()
{
	if(document.getElementById)
		{
		for(j=1;j<3;j++)
			{txt+=stiri[i][j];}
		document.getElementById("dv").innerHTML=txt;				
		scroll();		
		}
}
	
function scroll()
{
	if(document.getElementById)
		{		
		if(dtop>=10)
			{
			dtop-=r;
			document.getElementById("dv").style.top=dtop+"px";
			window.setTimeout("scroll()",80);			
			}				
		else
			if(dtop<15&&dtop>=-70)
			{						
			window.setTimeout("scroll2()",3000);			
			}
			else 
				if(dtop<-70&&i<stiri.length-1)
				{
				txt="";
				i+=1;
				dtop=90;
				document.getElementById("dv").style.top=dtop+"px";
				init();
				}
				else 
					if(dtop<-70&&i>=stiri.length-1)
					{
					txt="";
					i=1;
					dtop=90;
					document.getElementById("dv").style.top=dtop+"px";
					init();
					}
		}	
}

function scroll2()
{
	if(document.getElementById)
		{		
		if(dtop<15&&dtop>=-70)
			{
			dtop-=r;
			document.getElementById("dv").style.top=dtop+"px";
			window.setTimeout("scroll2()",80);			
			}				
		else
			scroll();
		}	
}

