var isOut = false;
function beginingeschoven(id) {
	var newheight = document.getElementById(id).offsetHeight-21;
	//alert(newheight);
	document.getElementById(id).style.top = parseInt('-' + newheight) + 'px';
}
function schuifuitenin(id) {
	sprong = 10;
	var newheight = document.getElementById(id).offsetHeight-21;
	if (isOut == true) {
		from = -1;
		to = parseInt('-' + newheight);
		isOut = false;
	} else {
		from = parseInt('-' + newheight);
		to = -1;
		isOut = true;
	}
	fromto(id,to,from,to,sprong);
}
function fromto(id,end,from,too,sprong) {
	if (from < too) {
		if ((from+sprong)>end) {
			document.getElementById(id).style.top = (end) + 'px';
			return false;
		} else {
			document.getElementById(id).style.top = (from + sprong) + 'px';
		}
		from = sprong+from;
	} else {
		if ((from-sprong) < end) {
			document.getElementById(id).style.top = (end) + 'px';
			return false;
		} else {
			document.getElementById(id).style.top = (from - sprong) + 'px';
		}
		from = parseInt('-' + (sprong-from));
	}
	if (end != from) {
		setTimeout("fromto('" + id + "'," + end + "," + from + "," + too + "," + sprong + ")",50);
	}
	return false;
}
