node-screen-min.js revision 95ee5434654c6cc3cf1b154db9dd31b128d20e66
YUI.add("node-screen",function(B){var A="nodeType";B.each(["winWidth","winHeight","docWidth","docHeight","docScrollX","docScrollY"],function(C){B.Node.ATTRS[C]={getter:function(){var D=Array.prototype.slice.call(arguments);D.unshift(B.Node.getDOMNode(this));return B.DOM[C].apply(this,D);}};});B.Node.ATTRS.scrollLeft={getter:function(){var C=B.Node.getDOMNode(this);return("scrollLeft" in C)?C.scrollLeft:B.DOM.docScrollX(C);},setter:function(D){var C=B.Node.getDOMNode(this);if(C){if("scrollLeft" in C){C.scrollLeft=D;}else{if(C.document||C[A]===9){B.DOM._getWin(C).scrollTo(D,B.DOM.docScrollY(C));}}}else{}}};B.Node.ATTRS.scrollTop={getter:function(){var C=B.Node.getDOMNode(this);return("scrollTop" in C)?C.scrollTop:B.DOM.docScrollY(C);},setter:function(D){var C=B.Node.getDOMNode(this);if(C){if("scrollTop" in C){C.scrollTop=D;}else{if(C.document||C[A]===9){B.DOM._getWin(C).scrollTo(B.DOM.docScrollX(C),D);}}}else{}}};B.Node.importMethod(B.DOM,["getXY","setXY","getX","setX","getY","setY"]);B.Node.ATTRS.region={getter:function(){var C=B.Node.getDOMNode(this);if(C&&!C.tagName){if(C.nodeType===9){C=C.documentElement;}else{if(C.alert){C=C.document.documentElement;}}}return B.DOM.region(C);}};B.Node.ATTRS.viewportRegion={getter:function(){return B.DOM.viewportRegion(B.Node.getDOMNode(this));}};B.Node.importMethod(B.DOM,"inViewportRegion");B.Node.prototype.intersect=function(C,E){var D=B.Node.getDOMNode(this);if(C instanceof B.Node){C=B.Node.getDOMNode(C);}return B.DOM.intersect(D,C,E);};B.Node.prototype.inRegion=function(C,E,F){var D=B.Node.getDOMNode(this);if(C instanceof B.Node){C=B.Node.getDOMNode(C);}return B.DOM.inRegion(D,C,E,F);};},"@VERSION@",{requires:["dom-screen"]});