var timer=0;
var x=0;

function init_timer(){
   timer=1;
}

function stop_timer(){
   timer=0;
}

function up(max,calq){
   maximum=max;
   calque=calq;
if (document.getElementById){
   document.getElementById(calque).style.top=x + "px";
   }
if (document.all && !document.getElementById){
   document.all[calque].style.top=x + "px";
   }
if (document.layers){
   document.layers[calque].top=x + "px";
   }
if(timer==1 && x<maximum){
   setTimeout("up(maximum,calque)",30);
   x+=3;
   }
}

function down(max,calq){
   maximum=max;
   calque=calq;
if (document.getElementById){
   document.getElementById(calque).style.top=x + "px";
   }
if (document.all && !document.getElementById){
   document.all[calque].style.top=x + "px";
   }
if (document.layers){
   document.layers[calque].top=x + "px";
   }
if(timer==1 && x>maximum){
   setTimeout("down(maximum,calque)",30);
   x-=3;
   }
}