/*
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() {
   	if (document.getElementById) {
        	cnt1 = document.getElementById("cont");
        	txt1 = document.getElementById("text");
        	txt1.style.top = 0;
			
    	}

}
//-------------------------------------------------------------------------------


//Secondo scrool verticale
timerID2 = null;
        
function ScrollUp2(speed){
    	if(document.getElementById){
        	if(parseInt(txt2.style.top) < 0){
        		txt2.style.top = parseInt(txt2.style.top) + speed + "px";
		}
        	timerID2 = setTimeout("ScrollUp2("+speed+")",30);
    	}
}

function ScrollDown2(speed){
    	if(document.getElementById){               
        	if(parseInt(txt2.style.top) > cnt2.offsetHeight - txt2.offsetHeight){ 
        		txt2.style.top = parseInt(txt2.style.top) - speed + "px";
			}
        	timerID2 = setTimeout("ScrollDown2("+speed+")",30);
    	}
}

function ScrollStop2(){
    	if(document.getElementById){
        	clearTimeout(timerID2);
    	}
}

function ScrollInit2() {
   	if (document.getElementById) {
        	cnt2 = document.getElementById("cont_lavori");
        	txt2 = document.getElementById("text_lavori");
        	txt2.style.top = 0;
    }

}
//---------------------------------------------

//Terzo scrool verticale
timerID3 = null;
        
function ScrollUp3(speed){
    	if(document.getElementById){
        	if(parseInt(txt3.style.top) < 0){
        		txt3.style.top = parseInt(txt3.style.top) + speed + "px";
		}
        	timerID3 = setTimeout("ScrollUp3("+speed+")",30);
    	}
}

function ScrollDown3(speed){
    	if(document.getElementById){               
        	if(parseInt(txt3.style.top) > cnt3.offsetHeight - txt3.offsetHeight){ 
        		txt3.style.top = parseInt(txt3.style.top) - speed + "px";
			}
        	timerID3 = setTimeout("ScrollDown3("+speed+")",30);
    	}
}

function ScrollStop3(){
    	if(document.getElementById){
        	clearTimeout(timerID3);
    	}
}

function ScrollInit3() {
   	if (document.getElementById) {
        	cnt3 = document.getElementById("contn");
        	txt3 = document.getElementById("textn");
        	txt3.style.top = 0;
    	}

}
//---------------------------------------------

//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;
    	}

}
//-------------------------------------------------------------------------------

