/*
Script made by Martial Boissonneault © 2001-2002 http://getElementById.com/
This script may be used and changed freely as long as this msg is intact
Visit http://getElementById.com/ for more free scripts and tutorials.
*/
//Primo scoll verticale
timerID = null;
        
function ScrollUp(speed){
    	if(document.getElementById){
        	if(parseInt(txt1.style.top) < 0){
        		txt1.style.top = parseInt(txt1.style.top) + speed + "px";
		}
        	timerID = setTimeout("ScrollUp("+speed+")",30);
    	}
}

function ScrollDown(speed){
    	if(document.getElementById){ 
        	if(parseInt(txt1.style.top) > cnt1.offsetHeight - txt1.offsetHeight){ 
        		txt1.style.top = parseInt(txt1.style.top) - speed + "px";
			}
        	timerID = setTimeout("ScrollDown("+speed+")",30);
    	}
}

function ScrollStop(){
    	if(document.getElementById){
        	clearTimeout(timerID);
    	}
}

function ScrollInit(topDefaultScroll) {
   	if (document.getElementById) {		
        	cnt1 = document.getElementById("cont");
        	txt1 = document.getElementById("text");
        	txt1.style.top = -topDefaultScroll+ "px";
    	}

}
//-------------------------------------------------------------------------------


//Scroll Orizzontale
timerID4 = null;
        
function ScrollUpOriz(speed){
		if(document.getElementById){
        	if(parseInt(txt4.style.left) < 0){
        		txt4.style.left = parseInt(txt4.style.left) + speed + "px";
		}
        	timerID4 = setTimeout("ScrollUpOriz("+speed+")",30);
    	}
}

function ScrollDownOriz(speed){
    	if(document.getElementById){               
        	if(parseInt(txt4.style.left) > cnt4.offsetWidth - txt4.offsetWidth){ 
        		txt4.style.left = parseInt(txt4.style.left) - speed + "px";
			}
        	timerID4 = setTimeout("ScrollDownOriz("+speed+")",30);
    	}
}

function ScrollStopOriz(){
    	if(document.getElementById){
        	clearTimeout(timerID4);
    	}
}

function ScrollInitOriz() {
   	if (document.getElementById) {
        	cnt4 = document.getElementById("contg");
        	txt4 = document.getElementById("textg");
        	txt4.style.left = 0;
    	}

}
//-------------------------------------------------------------------------------
