﻿var lastBottom = -12, lastTop = -262;

//var gab = 5;
function moveDown() {
	var target = document.getElementById("actionMov");
	if (parseInt(target.style.top) < lastBottom) {
	//target.style.top = parseInt(target.style.top) + gab + "px";
	target.style.top = Math.ceil(parseInt(target.style.top) + ((lastBottom - parseInt(target.style.top))*0.4)) + "px";
	setTimeout('moveDown()',20);
	} 
}
function moveUp() {
	var target = document.getElementById("actionMov");
	if (parseInt(target.style.top) > lastTop) {
	//target.style.top = parseInt(target.style.top) - gab + "px";
	target.style.top = Math.floor(parseInt(target.style.top) - ((parseInt(target.style.top) - lastTop)*0.4)) + "px";
	setTimeout('moveUp()',20);
	}
}