function getLeftPos(e) {
	pos = e.offsetLeft;
	while (e = e.offsetParent) pos += e.offsetLeft;
	return pos;
}

function getTopPos(e) {
	pos = e.offsetTop;
	while (e = e.offsetParent) pos += e.offsetTop;
	return pos;
}

