var mensaje = "TodoKenshin"; var delante = ""; var ancho = 50; var cnt = 0; //variando este parametro, modificas la velocidad del movimiento var velocidad = 100; var display; for ( var i = 0 ; i < ancho ; i++ ) delante += ' '; var max = delante.length; function ScrollUp() { if ( cnt == 0 ) { display = mensaje; timeID = setTimeout("ScrollUp()",velocidad); } if ( cnt >= 1 ) { display = delante.substring(0,cnt)+mensaje; timeID = setTimeout("ScrollUp()",velocidad); } if ( cnt == max ) { cnt = -2; timeID = setTimeout("ScrollDown()",velocidad); } cnt++; window.status=display; } function ScrollDown() { if ( cnt == 0 ) { display = delante + mensaje; timeID = setTimeout("ScrollDown()",velocidad); } if ( cnt >= 1 ) { display = delante.substring(0,(max-cnt))+mensaje; timeID = setTimeout("ScrollDown()",velocidad); } if ( cnt == max ) { cnt = -2; timeID = setTimeout("ScrollUp()",velocidad); } cnt++; window.status=display; } ScrollUp()