timerID=null;
timerID1=null;
timerID2=null;
timerID3=null;

function ScrollUp(speed){
    	if(document.getElementById){
        	if(parseInt(txt.style.top) < 0){
        		txt.style.top = parseInt(txt.style.top) + speed + "px";
		}
        	timerID = setTimeout("ScrollUp("+speed+")",30)
    	}
}

function ScrollDown(speed){
    	if(document.getElementById){                        
        	if(parseInt(txt.style.top) > cnt.offsetHeight - txt.offsetHeight){ 
        		txt.style.top = parseInt(txt.style.top) - speed + "px";
		}
        	timerID = setTimeout("ScrollDown("+speed+")",30)
    	}
}

function ScrollStop(){
    	if(document.getElementById){
        	clearTimeout(timerID);
    	}
}

function ScrollInit(contenedor,layer) {
   	if (document.getElementById) {
            cnt = document.getElementById(contenedor);
            txt = document.getElementById(layer);
            txt.style.top = 0;
    	}
}
function ScrollUp1(speed1){
    	if(document.getElementById){
        	if(parseInt(txt1.style.top) < 0){
        		txt1.style.top = parseInt(txt1.style.top) + speed1 + "px";
		}
        	timerID1 = setTimeout("ScrollUp1("+speed1+")",30)
    	}
}

function ScrollDown1(speed1){
    	if(document.getElementById){                        
        	if(parseInt(txt1.style.top) > cnt1.offsetHeight - txt1.offsetHeight){ 
        		txt1.style.top = parseInt(txt1.style.top) - speed1 + "px";
		}
        	timerID1 = setTimeout("ScrollDown1("+speed1+")",30)
    	}
}

function ScrollStop1(){
    	if(document.getElementById){
        	clearTimeout(timerID1);
    	}
}

function ScrollInit1(contenedor1,layer1) {
   	if (document.getElementById) {
            cnt1 = document.getElementById(contenedor1);
            txt1 = document.getElementById(layer1);
            txt1.style.top = 0;
    	}
}function ScrollUp2(speed2){
    	if(document.getElementById){
        	if(parseInt(txt2.style.top) < 0){
        		txt2.style.top = parseInt(txt2.style.top) + speed2 + "px";
		}
        	timerID2 = setTimeout("ScrollUp2("+speed2+")",30)
    	}
}

function ScrollDown2(speed2){
    	if(document.getElementById){                        
        	if(parseInt(txt2.style.top) > cnt2.offsetHeight - txt2.offsetHeight){ 
        		txt2.style.top = parseInt(txt2.style.top) - speed2 + "px";
		}
        	timerID2 = setTimeout("ScrollDown2("+speed2+")",30)
    	}
}

function ScrollStop2(){
    	if(document.getElementById){
        	clearTimeout(timerID2);
    	}
}

function ScrollInit2(contenedor2,layer2) {
   	if (document.getElementById) {
            cnt2 = document.getElementById(contenedor2);
            txt2 = document.getElementById(layer2);
            txt2.style.top = 0;
    	}
}

function ScrollUp3(speed3){
    	if(document.getElementById){
        	if(parseInt(txt3.style.top) < 0){
        		txt3.style.top = parseInt(txt3.style.top) + speed3 + "px";
		}
        	timerID3 = setTimeout("ScrollUp3("+speed3+")",30)
    	}
}

function ScrollDown3(speed3){
    	if(document.getElementById){                        
        	if(parseInt(txt3.style.top) > cnt3.offsetHeight - txt3.offsetHeight){ 
        		txt3.style.top = parseInt(txt3.style.top) - speed3 + "px";
		}
        	timerID3 = setTimeout("ScrollDown3("+speed3+")",30)
    	}
}

function ScrollStop3(){
    	if(document.getElementById){
        	clearTimeout(timerID3);
    	}
}

function ScrollInit3(contenedor3,layer3) {
   	if (document.getElementById) {
            cnt3 = document.getElementById(contenedor3);
            txt3 = document.getElementById(layer3);
            txt3.style.top = 0;
    	}
}