Yurok_shnurok,
Вариант )))
<div></div>
<script type="text/javascript">
var i = 0;
document.onmousemove = function () {
document.getElementsByTagName("div")[0].innerHTML = i > 100 ? 0 : ++i / 100;
window.setTimeout(function (a) {
return function () {
if (a == i) {
i && v_in_div(i);
i = -1
}
}
}(i), 20)
};
function v_in_div(a) {
b = document.createElement("div");
b.style.cssText = "height: 5px;width: " + a + "px;background-color: " + (a > 50 ? "#FF0000" : "#00FF00");
document.body.appendChild(b)
};
</script>