осталось паузу добавить )))
var a, pause = 3000,
id, i, dir;
function g() {
var b = document.getElementById("maksImg");
b.style.top = i < 50 ? i : "50px";
if (dir == 1) i++;
else i--;
if (i >= 50) {
dir = -1;
*!*
clearInterval(id);
window.setTimeout('id = setInterval("g()",50)', pause)
*/!*
}
if (i < -90) {
clearInterval(id);
b.style.display = "none"
}
}
function f() {
if(id)clearInterval(id);
document.getElementById("maksImg").style.display = "block";
i = -90;
dir = 1;
id = setInterval("g()", 50)
};