/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 3.3.0 build: 3167 */ YUI.add("event-focus",function(e){var d=e.Event,c=e.Lang,a=c.isString,b=c.isFunction(e.DOM.create('

').onbeforeactivate);function f(h,g,j){var i="_"+h+"Notifiers";e.Event.define(h,{_attach:function(l,m,k){if(e.DOM.isWindow(l)){return d._attach([h,function(n){m.fire(n);},l]);}else{return d._attach([g,this._proxy,l,this,m,k],{capture:true});}},_proxy:function(o,s,p){var m=o.target,q=m.getData(i),t=e.stamp(o.currentTarget._node),k=(b||o.target!==o.currentTarget),l=s.handle.sub,r=[m,o].concat(l.args||[]),n;s.currentTarget=(p)?m:o.currentTarget;s.container=(p)?o.currentTarget:null;if(!l.filter||l.filter.apply(m,r)){if(!q){q={};m.setData(i,q);if(k){n=d._attach([j,this._notify,m._node]).sub;n.once=true;}}if(!q[t]){q[t]=[];}q[t].push(s);if(!k){this._notify(o);}}},_notify:function(p,l){var m=p.currentTarget,r=m.getData(i),s=m.get("ownerDocument")||m,q=m,k=[],t,n,o;if(r){while(q&&q!==s){k.push.apply(k,r[e.stamp(q)]||[]);q=q.get("parentNode");}k.push.apply(k,r[e.stamp(s)]||[]);for(n=0,o=k.length;n