};\r
};\r
\r
+Node.prototype.offset = function( /* xnodeParent */ ){\r
+ var x = 0, y = 0, elm;\r
+ \r
+ if( !this.parent ){\r
+ console.log( 'xnode.offset() : no parent' );\r
+ return { x : 0, y : 0 };\r
+ };\r
+ Node._body._updateTimerID && Node._body._startUpdate();\r
+ if( !this._root ){\r
+ console.log( 'xnode.offset() : not belong tree.' );\r
+ return { x : 0, y : 0 };\r
+ };\r
+ if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
+ \r
+ if( X.Dom.Node._body === this || X.Dom.Node._html === this ){\r
+ return { x : 0, y : 0 };\r
+ };\r
+ \r
+ if( X.Dom.DOM_W3C ){\r
+ elm = this._rawNode;\r
+ } else\r
+ if( X.Dom.DOM_IE4 ){\r
+ elm = this._rawNode || this._ie4getRawNode(); \r
+ } else {\r
+ \r
+ };\r
+ \r
+ while( elm && elm !== document.body ){\r
+ x += elm.offsetLeft;\r
+ y += elm.offsetTop;\r
+ elm = elm.offsetParent || elm.parentNode || elm.parentElement;\r
+ };\r
+ return { x : x, y : y };\r
+};\r