
function ElementPosition(x, y) {
    this.x = x;
    this.y = y;
}

function getElementPosition(com, pos) {
    if (com==null){
      return pos;
    }
    pos.y = pos.y + com.offsetTop;
    pos.x = pos.x + com.offsetLeft;

    return getElementPosition(com.offsetParent,pos);
}
