/**************************************************************************
/* SCRIPT SCROLL NEWS
/**************************************************************************/

var container; // Contenitore del testo
var text; // Testo
var speed; // Tempo in secondi
var scroll; // handle of function
var initialize = false;
function scrollMarquee(){
	if (initialize) {
		 clearTimeout(scroll); 
		 if ( ( parseInt(text.style.top) + parseInt(text.style.height) ) > 0 ) { 
		 	text.style.top =  ( parseInt(text.style.top) - speed ) + "px";
		 } else { 
		 	 text.style.top = ( container.clientHeight || container.style.height ) + "px" ;
		 }
		 scroll = setTimeout("scrollMarquee()", 50 );
	}
}

function initMarquee(){
initialize = true;
 // Carica i dati
 container = document.getElementById("marqueeContainer");
 text = document.getElementById("marqueeText");
 speed = 1; // Pixel
 // Assegna
 text.style.top = ( container.clientHeight || container.style.height ) + "px" ;
 text.style.height = text.clientHeight + "px";
 // Chiama la funzione 
 scroll = setTimeout("scrollMarquee()",	50);
}
function stopMarquee(){
	clearTimeout(scroll);
	scroll = 0;	
}
function startMarquee(){
	clearTimeout(scroll);
	scroll = setTimeout("scrollMarquee()", 50 );
}