function getoffset(e) {
var t = e.offsetTop;
var l = e.offsetLeft;
while (e = e.offsetParent) {
t += e.offsetTop;
l += e.offsetLeft;
}
var result = {};
result.offsetTop = t;
result.offsetLeft = l;
return result;
}