code: public static int getRelativeX(int x, Element target) {
  
          return (x - target.getAbsoluteLeft()) + /* target.getScrollLeft() + */target.getOwnerDocument().getScrollLeft();
      }
docs: Gets the horizontal position of the given x-coordinate relative to a given element.<p>
  
  @param x the coordinate to use
  @param target the element whose coordinate system is to be used
  
  @return the relative horizontal position
  
  @see com.google.gwt.event.dom.client.MouseEvent#getRelativeX(com.google.gwt.dom.client.Element)