📄 tbra-aio.js
字号:
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]]}}return g};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c)}else{return false}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]}}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c)}if(f){f.VERSION=j;f.BUILD=h}else{YAHOO.log("mainClass is undefined for module "+a,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null};YAHOO.env.ua=function(){var c={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},b=navigator.userAgent,a;if((/KHTML/).test(b)){c.webkit=1}a=b.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){c.webkit=parseFloat(a[1]);if(/ Mobile\//.test(b)){c.mobile="Apple"}else{a=b.match(/NokiaN[^\/]*/);if(a){c.mobile=a[0]}}a=b.match(/AdobeAIR\/([^\s]*)/);if(a){c.air=a[0]}}if(!c.webkit){a=b.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){c.opera=parseFloat(a[1]);a=b.match(/Opera Mini[^;]*/);if(a){c.mobile=a[0]}}else{a=b.match(/MSIE\s([^;]*)/);if(a&&a[1]){c.ie=parseFloat(a[1])}else{a=b.match(/Gecko\/([^\s]*)/);if(a){c.gecko=1;a=b.match(/rv:([^\s\)]*)/);if(a&&a[1]){c.gecko=parseFloat(a[1])}}}}}a=b.match(/Caja\/([^\s]*)/);if(a&&a[1]){c.caja=parseFloat(a[1])}return c}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c=c+1){if(a[c]==b){d=false;break}}if(d){a.push(b)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var b=YAHOO.lang,f="[object Array]",c="[object Function]",a=Object.prototype,e=["toString","valueOf"],d={isArray:function(g){return a.toString.apply(g)===f},isBoolean:function(g){return typeof g==="boolean"},isFunction:function(g){return a.toString.apply(g)===c},isNull:function(g){return g===null},isNumber:function(g){return typeof g==="number"&&isFinite(g)},isObject:function(g){return(g&&(typeof g==="object"||b.isFunction(g)))||false},isString:function(g){return typeof g==="string"},isUndefined:function(g){return typeof g==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(j,h){var g,l,k;for(g=0;g<e.length;g=g+1){l=e[g];k=h[l];if(b.isFunction(k)&&k!=a[l]){j[l]=k}}}:function(){},extend:function(k,l,j){if(!l||!k){throw new Error("extend failed, please check that all dependencies are included.")}var h=function(){},g;h.prototype=l.prototype;k.prototype=new h();k.prototype.constructor=k;k.superclass=l.prototype;if(l.prototype.constructor==a.constructor){l.prototype.constructor=l}if(j){for(g in j){if(b.hasOwnProperty(j,g)){k.prototype[g]=j[g]}}b._IEEnumFix(k.prototype,j)}},augmentObject:function(l,k){if(!k||!l){throw new Error("Absorb failed, verify dependencies.")}var g=arguments,j,m,h=g[2];if(h&&h!==true){for(j=2;j<g.length;j=j+1){l[g[j]]=k[g[j]]}}else{for(m in k){if(h||!(m in l)){l[m]=k[m]}}b._IEEnumFix(l,k)}},augmentProto:function(k,j){if(!j||!k){throw new Error("Augment failed, verify dependencies.")}var g=[k.prototype,j.prototype],h;for(h=2;h<arguments.length;h=h+1){g.push(arguments[h])}b.augmentObject.apply(this,g)},dump:function(g,m){var j,l,q=[],r="{...}",h="f(){...}",p=", ",k=" => ";if(!b.isObject(g)){return g+""}else{if(g instanceof Date||("nodeType" in g&&"tagName" in g)){return g}else{if(b.isFunction(g)){return h}}}m=(b.isNumber(m))?m:3;if(b.isArray(g)){q.push("[");for(j=0,l=g.length;j<l;j=j+1){if(b.isObject(g[j])){q.push((m>0)?b.dump(g[j],m-1):r)}else{q.push(g[j])}q.push(p)}if(q.length>1){q.pop()}q.push("]")}else{q.push("{");for(j in g){if(b.hasOwnProperty(g,j)){q.push(j+k);if(b.isObject(g[j])){q.push((m>0)?b.dump(g[j],m-1):r)}else{q.push(g[j])}q.push(p)}}if(q.length>1){q.pop()}q.push("}")}return q.join("")},substitute:function(C,h,u){var q,p,m,y,z,B,x=[],l,r="dump",w=" ",g="{",A="}",t;for(;;){q=C.lastIndexOf(g);if(q<0){break}p=C.indexOf(A,q);if(q+1>=p){break}l=C.substring(q+1,p);y=l;B=null;m=y.indexOf(w);if(m>-1){B=y.substring(m+1);y=y.substring(0,m)}z=h[y];if(u){z=u(y,z,B)}if(b.isObject(z)){if(b.isArray(z)){z=b.dump(z,parseInt(B,10))}else{B=B||"";t=B.indexOf(r);if(t>-1){B=B.substring(4)}if(z.toString===a.toString||t>-1){z=b.dump(z,parseInt(B,10))}else{z=z.toString()}}}else{if(!b.isString(z)&&!b.isNumber(z)){z="~-"+x.length+"-~";x[x.length]=l}}C=C.substring(0,q)+z+C.substring(p+1)}for(q=x.length-1;q>=0;q=q-1){C=C.replace(new RegExp("~-"+q+"-~"),"{"+x[q]+"}","g")}return C},trim:function(g){try{return g.replace(/^\s+|\s+$/g,"")}catch(h){return g}},merge:function(){var k={},h=arguments,g=h.length,j;for(j=0;j<g;j=j+1){b.augmentObject(k,h[j],true)}return k},later:function(q,h,s,j,k){q=q||0;h=h||{};var i=s,p=j,l,g;if(b.isString(s)){i=h[s]}if(!i){throw new TypeError("method undefined")}if(!b.isArray(p)){p=[j]}l=function(){i.apply(h,p)};g=(k)?setInterval(l,q):setTimeout(l,q);return{interval:k,cancel:function(){if(this.interval){clearInterval(g)}else{clearTimeout(g)}}}},isValue:function(g){return(b.isObject(g)||b.isString(g)||b.isNumber(g)||b.isBoolean(g))}};b.hasOwnProperty=(a.hasOwnProperty)?function(g,h){return g&&g.hasOwnProperty(h)}:function(g,h){return !b.isUndefined(g[h])&&g.constructor.prototype[h]!==g[h]};d.augmentObject(b,d,true);YAHOO.util.Lang=b;b.augment=b.augmentProto;YAHOO.augment=b.augmentProto;YAHOO.extend=b.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1796"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,M=YAHOO.env.ua,a=YAHOO.lang.trim,C={},H={},m=/^t(?:able|d|h)$/i,x=/color$/i,j=window.document,w=j.documentElement,D="ownerDocument",N="defaultView",V="documentElement",T="compatMode",A="offsetLeft",p="offsetTop",U="offsetParent",y="parentNode",L="nodeType",c="tagName",o="scrollLeft",I="scrollTop",q="getBoundingClientRect",W="getComputedStyle",z="currentStyle",l="CSS1Compat",B="BackCompat",F="class",f="className",i="",b=" ",S="(?:^|\\s)",K="(?= |$)",u="g",P="position",E="fixed",v="relative",J="left",O="top",R="medium",Q="borderLeftWidth",r="borderTopWidth",d=M.opera,h=M.webkit,g=M.gecko,t=M.ie;e.Dom={CUSTOM_ATTRIBUTES:(!w.hasAttribute)?{"for":"htmlFor","class":f}:{htmlFor:"for",className:F},get:function(Z){var ab,X,aa,Y,G;if(Z){if(Z[L]||Z.item){return Z}if(typeof Z==="string"){ab=Z;Z=j.getElementById(Z);if(Z&&Z.id===ab){return Z}else{if(Z&&j.all){Z=null;X=j.all[ab];for(Y=0,G=X.length;Y<G;++Y){if(X[Y].id===ab){return X[Y]}}}}return Z}if(Z.DOM_EVENTS){Z=Z.get("element")}if("length" in Z){aa=[];for(Y=0,G=Z.length;Y<G;++Y){aa[aa.length]=e.Dom.get(Z[Y])}return aa}return Z}return null},getComputedStyle:function(G,X){if(window[W]){return G[D][N][W](G,null)[X]}else{if(G[z]){return e.Dom.IE_ComputedStyle.get(G,X)}}},getStyle:function(G,X){return e.Dom.batch(G,e.Dom._getStyle,X)},_getStyle:function(){if(window[W]){return function(G,Z){Z=(Z==="float")?Z="cssFloat":e.Dom._toCamel(Z);var Y=G.style[Z],X;if(!Y){X=G[D][N][W](G,null);if(X){Y=X[Z]}}return Y}}else{if(w[z]){return function(G,Z){var Y;switch(Z){case"opacity":Y=100;try{Y=G.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(aa){try{Y=G.filters("alpha").opacity}catch(X){}}return Y/100;case"float":Z="styleFloat";default:Z=e.Dom._toCamel(Z);Y=G[z]?G[z][Z]:null;return(G.style[Z]||Y)}}}}}(),setStyle:function(G,X,Y){e.Dom.batch(G,e.Dom._setStyle,{prop:X,val:Y})},_setStyle:function(){if(t){return function(X,G){var Y=e.Dom._toCamel(G.prop),Z=G.val;if(X){switch(Y){case"opacity":if(k.isString(X.style.filter)){X.style.filter="alpha(opacity="+Z*100+")";if(!X[z]||!X[z].hasLayout){X.style.zoom=1}}break;case"float":Y="styleFloat";default:X.style[Y]=Z}}else{}}}else{return function(X,G){var Y=e.Dom._toCamel(G.prop),Z=G.val;if(X){if(Y=="float"){Y="cssFloat"}X.style[Y]=Z}else{}}}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY)},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G))},_getXY:function(){if(j[V][q]){return function(Z){var aa,X,ab,ag,af,ae,ad,G,Y,ac=Math.floor,ah=false;if(e.Dom._canPosition(Z)){ab=Z[q]();ag=Z[D];aa=e.Dom.getDocumentScrollLeft(ag);X=e.Dom.getDocumentScrollTop(ag);ah=[ac(ab[J]),ac(ab[O])];if(t&&M.ie<8){af=2;ae=2;ad=ag[T];G=s(ag[V],Q);Y=s(ag[V],r);if(M.ie===6){if(ad!==B){af=0;ae=0}}if((ad==B)){if(G!==R){af=parseInt(G,10)}if(Y!==R){ae=parseInt(Y,10)}}ah[0]-=af;ah[1]-=ae}if((X||aa)){ah[0]+=aa;ah[1]+=X}ah[0]=ac(ah[0]);ah[1]=ac(ah[1])}else{}return ah}}else{return function(Z){var Y,X,ab,ac,ad,aa=false,G=Z;if(e.Dom._canPosition(Z)){aa=[Z[A],Z[p]];Y=e.Dom.getDocumentScrollLeft(Z[D]);X=e.Dom.getDocumentScrollTop(Z[D]);ad=((g||M.webkit>519)?true:false);while((G=G[U])){aa[0]+=G[A];aa[1]+=G[p];if(ad){aa=e.Dom._calcBorders(G,aa)}}if(e.Dom._getStyle(Z,P)!==E){G=Z;while((G=G[y])&&G[c]){ab=G[I];ac=G[o];if(g&&(e.Dom._getStyle(G,"overflow")!=="visible")){aa=e.Dom._calcBorders(G,aa)}if(ab||ac){aa[0]-=ac;aa[1]-=ab}}aa[0]+=Y;aa[1]+=X}else{if(d){aa[0]-=Y;aa[1]-=X}else{if(h||g){aa[0]+=Y;aa[1]+=X}}}aa[0]=Math.floor(aa[0]);aa[1]=Math.floor(aa[1])}else{}return aa}}}(),getX:function(G){var X=function(Y){return e.Dom.getXY(Y)[0]};return e.Dom.batch(G,X,e.Dom,true)},getY:function(G){var X=function(Y){return e.Dom.getXY(Y)[1]};return e.Dom.batch(G,X,e.Dom,true)},setXY:function(G,Y,X){e.Dom.batch(G,e.Dom._setXY,{pos:Y,noRetry:X})},_setXY:function(G,aa){var ab=e.Dom._getStyle(G,P),Z=e.Dom.setStyle,ae=aa.pos,X=aa.noRetry,ac=[parseInt(e.Dom.getComputedStyle(G,J),10),parseInt(e.Dom.getComputedStyle(G,O),10)],ad,Y;if(ab=="static"){ab=v;Z(G,P,ab)}ad=e.Dom._getXY(G);if(!ae||ad===false){return false}if(isNaN(ac[0])){ac[0]=(ab==v)?0:G[A]}if(isNaN(ac[1])){ac[1]=(ab==v)?0:G[p]}if(ae[0]!==null){Z(G,J,ae[0]-ad[0]+ac[0]+"px")}if(ae[1]!==null){Z(G,O,ae[1]-ad[1]+ac[1]+"px")}if(!X){Y=e.Dom._getXY(G);if((ae[0]!==null&&Y[0]!=ae[0])||(ae[1]!==null&&Y[1]!=ae[1])){e.Dom._setXY(G,{pos:ae,noRetry:true})}}},setX:function(X,G){e.Dom.setXY(X,[G,null])},setY:function(G,X){e.Dom.setXY(G,[null,X])},getRegion:function(G){var X=function(Y){var Z=false;if(e.Dom._canPosition(Y)){Z=e.Region.getRegion(Y)}else{}return Z};return e.Dom.batch(G,X,e.Dom,true)},getClientWidth:function(){return e.Dom.getViewportWidth()},getClientHeight:function(){return e.Dom.getViewportHeight()},getElementsByClassName:function(ac,ag,ad,af,Y,ae){ac=k.trim(ac);ag=ag||"*";ad=(ad)?e.Dom.get(ad):null||j;if(!ad){return[]}var X=[],G=ad.getElementsByTagName(ag),aa=e.Dom.hasClass;for(var Z=0,ab=G.length;Z<ab;++Z){if(aa(G[Z],ac)){X[X.length]=G[Z]}}if(af){e.Dom.batch(X,af,Y,ae)}return X},hasClass:function(X,G){return e.Dom.batch(X,e.Dom._hasClass,G)},_hasClass:function(Y,X){var G=false,Z;if(Y&&X){Z=e.Dom.getAttribute(Y,f)||i;if(X.exec){G=X.test(Z)}else{G=X&&(b+Z+b).indexOf(b+X+b)>-1}}else{}return G},addClass:function(X,G){return e.Dom.batch(X,e.Dom._addClass,G)},_addClass:function(Y,X){var G=false,Z;if(Y&&X){Z=e.Dom.getAttribute(Y,f)||i;if(!e.Dom._hasClass(Y,X)){e.Dom.setAttribute(Y,f,a(Z+b+X));G=true}}else{}return G},removeClass:function(X,G){return e.Dom.batch(X,e.Dom._removeClass,G)},_removeClass:function(Z,Y){var X=false,ab,aa,G;if(Z&&Y){ab=e.Dom.getAttribute(Z,f)||i;e.Dom.setAttribute(Z,f,ab.replace(e.Dom._getClassRegex(Y),i));aa=e.Dom.getAttribute(Z,f);if(ab!==aa){e.Dom.setAttribute(Z,f,a(aa));X=true;if(e.Dom.getAttribute(Z,f)===""){G=(Z.hasAttribute&&Z.hasAttribute(F))?F:f;Z.removeAttribute(G)}}}else{}return X},replaceClass:function(Y,X,G){return e.Dom.batch(Y,e.Dom._replaceClass,{from:X,to:G})},_replaceClass:function(Z,Y){var X,ac,ab,G=false,aa;if(Z&&Y){ac=Y.from;ab=Y.to;if(!ab){G=false}else{if(!ac){G=e.Dom._addClass(Z,Y.to)}else{if(ac!==ab){aa=e.Dom.getAttribute(Z,f)||i;X=(b+aa.replace(e.Dom._getClassRegex(ac),b+ab)).split(e.Dom._getClassRegex(ab));X.splice(1,0,b+ab);e.Dom.setAttribute(Z,f,a(X.join(i)));G=true}}}}else{}return G},generateId:function(G,Y){Y=Y||"yui-gen";var X=function(Z){if(Z&&Z.id){return Z.id}var aa=Y+YAHOO.env._id_counter++;if(Z){if(Z[D].getElementById(aa)){return e.Dom.generateId(Z,aa+Y)}Z.id=aa}return aa};return e.Dom.batch(G,X,e.Dom,true)||X.apply(e.Dom,arguments)},isAncestor:function(X,Y){X=e.Dom.get(X);Y=e.Dom.get(Y);var G=false;if((X&&Y)&&(X[L]&&Y[L])){if(X.contains&&X!==Y){G=X.contains(Y)}else{if(X.compareDocumentPosition){G=!!(X.compareDocumentPosition(Y)&16)}}}else{}return G},inDocument:function(G,X){return e.Dom._inDoc(e.Dom.get(G),X)},_inDoc:function(X,Y){var G=false;if(X&&X[c]){Y=Y||X[D];G=e.Dom.isAncestor(Y[V],X)}else{}return G},getElementsBy:function(X,ag,ac,ae,Z,ad,af){ag=ag||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[]}var Y=[],G=ac.getElementsByTagName(ag);for(var aa=0,ab=G.length;aa<ab;++aa){if(X(G[aa])){if(af){Y=G[aa];break}else{Y[Y.length]=G[aa]}}}if(ae){e.Dom.batch(Y,ae,Z,ad)}return Y},getElementBy:function(Y,G,X){return e.Dom.getElementsBy(Y,G,X,null,null,null,true)},batch:function(Y,ac,ab,aa){var Z=[],X=(aa)?ab:window;Y=(Y&&(Y[c]||Y.item))?Y:e.Dom.get(Y);if(Y&&ac){if(Y[c]||Y.length===undefined){return ac.call(X,Y,ab)}for(var G=0;G<Y.length;++G){Z[Z.length]=ac.call(X,Y[G],ab)}}else{return false}return Z},getDocumentHeight:function(){var X=(j[T]!=l||h)?j.body.scrollHeight:w.scrollHeight,G=Math.max(X,e.Dom.getViewportHeight());return G},getDocumentWidth:function(){var X=(j[T]!=l||h)?j.body.scrollWidth:w.scrollWidth,G=Math.max(X,e.Dom.getViewportWidth());return G},getViewportHeight:function(){var G=self.innerHeight,X=j[T];if((X||t)&&!d){G=(X==l)?w.clientHeight:j.body.clientHeight}return G},getViewportWidth:function(){var G=self.innerWidth,X=j[T];if(X||t){G=(X==l)?w.clientWidth:j.body.clientWidth}return G},getAncestorBy:function(G,X){while((G=G[y])){if(e.Dom._testElement(G,X)){return G}}return null},getAncestorByClassName:function(X,G){X=e.Dom.get(X);if(!X){return null}var Y=function(Z){return e.Dom.hasClass(Z,G)};return e.Dom.getAncestorBy(X,Y)},getAncestorByTagName:function(X,G){X=e.Dom.get(X);if(!X){return null}var Y=function(Z){return Z[c]&&Z[c].toUpperCase()==G.toUpperCase()};return e.Dom.getAncestorBy(X,Y)},getPreviousSiblingBy:function(G,X){while(G){G=G.previousSibling;if(e.Dom._testElement(G,X)){return G}}return null},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null}return e.Dom.getPreviousSiblingBy(G)},getNextSiblingBy:function(G,X){while(G){G=G.nextSibling;if(e.Dom._testElement(G,X)){return G}}return null},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null}return e.Dom.getNextSiblingBy(G)},getFirstChildBy:function(G,Y){var X=(e.Dom._testElement(G.firstChild,Y))?G.firstChild:null;return X||e.Dom.getNextSiblingBy(G.firstChild,Y)},getFirstChild:function(G,X){G=e.Dom.get(G);if(!G){return null}return e.Dom.getFirstChildBy(G)},getLastChildBy:function(G,Y){if(!G){return null}var X=(e.Dom._testElement(G.lastChild,Y))?G.lastChild:null;return X||e.Dom.getPreviousSiblingBy(G.lastChild,Y)},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G)},getChildrenBy:function(X,Z){var Y=e.Dom.getFirstChildBy(X,Z),G=Y?[Y]:[];e.Dom.getNextSiblingBy(Y,function(aa){if(!Z||Z(aa)){G[G.length]=aa}return false});return G},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G)},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[V].scrollLeft,G.body.scrollLeft)},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[V].scrollTop,G.body.scrollTop)},insertBefore:function(X,G){X=e.Dom.get(X);G=e.Dom.get(G);if(!X||!G||!G[y]){return null}return G[y].insertBefore(X,G)},insertAfter:function(X,G){X=e.Dom.get(X);G=e.Dom.get(G);if(!X||!G||!G[y]){return null}if(G.nextSibling){return G[y].insertBefore(X,G.nextSibling)}else{return G[y].appendChild(X)}},getClientRegion:function(){var Y=e.Dom.getDocumentScrollTop(),X=e.Dom.getDocumentScrollLeft(),Z=e.Dom.getViewportWidth()+X,G=e.Dom.getViewportHeight()+Y;return new e.Region(Y,Z,G,X)},setAttribute:function(X,G,Y){G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y)},getAttribute:function(X,G){G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;return X.getAttribute(G)},_toCamel:function(X){var Y=C;function G(Z,aa){return aa.toUpperCase()}return Y[X]||(Y[X]=X.indexOf("-")===-1?X:X.replace(/-([a-z])/gi,G))},_getClassRegex:function(X){var G;if(X!==undefined){if(X.exec){G=X}else{G=H[X];if(!G){X=X.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=H[X]=new RegExp(S+X+K,u)}}}return G},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,X){return G&&G[L]==1&&(!X||X(G))},_calcBorders:function(Y,Z){var X=parseInt(e.Dom[W](Y,r),10)||0,G=parseInt(e.Dom[W](Y,Q),10)||0;if(g){if(m.test(Y[c])){X=0;G=0}}Z[0]+=G;Z[1]+=X;return Z}};var s=e.Dom[W];if(M.opera){e.Dom[W]=function(X,G){var Y=s(X,G);if(x.test(G)){Y=e.Dom.Color.toRGB(Y)}return Y}}if(M.webkit){e.Dom[W]=function(X,G){var Y=s(X,G);if(Y==="rgba(0, 0, 0, 0)"){Y="transparent"}return Y}}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c)}else{return null}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c)};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}")};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c)};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0]}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a)};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",x="hasLayout",i="px",v="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",q="borderRightWidth",w="borderBottomWidth",t="visible",r="transparent",o="height",e="width",h="style",u="currentStyle",s=/^width|height$/,p=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(y,A){var z="",B=y[u][A];if(A===v){z=b.Dom.getStyle(y,v)}else{if(!B||(B.indexOf&&B.indexOf(i)>-1)){z=B}else{if(b.Dom.IE_COMPUTED[A]){z=b.Dom.IE_COMPUTED[A](y,A)}else{if(p.test(B)){z=b.Dom.IE.ComputedStyle.getPixel(y,A)}else{z=B}}}}return z},getOffset:function(A,F){var C=A[u][F],y=F.charAt(0).toUpperCase()+F.substr(1),D="offset"+y,z="pixel"+y,B="",E;if(C==l){E=A[D];if(E===undefined){B=0}B=E;if(s.test(F)){A[h][F]=E;if(A[D]>E){B=E-(A[D]-E)}A[h][F]=l}}else{if(!A[h][z]&&!A[h][F]){A[h][F]=C}B=A[h][z]}return B+i},getBorderWidth:function(y,A){var z=null;if(!y[u][x]){y[h].zoom=1}switch(A){case g:z=y[a];break;case w:z=y.offsetHeight-y.clientHeight-y[a];break;case d:z=y[f];break;case q:z=y.offsetWidth-y.clientWidth-y[f];break}return z+i},getPixel:function(z,y){var B=null,C=z[u][k],A=z[u][y];z[h][k]=A;B=z[h].pixelRight;z[h][k]=C;return B+i},getMargin:function(z,y){var A;if(z[u][y]==l){A=0+i}else{A=b.Dom.IE.ComputedStyle.getPixel(z,y)}return A},getVisibility:function(z,y){var A;while((A=z[u])&&A[y]=="inherit"){z=z[j]}return(A)?A[y]:t},getColor:function(z,y){return b.Dom.Color.toRGB(z[u][y])||r},getBorderColor:function(z,y){var A=z[u],B=A[y]||A.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(B))}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[o]=m.getOffset;c.color=m.getColor;c[g]=c[q]=c[w]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e)}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")"}return e},toHex:function(i){i=d.Dom.Color.KEYWORDS[i]||i;if(d.Dom.Color.re_RGB.exec(i)){var h=(b.$1.length===1)?"0"+b.$1:Number(b.$1),f=(b.$2.length===1)?"0"+b.$2:Number(b.$2),e=(b.$3.length===1)?"0"+b.$3:Number(b.$3);i=[h[c](16),f[c](16),e[c](16)].join("")}if(i.length<6){i=i.replace(d.Dom.Color.re_hex3,"$1$1")}if(i!=="transparent"&&i.indexOf("#")<0){i="#"+i}return i.toLowerCase()}}}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1796"});YAHOO.util.CustomEvent=function(d,c,b,a){this.type=d;this.scope=c||window;this.silent=b;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var e="_YUICEOnSubscribe";if(d!==e){this.subscribeEvent=new YAHOO.util.CustomEvent(e,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(a,b,c){if(!a){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(a,b,c)}this.subscribers.push(new YAHOO.util.Subscriber(a,b,c))},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll()}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true}}return e},fire:function(){this.lastError=null;var m=[],f=this.subscribers.length;if(!f&&this.silent){return true}var k=[].slice.call(arguments,0),h=true,d,l=false;if(!this.silent){}var c=this.subscribers.slice(),a=YAHOO.util.Event.throwErrors;for(d=0;d<f;++d){var p=c[d];if(!p){l=true}else{if(!this.silent){}var o=p.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var b=null;if(k.length>0){b=k[0]}try{h=p.fn.call(o,b,p.obj)}catch(g){this.lastError=g;if(a){throw g}}}else{try{h=p.fn.call(o,this.type,k,p.obj)}catch(j){this.lastError=j;if(a){throw j}}}if(false===h){if(!this.silent){}break}}}return(h!==false)},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b)}this.subscribers=[];return a},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj}this.subscribers.splice(a,1)},toString:function(){return"CustomEvent: '"+this.type+"', context: "+this.scope}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj}else{return this.overrideContext}}return a};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b)}else{return(this.fn==a)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var h=false;var i=[];var j=[];var g=[];var e=[];var c=0;var f=[];var b=[];var a=0;var d={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var k=YAHOO.env.ua.ie?"focusin":"focus";var l=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var m=this;var o=function(){m._tryPreloadAttach()};this._interval=setInterval(o,this.POLL_INTERVAL)}},onAvailable:function(t,p,r,s,q){var m=(YAHOO.lang.isString(t))?[t]:t;for(var o=0;o<m.length;o=o+1){f.push({id:m[o],fn:p,obj:r,overrideContext:s,checkReady:q})}c=this.POLL_RETRYS;this.startInterval()},onContentReady:function(q,m,o,p){this.onAvailable(q,m,o,p,true)},onDOMReady:function(m,o,p){if(this.DOMReady){setTimeout(function(){var q=window;if(p){if(p===true){q=o}else{q=p}}m.call(q,"DOMReady",[],o)},0)}else{this.DOMReadyEvent.subscribe(m,o,p)}},_addListener:function(p,m,z,t,x,C){if(!z||!z.call){return false}if(this._isValidCollection(p)){var A=true;for(var u=0,w=p.length;u<w;++u){A=this.on(p[u],m,z,t,x)&&A}return A}else{if(YAHOO.lang.isString(p)){var s=this.getEl(p);if(s){p=s}else{this.onAvailable(p,function(){YAHOO.util.Event.on(p,m,z,t,x)});return true}}}if(!p){return false}if("unload"==m&&t!==this){j[j.length]=[p,m,z,t,x];return true}var o=p;if(x){if(x===true){o=t}else{o=x}}var q=function(D){return z.call(o,YAHOO.util.Event.getEvent(D,p),t)};var B=[p,m,z,q,o,t,x];var v=i.length;i[v]=B;if(this.useLegacyEvent(p,m)){var r=this.getLegacyIndex(p,m);if(r==-1||p!=g[r][0]){r=g.length;b[p.id+m]=r;g[r]=[p,m,p["on"+m]];e[r]=[];p["on"+m]=function(D){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(D),r)}}e[r].push(B)}else{try{this._simpleAdd(p,m,q,C)}catch(y){this.lastError=y;this.removeListener(p,m,z);return false}}return true},addListener:function(o,r,m,p,q){return this._addListener(o,r,m,p,q,false)},addFocusListener:function(o,m,p,q){return this._addListener(o,k,m,p,q,true)},removeFocusListener:function(o,m){return this.removeListener(o,k,m)},addBlurListener:function(o,m,p,q){return this._addListener(o,l,m,p,q,true)},removeBlurListener:function(o,m){return this.removeListener(o,l,m)},fireLegacyEvent:function(s,q){var u=true,m,w,v,o,t;w=e[q].slice();for(var p=0,r=w.length;p<r;++p){v=w[p];if(v&&v[this.WFN]){o=v[this.ADJ_SCOPE];t=v[this.WFN].call(o,s);u=(u&&t)}}m=g[q];if(m&&m[2]){m[2](s)}return u},getLegacyIndex:function(o,p){var m=this.generateId(o)+p;if(typeof b[m]=="undefined"){return -1}else{return b[m]}},useLegacyEvent:function(m,o){return(this.webkit&&this.webkit<419&&("click"==o||"dblclick"==o))},removeListener:function(o,m,w){var r,u,y;if(typeof o=="string"){o=this.getEl(o)}else{if(this._isValidCollection(o)){var x=true;for(r=o.length-1;r>-1;r--){x=(this.removeListener(o[r],m,w)&&x)}return x}}if(!w||!w.call){return this.purgeElement(o,false,m)}if("unload"==m){for(r=j.length-1;r>-1;r--){y=j[r];if(y&&y[0]==o&&y[1]==m&&y[2]==w){j.splice(r,1);return true}}return false}var s=null;var t=arguments[3];if("undefined"===typeof t){t=this._getCacheIndex(o,m,w)}if(t>=0){s=i[t]}if(!o||!s){return false}if(this.useLegacyEvent(o,m)){var q=this.getLegacyIndex(o,m);var p=e[q];if(p){for(r=0,u=p.length;r<u;++r){y=p[r];if(y&&y[this.EL]==o&&y[this.TYPE]==m&&y[this.FN]==w){p.splice(r,1);break}}}}else{try{this._simpleRemove(o,m,s[this.WFN],false)}catch(v){this.lastError=v;return false}}delete i[t][this.WFN];delete i[t][this.FN];i.splice(t,1);return true},getTarget:function(p,o){var m=p.target||p.srcElement;return this.resolveTextNode(m)},resolveTextNode:function(o){try{if(o&&3==o.nodeType){return o.parentNode}}catch(m){}return o},getPageX:function(o){var m=o.pageX;if(!m&&0!==m){m=o.clientX||0;if(this.isIE){m+=this._getScrollLeft()}}return m},getPageY:function(m){var o=m.pageY;if(!o&&0!==o){o=m.clientY||0;if(this.isIE){o+=this._getScrollTop()}}return o},getXY:function(m){return[this.getPageX(m),this.getPageY(m)]},getRelatedTarget:function(o){var m=o.relatedTarget;if(!m){if(o.type=="mouseout"){m=o.toElement}else{if(o.type=="mouseover"){m=o.fromElement}}}return this.resolveTextNode(m)},getTime:function(p){if(!p.time){var o=new Date().getTime();try{p.time=o}catch(m){this.lastError=m;return o}}return p.time},stopEvent:function(m){this.stopPropagation(m);this.preventDefault(m)},stopPropagation:function(m){if(m.stopPropagation){m.stopPropagation()}else{m.cancelBubble=true}},preventDefault:function(m){if(m.preventDefault){m.preventDefault()}else{m.returnValue=false}},getEvent:function(p,m){var o=p||window.event;if(!o){var q=this.getEvent.caller;while(q){o=q.arguments[0];if(o&&Event==o.constructor){break}q=q.caller}}return o},getCharCode:function(o){var m=o.keyCode||o.charCode||0;if(YAHOO.env.ua.webkit&&(m in d)){m=d[m]}return m},_getCacheIndex:function(r,s,q){for(var p=0,o=i.length;p<o;p=p+1){var m=i[p];if(m&&m[this.FN]==q&&m[this.EL]==r&&m[this.TYPE]==s){return p}}return -1},generateId:function(m){var o=m.id;if(!o){o="yuievtautoid-"+a;++a;m.id=o}return o},_isValidCollection:function(p){try{return(p&&typeof p!=="string"&&p.length&&!p.tagName&&!p.alert&&typeof p[0]!=="undefined")}catch(m){return false}},elCache:{},getEl:function(m){return(typeof m==="string")?document.getElementById(m):m},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(o){if(!h){h=true;var m=YAHOO.util.Event;m._ready();m._tryPreloadAttach()}},_ready:function(o){var m=YAHOO.util.Event;if(!m.DOMReady){m.DOMReady=true;m.DOMReadyEvent.fire();m._simpleRemove(document,"DOMContentLoaded",m._ready)}},_tryPreloadAttach:function(){if(f.length===0){c=0;if(this._interval){clearInterval(this._interval);this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var t=!h;if(!t){t=(c>0&&f.length>0)}var s=[];var u=function(w,x){var v=w;if(x.overrideContext){if(x.overrideContext===true){v=x.obj}else{v=x.overrideContext}}x.fn.call(v,x.obj)};var o,m,r,q,p=[];for(o=0,m=f.length;o<m;o=o+1){r=f[o];if(r){q=this.getEl(r.id);if(q){if(r.checkReady){if(h||q.nextSibling||!t){p.push(r);f[o]=null}}else{u(q,r);f[o]=null}}else{s.push(r)}}}for(o=0,m=p.length;o<m;o=o+1){r=p[o];u(this.getEl(r.id),r)}c--;if(t){for(o=f.length-1;o>-1;o--){r=f[o];if(!r||!r.id){f.splice(o,1)}}this.startInterval()}else{if(this._interval){clearInterval(this._interval);this._interval=null}}this.locked=false},purgeElement:function(r,s,u){var p=(YAHOO.lang.isString(r))?this.getEl(r):r;var t=this.getListeners(p,u),q,m;if(t){for(q=t.length-1;q>-1;q--){var o=t[q];this.removeListener(p,o.type,o.fn)}}if(s&&p&&p.childNodes){for(q=0,m=p.childNodes.length;q<m;++q){this.purgeElement(p.childNodes[q],s,u)}}},getListeners:function(p,m){var s=[],o;if(!m){o=[i,j]}else{if(m==="unload"){o=[j]}else{o=[i]}}var u=(YAHOO.lang.isString(p))?this.getEl(p):p;for(var r=0;r<o.length;r=r+1){var w=o[r];if(w){for(var t=0,v=w.length;t<v;++t){var q=w[t];if(q&&q[this.EL]===u&&(!m||m===q[this.TYPE])){s.push({type:q[this.TYPE],fn:q[this.FN],obj:q[this.OBJ],adjust:q[this.OVERRIDE],scope:q[this.ADJ_SCOPE],index:t})}}}}return(s.length)?s:null},_unload:function(u){var o=YAHOO.util.Event,r,q,p,t,s,v=j.slice(),m;for(r=0,t=j.length;r<t;++r){p=v[r];if(p){m=window;if(p[o.ADJ_SCOPE]){if(p[o.ADJ_SCOPE]===true){m=p[o.UNLOAD_OBJ]}else{m=p[o.ADJ_SCOPE]}}p[o.FN].call(m,o.getEvent(u,p[o.EL]),p[o.UNLOAD_OBJ]);v[r]=null}}p=null;m=null;j=null;if(i){for(q=i.length-1;q>-1;q--){p=i[q];if(p){o.removeListener(p[o.EL],p[o.TYPE],p[o.FN],q)}}p=null}g=null;o._simpleRemove(window,"unload",o._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var m=document.documentElement,o=document.body;if(m&&(m.scrollTop||m.scrollLeft)){return[m.scrollTop,m.scrollLeft]}else{if(o){return[o.scrollTop,o.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(p,q,o,m){p.addEventListener(q,o,(m))}}else{if(window.attachEvent){return function(p,q,o,m){p.attachEvent("on"+q,o)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(p,q,o,m){p.removeEventListener(q,o,(m))}}else{if(window.detachEvent){return function(o,p,m){o.detachEvent("on"+p,m)}}else{return function(){}}}}()}}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -