YUI.add("dom-screen",function(t,e){var g,d,a,u,f,s,h,n,p,r,c,l,m,S,w,X;a="documentElement",u="compatMode",f="position",s="BackCompat",h="getBoundingClientRect",n="getComputedStyle",p=(g=t).DOM,r=/^t(?:able|d|h)$/i,g.UA.ie&&(d="BackCompat"!==g.config.doc[u]?a:"body"),g.mix(p,{winHeight:function(t){return p._getWinSize(t).height},winWidth:function(t){return p._getWinSize(t).width},docHeight:function(t){var e=p._getDocSize(t).height;return Math.max(e,p._getWinSize(t).height)},docWidth:function(t){var e=p._getDocSize(t).width;return Math.max(e,p._getWinSize(t).width)},docScrollX:function(t,e){t=(e=e||t?p._getDoc(t):g.config.doc).defaultView,t=t?t.pageXOffset:0;return Math.max(e[a].scrollLeft,e.body.scrollLeft,t)},docScrollY:function(t,e){t=(e=e||t?p._getDoc(t):g.config.doc).defaultView,t=t?t.pageYOffset:0;return Math.max(e[a].scrollTop,e.body.scrollTop,t)},getXY:g.config.doc[a][h]?function(t){var e,o,i,n,r,c,l,f=null;return t&&t.tagName&&(((l=(o=(r=t.ownerDocument)[u])!==s?r[a]:r.body).contains?l.contains(t):g.DOM.contains(l,t))?(c=(c=r.defaultView)&&"pageXOffset"in c?(e=c.pageXOffset,c.pageYOffset):(e=d?r[d].scrollLeft:p.docScrollX(t,r),d?r[d].scrollTop:p.docScrollY(t,r)),g.UA.ie&&(!r.documentMode||r.documentMode<8||o===s)&&(i=l.clientLeft,n=l.clientTop),f=[(r=t[h]()).left,r.top],(i||n)&&(f[0]-=i,f[1]-=n),(c||e)&&(!g.UA.ios||4.2<=g.UA.ios)&&(f[0]+=e,f[1]+=c)):f=p._getOffset(t)),f}:function(t){var e,o,i,n,r,c=null;if(t)if(p.inDoc(t)){for(c=[t.offsetLeft,t.offsetTop],e=t.ownerDocument,o=t,i=!!(g.UA.gecko||519<g.UA.webkit);o=o.offsetParent;)c[0]+=o.offsetLeft,c[1]+=o.offsetTop,i&&(c=p._calcBorders(o,c));if("fixed"!=p.getStyle(t,f)){for(o=t;o=o.parentNode;)n=o.scrollTop,r=o.scrollLeft,g.UA.gecko&&"visible"!==p.getStyle(o,"overflow")&&(c=p._calcBorders(o,c)),(n||r)&&(c[0]-=r,c[1]-=n);c[0]+=p.docScrollX(t,e),c[1]+=p.docScrollY(t,e)}else c[0]+=p.docScrollX(t,e),c[1]+=p.docScrollY(t,e)}else c=p._getOffset(t);return c},getScrollbarWidth:g.cached(function(){var t=g.config.doc,e=t.createElement("div"),o=t.getElementsByTagName("body")[0],i=.1;return o&&(e.style.cssText="position:absolute;visibility:hidden;overflow:scroll;width:20px;",e.appendChild(t.createElement("p")).style.height="1px",o.insertBefore(e,o.firstChild),i=e.offsetWidth-e.clientWidth,o.removeChild(e)),i},null,.1),getX:function(t){return p.getXY(t)[0]},getY:function(t){return p.getXY(t)[1]},setXY:function(t,e,o){var i,n,r,c,l=p.setStyle;t&&e&&(n=p.getStyle(t,f),r=(r=p.OFFSET_XY)||("rtl"===p.getComputedStyle(t,"direction")?"right":"left"),i=p._getOffset(t,r),"static"==n&&l(t,f,"relative"),n=p._getDirXY(t,r),c=e[0],"right"===r&&(c=p.winWidth()-(e[0]+parseInt(p.getComputedStyle(t,"width"),10)),i[0]||o||(o=!1)),null!==c&&l(t,r,c-n[0]+i[0]+"px"),null!==e[1]&&l(t,"top",e[1]-n[1]+i[1]+"px"),o||(r=p.getXY(t))[0]===e[0]&&r[1]===e[1]||p.setXY(t,e,!0))},setX:function(t,e){return p.setXY(t,[e,null])},setY:function(t,e){return p.setXY(t,[null,e])},swapXY:function(t,e){var o=p.getXY(t);p.setXY(t,p.getXY(e)),p.setXY(e,o)},_calcBorders:function(t,e){var o=parseInt(p[n](t,"borderTopWidth"),10)||0,i=parseInt(p[n](t,"borderLeftWidth"),10)||0;return g.UA.gecko&&r.test(t.tagName)&&(i=o=0),e[0]+=i,e[1]+=o,e},_getWinSize:function(t,e){var t=(e=e||t?p._getDoc(t):g.config.doc).defaultView||e.parentWindow,o=e[u],i=t.innerHeight,t=t.innerWidth,n=e[a];return o&&!g.UA.opera&&(i=(n="CSS1Compat"!=o?e.body:n).clientHeight,t=n.clientWidth),{height:i,width:t}},_getDocSize:function(t){var t=t?p._getDoc(t):g.config.doc,e=t[a];return{height:(e="CSS1Compat"!=t[u]?t.body:e).scrollHeight,width:e.scrollWidth}},_getDirXY:function(t,e){var o=p.getXY(t);return"right"===e&&(o[0]=p.winWidth()-(o[0]+parseInt(p.getComputedStyle(t,"width"),10))),o}}),l="right",m="bottom",S="left",w=function(t,e){var o=Math.max(t.top,e.top),i=Math.min(t[l],e[l]),n=Math.min(t[m],e[m]),t=Math.max(t[S],e[S]),e={};return e.top=o,e[l]=i,e[m]=n,e[S]=t,e},X=(c=t).DOM,c.mix(X,{region:function(t){var e=X.getXY(t),o=!1;return o=t&&e?X._getRegion(e[1],e[0]+t.offsetWidth,e[1]+t.offsetHeight,e[0]):o},intersect:function(t,e,o){var i=o||X.region(t),n={};if(e.tagName)n=X.region(e);else{if(!c.Lang.isObject(e))return!1;n=e}return{top:(n=w(n,i)).top,right:n[l],bottom:n[m],left:n[S],area:(n[m]-n.top)*(n[l]-n[S]),yoff:n[m]-n.top,xoff:n[l]-n[S],inRegion:X.inRegion(t,e,!1,o)}},inRegion:function(t,e,o,i){var n={},i=i||X.region(t);if(e.tagName)n=X.region(e);else{if(!c.Lang.isObject(e))return!1;n=e}return o?i[S]>=n[S]&&i[l]<=n[l]&&i.top>=n.top&&i[m]<=n[m]:(t=w(n,i))[m]>=t.top&&t[l]>=t[S]},inViewportRegion:function(t,e,o){return X.inRegion(t,X.viewportRegion(t),e,o)},_getRegion:function(t,e,o,i){var n={};return n.top=n[1]=t,n[S]=n[0]=i,n[m]=o,n[l]=e,n.width=n[l]-n[S],n.height=n[m]-n.top,n},viewportRegion:function(t){var e,o,i=!1;return(t=t||c.config.doc.documentElement)&&(e=X.docScrollX(t),o=X.docScrollY(t),i=X._getRegion(o,X.winWidth(t)+e,o+X.winHeight(t),e)),i}})},"patched-v3.18.3",{requires:["dom-base","dom-style"]});