var dtop=0;
var dheight=0;
var r=1;
var i=0;
var dtop=50;
var txt="";



function init()
{
	if(document.getElementById)
		{
		for(j=0;j<2;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=50;
				document.getElementById("dv").style.top=dtop+"px";
				init();
				}
				else 
					if(dtop<-70&&i>=stiri.length-1)
					{
					txt="";
					i=0;
					dtop=50;
					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();
		}	
}


