YUI.add("oop",function(F){var E=F.Lang,D=F.Array,C=Object.prototype,B="_~yuim~_";F.augment=function(A,T,I,R,N){var L=T.prototype,P=null,S=T,O=(N)?F.Array(N):[],H=A.prototype,M=H||A,Q=false,G,J,K;if(H&&S){G={};J={};P={};F.each(L,function(V,U){J[U]=function(){for(K in G){if(G.hasOwnProperty(K)&&(this[K]===J[K])){this[K]=G[K];}}S.apply(this,O);return G[U].apply(this,arguments);};if((!R||(U in R))&&(I||!(U in this))){if(E.isFunction(V)){G[U]=V;this[U]=J[U];}else{this[U]=V;}}},P,true);}else{Q=true;}F.mix(M,P||L,I,R);if(Q){T.apply(M,O);}return A;};F.aggregate=function(H,G,A,I){return F.mix(H,G,A,I,0,true);};F.extend=function(I,H,A,K){if(!H||!I){F.error("extend failed, verify dependencies");}var J=H.prototype,G=F.Object(J);I.prototype=G;G.constructor=I;I.superclass=J;if(H!=Object&&J.constructor==C.constructor){J.constructor=H;}if(A){F.mix(G,A,true);}if(K){F.mix(I,K,true);}return I;};F.each=function(H,G,I,A){if(H.each&&H.item){return H.each.call(H,G,I);}else{switch(D.test(H)){case 1:return D.each(H,G,I);case 2:return D.each(F.Array(H,0,true),G,I);default:return F.Object.each(H,G,I,A);}}};F.clone=function(I,J,M,N,H,L){if(!E.isObject(I)){return I;}var K,G=L||{},A;switch(E.type(I)){case"date":return new Date(I);case"regexp":return new RegExp(I.source);case"function":K=F.bind(I,H);break;case"array":K=[];break;default:if(I[B]){return G[I[B]];}A=F.guid();K=(J)?{}:F.Object(I);I[B]=A;G[A]=I;}if(!I.addEventListener&&!I.attachEvent){F.each(I,function(P,O){if(!M||(M.call(N||this,P,O,this,I)!==false)){if(O!==B){this[O]=F.clone(P,J,M,N,H||I,G);}}},K);}if(!L){F.each(G,function(P,O){delete P[B];});G=null;}return K;};F.bind=function(A,H){var G=arguments.length>2?F.Array(arguments,2,true):null;return function(){var J=E.isString(A)?H[A]:A,I=(G)?G.concat(F.Array(arguments,0,true)):arguments;return J.apply(H||J,I);};};F.rbind=function(A,H){var G=arguments.length>2?F.Array(arguments,2,true):null;return function(){var J=E.isString(A)?H[A]:A,I=(G)?F.Array(arguments,0,true).concat(G):arguments;return J.apply(H||J,I);};};},"3.0.0");
YUI.add("dom-base",function(D){(function(H){var R="nodeType",F="ownerDocument",E="defaultView",J="parentWindow",M="tagName",O="parentNode",Q="firstChild",L="previousSibling",P="nextSibling",K="contains",G="compareDocumentPosition",N=document.documentElement,I=/<([a-z]+)/i;H.DOM={byId:function(T,S){S=S||H.config.doc;return S.getElementById(T);},children:function(U,S){var T=[];if(U){S=S||"*";T=H.Selector.query("> "+S,U);}return T;},firstByTag:function(S,T){var U;T=T||H.config.doc;if(S&&T.getElementsByTagName){U=T.getElementsByTagName(S)[0];}return U||null;},getText:(N.textContent!==undefined)?function(T){var S="";if(T){S=T.textContent;}return S||"";}:function(T){var S="";if(T){S=T.innerText;}return S||"";},setText:(N.textContent!==undefined)?function(S,T){if(S){S.textContent=T;}}:function(S,T){if(S){S.innerText=T;}},previous:function(S,U,T){return H.DOM.elementByAxis(S,L,U,T);},next:function(S,U,T){return H.DOM.elementByAxis(S,P,U,T);},ancestor:function(S,U,T){return H.DOM.elementByAxis(S,O,U,T);},elementByAxis:function(S,V,U,T){while(S&&(S=S[V])){if((T||S[M])&&(!U||U(S))){return S;}}return null;},contains:function(T,U){var S=false;if(!U||!T||!U[R]||!T[R]){S=false;}else{if(T[K]){if(H.UA.opera||U[R]===1){S=T[K](U);}else{S=H.DOM._bruteContains(T,U);}}else{if(T[G]){if(T===U||!!(T[G](U)&16)){S=true;}}}}return S;},inDoc:function(S,T){T=T||S[F];var U=S.id;if(!U){U=S.id=H.guid();}return!!(T.getElementById(U));},create:function(X,Z){if(typeof X==="string"){X=H.Lang.trim(X);}if(!Z&&H.DOM._cloneCache[X]){return H.DOM._cloneCache[X].cloneNode(true);}Z=Z||H.config.doc;var T=I.exec(X),W=H.DOM._create,Y=H.DOM.creators,V=null,S,U;if(T&&Y[T[1]]){if(typeof Y[T[1]]==="function"){W=Y[T[1]];}else{S=Y[T[1]];}}U=W(X,Z,S).childNodes;if(U.length===1){V=U[0].parentNode.removeChild(U[0]);}else{V=H.DOM._nl2frag(U,Z);}if(V){H.DOM._cloneCache[X]=V.cloneNode(true);}return V;},_nl2frag:function(T,W){var U=null,V,S;if(T&&(T.push||T.item)&&T[0]){W=W||T[0].ownerDocument;U=W.createDocumentFragment();if(T.item){T=H.Array(T,0,true);}for(V=0,S=T.length;V<S;V++){U.appendChild(T[V]);}}return U;},CUSTOM_ATTRIBUTES:(!N.hasAttribute)?{"for":"htmlFor","class":"className"}:{"htmlFor":"for","className":"class"},setAttribute:function(U,S,V,T){if(U&&U.setAttribute){S=H.DOM.CUSTOM_ATTRIBUTES[S]||S;U.setAttribute(S,V,T);}},getAttribute:function(V,S,U){U=(U!==undefined)?U:2;var T="";if(V&&V.getAttribute){S=H.DOM.CUSTOM_ATTRIBUTES[S]||S;T=V.getAttribute(S,U);if(T===null){T="";}}return T;},isWindow:function(S){return S.alert&&S.document;},_fragClones:{div:document.createElement("div")},_create:function(T,U,S){S=S||"div";var V=H.DOM._fragClones[S];if(V){V=V.cloneNode(false);}else{V=H.DOM._fragClones[S]=U.createElement(S);}V.innerHTML=T;return V;},_removeChildNodes:function(S){while(S.firstChild){S.removeChild(S.firstChild);}},_cloneCache:{},addHTML:function(W,V,T){if(typeof V==="string"){V=H.Lang.trim(V);}var U=H.DOM._cloneCache[V],S=W.parentNode;if(U){U=U.cloneNode(true);}else{if(V.nodeType){U=V;}else{U=H.DOM.create(V);}}if(T){if(T.nodeType){T.parentNode.insertBefore(U,T);}else{switch(T){case"replace":while(W.firstChild){W.removeChild(W.firstChild);}W.appendChild(U);break;case"before":S.insertBefore(U,W);break;case"after":if(W.nextSibling){S.insertBefore(U,W.nextSibling);}else{S.appendChild(U);}break;default:W.appendChild(U);}}}else{W.appendChild(U);}return U;},VALUE_SETTERS:{},VALUE_GETTERS:{},getValue:function(U){var T="",S;if(U&&U[M]){S=H.DOM.VALUE_GETTERS[U[M].toLowerCase()];if(S){T=S(U);}else{T=U.value;}}return(typeof T==="string")?T:"";},setValue:function(S,T){var U;if(S&&S[M]){U=H.DOM.VALUE_SETTERS[S[M].toLowerCase()];if(U){U(S,T);}else{S.value=T;}}},_bruteContains:function(S,T){while(T){if(S===T){return true;}T=T.parentNode;}return false;},_getRegExp:function(T,S){S=S||"";H.DOM._regexCache=H.DOM._regexCache||{};if(!H.DOM._regexCache[T+S]){H.DOM._regexCache[T+S]=new RegExp(T,S);}return H.DOM._regexCache[T+S];},_getDoc:function(S){S=S||{};return(S[R]===9)?S:S[F]||S.document||H.config.doc;},_getWin:function(S){var T=H.DOM._getDoc(S);return T[E]||T[J]||H.config.win;},_batch:function(V,Z,Y,U,T,X){Z=(typeof name==="string")?H.DOM[Z]:Z;var S,W=[];if(Z&&V){H.each(V,function(a){if((S=Z.call(H.DOM,a,Y,U,T,X))!==undefined){W[W.length]=S;}});}return W.length?W:V;},_testElement:function(T,S,U){S=(S&&S!=="*")?S.toUpperCase():null;return(T&&T[M]&&(!S||T[M].toUpperCase()===S)&&(!U||U(T)));},creators:{},_IESimpleCreate:function(S,T){T=T||H.config.doc;return T.createElement(S);}};(function(W){var X=W.DOM.creators,S=W.DOM.create,V=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*<tbody/,U="<table>",T="</table>";if(W.UA.ie){W.mix(X,{tbody:function(Z,a){var b=S(U+Z+T,a),Y=b.children.tags("tbody")[0];if(b.children.length>1&&Y&&!V.test(Z)){Y[O].removeChild(Y);}return b;},script:function(Y,Z){var a=Z.createElement("div");a.innerHTML="-"+Y;a.removeChild(a[Q]);return a;}},true);W.mix(W.DOM.VALUE_GETTERS,{button:function(Y){return(Y.attributes&&Y.attributes.value)?Y.attributes.value.value:"";}});W.mix(W.DOM.VALUE_SETTERS,{button:function(Z,a){var Y=Z.attributes.value;if(!Y){Y=Z[F].createAttribute("value");Z.setAttributeNode(Y);}Y.value=a;}});}if(W.UA.gecko||W.UA.ie){W.mix(X,{option:function(Y,Z){return S("<select>"+Y+"</select>",Z);},tr:function(Y,Z){return S("<tbody>"+Y+"</tbody>",Z);},td:function(Y,Z){return S("<tr>"+Y+"</tr>",Z);},tbody:function(Y,Z){return S(U+Y+T,Z);}});W.mix(X,{legend:"fieldset",th:X.td,thead:X.tbody,tfoot:X.tbody,caption:X.tbody,colgroup:X.tbody,col:X.tbody,optgroup:X.option});}W.mix(W.DOM.VALUE_GETTERS,{option:function(Z){var Y=Z.attributes;return(Y.value&&Y.value.specified)?Z.value:Z.text;},select:function(Z){var a=Z.value,Y=Z.options;if(Y&&a===""){if(Z.multiple){}else{a=W.DOM.getValue(Y[Z.selectedIndex],"value");}}return a;}});})(H);})(D);var B,A,C;D.mix(D.DOM,{hasClass:function(G,F){var E=D.DOM._getRegExp("(?:^|\\s+)"+F+"(?:\\s+|$)");return E.test(G.className);},addClass:function(F,E){if(!D.DOM.hasClass(F,E)){F.className=D.Lang.trim([F.className,E].join(" "));}},removeClass:function(F,E){if(E&&A(F,E)){F.className=D.Lang.trim(F.className.replace(D.DOM._getRegExp("(?:^|\\s+)"+E+"(?:\\s+|$)")," "));if(A(F,E)){C(F,E);}}},replaceClass:function(F,E,G){B(F,G);C(F,E);},toggleClass:function(F,E){if(A(F,E)){C(F,E);}else{B(F,E);}}});A=D.DOM.hasClass;C=D.DOM.removeClass;B=D.DOM.addClass;},"3.0.0",{requires:["oop"]});YUI.add("dom-style",function(A){(function(E){var C="documentElement",B="defaultView",D="ownerDocument",L="style",N="float",F="cssFloat",G="styleFloat",J="transparent",H="getComputedStyle",M=E.config.doc,I=undefined,K=/color$/i;E.mix(E.DOM,{CUSTOM_STYLES:{},setStyle:function(R,O,S,Q){Q=Q||R.style;var P=E.DOM.CUSTOM_STYLES;if(Q){if(S===null){S="";}if(O in P){if(P[O].set){P[O].set(R,S,Q);return;}else{if(typeof P[O]==="string"){O=P[O];}}}Q[O]=S;}},getStyle:function(R,O){var Q=R[L],P=E.DOM.CUSTOM_STYLES,S="";if(Q){if(O in P){if(P[O].get){return P[O].get(R,O,Q);}else{if(typeof P[O]==="string"){O=P[O];}}}S=Q[O];if(S===""){S=E.DOM[H](R,O);}}return S;},setStyles:function(P,Q){var O=P.style;E.each(Q,function(R,S){E.DOM.setStyle(P,S,R,O);},E.DOM);},getComputedStyle:function(P,O){var R="",Q=P[D];if(P[L]){R=Q[B][H](P,null)[O];}return R;}});if(M[C][L][F]!==I){E.DOM.CUSTOM_STYLES[N]=F;}else{if(M[C][L][G]!==I){E.DOM.CUSTOM_STYLES[N]=G;}}if(E.UA.opera){E.DOM[H]=function(Q,P){var O=Q[D][B],R=O[H](Q,"")[P];if(K.test(P)){R=E.Color.toRGB(R);}return R;};}if(E.UA.webkit){E.DOM[H]=function(Q,P){var O=Q[D][B],R=O[H](Q,"")[P];if(R==="rgba(0, 0, 0, 0)"){R=J;}return R;};}})(A);(function(D){var B=parseInt,C=RegExp;D.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.Color.re_RGB.test(E)){E=D.Color.toHex(E);}if(D.Color.re_hex.exec(E)){E="rgb("+[B(C.$1,16),B(C.$2,16),B(C.$3,16)].join(", ")+")";}return E;},toHex:function(F){F=D.Color.KEYWORDS[F]||F;if(D.Color.re_RGB.exec(F)){F=[Number(C.$1).toString(16),Number(C.$2).toString(16),Number(C.$3).toString(16)];for(var E=0;E<F.length;E++){if(F[E].length<2){F[E]=F[E].replace(D.Color.re_hex3,"$1$1");}}F="#"+F.join("");}if(F.length<6){F=F.replace(D.Color.re_hex3,"$1$1");}if(F!=="transparent"&&F.indexOf("#")<0){F="#"+F;}return F.toLowerCase();}};})(A);(function(D){var W="hasLayout",K="px",L="filter",B="filters",T="opacity",M="auto",G="borderWidth",J="borderTopWidth",Q="borderRightWidth",V="borderBottomWidth",H="borderLeftWidth",I="width",O="height",R="transparent",S="visible",C="getComputedStyle",Z=undefined,X=document.documentElement,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,E=function(Y){return Y.currentStyle||Y.style;},N={CUSTOM_STYLES:{},get:function(Y,b){var a="",c;if(Y){c=E(Y)[b];if(b===T&&D.DOM.CUSTOM_STYLES[T]){a=D.DOM.CUSTOM_STYLES[T].get(Y);}else{if(!c||(c.indexOf&&c.indexOf(K)>-1)){a=c;}else{if(D.DOM.IE.COMPUTED[b]){a=D.DOM.IE.COMPUTED[b](Y,b);}else{if(P.test(c)){a=N.getPixel(Y,b)+K;}else{a=c;}}}}}return a;},sizeOffsets:{width:["Left","Right"],height:["Top","Bottom"],top:["Top"],bottom:["Bottom"]},getOffset:function(b,g){var d=E(b)[g],Y=g.charAt(0).toUpperCase()+g.substr(1),f="offset"+Y,a="pixel"+Y,e=N.sizeOffsets[g],c="";if(d===M||d.indexOf("%")>-1){c=b["offset"+Y];if(e[0]){c-=N.getPixel(b,"padding"+e[0]);c-=N.getBorderWidth(b,"border"+e[0]+"Width",1);}if(e[1]){c-=N.getPixel(b,"padding"+e[1]);c-=N.getBorderWidth(b,"border"+e[1]+"Width",1);}}else{if(!b.style[a]&&!b.style[g]){b.style[g]=d;}c=b.style[a];}return c+K;},borderMap:{thin:"2px",medium:"4px",thick:"6px"},getBorderWidth:function(a,c,Y){var b=Y?"":K,d=a.currentStyle[c];if(d.indexOf(K)<0){if(N.borderMap[d]){d=N.borderMap[d];}else{}}return(Y)?parseFloat(d):d;},getPixel:function(b,Y){var d=null,a=E(b),e=a.right,c=a[Y];b.style.right=c;d=b.style.pixelRight;b.style.right=e;return d;},getMargin:function(b,Y){var c,a=E(b);if(a[Y]==M){c=0;}else{c=N.getPixel(b,Y);}return c+K;},getVisibility:function(a,Y){var b;while((b=a.currentStyle)&&b[Y]=="inherit"){a=a.parentNode;}return(b)?b[Y]:S;},getColor:function(a,Y){var b=E(a)[Y];if(!b||b===R){D.DOM.elementByAxis(a,"parentNode",null,function(c){b=E(c)[Y];if(b&&b!==R){a=c;return true;}});}return D.Color.toRGB(b);},getBorderColor:function(a,Y){var b=E(a),c=b[Y]||b.color;return D.Color.toRGB(D.Color.toHex(c));}},F={};try{if(X.style[T]===Z&&X[B]){D.DOM.CUSTOM_STYLES[T]={get:function(a){var c=100;try{c=a[B]["DXImageTransform.Microsoft.Alpha"][T];}catch(b){try{c=a[B]("alpha")[T];}catch(Y){}}return c/100;},set:function(a,d,Y){var c,b;if(d===""){b=E(a);c=(T in b)?b[T]:1;d=c;}if(typeof Y[L]=="string"){Y[L]="alpha("+T+"="+d*100+")";if(!a.currentStyle||!a.currentStyle[W]){Y.zoom=1;}}}};}}catch(U){}try{document.createElement("div").style.height="-1px";}catch(U){D.DOM.CUSTOM_STYLES.height={set:function(b,c,a){var Y=parseFloat(c);if(isNaN(Y)||Y>=0){a.height=c;}else{}}};D.DOM.CUSTOM_STYLES.width={set:function(b,c,a){var Y=parseFloat(c);if(isNaN(Y)||Y>=0){a.width=c;}else{}}};}F[I]=F[O]=N.getOffset;F.color=F.backgroundColor=N.getColor;F[G]=F[J]=F[Q]=F[V]=F[H]=N.getBorderWidth;F.marginTop=F.marginRight=F.marginBottom=F.marginLeft=N.getMargin;F.visibility=N.getVisibility;F.borderColor=F.borderTopColor=F.borderRightColor=F.borderBottomColor=F.borderLeftColor=N.getBorderColor;if(!D.config.win[C]){D.DOM[C]=N.get;}D.namespace("DOM.IE");D.DOM.IE.COMPUTED=F;D.DOM.IE.ComputedStyle=N;})(A);},"3.0.0",{requires:["dom-base"]});YUI.add("dom-screen",function(A){(function(F){var D="documentElement",O="compatMode",M="position",C="fixed",K="relative",G="left",H="top",I="BackCompat",N="medium",E="borderLeftWidth",B="borderTopWidth",P="getBoundingClientRect",J="getComputedStyle",L=/^t(?:able|d|h)$/i;F.mix(F.DOM,{winHeight:function(R){var Q=F.DOM._getWinSize(R).height;return Q;},winWidth:function(R){var Q=F.DOM._getWinSize(R).width;return Q;},docHeight:function(R){var Q=F.DOM._getDocSize(R).height;return Math.max(Q,F.DOM._getWinSize(R).height);},docWidth:function(R){var Q=F.DOM._getDocSize(R).width;return Math.max(Q,F.DOM._getWinSize(R).width);},docScrollX:function(Q){var R=F.DOM._getDoc(Q);return Math.max(R[D].scrollLeft,R.body.scrollLeft);},docScrollY:function(Q){var R=F.DOM._getDoc(Q);return Math.max(R[D].scrollTop,R.body.scrollTop);},getXY:function(){if(document[D][P]){return function(T){var a=null,U,R,V,Y,X,Q,S,W,Z;if(T){if(F.DOM.inDoc(T)){U=F.DOM.docScrollX(T);R=F.DOM.docScrollY(T);V=T[P]();Z=F.DOM._getDoc(T);a=[V.left,V.top];if(F.UA.ie){Y=2;X=2;W=Z[O];Q=F.DOM[J](Z[D],E);S=F.DOM[J](Z[D],B);if(F.UA.ie===6){if(W!==I){Y=0;X=0;}}if((W==I)){if(Q!==N){Y=parseInt(Q,10);}if(S!==N){X=parseInt(S,10);}}a[0]-=Y;a[1]-=X;}if((R||U)){a[0]+=U;a[1]+=R;}}else{a=F.DOM._getOffset(T);}}return a;};}else{return function(R){var T=null,Q,V,S,U;if(R){if(F.DOM.inDoc(R)){T=[R.offsetLeft,R.offsetTop];Q=R;V=((F.UA.gecko||F.UA.webkit>519)?true:false);while((Q=Q.offsetParent)){T[0]+=Q.offsetLeft;T[1]+=Q.offsetTop;if(V){T=F.DOM._calcBorders(Q,T);}}if(F.DOM.getStyle(R,M)!=C){Q=R;while((Q=Q.parentNode)){S=Q.scrollTop;U=Q.scrollLeft;if(F.UA.gecko&&(F.DOM.getStyle(Q,"overflow")!=="visible")){T=F.DOM._calcBorders(Q,T);}if(S||U){T[0]-=U;T[1]-=S;}}T[0]+=F.DOM.docScrollX(R);T[1]+=F.DOM.docScrollY(R);}else{T[0]+=F.DOM.docScrollX(R);T[1]+=F.DOM.docScrollY(R);}}else{T=F.DOM._getOffset(R);}}return T;};}}(),_getOffset:function(Q){var S,R=null;if(Q){S=F.DOM.getStyle(Q,M);R=[parseInt(F.DOM[J](Q,G),10),parseInt(F.DOM[J](Q,H),10)];if(isNaN(R[0])){R[0]=parseInt(F.DOM.getStyle(Q,G),10);if(isNaN(R[0])){R[0]=(S===K)?0:Q.offsetLeft||0;}}if(isNaN(R[1])){R[1]=parseInt(F.DOM.getStyle(Q,H),10);if(isNaN(R[1])){R[1]=(S===K)?0:Q.offsetTop||0;}}}return R;},getX:function(Q){return F.DOM.getXY(Q)[0];},getY:function(Q){return F.DOM.getXY(Q)[1];},setXY:function(R,U,X){var S=F.DOM.setStyle,W,V,Q,T;if(R&&U){W=F.DOM.getStyle(R,M);V=F.DOM._getOffset(R);if(W=="static"){W=K;S(R,M,W);}T=F.DOM.getXY(R);if(U[0]!==null){S(R,G,U[0]-T[0]+V[0]+"px");}if(U[1]!==null){S(R,H,U[1]-T[1]+V[1]+"px");}if(!X){Q=F.DOM.getXY(R);if(Q[0]!==U[0]||Q[1]!==U[1]){F.DOM.setXY(R,U,true);}}}else{}},setX:function(R,Q){return F.DOM.setXY(R,[Q,null]);},setY:function(Q,R){return F.DOM.setXY(Q,[null,R]);},_calcBorders:function(S,T){var R=parseInt(F.DOM[J](S,B),10)||0,Q=parseInt(F.DOM[J](S,E),10)||0;if(F.UA.gecko){if(L.test(S.tagName)){R=0;Q=0;}}T[0]+=Q;T[1]+=R;return T;},_getWinSize:function(T){var V=F.DOM._getDoc(),U=V.defaultView||V.parentWindow,W=V[O],S=U.innerHeight,R=U.innerWidth,Q=V[D];if(W&&!F.UA.opera){if(W!="CSS1Compat"){Q=V.body;}S=Q.clientHeight;R=Q.clientWidth;}return{height:S,width:R};},_getDocSize:function(R){var S=F.DOM._getDoc(),Q=S[D];if(S[O]!="CSS1Compat"){Q=S.body;}return{height:Q.scrollHeight,width:Q.scrollWidth};}});})(A);(function(G){var D="top",C="right",H="bottom",B="left",F=function(L,K){var N=Math.max(L[D],K[D]),O=Math.min(L[C],K[C]),I=Math.min(L[H],K[H]),J=Math.max(L[B],K[B]),M={};M[D]=N;M[C]=O;M[H]=I;M[B]=J;return M;},E=G.DOM;G.mix(E,{region:function(J){var K=E.getXY(J),I=false;if(J&&K){I=E._getRegion(K[1],K[0]+J.offsetWidth,K[1]+J.offsetHeight,K[0]);}return I;},intersect:function(K,I,M){var J=M||E.region(K),L={},O=I,N;if(O.tagName){L=E.region(O);}else{if(G.Lang.isObject(I)){L=I;}else{return false;}}N=F(L,J);return{top:N[D],right:N[C],bottom:N[H],left:N[B],area:((N[H]-N[D])*(N[C]-N[B])),yoff:((N[H]-N[D])),xoff:(N[C]-N[B]),inRegion:E.inRegion(K,I,false,M)};},inRegion:function(L,I,J,N){var M={},K=N||E.region(L),P=I,O;if(P.tagName){M=E.region(P);}else{if(G.Lang.isObject(I)){M=I;}else{return false;}}if(J){return(K[B]>=M[B]&&K[C]<=M[C]&&K[D]>=M[D]&&K[H]<=M[H]);}else{O=F(M,K);if(O[H]>=O[D]&&O[C]>=O[B]){return true;}else{return false;}}},inViewportRegion:function(J,I,K){return E.inRegion(J,E.viewportRegion(J),I,K);},_getRegion:function(K,L,I,J){var M={};M[D]=M[1]=K;M[B]=M[0]=J;M[H]=I;M[C]=L;M.width=M[C]-M[B];M.height=M[H]-M[D];return M;},viewportRegion:function(J){J=J||G.config.doc.documentElement;var I=false,L,K;if(J){L=E.docScrollX(J);K=E.docScrollY(J);I=E._getRegion(K,E.winWidth(J)+L,K+E.winHeight(J),L);}return I;}});})(A);},"3.0.0",{requires:["dom-base","dom-style"]});YUI.add("selector-native",function(A){(function(G){G.namespace("Selector");var E="compareDocumentPosition",F="ownerDocument",D="yui-tmp-",C=0;var B={_foundCache:[],useNative:true,_compare:("sourceIndex"in document.documentElement)?function(K,J){var I=K.sourceIndex,H=J.sourceIndex;if(I===H){return 0;}else{if(I>H){return 1;}}return-1;}:(document.documentElement[E]?function(I,H){if(I[E](H)&4){return-1;}else{return 1;}}:function(L,K){var J,H,I;if(L&&K){J=L[F].createRange();J.setStart(L,0);H=K[F].createRange();H.setStart(K,0);I=J.compareBoundaryPoints(1,H);}return I;}),_sort:function(H){if(H){H=G.Array(H,0,true);if(H.sort){H.sort(B._compare);}}return H;},_deDupe:function(H){var I=[],J,K;for(J=0;(K=H[J++]);){if(!K._found){I[I.length]=K;K._found=true;}}for(J=0;(K=I[J++]);){K._found=null;K.removeAttribute("_found");}return I;},query:function(I,P,Q,H){P=P||G.config.doc;var M=[],J=(G.Selector.useNative&&document.querySelector&&!H),L=[[I,P]],N,R,K,O=(J)?G.Selector._nativeQuery:G.Selector._bruteQuery;if(I&&O){if(!H&&(!J||P.tagName)){L=B._splitQueries(I,P);}for(K=0;(N=L[K++]);){R=O(N[0],N[1],Q);if(!Q){R=G.Array(R,0,true);}if(R){M=M.concat(R);}}if(L.length>1){M=B._sort(B._deDupe(M));}}return(Q)?(M[0]||null):M;},_splitQueries:function(J,M){var I=J.split(","),K=[],N="",L,H;if(M){if(M.tagName){M.id=M.id||G.guid();N="#"+M.id+" ";}for(L=0,H=I.length;L<H;++L){J=N+I[L];K.push([J,M]);}}return K;},_nativeQuery:function(H,I,J){try{return I["querySelector"+(J?"":"All")](H);}catch(K){return G.Selector.query(H,I,J,true);}},filter:function(I,H){var J=[],K,L;if(I&&H){for(K=0;(L=I[K++]);){if(G.Selector.test(L,H)){J[J.length]=L;}}}else{}return J;},test:function(N,I,J){var K=false,H=I.split(","),M,L,O;if(N&&N.tagName){J=J||N.ownerDocument;if(!N.id){N.id=D+C++;}for(L=0;(O=H[L++]);){O+="#"+N.id;M=G.Selector.query(O,J,true);K=(M===N);if(K){break;}}}return K;}};G.mix(G.Selector,B,true);})(A);},"3.0.0",{requires:["dom-base"]});YUI.add("selector-css2",function(G){var H="parentNode",D="tagName",E="attributes",A="combinator",F="pseudos",C=G.Selector,B={SORT_RESULTS:true,_children:function(M,I){var J=M.children,L,K=[],N,O;if(M.children&&I&&M.children.tags){K=M.children.tags(I);}else{if((!J&&M[D])||(J&&I)){N=J||M.childNodes;J=[];for(L=0;(O=N[L++]);){if(O.tagName){if(!I||I===O.tagName){J.push(O);}}}}}return J||[];},_regexCache:{},_re:{attr:/(\[.*\])/g,pseudos:/:([\-\w]+(?:\(?:['"]?(.+)['"]?\)))*/i},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[className~=$1]"},operators:{"":function(J,I){return G.DOM.getAttribute(J,I)!=="";},"~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}-?"},pseudos:{"first-child":function(I){return G.Selector._children(I[H])[0]===I;}},_bruteQuery:function(M,Q,S){var N=[],I=[],P=C._tokenize(M),L=P[P.length-1],R=G.DOM._getDoc(Q),J,O,K;if(P[0]&&R===Q&&(J=P[0].id)&&R.getElementById(J)){Q=R.getElementById(J);}if(L){J=L.id;O=L.className;K=L.tagName||"*";if(J){if(R.getElementById(J)){I=[R.getElementById(J)];}}else{if(O){I=Q.getElementsByClassName(O);}else{if(K){I=Q.getElementsByTagName(K||"*");}}}if(I.length){N=C._filterNodes(I,P,S);}}return N;},_filterNodes:function(R,N,P){var W=0,V,X=N.length,Q=X-1,M=[],T=R[0],a=T,Y=G.Selector.getters,L,U,K,O,I,S,J,Z;for(W=0;(a=T=R[W++]);){Q=X-1;O=null;testLoop:while(a&&a.tagName){K=N[Q];J=K.tests;V=J.length;if(V&&!I){while((Z=J[--V])){L=Z[1];if(Y[Z[0]]){S=Y[Z[0]](a,Z[0]);}else{S=a[Z[0]];if(S===undefined&&a.getAttribute){S=a.getAttribute(Z[0]);}}if((L==="="&&S!==Z[2])||(L.test&&!L.test(S))||(L.call&&!L(a,Z[0]))){if((a=a[O])){while(a&&(!a.tagName||(K.tagName&&K.tagName!==a.tagName))){a=a[O];}}continue testLoop;}}}Q--;if(!I&&(U=K.combinator)){O=U.axis;a=a[O];while(a&&!a.tagName){a=a[O];}if(U.direct){O=null;}}else{M.push(T);if(P){return M;}break;}}}T=a=null;return M;},_getRegExp:function(K,I){var J=C._regexCache;I=I||"";if(!J[K+I]){J[K+I]=new RegExp(K,I);}return J[K+I];},combinators:{" ":{axis:"parentNode"},">":{axis:"parentNode",direct:true},"+":{axis:"previousSibling",direct:true}},_parsers:[{name:E,re:/^\[([a-z]+\w*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i,fn:function(K,L){var J=K[2]||"",I=G.Selector.operators,M;if((K[1]==="id"&&J==="=")||(K[1]==="className"&&document.getElementsByClassName&&(J==="~="||J==="="))){L.prefilter=K[1];L[K[1]]=K[3];}if(J in I){M=I[J];if(typeof M==="string"){M=G.Selector._getRegExp(M.replace("{val}",K[3]));}K[2]=M;}if(!L.last||L.prefilter!==K[1]){return K.slice(1);}}},{name:D,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(J,K){var I=J[1].toUpperCase();K.tagName=I;if(I!=="*"&&(!K.last||K.prefilter)){return[D,"=",I];}if(!K.prefilter){K.prefilter="tagName";}}},{name:A,re:/^\s*([>+~]|\s)\s*/,fn:function(I,J){}},{name:F,re:/^:([\-\w]+)(?:\(['"]?(.+)['"]?\))*/i,fn:function(I,J){var K=C[F][I[1]];if(K){return[I[2],K];}else{return false;}}}],_getToken:function(I){return{tagName:null,id:null,className:null,attributes:{},combinator:null,tests:[]};},_tokenize:function(K){K=K||"";K=C._replaceShorthand(G.Lang.trim(K));var J=C._getToken(),P=K,O=[],Q=false,M,N,L,I;outer:do{Q=false;for(L=0;(I=C._parsers[L++]);){if((M=I.re.exec(K))){if(I!==A){J.selector=K;}K=K.replace(M[0],"");if(!K.length){J.last=true;}if(C._attrFilters[M[1]]){M[1]=C._attrFilters[M[1]];}N=I.fn(M,J);if(N===false){Q=false;break outer;}else{if(N){J.tests.push(N);}}if(!K.length||I.name===A){O.push(J);J=C._getToken(J);if(I.name===A){J.combinator=G.Selector.combinators[M[1]];}}Q=true;}}}while(Q&&K.length);if(!Q||K.length){O=[];}return O;},_replaceShorthand:function(J){var K=C.shorthand,L=J.match(C._re.attr),O=J.match(C._re.pseudos),N,M,I;if(O){J=J.replace(C._re.pseudos,"!!REPLACED_PSEUDO!!");}if(L){J=J.replace(C._re.attr,"!!REPLACED_ATTRIBUTE!!");}for(N in K){if(K.hasOwnProperty(N)){J=J.replace(C._getRegExp(N,"gi"),K[N]);}}if(L){for(M=0,I=L.length;M<I;++M){J=J.replace("!!REPLACED_ATTRIBUTE!!",L[M]);}}if(O){for(M=0,I=O.length;M<I;++M){J=J.replace("!!REPLACED_PSEUDO!!",O[M]);}}return J;},_attrFilters:{"class":"className","for":"htmlFor"},getters:{href:function(J,I){return G.DOM.getAttribute(J,I);}}};G.mix(G.Selector,B,true);G.Selector.getters.src=G.Selector.getters.rel=G.Selector.getters.href;if(G.Selector.useNative&&document.querySelector){G.Selector.shorthand["\\.(-?[_a-z]+[-\\w]*)"]="[class~=$1]";}},"3.0.0",{requires:["selector-native"]});YUI.add("selector",function(A){},"3.0.0",{use:["selector-native","selector-css2"]});YUI.add("dom",function(A){},"3.0.0",{use:["dom-base","dom-style","dom-screen","selector"]});
YUI.add("event-custom-base",function(E){E.Env.evt={handles:{},plugins:{}};(function(){var F=0,G=1;E.Do={objs:{},before:function(I,K,L,M){var J=I,H;if(M){H=[I,M].concat(E.Array(arguments,4,true));J=E.rbind.apply(E,H);}return this._inject(F,J,K,L);},after:function(I,K,L,M){var J=I,H;if(M){H=[I,M].concat(E.Array(arguments,4,true));J=E.rbind.apply(E,H);}return this._inject(G,J,K,L);},_inject:function(H,J,K,M){var N=E.stamp(K),L,I;if(!this.objs[N]){this.objs[N]={};}L=this.objs[N];if(!L[M]){L[M]=new E.Do.Method(K,M);K[M]=function(){return L[M].exec.apply(L[M],arguments);};}I=N+E.stamp(J)+M;L[M].register(I,J,H);return new E.EventHandle(L[M],I);},detach:function(H){if(H.detach){H.detach();}},_unload:function(I,H){}};E.Do.Method=function(H,I){this.obj=H;this.methodName=I;this.method=H[I];this.before={};this.after={};};E.Do.Method.prototype.register=function(I,J,H){if(H){this.after[I]=J;}else{this.before[I]=J;}};E.Do.Method.prototype._delete=function(H){delete this.before[H];delete this.after[H];};E.Do.Method.prototype.exec=function(){var J=E.Array(arguments,0,true),K,I,N,L=this.before,H=this.after,M=false;for(K in L){if(L.hasOwnProperty(K)){I=L[K].apply(this.obj,J);if(I){switch(I.constructor){case E.Do.Halt:return I.retVal;case E.Do.AlterArgs:J=I.newArgs;break;case E.Do.Prevent:M=true;break;default:}}}}if(!M){I=this.method.apply(this.obj,J);}for(K in H){if(H.hasOwnProperty(K)){N=H[K].apply(this.obj,J);if(N&&N.constructor==E.Do.Halt){return N.retVal;}else{if(N&&N.constructor==E.Do.AlterReturn){I=N.newRetVal;}}}}return I;};E.Do.AlterArgs=function(I,H){this.msg=I;this.newArgs=H;};E.Do.AlterReturn=function(I,H){this.msg=I;this.newRetVal=H;};E.Do.Halt=function(I,H){this.msg=I;this.retVal=H;};E.Do.Prevent=function(H){this.msg=H;};E.Do.Error=E.Do.Halt;})();var D="after",B=["broadcast","bubbles","context","contextFn","currentTarget","defaultFn","details","emitFacade","fireOnce","host","preventable","preventedFn","queuable","silent","stoppedFn","target","type"],C=9,A="yui:log";E.EventHandle=function(F,G){this.evt=F;this.sub=G;};E.EventHandle.prototype={detach:function(){var F=this.evt,G;if(F){if(E.Lang.isArray(F)){for(G=0;G<F.length;G++){F[G].detach();}}else{F._delete(this.sub);}}}};E.CustomEvent=function(F,G){G=G||{};this.id=E.stamp(this);this.type=F;this.context=E;this.logSystem=(F==A);this.silent=this.logSystem;this.subscribers={};this.afters={};this.preventable=true;this.bubbles=true;this.signature=C;this.applyConfig(G,true);};E.CustomEvent.prototype={applyConfig:function(G,F){if(G){E.mix(this,G,F,B);}},_on:function(J,H,G,F){if(!J){this.log("Invalid callback for CE: "+this.type);}var I=new E.Subscriber(J,H,G,F);if(this.fireOnce&&this.fired){E.later(0,this,E.bind(this._notify,this,I,this.firedWith));}if(F==D){this.afters[I.id]=I;this.hasAfters=true;}else{this.subscribers[I.id]=I;this.hasSubscribers=true;}return new E.EventHandle(this,I);},subscribe:function(H,G){var F=(arguments.length>2)?E.Array(arguments,2,true):null;return this._on(H,G,F,true);},on:function(H,G){var F=(arguments.length>2)?E.Array(arguments,2,true):null;return this._on(H,G,F,true);},after:function(H,G){var F=(arguments.length>2)?E.Array(arguments,2,true):null;return this._on(H,G,F,D);},detach:function(J,H){if(J&&J.detach){return J.detach();}var K=0,G=this.subscribers,F,I;for(F in G){if(G.hasOwnProperty(F)){I=G[F];if(I&&(!J||J===I.fn)){this._delete(I);K++;}}}return K;},unsubscribe:function(){return this.detach.apply(this,arguments);},_notify:function(I,H,F){this.log(this.type+"->"+"sub: "+I.id);var G;G=I.notify(H,this);if(false===G||this.stopped>1){this.log(this.type+" cancelled by subscriber");return false;}return true;},log:function(G,F){if(!this.silent){}},fire:function(){if(this.fireOnce&&this.fired){this.log("fireOnce event: "+this.type+" already fired");return true;}else{var F=E.Array(arguments,0,true);this.fired=true;this.firedWith=F;if(this.emitFacade){return this.fireComplex(F);}else{return this.fireSimple(F);}}},fireSimple:function(F){if(this.hasSubscribers||this.hasAfters){this._procSubs(E.merge(this.subscribers,this.afters),F);}this._broadcast(F);return this.stopped?false:true;},fireComplex:function(F){F[0]=F[0]||{};return this.fireSimple(F);},_procSubs:function(I,G,F){var J,H;for(H in I){if(I.hasOwnProperty(H)){J=I[H];if(J&&J.fn){if(false===this._notify(J,G,F)){this.stopped=2;}if(this.stopped==2){return false;}}}}return true;},_broadcast:function(G){if(!this.stopped&&this.broadcast){var F=E.Array(G);F.unshift(this.type);if(this.host!==E){E.fire.apply(E,F);}if(this.broadcast==2){E.Global.fire.apply(E.Global,F);}}},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},detachAll:function(){return this.detach();},_delete:function(F){if(F){delete F.fn;delete F.context;delete this.subscribers[F.id];delete this.afters[F.id];}}};E.Subscriber=function(H,G,F){this.fn=H;this.context=G;this.id=E.stamp(this);this.args=F;this.events=null;};E.Subscriber.prototype={_notify:function(J,H,I){var F=this.args,G;switch(I.signature){case 0:G=this.fn.call(J,I.type,H,J);break;case 1:G=this.fn.call(J,H[0]||null,J);break;default:if(F||H){H=H||[];F=(F)?H.concat(F):H;G=this.fn.apply(J,F);}else{G=this.fn.call(J);}}return G;},notify:function(G,I){var J=this.context,F=true;if(!J){J=(I.contextFn)?I.contextFn():I.context;}if(E.config.throwFail){F=this._notify(J,G,I);}else{try{F=this._notify(J,G,I);}catch(H){E.error(this+" failed: "+H.message,H);}}return F;},contains:function(G,F){if(F){return((this.fn==G)&&this.context==F);}else{return(this.fn==G);}}};(function(){var F=E.Lang,H=":",I="|",J="~AFTER~",K=E.cached(function(L,N){if(!N||!F.isString(L)||L.indexOf(H)>-1){return L;}return N+H+L;}),G=E.cached(function(O,Q){var N=O,P,R,L;if(!F.isString(N)){return N;}L=N.indexOf(J);if(L>-1){R=true;N=N.substr(J.length);}L=N.indexOf(I);if(L>-1){P=N.substr(0,(L));N=N.substr(L+1);if(N=="*"){N=null;}}return[P,(Q)?K(N,Q):N,R,N];}),M=function(L){var N=(F.isObject(L))?L:{};this._yuievt=this._yuievt||{id:E.guid(),events:{},targets:{},config:N,chain:("chain"in N)?N.chain:E.config.chain,defaults:{context:N.context||this,host:this,emitFacade:N.emitFacade,fireOnce:N.fireOnce,queuable:N.queuable,broadcast:N.broadcast,bubbles:("bubbles"in N)?N.bubbles:true}};};M.prototype={on:function(Q,U,O,V){var Z=G(Q,this._yuievt.config.prefix),a,b,N,g,X,W,d,R=E.Env.evt.handles,P,L,S,e=E.Node,Y,T;if(F.isObject(Q)){if(F.isFunction(Q)){return E.Do.before.apply(E.Do,arguments);}a=U;b=O;N=E.Array(arguments,0,true);g={};P=Q._after;delete Q._after;E.each(Q,function(f,c){if(f){a=f.fn||((E.Lang.isFunction(f))?f:a);b=f.context||b;}N[0]=(P)?J+c:c;N[1]=a;N[2]=b;g[c]=this.on.apply(this,N);},this);return(this._yuievt.chain)?this:new E.EventHandle(g);}W=Z[0];P=Z[2];S=Z[3];if(e&&(this instanceof e)&&(S in e.DOM_EVENTS)){N=E.Array(arguments,0,true);N.splice(2,0,e.getDOMNode(this));return E.on.apply(E,N);}Q=Z[1];if(this instanceof YUI){L=E.Env.evt.plugins[Q];N=E.Array(arguments,0,true);N[0]=S;if(e){Y=N[2];if(Y instanceof E.NodeList){Y=E.NodeList.getDOMNodes(Y);}else{if(Y instanceof e){Y=e.getDOMNode(Y);}}T=(S in e.DOM_EVENTS);if(T){N[2]=Y;}}if(L){d=L.on.apply(E,N);}else{if((!Q)||T){d=E.Event._attach(N);}}}if(!d){X=this._yuievt.events[Q]||this.publish(Q);d=X._on(U,O,(arguments.length>3)?E.Array(arguments,3,true):null,(P)?"after":true);}if(W){R[W]=R[W]||{};R[W][Q]=R[W][Q]||[];R[W][Q].push(d);}return(this._yuievt.chain)?this:d;},subscribe:function(){return this.on.apply(this,arguments);},detach:function(P,U,O){var T=this._yuievt.events,Z,d,c=E.Node,Y=(this instanceof c);if(!P&&(this!==E)){for(Z in T){if(T.hasOwnProperty(Z)){d=T[Z].detach(U,O);}}if(Y){E.Event.purgeElement(c.getDOMNode(this));}return d;}var X=G(P,this._yuievt.config.prefix),V=F.isArray(X)?X[0]:null,R=(X)?X[3]:null,b,L,Q=E.Env.evt.handles,S,N,W,a=function(g,f){var e=g[f];if(e){while(e.length){b=e.pop();b.detach();}}};if(V){S=Q[V];P=X[1];if(S){if(P){a(S,P);}else{for(Z in S){if(S.hasOwnProperty(Z)){a(S,Z);}}}return(this._yuievt.chain)?this:true;}}else{if(F.isObject(P)&&P.detach){d=P.detach();return(this._yuievt.chain)?this:d;}else{if(Y&&((!R)||(R in c.DOM_EVENTS))){N=E.Array(arguments,0,true);N[2]=c.getDOMNode(this);return E.detach.apply(E,N);}}}L=E.Env.evt.plugins[R];if(this instanceof YUI){N=E.Array(arguments,0,true);if(L&&L.detach){return L.detach.apply(E,N);}else{if(!P||(!L&&c&&(P in c.DOM_EVENTS))){N[0]=P;return E.Event.detach.apply(E.Event,N);}}}W=T[P];if(W){d=W.detach(U,O);}return(this._yuievt.chain)?this:d;},unsubscribe:function(){return this.detach.apply(this,arguments);},detachAll:function(L){return this.detach(L);},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},publish:function(O,P){var N,R,L,Q=this._yuievt.config.prefix;O=(Q)?K(O,Q):O;if(F.isObject(O)){L={};E.each(O,function(T,S){L[S]=this.publish(S,T||P);},this);return L;}N=this._yuievt.events;R=N[O];if(R){if(P){R.applyConfig(P,true);}}else{R=new E.CustomEvent(O,(P)?E.mix(P,this._yuievt.defaults):this._yuievt.defaults);N[O]=R;}return N[O];},addTarget:function(L){this._yuievt.targets[E.stamp(L)]=L;this._yuievt.hasTargets=true;},removeTarget:function(L){delete this._yuievt.targets[E.stamp(L)];},fire:function(P){var S=F.isString(P),O=(S)?P:(P&&P.type),R,L,N,Q=this._yuievt.config.prefix;O=(Q)?K(O,Q):O;R=this.getEvent(O,true);if(!R){if(this._yuievt.hasTargets){L=(S)?arguments:E.Array(arguments,0,true).unshift(O);return this.bubble(null,L,this);}N=true;}else{L=E.Array(arguments,(S)?1:0,true);N=R.fire.apply(R,L);R.target=null;}return(this._yuievt.chain)?this:N;},getEvent:function(N,L){var P,O;if(!L){P=this._yuievt.config.prefix;N=(P)?K(N,P):N;}O=this._yuievt.events;return(O&&N in O)?O[N]:null;},after:function(O,N){var L=E.Array(arguments,0,true);switch(F.type(O)){case"function":return E.Do.after.apply(E.Do,arguments);case"object":L[0]._after=true;break;default:L[0]=J+O;}return this.on.apply(this,L);},before:function(){return this.on.apply(this,arguments);}};E.EventTarget=M;E.mix(E,M.prototype,false,false,{bubbles:false});M.call(E);YUI.Env.globalEvents=YUI.Env.globalEvents||new M();E.Global=YUI.Env.globalEvents;})();},"3.0.0",{requires:["oop"]});YUI.add("event-custom-complex",function(A){(function(){var C,D,B=A.CustomEvent.prototype;A.EventFacade=function(F,E){F=F||{};this.details=F.details;this.type=F.type;this.target=F.target;this.currentTarget=E;this.relatedTarget=F.relatedTarget;this.stopPropagation=function(){F.stopPropagation();};this.stopImmediatePropagation=function(){F.stopImmediatePropagation();};this.preventDefault=function(){F.preventDefault();};this.halt=function(G){F.halt(G);};};B.fireComplex=function(H){var L=A.Env._eventstack,F,J,E,K,G,I;if(L){if(this.queuable&&this.type!=L.next.type){this.log("queue "+this.type);L.queue.push([this,H]);return true;}}else{A.Env._eventstack={id:this.id,next:this,silent:this.silent,stopped:0,prevented:0,queue:[]};L=A.Env._eventstack;}this.stopped=0;this.prevented=0;this.target=this.target||this.host;I=new A.EventTarget({fireOnce:true,context:this.host});this.events=I;if(this.preventedFn){I.on("prevented",this.preventedFn);}if(this.stoppedFn){I.on("stopped",this.stoppedFn);}this.currentTarget=this.host||this.currentTarget;this.details=H.slice();this.log("Firing "+this.type);this._facade=null;F=this._getFacade(H);if(A.Lang.isObject(H[0])){H[0]=F;}else{H.unshift(F);}if(this.hasSubscribers){this._procSubs(A.merge(this.subscribers),H,F);}if(this.bubbles&&this.host&&this.host.bubble&&!this.stopped){L.stopped=0;L.prevented=0;G=this.host.bubble(this);this.stopped=Math.max(this.stopped,L.stopped);this.prevented=Math.max(this.prevented,L.prevented);}if(this.defaultFn&&!this.prevented){this.defaultFn.apply(this.host||this,H);}this._broadcast(H);if(this.hasAfters&&!this.prevented&&this.stopped<2){this._procSubs(A.merge(this.afters),H,F);}if(L.id===this.id){E=L.queue;while(E.length){J=E.pop();K=J[0];L.stopped=0;L.prevented=0;L.next=K;K.fire.apply(K,J[1]);}A.Env._eventstack=null;}return this.stopped?false:true;};B._getFacade=function(){var E=this._facade,H,G,F=this.details;if(!E){E=new A.EventFacade(this,this.currentTarget);}H=F&&F[0];if(A.Lang.isObject(H,true)){G={};A.mix(G,E,true,D);A.mix(E,H,true);A.mix(E,G,true,D);}E.details=this.details;E.target=this.target;E.currentTarget=this.currentTarget;E.stopped=0;E.prevented=0;this._facade=E;return this._facade;};B.stopPropagation=function(){this.stopped=1;A.Env._eventstack.stopped=1;this.events.fire("stopped",this);};B.stopImmediatePropagation=function(){this.stopped=2;A.Env._eventstack.stopped=2;this.events.fire("stopped",this);};B.preventDefault=function(){if(this.preventable){this.prevented=1;A.Env._eventstack.prevented=1;this.events.fire("prevented",this);}};B.halt=function(E){if(E){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};A.EventTarget.prototype.bubble=function(M,K,I){var G=this._yuievt.targets,J=true,N,L,E,F,H;if(!M||((!M.stopped)&&G)){for(F in G){if(G.hasOwnProperty(F)){N=G[F];L=M&&M.type;E=N.getEvent(L,true);if(!E){if(N._yuievt.hasTargets){N.bubble.call(N,M,K,I);}}else{E.target=I||(M&&M.target)||this;E.currentTarget=N;H=E.broadcast;E.broadcast=false;J=J&&E.fire.apply(E,K||M.details);E.broadcast=H;if(E.stopped){break;}}}}}return J;};C=new A.EventFacade();D=A.Object.keys(C);})();},"3.0.0",{requires:["event-custom-base"]});YUI.add("event-custom",function(A){},"3.0.0",{use:["event-custom-base","event-custom-complex"]});
(function(){var GLOBAL_ENV=YUI.Env,C=YUI.config,D=C.doc,POLL_INTERVAL=C.pollInterval||40,_ready=function(e){GLOBAL_ENV._ready();};if(!GLOBAL_ENV._ready){GLOBAL_ENV._ready=function(){if(!GLOBAL_ENV.DOMReady){GLOBAL_ENV.DOMReady=true;if(D.removeEventListener){D.removeEventListener("DOMContentLoaded",_ready,false);}}};if(navigator.userAgent.match(/MSIE/)){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;_ready();}};}else{GLOBAL_ENV._dri=setInterval(function(){try{document.documentElement.doScroll("left");clearInterval(GLOBAL_ENV._dri);GLOBAL_ENV._dri=null;_ready();}catch(ex){}},POLL_INTERVAL);}}else{D.addEventListener("DOMContentLoaded",_ready,false);}}})();YUI.add("event-base",function(A){(function(){var C=YUI.Env,B=function(){A.fire("domready");};A.publish("domready",{fireOnce:true});if(C.DOMReady){B();}else{A.before(B,C,"_ready");}})();(function(){var C=A.UA,B={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},D=function(F){try{if(F&&3==F.nodeType){F=F.parentNode;}}catch(E){return null;}return A.one(F);};A.DOMEventFacade=function(L,F,E){E=E||{};var H=L,G=F,I=A.config.doc,M=I.body,N=H.pageX,K=H.pageY,J,O;this.altKey=H.altKey;this.ctrlKey=H.ctrlKey;this.metaKey=H.metaKey;this.shiftKey=H.shiftKey;this.type=H.type;this.clientX=H.clientX;this.clientY=H.clientY;if(!N&&0!==N){N=H.clientX||0;K=H.clientY||0;if(C.ie){N+=Math.max(I.documentElement.scrollLeft,M.scrollLeft);K+=Math.max(I.documentElement.scrollTop,M.scrollTop);}}this._yuifacade=true;this._event=H;this.pageX=N;this.pageY=K;J=H.keyCode||H.charCode||0;if(C.webkit&&(J in B)){J=B[J];}this.keyCode=J;this.charCode=J;this.button=H.which||H.button;this.which=this.button;this.target=D(H.target||H.srcElement);this.currentTarget=D(G);O=H.relatedTarget;if(!O){if(H.type=="mouseout"){O=H.toElement;}else{if(H.type=="mouseover"){O=H.fromElement;}}}this.relatedTarget=D(O);if(H.type=="mousewheel"||H.type=="DOMMouseScroll"){this.wheelDelta=(H.detail)?(H.detail*-1):Math.round(H.wheelDelta/80)||((H.wheelDelta<0)?-1:1);}this.stopPropagation=function(){if(H.stopPropagation){H.stopPropagation();}else{H.cancelBubble=true;}E.stopped=1;};this.stopImmediatePropagation=function(){if(H.stopImmediatePropagation){H.stopImmediatePropagation();}else{this.stopPropagation();}E.stopped=2;};this.preventDefault=function(P){if(H.preventDefault){H.preventDefault();}H.returnValue=P||false;E.prevented=1;};this.halt=function(P){if(P){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};};})();(function(){A.Env.evt.dom_wrappers={};A.Env.evt.dom_map={};var H=A.Env.evt,J=YUI.Env.add,D=YUI.Env.remove,G=function(){YUI.Env.windowLoaded=true;A.Event._load();D(window,"load",G);},B=function(){A.Event._unload();D(window,"unload",B);},C="domready",E="~yui|2|compat~",F=function(L){try{return(L&&typeof L!=="string"&&A.Lang.isNumber(L.length)&&!L.tagName&&!L.alert);}catch(K){return false;}},I=function(){var M=false,N=0,L=[],O=H.dom_wrappers,K=null,P=H.dom_map;return{POLL_RETRYS:1000,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:false,startInterval:function(){var Q=A.Event;if(!Q._interval){Q._interval=setInterval(A.bind(Q._poll,Q),Q.POLL_INTERVAL);}},onAvailable:function(Q,U,Y,R,V,X){var W=A.Array(Q),S,T;for(S=0;S<W.length;S=S+1){L.push({id:W[S],fn:U,obj:Y,override:R,checkReady:V,compat:X});}N=this.POLL_RETRYS;setTimeout(A.bind(A.Event._poll,A.Event),0);T=new A.EventHandle({_delete:function(){if(T.handle){T.handle.detach();return;}var a,Z;for(a=0;a<W.length;a++){for(Z=0;Z<L.length;Z++){if(W[a]===L[Z].id){L.splice(Z,1);}}}}});return T;},onContentReady:function(U,R,T,S,Q){return this.onAvailable(U,R,T,S,true,Q);},attach:function(T,S,R,Q){return A.Event._attach(A.Array(arguments,0,true));},_createWrapper:function(W,V,Q,R,U){var X=A.stamp(W),T="event:"+X+V,S;if(false===U){T+="native";}if(Q){T+="capture";}S=O[T];if(!S){S=A.publish(T,{silent:true,bubbles:false,contextFn:function(){S.nodeRef=S.nodeRef||A.one(S.el);return S.nodeRef;}});S.el=W;S.key=T;S.domkey=X;S.type=V;S.fn=function(Y){S.fire(A.Event.getEvent(Y,W,(R||(false===U))));};S.capture=Q;if(W==A.config.win&&V=="load"){S.fireOnce=true;K=T;}O[T]=S;P[X]=P[X]||{};P[X][T]=S;J(W,V,S.fn,Q);}return S;},_attach:function(W,S){var a,e=A.Event,c,U,Z,Q,T=false,V,X=W[0],Y=W[1],R=W[2]||A.config.win,d=S&&S.facade,b=S&&S.capture;if(W[W.length-1]===E){a=true;}if(!Y||!Y.call){return false;}if(F(R)){c=[];A.each(R,function(g,f){W[2]=g;c.push(e._attach(W,S));});return new A.EventHandle(c);}else{if(A.Lang.isString(R)){if(a){U=A.DOM.byId(R);}else{U=A.Selector.query(R);switch(U.length){case 0:U=null;break;case 1:U=U[0];break;default:W[2]=U;return e._attach(W,S);}}if(U){R=U;}else{V=this.onAvailable(R,function(){V.handle=e._attach(W,S);},e,true,false,a);return V;}}}if(!R){return false;}if(A.Node&&R instanceof A.Node){R=A.Node.getDOMNode(R);}Z=this._createWrapper(R,X,b,a,d);if(R==A.config.win&&X=="load"){if(YUI.Env.windowLoaded){T=true;}}if(a){W.pop();}Q=W[3];V=Z._on(Y,Q,(W.length>4)?W.slice(4):null);if(T){Z.fire();}return V;},detach:function(X,Z,S,U){var W=A.Array(arguments,0,true),a,V,T,Y,Q,R;if(W[W.length-1]===E){a=true;}if(X&&X.detach){return X.detach();}if(typeof S=="string"){if(a){S=A.DOM.byId(S);}else{S=A.Selector.query(S);T=S.length;if(T<1){S=null;}else{if(T==1){S=S[0];}}}}if(!S){return false;}if(F(S)){Y=true;for(V=0,T=S.length;V<T;++V){W[2]=S[V];Y=(A.Event.detach.apply(A.Event,W)&&Y);}return Y;}if(!X||!Z||!Z.call){return this.purgeElement(S,false,X);}Q="event:"+A.stamp(S)+X;R=O[Q];if(R){return R.detach(Z);}else{return false;}},getEvent:function(T,R,Q){var S=T||window.event;return(Q)?S:new A.DOMEventFacade(S,R,O["event:"+A.stamp(R)+T.type]);},generateId:function(Q){var R=Q.id;if(!R){R=A.stamp(Q);Q.id=R;}return R;},_isValidCollection:F,_load:function(Q){if(!M){M=true;if(A.fire){A.fire(C);}A.Event._poll();}},_poll:function(){if(this.locked){return;}if(A.UA.ie&&!YUI.Env.DOMReady){this.startInterval();return;}this.locked=true;var V=!M,U,W,R,Q,T,S;if(!V){V=(N>0);}U=[];W=function(Z,a){var Y,X=a.override;if(a.compat){if(a.override){if(X===true){Y=a.obj;}else{Y=X;}}else{Y=Z;}a.fn.call(Y,a.obj);}else{Y=a.obj||A.one(Z);a.fn.apply(Y,(A.Lang.isArray(X))?X:[]);}};for(R=0,Q=L.length;R<Q;++R){T=L[R];if(T&&!T.checkReady){S=(T.compat)?A.DOM.byId(T.id):A.Selector.query(T.id,null,true);if(S){W(S,T);L[R]=null;}else{U.push(T);}}}for(R=0,Q=L.length;R<Q;++R){T=L[R];if(T&&T.checkReady){S=(T.compat)?A.DOM.byId(T.id):A.Selector.query(T.id,null,true);if(S){if(M||(S.get&&S.get("nextSibling"))||S.nextSibling){W(S,T);L[R]=null;}}else{U.push(T);}}}N=(U.length===0)?0:N-1;if(V){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return;},purgeElement:function(W,X,V){var S=(A.Lang.isString(W))?A.Selector.query(W,null,true):W,R=this.getListeners(S,V),T,Q,U;if(R){for(T=0,Q=R.length;T<Q;++T){U=R[T];U.detachAll();D(U.el,U.type,U.fn,U.capture);delete O[U.key];delete P[U.domkey][U.key];}}if(X&&S&&S.childNodes){for(T=0,Q=S.childNodes.length;T<Q;++T){this.purgeElement(S.childNodes[T],X,V);}}},getListeners:function(U,T){var V=A.stamp(U,true),Q=P[V],S=[],R=(T)?"event:"+V+T:null;if(!Q){return null;}if(R){if(Q[R]){S.push(Q[R]);}R+="native";if(Q[R]){S.push(Q[R]);}}else{A.each(Q,function(X,W){S.push(X);});}return(S.length)?S:null;},_unload:function(Q){A.each(O,function(S,R){S.detachAll();D(S.el,S.type,S.fn,S.capture);delete O[R];delete P[S.domkey][R];});},nativeAdd:J,nativeRemove:D};}();A.Event=I;if(A.config.injected||YUI.Env.windowLoaded){G();}else{J(window,"load",G);}if(A.UA.ie){A.on(C,I._poll,I,true);}A.on("unload",B);I.Custom=A.CustomEvent;I.Subscriber=A.Subscriber;I.Target=A.EventTarget;I.Handle=A.EventHandle;I.Facade=A.EventFacade;I._poll();})();A.Env.evt.plugins.available={on:function(D,C,F,E){var B=arguments.length>4?A.Array(arguments,4,true):[];return A.Event.onAvailable.call(A.Event,F,C,E,B);}};A.Env.evt.plugins.contentready={on:function(D,C,F,E){var B=arguments.length>4?A.Array(arguments,4,true):[];return A.Event.onContentReady.call(A.Event,F,C,E,B);}};},"3.0.0",{requires:["event-custom-base"]});
YUI.add("pluginhost",function(C){var A=C.Lang;function B(){this._plugins={};}B.prototype={plug:function(G,D){if(G){if(A.isFunction(G)){this._plug(G,D);}else{if(A.isArray(G)){for(var E=0,F=G.length;E<F;E++){this.plug(G[E]);}}else{this._plug(G.fn,G.cfg);}}}return this;},unplug:function(E){if(E){this._unplug(E);}else{var D;for(D in this._plugins){if(this._plugins.hasOwnProperty(D)){this._unplug(D);}}}return this;},hasPlugin:function(D){return(this._plugins[D]&&this[D]);},_initPlugins:function(E){this._plugins=this._plugins||{};var G=(this._getClasses)?this._getClasses():[this.constructor],D=[],H={},F,I,K,L,J;for(I=G.length-1;I>=0;I--){F=G[I];L=F._UNPLUG;if(L){C.mix(H,L,true);}K=F._PLUG;if(K){C.mix(D,K,true);}}for(J in D){if(D.hasOwnProperty(J)){if(!H[J]){this.plug(D[J]);}}}if(E&&E.plugins){this.plug(E.plugins);}},_destroyPlugins:function(){this._unplug();},_plug:function(F,D){if(F&&F.NS){var E=F.NS;D=D||{};D.host=this;if(this.hasPlugin(E)){this[E].setAttrs(D);}else{this[E]=new F(D);this._plugins[E]=F;}}},_unplug:function(F){var E=F,D=this._plugins;if(A.isFunction(F)){E=F.NS;if(E&&(!D[E]||D[E]!==F)){E=null;}}if(E){if(this[E]){this[E].destroy();delete this[E];}if(D[E]){delete D[E];}}}};B.plug=function(E,I,G){var J,H,D,F;if(E!==C.Base){E._PLUG=E._PLUG||{};if(!A.isArray(I)){if(G){I={fn:I,cfg:G};}I=[I];}for(H=0,D=I.length;H<D;H++){J=I[H];F=J.NAME||J.fn.NAME;E._PLUG[F]=J;}}};B.unplug=function(E,H){var I,G,D,F;if(E!==C.Base){E._UNPLUG=E._UNPLUG||{};if(!A.isArray(H)){H=[H];}for(G=0,D=H.length;G<D;G++){I=H[G];F=I.NAME;if(!E._PLUG[F]){E._UNPLUG[F]=I;}else{delete E._PLUG[F];}}}};C.namespace("Plugin").Host=B;},"3.0.0",{requires:["yui-base"]});
YUI.add("node-base",function(C){var G=".",E="nodeName",I="nodeType",B="ownerDocument",H="tagName",D="_yuid",F=function(L){var K=L[D];if(K&&F._instances[K]&&F._instances[K]._node!==L){L[D]=null;}K=C.stamp(L);if(!K){K=C.guid();}this[D]=K;this._node=L;F._instances[K]=this;this._stateProxy=L;if(this._initPlugins){this._initPlugins();}},J=function(L){var K=null;if(L){K=(typeof L==="string")?function(M){return C.Selector.test(M,L);}:function(M){return L(F.get(M));};}return K;};F.NAME="Node";F.re_aria=/^(?:role$|aria-)/;F.DOM_EVENTS={abort:true,beforeunload:true,blur:true,change:true,click:true,close:true,command:true,contextmenu:true,drag:true,dragstart:true,dragenter:true,dragover:true,dragleave:true,dragend:true,drop:true,dblclick:true,error:true,focus:true,keydown:true,keypress:true,keyup:true,load:true,message:true,mousedown:true,mousemove:true,mouseout:true,mouseover:true,mouseup:true,mousemultiwheel:true,mousewheel:true,submit:true,mouseenter:true,mouseleave:true,scroll:true,reset:true,resize:true,select:true,textInput:true,unload:true};C.mix(F.DOM_EVENTS,C.Env.evt.plugins);F._instances={};F.getDOMNode=function(K){if(K){return(K.nodeType)?K:K._node||null;}return null;};F.scrubVal=function(L,K){if(K&&L){if(typeof L==="object"||typeof L==="function"){if(I in L||C.DOM.isWindow(L)){L=F.get(L);}else{if((L.item&&!L._nodes)||(L[0]&&L[0][I])){L=C.all(L);}}}}else{if(L===undefined){L=K;}}return L;};F.addMethod=function(K,M,L){if(K&&M&&typeof M==="function"){F.prototype[K]=function(){L=L||this;var O=C.Array(arguments),N;if(O[0]&&O[0]instanceof F){O[0]=O[0]._node;}if(O[1]&&O[1]instanceof F){O[1]=O[1]._node;}O.unshift(this._node);N=F.scrubVal(M.apply(L,O),this);return N;};}else{}};F.importMethod=function(M,K,L){if(typeof K==="string"){L=L||K;F.addMethod(L,M[K],M);}else{C.each(K,function(N){F.importMethod(M,N);});}};F.one=function(N){var K=null,M,L;if(N){if(typeof N==="string"){if(N.indexOf("doc")===0){N=C.config.doc;}else{if(N.indexOf("win")===0){N=C.config.win;}else{N=C.Selector.query(N,null,true);}}if(!N){return null;}}else{if(N instanceof F){return N;}}L=N._yuid;K=F._instances[L];M=K?K._node:null;if(!K||(M&&N!==M)){K=new F(N);}}return K;};F.get=function(){return F.one.apply(F,arguments);};F.create=function(){return F.get(C.DOM.create.apply(C.DOM,arguments));};F.ATTRS={text:{getter:function(){return C.DOM.getText(this._node);},setter:function(K){C.DOM.setText(this._node,K);return K;}},"options":{getter:function(){return this._node.getElementsByTagName("option");}},"elements":{getter:function(){return C.all(this._node.elements);}},"children":{getter:function(){var N=this._node,M=N.children,O,L,K;if(!M){O=N.childNodes;M=[];for(L=0,K=O.length;L<K;++L){if(O[L][H]){M[M.length]=O[L];}}}return C.all(M);}},value:{getter:function(){return C.DOM.getValue(this._node);},setter:function(K){C.DOM.setValue(this._node,K);return K;}},data:{getter:function(){return this._data;},setter:function(K){this._data=K;return K;}}};F.DEFAULT_SETTER=function(K,M){var L=this._stateProxy,N;if(K.indexOf(G)>-1){N=K;K=K.split(G);C.Object.setValue(L,K,M);}else{if(L[K]!==undefined){L[K]=M;}}return M;};F.DEFAULT_GETTER=function(K){var L=this._stateProxy,M;if(K.indexOf&&K.indexOf(G)>-1){M=C.Object.getValue(L,K.split(G));}else{if(L[K]!==undefined){M=L[K];}}return M;};C.augment(F,C.Event.Target);C.mix(F.prototype,{toString:function(){var M="",L=this[D]+": not bound to a node",K=this._node;if(K){M+=K[E];if(K.id){M+="#"+K.id;}if(K.className){M+="."+K.className.replace(" ",".");}M+=" "+this[D];}return M||L;},get:function(K){var L;if(this._getAttr){L=this._getAttr(K);}else{L=this._get(K);}if(L){L=C.Node.scrubVal(L,this);}return L;},_get:function(K){var L=F.ATTRS[K],M;if(L&&L.getter){M=L.getter.call(this);}else{if(F.re_aria.test(K)){M=this._node.getAttribute(K,2);}else{M=F.DEFAULT_GETTER.apply(this,arguments);}}return M;},set:function(K,M){var L=F.ATTRS[K];if(this._setAttr){this._setAttr.apply(this,arguments);}else{if(L&&L.setter){L.setter.call(this,M);}else{if(F.re_aria.test(K)){this._node.setAttribute(K,M);}else{F.DEFAULT_SETTER.apply(this,arguments);}}}return this;},setAttrs:function(K){if(this._setAttrs){this._setAttrs(K);}else{C.Object.each(K,function(L,M){this.set(M,L);},this);}return this;},getAttrs:function(L){var K={};if(this._getAttrs){this._getAttrs(L);}else{C.Array.each(L,function(M,N){K[M]=this.get(M);},this);}return K;},create:F.create,compareTo:function(K){var L=this._node;if(K instanceof C.Node){K=K._node;}return L===K;},inDoc:function(L){var K=this._node;L=(L)?L._node||L:K[B];if(L.documentElement){return C.DOM.contains(L.documentElement,K);}},getById:function(M){var L=this._node,K=C.DOM.byId(M,L[B]);if(K&&C.DOM.contains(L,K)){K=C.one(K);}else{K=null;}return K;},ancestor:function(K){return F.get(C.DOM.elementByAxis(this._node,"parentNode",J(K)));},previous:function(L,K){return F.get(C.DOM.elementByAxis(this._node,"previousSibling",J(L),K));},next:function(M,L,K){return F.get(C.DOM.elementByAxis(this._node,"nextSibling",J(L),K));},one:function(K){return C.one(C.Selector.query(K,this._node,true));},query:function(K){return this.one(K);},all:function(K){var L=C.all(C.Selector.query(K,this._node));L._query=K;return L;},queryAll:function(K){return this.all(K);},test:function(K){return C.Selector.test(this._node,K);},remove:function(K){var L=this._node;L.parentNode.removeChild(L);if(K){this.destroy(true);}return this;},replace:function(K){var L=this._node;L.parentNode.replaceChild(K,L);return this;},purge:function(L,K){C.Event.purgeElement(this._node,L,K);},destroy:function(K){delete F._instances[this[D]];if(K){this.purge(true);}if(this.unplug){this.unplug();}this._node._yuid=null;this._node=null;this._stateProxy=null;},invoke:function(R,L,K,Q,P,O){var N=this._node,M;if(L&&L instanceof C.Node){L=L._node;}if(K&&K instanceof C.Node){K=K._node;}M=N[R](L,K,Q,P,O);return C.Node.scrubVal(M,this);},each:function(L,K){K=K||this;return L.call(K,this);},item:function(K){return this;},size:function(){return this._node?1:0;},insert:function(M,K){var L=this._node;if(M){if(typeof K==="number"){K=this._node.childNodes[K];}if(typeof M!=="string"){if(M._node){M=M._node;}else{if(M._nodes||(!M.nodeType&&M.length)){C.each(M._nodes,function(N){C.DOM.addHTML(L,N,K);});return this;}}}C.DOM.addHTML(L,M,K);}return this;},prepend:function(K){return this.insert(K,0);},append:function(K){return this.insert(K,null);},setContent:function(K){C.DOM.addHTML(this._node,K,"replace");return this;},hasMethod:function(L){var K=this._node;return(K&&(typeof K==="function"));}},true);C.Node=F;C.get=C.Node.get;C.one=C.Node.one;var A=function(K){if(typeof K==="string"){this._query=K;K=C.Selector.query(K);}else{K=C.Array(K,0,true);}A._instances[C.stamp(this)]=this;this._nodes=K;};A.NAME="NodeList";A.getDOMNodes=function(K){return K._nodes;};A._instances=[];A.each=function(K,N,M){var L=K._nodes;if(L&&L.length){C.Array.each(L,N,M||K);}else{}};A.addMethod=function(K,M,L){if(K&&M){A.prototype[K]=function(){var O=[],N=arguments;C.Array.each(this._nodes,function(T){var S="_yuid",Q=C.Node._instances[T[S]],R,P;if(!Q){Q=A._getTempNode(T);}R=L||Q;P=M.apply(R,N);if(P!==undefined&&P!==Q){O[O.length]=P;}});return O.length?O:this;};}else{}};A.importMethod=function(M,K,L){if(typeof K==="string"){L=L||K;A.addMethod(K,M[K]);}else{C.each(K,function(N){A.importMethod(M,N);});}};A._getTempNode=function(L){var K=A._tempNode;if(!K){K=C.Node.create("<div></div>");A._tempNode=K;}K._node=L;K._stateProxy=L;return K;};C.mix(A.prototype,{item:function(K){return C.one((this._nodes||[])[K]);},each:function(M,L){var K=this;C.Array.each(this._nodes,function(O,N){O=C.one(O);return M.call(L||O,O,N,K);});return K;},batch:function(L,K){var M=this;C.Array.each(this._nodes,function(P,O){var N=C.Node._instances[P[D]];if(!N){N=A._getTempNode(P);}return L.call(K||N,N,O,M);});return M;},some:function(M,L){var K=this;return C.Array.some(this._nodes,function(O,N){O=C.one(O);L=L||O;return M.call(L,O,N,K);});},toFrag:function(){return C.one(C.DOM._nl2frag(this._nodes));},indexOf:function(K){return C.Array.indexOf(this._nodes,C.Node.getDOMNode(K));},filter:function(K){return C.all(C.Selector.filter(this._nodes,K));},modulus:function(M,L){L=L||0;var K=[];A.each(this,function(O,N){if(N%M===L){K.push(O);}});return C.all(K);},odd:function(){return this.modulus(2,1);},even:function(){return this.modulus(2);},destructor:function(){delete A._instances[this[D]];},refresh:function(){var L,K=this._nodes;if(this._query){if(K&&K[0]&&K[0].ownerDocument){L=K[0].ownerDocument;}this._nodes=C.Selector.query(this._query,L||C.config.doc);}return this;},on:function(N,M,L){var K=C.Array(arguments,0,true);K.splice(2,0,this._nodes);K[3]=L||this;return C.on.apply(C,K);},after:function(N,M,L){var K=C.Array(arguments,0,true);K.splice(2,0,this._nodes);K[3]=L||this;return C.after.apply(C,K);},size:function(){return this._nodes.length;},toString:function(){var N="",M=this[D]+": not bound to any nodes",K=this._nodes,L;if(K&&K[0]){L=K[0];N+=L[E];if(L.id){N+="#"+L.id;}if(L.className){N+="."+L.className.replace(" ",".");}if(K.length>1){N+="...["+K.length+" items]";}}return N||M;}},true);A.importMethod(C.Node.prototype,["append","detach","detachAll","insert","prepend","remove","set","setContent"]);A.prototype.get=function(L){var O=[],N=this._nodes,M=false,P=A._getTempNode,K,Q;if(N[0]){K=C.Node._instances[N[0]._yuid]||P(N[0]);Q=K._get(L);if(Q&&Q.nodeType){M=true;}}C.Array.each(N,function(R){K=C.Node._instances[R._yuid];if(!K){K=P(R);}Q=K._get(L);if(!M){Q=C.Node.scrubVal(Q,K);}O.push(Q);});return(M)?C.all(O):O;};C.NodeList=A;C.all=function(K){return new A(K);};C.Node.all=C.all;C.Array.each(["replaceChild","appendChild","insertBefore","removeChild","hasChildNodes","cloneNode","hasAttribute","removeAttribute","scrollIntoView","getElementsByTagName","focus","blur","submit","reset","select"],function(K){C.Node.prototype[K]=function(O,M,L){var N=this.invoke(K,O,M,L);return N;};});F.importMethod(C.DOM,["contains","setAttribute","getAttribute"]);C.NodeList.importMethod(C.Node.prototype,["getAttribute","setAttribute"]);(function(L){var K=["hasClass","addClass","removeClass","replaceClass","toggleClass"];L.Node.importMethod(L.DOM,K);L.NodeList.importMethod(L.Node.prototype,K);})(C);if(!document.documentElement.hasAttribute){C.Node.prototype.hasAttribute=function(K){return C.DOM.getAttribute(this._node,K)!=="";};}C.Node.ATTRS.type={setter:function(L){if(L==="hidden"){try{this._node.type="hidden";}catch(K){this.setStyle("display","none");this._inputType="hidden";}}else{try{this._node.type=L;}catch(K){}}return L;},getter:function(){return this._inputType||this._node.type;},_bypassProxy:true};},"3.0.0",{requires:["dom-base","selector-css2","event-base"]});YUI.add("node-style",function(A){(function(C){var B=["getStyle","getComputedStyle","setStyle","setStyles"];C.Node.importMethod(C.DOM,B);C.NodeList.importMethod(C.Node.prototype,B);})(A);},"3.0.0",{requires:["dom-style","node-base"]});YUI.add("node-screen",function(A){A.each(["winWidth","winHeight","docWidth","docHeight","docScrollX","docScrollY"],function(B){A.Node.ATTRS[B]={getter:function(){var C=Array.prototype.slice.call(arguments);C.unshift(A.Node.getDOMNode(this));return A.DOM[B].apply(this,C);}};});A.Node.ATTRS.scrollLeft={getter:function(){var B=A.Node.getDOMNode(this);return("scrollLeft"in B)?B.scrollLeft:A.DOM.docScrollX(B);},setter:function(C){var B=A.Node.getDOMNode(this);if(B){if("scrollLeft"in B){B.scrollLeft=C;}else{if(B.document||B.nodeType===9){A.DOM._getWin(B).scrollTo(C,A.DOM.docScrollY(B));}}}else{}}};A.Node.ATTRS.scrollTop={getter:function(){var B=A.Node.getDOMNode(this);return("scrollTop"in B)?B.scrollTop:A.DOM.docScrollY(B);},setter:function(C){var B=A.Node.getDOMNode(this);if(B){if("scrollTop"in B){B.scrollTop=C;}else{if(B.document||B.nodeType===9){A.DOM._getWin(B).scrollTo(A.DOM.docScrollX(B),C);}}}else{}}};A.Node.importMethod(A.DOM,["getXY","setXY","getX","setX","getY","setY"]);A.Node.ATTRS.region={getter:function(){var B=A.Node.getDOMNode(this);if(B&&!B.tagName){if(B.nodeType===9){B=B.documentElement;}else{if(B.alert){B=B.document.documentElement;}}}return A.DOM.region(B);}};A.Node.ATTRS.viewportRegion={getter:function(){return A.DOM.viewportRegion(A.Node.getDOMNode(this));}};A.Node.importMethod(A.DOM,"inViewportRegion");A.Node.prototype.intersect=function(B,D){var C=A.Node.getDOMNode(this);if(B instanceof A.Node){B=A.Node.getDOMNode(B);}return A.DOM.intersect(C,B,D);};A.Node.prototype.inRegion=function(B,D,E){var C=A.Node.getDOMNode(this);if(B instanceof A.Node){B=A.Node.getDOMNode(B);}return A.DOM.inRegion(C,B,D,E);};},"3.0.0",{requires:["dom-screen"]});YUI.add("node-pluginhost",function(A){A.Node.plug=function(){var B=A.Array(arguments);B.unshift(A.Node);A.Plugin.Host.plug.apply(A.Base,B);return A.Node;};A.Node.unplug=function(){var B=A.Array(arguments);B.unshift(A.Node);A.Plugin.Host.unplug.apply(A.Base,B);return A.Node;};A.mix(A.Node,A.Plugin.Host,false,null,1);A.NodeList.prototype.plug=function(){var B=arguments;A.NodeList.each(this,function(C){A.Node.prototype.plug.apply(A.one(C),B);});};A.NodeList.prototype.unplug=function(){var B=arguments;A.NodeList.each(this,function(C){A.Node.prototype.unplug.apply(A.one(C),B);});};},"3.0.0",{requires:["node-base","pluginhost"]});YUI.add("node-event-delegate",function(A){A.Node.prototype.delegate=function(F,E,B){var D=Array.prototype.slice.call(arguments,3),C=[F,E,A.Node.getDOMNode(this),B];C=C.concat(D);return A.delegate.apply(A,C);};},"3.0.0",{requires:["node-base","event-delegate","pluginhost"]});YUI.add("node",function(A){},"3.0.0",{skinnable:false,use:["node-base","node-style","node-screen","node-pluginhost","node-event-delegate"],requires:["dom","event-base","event-delegate","pluginhost"]});
YUI.add("event-delegate",function(B){var I=B.Event,F=B.Lang,E={},A={mouseenter:"mouseover",mouseleave:"mouseout"},H=function(K){try{if(K&&3==K.nodeType){return K.parentNode;}}catch(J){}return K;},D=function(K,P,M){var Q=H((P.target||P.srcElement)),N=E[K],T,O,L,S,R;var J=function(X,U,V){var W;if(!X||X===V){W=false;}else{W=B.Selector.test(X,U)?X:J(X.parentNode,U,V);}return W;};for(T in N){if(N.hasOwnProperty(T)){O=N[T];S=N.fn;L=null;if(B.Selector.test(Q,T,M)){L=Q;}else{if(B.Selector.test(Q,((T.replace(/,/gi," *,"))+" *"),M)){L=J(Q,T,M);}}if(L){if(!R){R=new B.DOMEventFacade(P,M);R.container=R.currentTarget;}R.currentTarget=B.Node.get(L);B.publish(O,{contextFn:function(){return R.currentTarget;}});if(S){S(R,O);}else{B.fire(O,R);}}}}},G=function(M,L,K){var O={focus:I._attachFocus,blur:I._attachBlur},N=O[M],J=[M,function(P){D(L,(P||window.event),K);},K];if(N){return N(J,{capture:true,facade:false});}else{return I._attach(J,{facade:false});}},C=B.cached(function(J){return J.replace(/[|,:]/g,"~");});B.Env.evt.plugins.delegate={on:function(O,N,M,J,K){var L=B.Array(arguments,0,true);L.splice(3,1);L[0]=J;return B.delegate.apply(B,L);}};I.delegate=function(R,U,K,W){if(!W){return false;}var O=B.Array(arguments,0,true),M=K,N;if(F.isString(K)){M=B.Selector.query(K,null,true);if(!M){N=I.onAvailable(K,function(){N.handle=I.delegate.apply(I,O);},I,true,false);return N;}}M=B.Node.getDOMNode(M);var S=B.stamp(M),L="delegate:"+S+R+C(W),J=R+S,Q=E[J],T,V,P;if(!Q){Q={};if(A[R]){if(!I._fireMouseEnter){return false;}R=A[R];Q.fn=I._fireMouseEnter;}T=G(R,J,M);B.after(function(X){if(T.sub==X){delete E[J];B.detachAll(L);}},T.evt,"_delete");Q.handle=T;E[J]=Q;}P=Q.listeners;Q.listeners=P?(P+1):1;Q[W]=L;O[0]=L;O.splice(2,2);V=B.on.apply(B,O);B.after(function(){Q.listeners=(Q.listeners-1);if(Q.listeners===0){Q.handle.detach();}},V,"detach");return V;};B.delegate=I.delegate;},"3.0.0",{requires:["node-base"]});
YUI.add("cookie",function(C){var K=C.Lang,I=C.Object,G=null,D=K.isString,P=K.isObject,F=K.isUndefined,E=K.isFunction,H=encodeURIComponent,B=decodeURIComponent,N=C.config.doc;function J(L){throw new TypeError(L);}function M(L){if(!D(L)||L===""){J("Cookie name must be a non-empty string.");}}function A(L){if(!D(L)||L===""){J("Subcookie name must be a non-empty string.");}}C.Cookie={_createCookieString:function(Q,T,R,O){O=O||{};var V=H(Q)+"="+(R?H(T):T),L=O.expires,U=O.path,S=O.domain;if(P(O)){if(L instanceof Date){V+="; expires="+L.toUTCString();}if(D(U)&&U!==""){V+="; path="+U;}if(D(S)&&S!==""){V+="; domain="+S;}if(O.secure===true){V+="; secure";}}return V;},_createCookieHashString:function(L){if(!P(L)){J("Cookie._createCookieHashString(): Argument must be an object.");}var O=[];I.each(L,function(R,Q){if(!E(R)&&!F(R)){O.push(H(Q)+"="+H(String(R)));}});return O.join("&");},_parseCookieHash:function(S){var R=S.split("&"),T=G,Q={};if(S.length){for(var O=0,L=R.length;O<L;O++){T=R[O].split("=");Q[B(T[0])]=B(T[1]);}}return Q;},_parseCookieString:function(W,Y){var X={};if(D(W)&&W.length>0){var L=(Y===false?function(Z){return Z;}:B),U=W.split(/;\s/g),V=G,O=G,R=G;for(var Q=0,S=U.length;Q<S;Q++){R=U[Q].match(/([^=]+)=/i);if(R instanceof Array){try{V=B(R[1]);O=L(U[Q].substring(R[1].length+1));}catch(T){}}else{V=B(U[Q]);O="";}X[V]=O;}}return X;},exists:function(L){M(L);var O=this._parseCookieString(N.cookie,true);return O.hasOwnProperty(L);},get:function(O,L){M(O);var S,Q,R;if(E(L)){R=L;L={};}else{if(P(L)){R=L.converter;}else{L={};}}S=this._parseCookieString(N.cookie,!L.raw);Q=S[O];if(F(Q)){return G;}if(!E(R)){return Q;}else{return R(Q);}},getSub:function(L,Q,O){var R=this.getSubs(L);if(R!==G){A(Q);if(F(R[Q])){return G;}if(!E(O)){return R[Q];}else{return O(R[Q]);}}else{return G;}},getSubs:function(L){M(L);var O=this._parseCookieString(N.cookie,false);if(D(O[L])){return this._parseCookieHash(O[L]);}return G;},remove:function(O,L){M(O);L=C.merge(L||{},{expires:new Date(0)});return this.set(O,"",L);},removeSub:function(O,S,L){M(O);A(S);L=L||{};var R=this.getSubs(O);if(P(R)&&R.hasOwnProperty(S)){delete R[S];if(!L.removeIfEmpty){return this.setSubs(O,R,L);}else{for(var Q in R){if(R.hasOwnProperty(Q)&&!E(R[Q])&&!F(R[Q])){return this.setSubs(O,R,L);}}return this.remove(O,L);}}else{return"";}},set:function(O,Q,L){M(O);if(F(Q)){J("Cookie.set(): Value cannot be undefined.");}L=L||{};var R=this._createCookieString(O,Q,!L.raw,L);N.cookie=R;return R;},setSub:function(O,R,Q,L){M(O);A(R);if(F(Q)){J("Cookie.setSub(): Subcookie value cannot be undefined.");}var S=this.getSubs(O);if(!P(S)){S={};}S[R]=Q;return this.setSubs(O,S,L);},setSubs:function(O,Q,L){M(O);if(!P(Q)){J("Cookie.setSubs(): Cookie value must be an object.");}var R=this._createCookieString(O,this._createCookieHashString(Q),false,L);N.cookie=R;return R;}};},"3.0.0",{requires:["yui-base"]});
YUI.add("attribute-base",function(C){C.State=function(){this.data={};};C.State.prototype={add:function(O,Y,e){var c=this.data;c[Y]=c[Y]||{};c[Y][O]=e;},addAll:function(O,c){var Y;for(Y in c){if(c.hasOwnProperty(Y)){this.add(O,Y,c[Y]);}}},remove:function(O,Y){var c=this.data;if(c[Y]&&(O in c[Y])){delete c[Y][O];}},removeAll:function(O,c){var Y=this.data;C.each(c||Y,function(e,d){if(C.Lang.isString(d)){this.remove(O,d);}else{this.remove(O,e);}},this);},get:function(O,Y){var c=this.data;return(c[Y]&&O in c[Y])?c[Y][O]:undefined;},getAll:function(O){var c=this.data,Y;C.each(c,function(e,d){if(O in c[d]){Y=Y||{};Y[d]=e[O];}},this);return Y;}};var K=C.Object,F=C.Lang,L=C.EventTarget,W=".",U="Change",N="getter",M="setter",P="readOnly",X="writeOnce",b="validator",H="value",Q="valueFn",E="broadcast",S="lazyAdd",J="_bypassProxy",a="added",B="initializing",I="initValue",V="published",T="defaultValue",A="lazy",R="isLazyAdd",G,Z={};Z[P]=1;Z[X]=1;Z[N]=1;Z[E]=1;function D(){var c=this,O=this.constructor.ATTRS,Y=C.Base;c._ATTR_E_FACADE={};L.call(c,{emitFacade:true});c._conf=c._state=new C.State();c._stateProxy=c._stateProxy||null;c._requireAddAttr=c._requireAddAttr||false;if(O&&!(Y&&c instanceof Y)){c.addAttrs(this._protectAttrs(O));}}D.INVALID_VALUE={};G=D.INVALID_VALUE;D._ATTR_CFG=[M,N,b,H,Q,X,P,S,E,J];D.prototype={addAttr:function(Y,O,d){var e=this,g=e._state,f,c;d=(S in O)?O[S]:d;if(d&&!e.attrAdded(Y)){g.add(Y,A,O||{});g.add(Y,a,true);}else{if(!e.attrAdded(Y)||g.get(Y,R)){O=O||{};c=(H in O);if(c){f=O.value;delete O.value;}O.added=true;O.initializing=true;g.addAll(Y,O);if(c){e.set(Y,f);}g.remove(Y,B);}}return e;},attrAdded:function(O){return!!this._state.get(O,a);},modifyAttr:function(Y,O){var c=this,e,d;if(c.attrAdded(Y)){if(c._isLazyAttr(Y)){c._addLazyAttr(Y);}d=c._state;for(e in O){if(Z[e]&&O.hasOwnProperty(e)){d.add(Y,e,O[e]);if(e===E){d.remove(Y,V);}}}}},removeAttr:function(O){this._state.removeAll(O);},get:function(O){return this._getAttr(O);},_isLazyAttr:function(O){return this._state.get(O,A);},_addLazyAttr:function(Y){var c=this._state,O=c.get(Y,A);c.add(Y,R,true);c.remove(Y,A);this.addAttr(Y,O);},set:function(O,c,Y){return this._setAttr(O,c,Y);},reset:function(O){var c=this,Y;if(O){if(c._isLazyAttr(O)){c._addLazyAttr(O);}c.set(O,c._state.get(O,I));}else{Y=c._state.data.added;C.each(Y,function(d,e){c.reset(e);},c);}return c;},_set:function(O,c,Y){return this._setAttr(O,c,Y,true);},_getAttr:function(c){var d=this,h=c,e=d._state,f,O,g,Y;if(c.indexOf(W)!==-1){f=c.split(W);c=f.shift();}if(d._tCfgs&&d._tCfgs[c]){Y={};Y[c]=d._tCfgs[c];delete d._tCfgs[c];d._addAttrs(Y,d._tVals);}if(d._isLazyAttr(c)){d._addLazyAttr(c);}g=d._getStateVal(c);O=e.get(c,N);g=(O)?O.call(d,g,h):g;g=(f)?K.getValue(g,f):g;return g;},_setAttr:function(c,f,O,d){var i=true,Y=this._state,g=this._stateProxy,j=Y.data,h,k,l,e;if(c.indexOf(W)!==-1){k=c;l=c.split(W);c=l.shift();}if(this._isLazyAttr(c)){this._addLazyAttr(c);}h=(!j.value||!(c in j.value));if(g&&c in g&&!this._state.get(c,J)){h=false;}if(this._requireAddAttr&&!this.attrAdded(c)){}else{if(!h&&!d){if(Y.get(c,X)){i=false;}if(Y.get(c,P)){i=false;}}if(i){if(!h){e=this.get(c);}if(l){f=K.setValue(C.clone(e),l,f);if(f===undefined){i=false;}}if(i){if(Y.get(c,B)){this._setAttrVal(c,k,e,f);}else{this._fireAttrChange(c,k,e,f,O);}}}}return this;},_fireAttrChange:function(g,f,d,c,O){var i=this,e=g+U,Y=i._state,h;if(!Y.get(g,V)){i.publish(e,{queuable:false,defaultFn:i._defAttrChangeFn,silent:true,broadcast:Y.get(g,E)});Y.add(g,V,true);}h=(O)?C.merge(O):i._ATTR_E_FACADE;h.type=e;h.attrName=g;h.subAttrName=f;h.prevVal=d;h.newVal=c;i.fire(h);},_defAttrChangeFn:function(O){if(!this._setAttrVal(O.attrName,O.subAttrName,O.prevVal,O.newVal)){O.stopImmediatePropagation();}else{O.newVal=this._getStateVal(O.attrName);}},_getStateVal:function(O){var Y=this._stateProxy;return Y&&(O in Y)&&!this._state.get(O,J)?Y[O]:this._state.get(O,H);},_setStateVal:function(O,c){var Y=this._stateProxy;if(Y&&(O in Y)&&!this._state.get(O,J)){Y[O]=c;}else{this._state.add(O,H,c);}},_setAttrVal:function(l,k,h,f){var n=this,i=true,c=n._state,d=c.get(l,b),g=c.get(l,M),j=c.get(l,B),m=this._getStateVal(l),Y=k||l,e,O;if(d){O=d.call(n,f,Y);if(!O&&j){f=c.get(l,T);O=true;}}if(!d||O){if(g){e=g.call(n,f,Y);if(e===G){i=false;}else{if(e!==undefined){f=e;}}}if(i){if(!k&&(f===m)&&!F.isObject(f)){i=false;}else{if(c.get(l,I)===undefined){c.add(l,I,f);}n._setStateVal(l,f);}}}else{i=false;}return i;},setAttrs:function(O,Y){return this._setAttrs(O,Y);},_setAttrs:function(Y,c){for(var O in Y){if(Y.hasOwnProperty(O)){this.set(O,Y[O]);}}return this;},getAttrs:function(O){return this._getAttrs(O);},_getAttrs:function(d){var f=this,h={},e,Y,O,g,c=(d===true);d=(d&&!c)?d:K.keys(f._state.data.added);for(e=0,Y=d.length;e<Y;e++){O=d[e];g=f.get(O);if(!c||f._getStateVal(O)!=f._state.get(O,I)){h[O]=f.get(O);}}return h;},addAttrs:function(O,Y,c){var d=this;if(O){d._tCfgs=O;d._tVals=d._normAttrVals(Y);d._addAttrs(O,d._tVals,c);d._tCfgs=d._tVals=null;}return d;},_addAttrs:function(Y,c,d){var f=this,O,e,g;for(O in Y){if(Y.hasOwnProperty(O)){e=Y[O];e.defaultValue=e.value;g=f._getAttrInitVal(O,e,f._tVals);if(g!==undefined){e.value=g;}if(f._tCfgs[O]){delete f._tCfgs[O];}f.addAttr(O,e,d);}}},_protectAttrs:function(Y){if(Y){Y=C.merge(Y);for(var O in Y){if(Y.hasOwnProperty(O)){Y[O]=C.merge(Y[O]);}}}return Y;},_normAttrVals:function(O){return(O)?C.merge(O):null;},_getAttrInitVal:function(O,Y,c){var d=(!Y[P]&&c&&c.hasOwnProperty(O))?d=c[O]:(Y[Q])?Y[Q].call(this):Y[H];return d;}};C.mix(D,L,false,null,1);C.Attribute=D;},"3.0.0",{requires:["event-custom"]});YUI.add("attribute-complex",function(B){var A=B.Object,C=".";B.Attribute.Complex=function(){};B.Attribute.Complex.prototype={_normAttrVals:function(G){var I={},H={},J,D,F,E;if(G){for(E in G){if(G.hasOwnProperty(E)){if(E.indexOf(C)!==-1){J=E.split(C);D=J.shift();F=H[D]=H[D]||[];F[F.length]={path:J,value:G[E]};}else{I[E]=G[E];}}}return{simple:I,complex:H};}else{return null;}},_getAttrInitVal:function(K,I,M){var E=(I.valueFn)?I.valueFn.call(this):I.value,D,F,H,G,N,L,J;if(!I.readOnly&&M){D=M.simple;if(D&&D.hasOwnProperty(K)){E=D[K];}F=M.complex;if(F&&F.hasOwnProperty(K)){J=F[K];for(H=0,G=J.length;H<G;++H){N=J[H].path;L=J[H].value;A.setValue(E,N,L);}}}return E;}};B.mix(B.Attribute,B.Attribute.Complex,true,null,1);},"3.0.0",{requires:["attribute-base"]});YUI.add("attribute",function(A){},"3.0.0",{use:["attribute-base","attribute-complex"]});
YUI.add("base-base",function(B){var H=B.Object,J=B.Lang,I=".",F="destroy",P="init",N="initialized",G="destroyed",D="initializer",C=Object.prototype.constructor,K="deep",Q="shallow",M="destructor",A=B.Attribute;function E(){A.call(this);var L=B.Plugin&&B.Plugin.Host;if(this._initPlugins&&L){L.call(this);}if(this._lazyAddAttrs!==false){this._lazyAddAttrs=true;}this.init.apply(this,arguments);}E._ATTR_CFG=A._ATTR_CFG.concat("cloneDefaultValue");E.NAME="base";E.ATTRS={initialized:{readOnly:true,value:false},destroyed:{readOnly:true,value:false}};E.prototype={init:function(L){this._yuievt.config.prefix=this.name=this.constructor.NAME;this.publish(P,{queuable:false,defaultFn:this._defInitFn});if(L){if(L.on){this.on(L.on);}if(L.after){this.after(L.after);}}this.fire(P,{cfg:L});return this;},destroy:function(){this.publish(F,{queuable:false,defaultFn:this._defDestroyFn});this.fire(F);return this;},_defInitFn:function(L){this._initHierarchy(L.cfg);if(this._initPlugins){this._initPlugins(L.cfg);}this._set(N,true);},_defDestroyFn:function(L){this._destroyHierarchy();if(this._destroyPlugins){this._destroyPlugins();}this._set(G,true);},_getClasses:function(){if(!this._classes){this._initHierarchyData();}return this._classes;},_getAttrCfgs:function(){if(!this._attrs){this._initHierarchyData();}return this._attrs;},_filterAttrCfgs:function(T,O){var R=null,L,S=T.ATTRS;if(S){for(L in S){if(S.hasOwnProperty(L)&&O[L]){R=R||{};R[L]=O[L];delete O[L];}}}return R;},_initHierarchyData:function(){var R=this.constructor,O=[],L=[];while(R){O[O.length]=R;if(R.ATTRS){L[L.length]=R.ATTRS;}R=R.superclass?R.superclass.constructor:null;}this._classes=O;this._attrs=this._aggregateAttrs(L);},_aggregateAttrs:function(W){var T,X,S,L,Y,O,V,R=E._ATTR_CFG,U={};if(W){for(O=W.length-1;O>=0;--O){X=W[O];for(T in X){if(X.hasOwnProperty(T)){S=B.mix({},X[T],true,R);L=S.value;V=S.cloneDefaultValue;if(L){if((V===undefined&&(C===L.constructor||J.isArray(L)))||V===K||V===true){S.value=B.clone(L);}else{if(V===Q){S.value=B.merge(L);}}}Y=null;if(T.indexOf(I)!==-1){Y=T.split(I);T=Y.shift();}if(Y&&U[T]&&U[T].value){H.setValue(U[T].value,Y,L);}else{if(!Y){if(!U[T]){U[T]=S;}else{B.mix(U[T],S,true,R);}}}}}}}return U;},_initHierarchy:function(U){var R=this._lazyAddAttrs,V,W,X,S,O,T=this._getClasses(),L=this._getAttrCfgs();for(X=T.length-1;X>=0;X--){V=T[X];W=V.prototype;if(V._yuibuild&&V._yuibuild.exts&&!V._yuibuild.dynamic){for(S=0,O=V._yuibuild.exts.length;S<O;S++){V._yuibuild.exts[S].apply(this,arguments);}}this.addAttrs(this._filterAttrCfgs(V,L),U,R);if(W.hasOwnProperty(D)){W.initializer.apply(this,arguments);}}},_destroyHierarchy:function(){var T,O,S,L,R=this._getClasses();for(S=0,L=R.length;S<L;S++){T=R[S];O=T.prototype;if(O.hasOwnProperty(M)){O.destructor.apply(this,arguments);}}},toString:function(){return this.constructor.NAME+"["+B.stamp(this)+"]";}};B.mix(E,A,false,null,1);E.prototype.constructor=E;B.Base=E;E.prototype.constructor=E;},"3.0.0",{requires:["attribute-base"]});YUI.add("base-pluginhost",function(C){var A=C.Base,B=C.Plugin.Host;C.mix(A,B,false,null,1);A.plug=B.plug;A.unplug=B.unplug;},"3.0.0",{requires:["base-base","pluginhost"]});YUI.add("base-build",function(C){var B=C.Base,A=C.Lang;B._buildCfg={aggregates:["ATTRS","_PLUG","_UNPLUG"]};B.build=function(D,I,M,L){var O=B.build,E=O._getClass(I,L),K=O._getAggregates(I,L),G=E._yuibuild.dynamic,J,H,F,N;if(G){if(K){for(J=0,H=K.length;J<H;++J){F=K[J];if(I.hasOwnProperty(F)){E[F]=A.isArray(I[F])?[]:{};}}C.aggregate(E,I,true,K);}}for(J=0,H=M.length;J<H;J++){N=M[J];if(K){C.aggregate(E,N,true,K);}C.mix(E,N,true,null,1);E._yuibuild.exts.push(N);}E.prototype.hasImpl=O._hasImpl;if(G){E.NAME=D;E.prototype.constructor=E;}return E;};C.mix(B.build,{_template:function(D){function E(){E.superclass.constructor.apply(this,arguments);var H=E._yuibuild.exts,F=H.length,G;for(G=0;G<F;G++){H[G].apply(this,arguments);}return this;}C.extend(E,D);return E;},_hasImpl:function(G){var J=this._getClasses();for(var I=0,E=J.length;I<E;I++){var D=J[I];if(D._yuibuild){var H=D._yuibuild.exts,K=H.length,F;for(F=0;F<K;F++){if(H[F]===G){return true;}}}}return false;},_getClass:function(D,E){var F=(E&&false===E.dynamic)?false:true,G=(F)?B.build._template(D):D;G._yuibuild={id:null,exts:[],dynamic:F};return G;},_getAggregates:function(D,E){var F=[],H=(E&&E.aggregates),I=D,G;while(I&&I.prototype){G=I._buildCfg&&I._buildCfg.aggregates;if(G){F=F.concat(G);}I=I.superclass?I.superclass.constructor:null;}if(H){F=F.concat(H);}return F;}});},"3.0.0",{requires:["base-base"]});YUI.add("base",function(A){},"3.0.0",{use:["base-base","base-pluginhost","base-build"]});
YUI.add("anim-base",function(B){var C="running",N="startTime",L="elapsedTime",J="start",I="tween",M="end",D="node",K="paused",P="reverse",H="iterationCount",A=Number;var F={},O={},E;B.Anim=function(){B.Anim.superclass.constructor.apply(this,arguments);O[B.stamp(this)]=this;};B.Anim.NAME="anim";B.Anim.RE_DEFAULT_UNIT=/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i;B.Anim.DEFAULT_UNIT="px";B.Anim.DEFAULT_EASING=function(R,Q,T,S){return T*R/S+Q;};B.Anim.behaviors={left:{get:function(R,Q){return R._getOffset(Q);}}};B.Anim.behaviors.top=B.Anim.behaviors.left;B.Anim.DEFAULT_SETTER=function(U,R,X,W,Q,V,S,T){T=T||"";U._node.setStyle(R,S(Q,A(X),A(W)-A(X),V)+T);};B.Anim.DEFAULT_GETTER=function(Q,R){return Q._node.getComputedStyle(R);};B.Anim.ATTRS={node:{setter:function(Q){Q=B.get(Q);this._node=Q;if(!Q){}return Q;}},duration:{value:1},easing:{value:B.Anim.DEFAULT_EASING,setter:function(Q){if(typeof Q==="string"&&B.Easing){return B.Easing[Q];}}},from:{},to:{},startTime:{value:0,readOnly:true},elapsedTime:{value:0,readOnly:true},running:{getter:function(){return!!F[B.stamp(this)];},value:false,readOnly:true},iterations:{value:1},iterationCount:{value:0,readOnly:true},direction:{value:"normal"},paused:{readOnly:true,value:false},reverse:{value:false}};B.Anim.run=function(){for(var Q in O){if(O[Q].run){O[Q].run();}}};B.Anim.pause=function(){for(var Q in F){if(F[Q].pause){F[Q].pause();}}B.Anim._stopTimer();};B.Anim.stop=function(){for(var Q in F){if(F[Q].stop){F[Q].stop();}}B.Anim._stopTimer();};B.Anim._startTimer=function(){if(!E){E=setInterval(B.Anim._runFrame,1);}};B.Anim._stopTimer=function(){clearInterval(E);E=0;};B.Anim._runFrame=function(){var Q=true;for(var R in F){if(F[R]._runFrame){Q=false;F[R]._runFrame();}}if(Q){B.Anim._stopTimer();}};B.Anim.RE_UNITS=/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;var G={run:function(){if(!this.get(C)){this._start();}else{if(this.get(K)){this._resume();}}return this;},pause:function(){if(this.get(C)){this._pause();}return this;},stop:function(Q){if(this.get(C)||this.get(K)){this._end(Q);}return this;},_added:false,_start:function(){this._set(N,new Date()-this.get(L));this._actualFrames=0;if(!this.get(K)){this._initAnimAttr();}F[B.stamp(this)]=this;B.Anim._startTimer();this.fire(J);},_pause:function(){this._set(N,null);this._set(K,true);delete F[B.stamp(this)];this.fire("pause");},_resume:function(){this._set(K,false);F[B.stamp(this)]=this;this.fire("resume");},_end:function(Q){this._set(N,null);this._set(L,0);this._set(K,false);delete F[B.stamp(this)];this.fire(M,{elapsed:this.get(L)});},_runFrame:function(){var X=this._runtimeAttr,S=B.Anim.behaviors,Y=X.easing,Z=X.duration,a=new Date()-this.get(N),W=this.get(P),U=(a>=Z),Q=Z,R,T;if(W){a=Z-a;U=(a<=0);Q=0;}for(var V in X){if(X[V].to){R=X[V];T=(V in S&&"set"in S[V])?S[V].set:B.Anim.DEFAULT_SETTER;if(!U){T(this,V,R.from,R.to,a,Z,Y,R.unit);}else{T(this,V,R.from,R.to,Q,Z,Y,R.unit);}}}this._actualFrames+=1;this._set(L,a);this.fire(I);if(U){this._lastFrame();}},_lastFrame:function(){var Q=this.get("iterations"),R=this.get(H);R+=1;if(Q==="infinite"||R<Q){if(this.get("direction")==="alternate"){this.set(P,!this.get(P));}this.fire("iteration");}else{R=0;this._end();}this._set(N,new Date());this._set(H,R);},_initAnimAttr:function(){var X=this.get("from")||{},Y=this.get("to")||{},Q=this.get("duration")*1000,T=this.get(D),W=this.get("easing")||{},V={},R=B.Anim.behaviors,Z,S,U;B.each(Y,function(d,b){if(typeof d==="function"){d=d.call(this,T);}S=X[b];if(S===undefined){S=(b in R&&"get"in R[b])?R[b].get(this,b):B.Anim.DEFAULT_GETTER(this,b);}else{if(typeof S==="function"){S=S.call(this,T);}}var a=B.Anim.RE_UNITS.exec(S);var c=B.Anim.RE_UNITS.exec(d);S=a?a[1]:S;U=c?c[1]:d;Z=c?c[2]:a?a[2]:"";if(!Z&&B.Anim.RE_DEFAULT_UNIT.test(b)){Z=B.Anim.DEFAULT_UNIT;}if(!S||!U){B.error('invalid "from" or "to" for "'+b+'"',"Anim");return;}V[b]={from:S,to:U,unit:Z};V.duration=Q;V.easing=W;},this);this._runtimeAttr=V;},_getOffset:function(R){var T=this._node,U=T.getComputedStyle(R),S=(R==="left")?"getX":"getY",V=(R==="left")?"setX":"setY";if(U==="auto"){var Q=T.getStyle("position");if(Q==="absolute"||Q==="fixed"){U=T[S]();T[V](U);}else{U=0;}}return U;}};B.extend(B.Anim,B.Base,G);},"3.0.0",{requires:["base-base","node-style"]});YUI.add("anim-color",function(B){var A=Number;B.Anim.behaviors.color={set:function(F,D,I,H,C,G,E){I=B.Color.re_RGB.exec(B.Color.toRGB(I));H=B.Color.re_RGB.exec(B.Color.toRGB(H));if(!I||I.length<3||!H||H.length<3){B.error("invalid from or to passed to color behavior");}F._node.setStyle(D,"rgb("+[Math.floor(E(C,A(I[1]),A(H[1])-A(I[1]),G)),Math.floor(E(C,A(I[2]),A(H[2])-A(I[2]),G)),Math.floor(E(C,A(I[3]),A(H[3])-A(I[3]),G))].join(", ")+")");},get:function(D,C){var E=D._node.getComputedStyle(C);E=(E==="transparent")?"rgb(255, 255, 255)":E;return E;}};B.each(["backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],function(C,D){B.Anim.behaviors[C]=B.Anim.behaviors.color;});},"3.0.0",{requires:["anim-base"]});YUI.add("anim-curve",function(A){A.Anim.behaviors.curve={set:function(F,C,I,H,B,G,E){I=I.slice.call(I);H=H.slice.call(H);var D=E(B,0,100,G)/100;H.unshift(I);F._node.setXY(A.Anim.getBezier(H,D));},get:function(C,B){return C._node.getXY();}};A.Anim.getBezier=function(F,E){var G=F.length;var D=[];for(var C=0;C<G;++C){D[C]=[F[C][0],F[C][1]];}for(var B=1;B<G;++B){for(C=0;C<G-B;++C){D[C][0]=(1-E)*D[C][0]+E*D[parseInt(C+1,10)][0];D[C][1]=(1-E)*D[C][1]+E*D[parseInt(C+1,10)][1];}}return[D[0][0],D[0][1]];};},"3.0.0",{requires:["anim-xy"]});YUI.add("anim-easing",function(A){A.Easing={easeNone:function(C,B,E,D){return E*C/D+B;},easeIn:function(C,B,E,D){return E*(C/=D)*C+B;},easeOut:function(C,B,E,D){return-E*(C/=D)*(C-2)+B;},easeBoth:function(C,B,E,D){if((C/=D/2)<1){return E/2*C*C+B;}return-E/2*((--C)*(C-2)-1)+B;},easeInStrong:function(C,B,E,D){return E*(C/=D)*C*C*C+B;},easeOutStrong:function(C,B,E,D){return-E*((C=C/D-1)*C*C*C-1)+B;},easeBothStrong:function(C,B,E,D){if((C/=D/2)<1){return E/2*C*C*C*C+B;}return-E/2*((C-=2)*C*C*C-2)+B;},elasticIn:function(D,B,H,G,C,F){var E;if(D===0){return B;}if((D/=G)===1){return B+H;}if(!F){F=G*0.3;}if(!C||C<Math.abs(H)){C=H;E=F/4;}else{E=F/(2*Math.PI)*Math.asin(H/C);}return-(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+B;},elasticOut:function(D,B,H,G,C,F){var E;if(D===0){return B;}if((D/=G)===1){return B+H;}if(!F){F=G*0.3;}if(!C||C<Math.abs(H)){C=H;E=F/4;}else{E=F/(2*Math.PI)*Math.asin(H/C);}return C*Math.pow(2,-10*D)*Math.sin((D*G-E)*(2*Math.PI)/F)+H+B;},elasticBoth:function(D,B,H,G,C,F){var E;if(D===0){return B;}if((D/=G/2)===2){return B+H;}if(!F){F=G*(0.3*1.5);}if(!C||C<Math.abs(H)){C=H;E=F/4;}else{E=F/(2*Math.PI)*Math.asin(H/C);}if(D<1){return-0.5*(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+B;}return C*Math.pow(2,-10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F)*0.5+H+B;},backIn:function(C,B,F,E,D){if(D===undefined){D=1.70158;}if(C===E){C-=0.001;}return F*(C/=E)*C*((D+1)*C-D)+B;},backOut:function(C,B,F,E,D){if(typeof D==="undefined"){D=1.70158;}return F*((C=C/E-1)*C*((D+1)*C+D)+1)+B;},backBoth:function(C,B,F,E,D){if(typeof D==="undefined"){D=1.70158;}if((C/=E/2)<1){return F/2*(C*C*(((D*=(1.525))+1)*C-D))+B;}return F/2*((C-=2)*C*(((D*=(1.525))+1)*C+D)+2)+B;},bounceIn:function(C,B,E,D){return E-A.Easing.bounceOut(D-C,0,E,D)+B;},bounceOut:function(C,B,E,D){if((C/=D)<(1/2.75)){return E*(7.5625*C*C)+B;}else{if(C<(2/2.75)){return E*(7.5625*(C-=(1.5/2.75))*C+0.75)+B;}else{if(C<(2.5/2.75)){return E*(7.5625*(C-=(2.25/2.75))*C+0.9375)+B;}}}return E*(7.5625*(C-=(2.625/2.75))*C+0.984375)+B;},bounceBoth:function(C,B,E,D){if(C<D/2){return A.Easing.bounceIn(C*2,0,E,D)*0.5+B;}return A.Easing.bounceOut(C*2-D,0,E,D)*0.5+E*0.5+B;}};},"3.0.0",{requires:["anim-base"]});YUI.add("anim-node-plugin",function(B){var A=function(C){C=(C)?B.merge(C):{};C.node=C.host;A.superclass.constructor.apply(this,arguments);};A.NAME="nodefx";A.NS="fx";B.extend(A,B.Anim);B.namespace("Plugin");B.Plugin.NodeFX=A;},"3.0.0",{requires:["node-pluginhost","anim-base"]});YUI.add("anim-scroll",function(B){var A=Number;B.Anim.behaviors.scroll={set:function(F,G,I,J,K,E,H){var D=F._node,C=([H(K,A(I[0]),A(J[0])-A(I[0]),E),H(K,A(I[1]),A(J[1])-A(I[1]),E)]);if(C[0]){D.set("scrollLeft",C[0]);}if(C[1]){D.set("scrollTop",C[1]);}},get:function(D){var C=D._node;return[C.get("scrollLeft"),C.get("scrollTop")];}};},"3.0.0",{requires:["anim-base"]});YUI.add("anim-xy",function(B){var A=Number;B.Anim.behaviors.xy={set:function(F,D,I,H,C,G,E){F._node.setXY([E(C,A(I[0]),A(H[0])-A(I[0]),G),E(C,A(I[1]),A(H[1])-A(I[1]),G)]);},get:function(C){return C._node.getXY();}};},"3.0.0",{requires:["anim-base","node-screen"]});YUI.add("anim",function(A){},"3.0.0",{use:["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],skinnable:false});
YUI().namespace('Y.Slide');YUI.add('slide',function(Y){Slide=function(){this.init.apply(this,arguments);};Y.mix(Slide,{init:function(id,config){var that=this;that.id=id;that.buildParam(config);that.buildEventCenter();that.construct();that.bindEvent();that.ready({index:0,navnode:that.tabs.item(0),pannelnode:that.pannels.item(0),tab:this});return this;},buildEventCenter:function(){var that=this;var EventFactory=function(){this.publish("switch");};Y.augment(EventFactory,Y.Event.Target);that.EventCenter=new EventFactory();return this;},on:function(type,foo){var that=this;that.EventCenter.subscribe(type,foo);return this;},construct:function(){var that=this;var con=that.con=Y.one('#'+that.id);that.tabs=con.queryAll('.'+that.navClass+' li');that.length=that.tabs.size();that.animcon=con.query('.'+that.contentClass);that.animwrap=null;if(that.effect=='none'){that.pannels=con.queryAll('.'+that.contentClass+' div.'+that.pannelClass);}else if(that.effect=='v-slide'){that.animwrap=Y.Node.create('<div style="position:absolute;"></div>');that.animwrap.set('innerHTML',that.animcon.get('innerHTML'));that.animcon.set('innerHTML','');that.animcon.appendChild(that.animwrap);that.pannels=con.queryAll('.'+that.contentClass+' div.'+that.pannelClass);that.pannels.setStyle('width',that.animcon.get('region').width+'px');that.pannels.setStyle('height',that.animcon.get('region').height+'px');that.pannels.setStyle('float','none');that.pannels.setStyle('overflow','hidden');that.animwrap.setStyle('height',(that.length*that.animcon.get('region').height)+'px');that.animwrap.setStyle('overflow','hidden');}else if(that.effect=='h-slide'){that.animwrap=Y.Node.create('<div style="position:absolute;"></div>');that.animwrap.set('innerHTML',that.animcon.get('innerHTML'));that.animcon.set('innerHTML','');that.animcon.appendChild(that.animwrap);that.pannels=con.queryAll('.'+that.contentClass+' div.'+that.pannelClass);that.pannels.setStyle('width',that.animcon.get('region').width+'px');that.pannels.setStyle('height',that.animcon.get('region').height+'px');that.pannels.setStyle('float','left');that.pannels.setStyle('overflow','hidden');that.animwrap.setStyle('width',(that.length*that.animcon.get('region').width)+'px');that.animwrap.setStyle('overflow','hidden');}else if(that.effect=='fade'){that.pannels=con.queryAll('.'+that.contentClass+' div.'+that.pannelClass);that.pannels.each(function(node,i){if(i==0){node.removeClass('hidden');}else{node.addClass('hidden');}});}
if(that.autoSlide==true){that.play();}else{that.goto(0);}
return this;},bindEvent:function(){var that=this;if(that.eventype=='click'||that.eventype=='mouseover'){that.con.delegate(that.eventype,function(e){e.halt();that.goto(Number(that.tabs.indexOf(e.currentTarget)));if(that.autoSlide)that.stop().play();},'.'+that.navClass+' li');}
if(that.hoverStop){that.con.delegate('mouseover',function(e){e.halt();if(that.autoSlide)that.stop();},'.'+that.contentClass+' div.'+that.pannelClass);that.con.delegate('mouseout',function(e){e.halt();if(that.autoSlide)that.play();},'.'+that.contentClass+' div.'+that.pannelClass);}
return this;},buildParam:function(o){var that=this;var o=(typeof o=='undefined'||o==null)?{}:o;that.autoSlide=(typeof o.autoSlide=='undefined'||o.autoSlide==null)?false:o.autoSlide;that.speed=(typeof o.speed=='undefined'||o.speed==null)?0.5:o.speed;that.timeout=(typeof o.timeout=='undefined'||o.timeout==null)?1000:o.timeout;that.effect=(typeof o.effect=='undefined'||o.effect==null)?'none':o.effect;that.eventype=(typeof o.eventype=='undefined'||o.eventype==null)?'click':o.eventype;that.easing=(typeof o.easing=='undefined'||o.easing==null)?'easeBoth':o.easing;that.hoverStop=(typeof o.hoverStop=='undefined'||o.hoverStop==null)?true:o.hoverStop;that.selectedClass=(typeof o.selectedClass=='undefined'||o.selectedClass==null)?'selected':o.selectedClass;that.conClass=(typeof o.conClass=='undefined'||o.conClass==null)?'t-slide':o.conClass;that.navClass=(typeof o.navClass=='undefined'||o.navClass==null)?'tab-nav':o.navClass;that.contentClass=(typeof o.contentClass=='undefined'||o.contentClass==null)?'tab-content':o.contentClass;that.pannelClass=(typeof o.pannelClass=='undefined'||o.pannelClass==null)?'tab-pannel':o.pannelClass;that.before_switch=(typeof o.before_switch=='undefined'||o.before_switch==null)?new Function:o.before_switch;that.ready=(typeof o.ready=='undefined'||o.ready==null)?new Function:o.ready;that.id=that.id;that.tabs=[];that.animcon=null;that.pannels=[];that.timer=null;that.current_tab=-1;return this;},previous:function(){var that=this;var _index=that.current_tab+that.length-1;if(_index>=that.length){_index=_index%that.length;}
that.goto(_index);return this;},next:function(){var that=this;var _index=that.current_tab+1;if(_index>=that.length){_index=_index%that.length;}
that.goto(_index);return this;},switch_to:function(index){var that=this;if(index>=that.length){index=index%that.length;}
if(index==that.current_tab){return this;}
if(that.effect=='none'){that.pannels.addClass('hidden');that.pannels.item(index).removeClass('hidden');}else if(that.effect=='v-slide'){if(that.current_tab==-1){that.current_tab=index;return this;}
try{that.anim.stop();}catch(e){}
that.anim=new Y.Anim({node:that.animwrap,to:{top:-1*index*that.animcon.get('region').height},easing:that.easing,duration:that.speed});if(that.autoSlide){that.stop();}
that.anim.on('end',function(){if(that.autoSlide){that.play();}});that.anim.run();}else if(that.effect=='h-slide'){if(that.current_tab==-1){that.current_tab=index;return this;}
try{that.anim.stop();}catch(e){}
that.anim=new Y.Anim({node:that.animwrap,to:{left:-1*index*that.animcon.get('region').width},easing:that.easing,duration:that.speed});if(that.autoSlide){that.stop();}
that.anim.on('end',function(){if(that.autoSlide){that.play();}});that.anim.run();}else if(that.effect=='fade'){if(that.current_tab==-1){that.current_tab=index;return this;}
try{that.anim.stop();}catch(e){}
that.anim=new Y.Anim({node:that.pannels.item(that.current_tab),to:{opacity:0},easing:that.easing,duration:that.speed});that.anim_2=new Y.Anim({node:that.pannels.item(index),to:{opacity:1},easing:that.easing,duration:that.speed});var _curr=that.current_tab;that.anim.on('end',function(){that.pannels.item(_curr).addClass('hidden');that.pannels.item(index).setStyle('opacity',0);that.pannels.item(index).removeClass('hidden');that.anim_2.run();});if(that.autoSlide){that.stop();}
that.anim_2.on('end',function(){if(that.autoSlide){that.play();}});that.anim.run();}
that.tabs.removeClass(that.selectedClass);that.tabs.item(index).addClass(that.selectedClass);that.current_tab=index;that.EventCenter.fire('switch',{index:index,navnode:that.tabs.item(index),pannelnode:that.pannels.item(index)});},goto:function(index){var that=this;if(that.before_switch({index:index,navnode:that.tabs.item(index),pannelnode:that.pannels.item(index)})==false){return;}
that.switch_to(index);},play:function(){var that=this;if(that.timer!=null)clearTimeout(that.timer);that.timer=setTimeout(function(){that.next();that.timer=setTimeout(arguments.callee,Number(that.timeout));},Number(that.timeout));return this;},stop:function(){var that=this;clearTimeout(that.timer);that.timer=null;return this;}},0,null,4);Y.Slide=Slide;},'',{requires:['node','anim']});
YUI.namespace('T.base');YUI.add('t-base',function(Y){Y.mix(T.base,{hasLayout:function(con){con.setStyle('zoom','');con.setStyle('zoom','1');},getLength:function(o){var n=0;if(typeof o=='array'||typeof o=='string')return o.length;for(var i in o){n++;}
return n;},createIframe:function(id,src,foo){var iframe=document.createElement("iframe");iframe.id=id;iframe.src=src;iframe.width='0px';iframe.frameBorder='0';iframe.border='0';iframe.height='0px';if(iframe.attachEvent){iframe.attachEvent("onload",function(){foo(id);});}else{iframe.onload=function(){foo(id);};}
document.body.appendChild(iframe);},distinct:function(A){var that=this;if(!(A instanceof Array)||A.length<=1)return A;var a=[],b=[];for(var i=1;i<A.length;i++){for(var j=0;j<i;j++){if(that.inArray(j,b))continue;if(A[j]==A[i]){b.push(j);}}}
for(var i=0;i<A.length;i++){if(that.inArray(i,b))continue;a.push(A[i]);}
return a;},io:function(method,url,suback,postData,onfailure,contentType,args){if(typeof postData=='undefined')var postString='';if(typeof onfailure=='undefined')onfailure=new Function;if(typeof contentType=='undefined'||contentType=='')var contentType='application/x-www-form-urlencoded; charset=gbk';if(typeof postData=='object'){var postString=Y.JSON.stringify(postData);}else{var postString=postData;}
var cfg={method:typeof method=='undefined'?'GET':method,data:postString,headers:{'Content-Type':contentType},arguments:typeof args=='undefined'?'':args,on:{complete:function(id,o){try{eval("var re = "+o.responseText.replace(/<!--(.*?)-->/g,''));}catch(e){Y.log('接口返回为空，或者格式不对','error');return;}
if(typeof re.status=='undefined'){Y.log('数据格式错误','error');return;}
if(Number(re.status)<0){onfailure(re.errContent);return;}
suback(re.data);}}};var request=Y.io(url,cfg);},trim:function(str){return str.replace(/(^\s*)|(\s*$)/g,"");},getUrlValue:function(url){var url=(url!==undefined)?url:window.location.href;if(url.indexOf("#")>-1){var variable=url.split("#")[1];}else{var variable=url.split("?")[1];}
if(variable==''||typeof variable=="undefined"){return{};}else{var value={};variable=variable.split("&");for(var i=0,m=variable.length;i<m;i++){value[variable[i].split("=")[0]]=variable[i].split("=")[1];}
return value;}},getHash:function(sUrl){var url=sUrl||window.location.href;if(url.indexOf("#")<0){return{};}else{var hash=url.split('#')[1];if(hash=='')return{};if(hash[hash.length-1]=='&')hash=hash.substr(0,hash.length-1);hash=hash.replace(/'/ig,'"');hash=hash.replace(/=/ig,':\'');hash=hash.replace(/&/ig,'\',');hash+='\'';eval('var o = {'+hash+'};');return o;}},setHash:function(sUrl,data){var url=sUrl||window.location.href;if(url.indexOf("#")<0){url+='#';}
var o=this.getHash(url);for(var i in data){o[i]=data[i];}
url=url.split("#")[0]+'#';for(var i in o){url+=i+'='+o[i]+'&';}
url=url.substr(0,url.length-1);return url;},setUrlValue:function(sUrl,data){var fd=this;var url=sUrl||window.location.href;if(url.indexOf("?")<0){url+='?';}
var o=fd.getUrlValue(url);for(var i in data){o[i]=data[i];}
url=url.split("?")[0]+'?';for(var i in o){url+=i+'='+o[i]+'&';}
url=url.substr(0,url.length-1);return url;},breakupArray:function(a,n){if(!YAHOO.lang.isArray(a))return a;var aa=[];for(var i=0;i<=Math.floor(a.length/n);i++){var _a=[];for(var j=0;j<n;j++){if(a[i*n+j]===undefined)break;_a[j]=a[i*n+j];}
aa.push(_a);}
return aa;},removeArray:function(v,a){for(var i=0,m=a.length;i<m;i++){if(a[i]==v){a.splice(i,1);break;}}},replaceArray:function(v,n,a){for(var i=0,m=a.length;i<m;i++){if(a[i]==v){a.splice(i,1,n);break;}}},inArray:function(v,a){var o=false;for(var i=0,m=a.length;i<m;i++){if(a[i]==v){o=true;break;}}
return o;},cn_strlen:function(string){return string.replace(/[^\u00-\uFF]/g,"**").length;},substr:function(string,length){if(string===undefined){return"";}
if(typeof length!="number"){return string;}
if(string.length*2<=length){return string;}
var out="",num=0;for(var i=0,m=string.length;i<m;i++){out+=string.substr(i,1);if(/[^\u00-\uFF]/i.test(string.substr(i,1))){num+=2;}else{num+=1;}
if(num>=length)break;}
if(string!=out){if(/[^\u00-\uFF]/i.test(out.substr(-2))){out=out.substr(0,out.length-2)+"...";}else{out=out.substr(0,out.length-3)+"...";}}
return out;},templetShow:function(templet,data){var fd=this;if(data instanceof Array){var str_in='';for(var i=0;i<data.length;i++){str_in+=fd.templetShow(templet,data[i]);}
templet=str_in;}else{var value_s=templet.match(/{\$(.*?)}/g);if(data!==undefined&&value_s!=null){for(var i=0,m=value_s.length;i<m;i++){var par=value_s[i].replace(/({\$)|}/g,'');value=(data[par]!==undefined)?data[par]:'';templet=templet.replace(value_s[i],value);}}}
return templet;},AE:function(o,fun){if((typeof o).toLowerCase()!="function")return o;var _fun=o;o=function(){_fun.apply(_fun,arguments);fun.apply(fun,arguments);};return o;},clone:Y.clone,wbtrim:function(str,count){var count=count||10;var thexp=new RegExp("(([!@#$%^&*_+=-《》@『』【】×￥～，。；：＇＂]|[a-z]|[A-Z]|[0-9])+|\s|.)","g");var a=str.match(thexp);var _str='';for(var i=0;i<a.length;i++){if(a[i].length>count&&/([!@#$%^&*_+=-《》@『』【】×￥～，。；：＇＂]|[a-z]|[A-Z]|[0-9])+/i.test(a[i])){var exp=new RegExp(".{"+count+"}","g");var r=a[i].substr(Math.floor(a[i].length/count)*count,Math.floor(a[i].length%count));var t=a[i].match(exp).join("<wbr />")+r;a[i]=t;}
_str+=a[i];}
return _str;},trimSize:function(str,bsize){if(!str&&'string'!=typeOf(str)){return'';}
str=trim(str);var rs='';var blen=0;for(var i=0;i<str.length&&blen<bsize;i++){rs+=str.charAt(i);if(/[\u4E00-\u9FA5]/.test(str.charAt(i))){blen+=2;}
else{blen++;}}
if(blen>=bsize&&bsize>2){rs=rs.substring(0,rs.length-2)+'...';}
return rs;},stripTags:function(str){return str.replace(/<\/?[^>]+>/gi,'');},stripHTML:function(str){return str.replace('<','&lt;').replace('>','&gt;').replace('"','&quot;').replace('&','&amp;');},stripScripts:function(str){return str.replace(new RegExp('<script[^>]*>([\\S\\s]*?)<\/script>','img'),'');},DOMData:function(node,attr){var con=node;var attr=attr?attr:'rev';var set=function(k,v){var ostr=node.getAttribute(attr);if(!/^{.*?}$/.test(ostr))ostr='{}';eval('var o = '+ostr);if(!v)return false;o[k]=v;var ostr=Y.JSON.stringify(o);node.setAttribute(attr,ostr);};var get=function(k){var ostr=node.getAttribute(attr);if(!/^{.*?}$/.test(ostr))ostr='{}';eval('var o = '+ostr);if(!o[k])return'';return o[k];};return{set:set,get:get};}});});
YUI.namespace('C.Tools');YUI.add('c-tools',function(Y){C.Tools=Y.merge(T.base,{C:function(arr,num){var r=[];(function f(t,a,n){if(n==0)return r.push(t);for(var i=0,l=a.length;i<=l-n;i++){f(t.concat(a[i]),a.slice(i+1),n-1);}})([],arr,num);return r;},P:function(arr,num){var r=[];(function f(t,a,n){if(n==0)return r.push(t);for(var i=0,l=a.length;i<l;i++){f(t.concat(a[i]),a.slice(0,i).concat(a.slice(i+1)),n-1);}})([],arr,num);return r;},getCompoundPermutation:function(nakedata){var that=this;if(nakedata.length==1)return nakedata[0];var _a=nakedata[0].concat();for(var i=1;i<nakedata.length;i++){_a=that.combine(_a,nakedata[i]);}
return _a;},combine:function(a,b){var _a=[];for(var i=0;i<a.length;i++){for(var j=0;j<b.length;j++){_a.push([a[i],b[j]].join(','));}}
return _a;},_getCompoundCombination:function(ca,n){var that=this;var r=[];if(ca.length>=n){var r=that.C(ca,n);}else if(ca.length<n){var a=[];for(var i=0;i<ca.length;i++){var _a=arguments.callee.apply(that,[ca,n-1]);for(var j=0;j<_a.length;j++){a.push(_a[j].concat(ca[i]).sort());}}
r=that.pureArray(a);}
for(var i=0;i<ca.length;i++){var _a=[];for(var j=0;j<n;j++){_a.push(ca[i]);}
r.push(_a);}
return that.pureArray(r);},getCompoundCombination:function(ca,n){var that=this;var r=that._getCompoundCombination(ca,n);for(var i=0;i<r.length;i++){r[i]=r[i].join(',');}
return r;},pureArray:function(a){var that=this;for(var i=0;i<a.length;i++){a[i]=a[i].sort().toString();}
a=that.distinct(a);for(var i=0;i<a.length;i++){var t=a[i].split(',');for(var j=0;j<t.length;j++){t[j]=Number(t[j]);}
a[i]=t;}
return a;},_getSummationPermutation:function(m,n,_max){if(!(m instanceof Array)){var _k=m;m=[];m.push(_k);}
if(!_max){var _max=9;}
if(m.length==1){var sum=m[0];var _a=[];if(n==2){for(var i=0;i<10;i++){if(sum-i>=0){if(i>_max||[sum-i]>_max)continue;_a.push([i,sum-i]);}}}else if(n>2){for(var i=0;i<10;i++){var subsum=sum-i;var sub_a=arguments.callee(subsum,n-1);for(var j=0;j<sub_a.length;j++){var _t=[];_t.push(i);_a.push(_t.concat(sub_a[j]));}}}
return _a;}else if(m.length>1){var _a=[];for(var i=0;i<m.length;i++){_a=_a.concat(arguments.callee(m[i],n));}
return _a;}else{return[];}},getSummationPermutation:function(m,n){var that=this;var r=that._getSummationPermutation(m,n);for(var i=0;i<r.length;i++){r[i]=r[i].join(',');}
return r;},_getSummationCombination:function(m,n){var that=this;var a=that._getSummationPermutation(m,n);return that.pureArray(a);},getSummationCombination:function(m,n){var that=this;var r=that._getSummationCombination(m,n);for(var i=0;i<r.length;i++){r[i]=r[i].join(',');}
return r;},copyToClipboard:function(txt){if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData('Text',txt);}else if(navigator.userAgent.indexOf('Opera')!=-1){window.location=txt;}else if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');}catch(e){alert('您的firefox安全限制限制您进行剪贴板操作，请打开’about:config’将 signed.applets.codebase_principal_support’设置为true’之后重试');return false;}
var clip=Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);if(!clip){return false;}
var trans=Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);if(!trans){return false;}
trans.addDataFlavor('text/unicode');var str=new Object();var len=new Object();var str=Components.classes['@mozilla.org/supports-string;1'].createInstance(Components.interfaces.nsISupportsString);var copytext=txt;str.data=copytext;trans.setTransferData('text/unicode',str,copytext.length*2);var clipid=Components.interfaces.nsIClipboard;if(!clip){return false;}
clip.setData(trans,null,clipid.kGlobalClipboard);return true;}}});});
YUI.add("event-focus",function(A){(function(){var I=A.UA,J=A.Event,E=A.Env.evt.plugins,C=I.ie,F=(I.opera||I.webkit),D={focus:(C?"focusin":(F?"DOMFocusIn":"focus")),blur:(C?"focusout":(F?"DOMFocusOut":"blur"))},G={capture:(I.gecko?true:false)},H=function(M,L){var K=A.Array(M,0,true);K[0]=D[K[0]];return J._attach(K,L);},B={on:function(){return H(arguments,G);}};J._attachFocus=H;J._attachBlur=H;E.focus=B;E.blur=B;})();},"3.0.0",{requires:["node-base"]});
YUI.add("classnamemanager",function(C){var B="classNamePrefix",D="classNameDelimiter",A=C.config;A[B]=A[B]||"yui";A[D]=A[D]||"-";C.ClassNameManager=function(){var E=A[B],F=A[D];return{getClassName:C.cached(function(I,G){var H=E+F+((G)?Array.prototype.join.call(arguments,F):I);return H.replace(/\s/g,"");})};}();},"3.0.0");
YUI.add("widget",function(D){var Q=D.Lang,K=D.Object,g=D.Node,M=D.ClassNameManager,a="widget",J="content",c="visible",e="hidden",f="disabled",T="focused",G="width",X="height",i="",Z="-",h="boundingBox",U="contentBox",P="parentNode",B="firstChild",b="ownerDocument",d="body",C="tabIndex",F="locale",H="initValue",R="id",S="render",A="rendered",W="destroyed",I="contentUpdate",V={};function E(L){this._yuid=D.guid(a);this._strings={};E.superclass.constructor.apply(this,arguments);}E._buildCfg={aggregates:["HTML_PARSER"]};E.NAME=a;E.UI_SRC="ui";var N=E.UI_SRC;E.ATTRS={rendered:{value:false,readOnly:true},boundingBox:{value:null,setter:function(L){return this._setBoundingBox(L);},writeOnce:true},contentBox:{value:null,setter:function(L){return this._setContentBox(L);},writeOnce:true},tabIndex:{value:0,validator:function(L){return(Q.isNumber(L)||Q.isNull(L));}},focused:{value:false,readOnly:true},disabled:{value:false},visible:{value:true},height:{value:i},width:{value:i},moveStyles:{value:false},locale:{value:"en"},strings:{setter:function(L){return this._setStrings(L,this.get(F));},getter:function(){return this.getStrings(this.get(F));}}};E._NAME_LOWERCASE=E.NAME.toLowerCase();E.getClassName=function(){var L=D.Array(arguments,0,true);L.splice(0,0,this._NAME_LOWERCASE);return M.getClassName.apply(M,L);};E.getByNode=function(L){var O,Y=E.getClassName();L=g.get(L);if(L){L=(L.hasClass(Y))?L:L.ancestor("."+Y);if(L){O=V[L.get(R)];}}return O||null;};E.HTML_PARSER={};D.extend(E,D.Base,{getClassName:function(){var L=D.Array(arguments,0,true);L.splice(0,0,this._name);return M.getClassName.apply(M,L);},initializer:function(L){this.publish(I,{preventable:false});this._name=this.constructor.NAME.toLowerCase();var Y=this.get(h).get(R);if(Y){V[Y]=this;}var O=this._parseHTML(this.get(U));if(O){D.aggregate(L,O,false);}},destructor:function(){var L=this.get(h);D.Event.purgeElement(L,true);var O=L.get(R);if(O&&O in V){delete V[O];}},render:function(L){if(this.get(W)){return;}if(!this.get(A)){this.publish(S,{queuable:false,defaultFn:this._defRenderFn});L=(L)?g.get(L):null;if(L&&!L.inDoc()){L=null;}this.fire(S,{parentNode:L});}return this;},_defRenderFn:function(L){this._renderUI(L.parentNode);this._bindUI();this._syncUI();this.renderer();this._set(A,true);},renderer:function(){this.renderUI();this.bindUI();this.syncUI();},bindUI:function(){},renderUI:function(){},syncUI:function(){},hide:function(){return this.set(c,false);},show:function(){return this.set(c,true);},focus:function(){return this._set(T,true);},blur:function(){return this._set(T,false);},enable:function(){return this.set(f,false);},disable:function(){return this.set(f,true);},_parseHTML:function(O){var L=this._getHtmlParser(),Y,j;if(L&&O&&O.hasChildNodes()){K.each(L,function(m,l,n){j=null;if(Q.isFunction(m)){j=m.call(this,O);}else{if(Q.isArray(m)){j=O.queryAll(m[0]);}else{j=O.query(m);}}if(j!==null&&j!==undefined){Y=Y||{};Y[l]=j;}},this);}return Y;},_moveStyles:function(k,m){var j=this.WRAP_STYLES,n=k.getStyle("position"),O=this.get(U),l=[0,0],Y,L;if(!this.get("height")){Y=O.get("offsetHeight");}if(!this.get("width")){L=O.get("offsetWidth");}if(n==="absolute"){l=k.getXY();m.setStyles({right:"auto",bottom:"auto"});k.setStyles({right:"auto",bottom:"auto"});}D.each(j,function(p,o){var q=k.getStyle(o);m.setStyle(o,q);if(p===false){k.setStyle(o,"");}else{k.setStyle(o,p);}});if(n==="absolute"){m.setXY(l);}if(Y){this.set("height",Y);}if(L){this.set("width",L);}},_renderBox:function(O){var Y=this.get(U),j=this.get(h),k=j.get(b)||Y.get(b),L;if(!j.compareTo(Y.get(P))){if(this.get("moveStyles")){this._moveStyles(Y,j);}if(Y.inDoc(k)){Y.get(P).replaceChild(j,Y);}j.appendChild(Y);}if(!j.inDoc(k)&&!O){L=g.get(d);if(L.get(B)){L.insertBefore(j,L.get(B));}else{L.appendChild(j);}}else{if(O&&!O.compareTo(j.get(P))){O.appendChild(j);}}},_setBoundingBox:function(L){return this._setBox(L,this.BOUNDING_TEMPLATE);},_setContentBox:function(L){return this._setBox(L,this.CONTENT_TEMPLATE);},_setBox:function(Y,O){Y=g.get(Y)||g.create(O);var L=D.stamp(Y);if(!Y.get(R)){Y.set(R,L);}return Y;},_renderUI:function(L){this._renderBoxClassNames();this._renderBox(L);},_renderBoxClassNames:function(){var k=this._getClasses(),Y=this.get(h),L=this.get(U),O,j;Y.addClass(E.getClassName());for(j=k.length-3;j>=0;j--){O=k[j].NAME;if(O){Y.addClass(M.getClassName(O.toLowerCase()));}}L.addClass(this.getClassName(J));},_bindUI:function(){this.after("visibleChange",this._afterVisibleChange);this.after("disabledChange",this._afterDisabledChange);this.after("heightChange",this._afterHeightChange);this.after("widthChange",this._afterWidthChange);this.after("focusedChange",this._afterFocusedChange);this._bindDOMListeners();},_bindDOMListeners:function(){var L=this.get(h).get("ownerDocument");L.on("focus",this._onFocus,this);if(D.UA.webkit){L.on("mousedown",this._onDocMouseDown,this);}},_syncUI:function(){this._uiSetVisible(this.get(c));this._uiSetDisabled(this.get(f));this._uiSetHeight(this.get(X));this._uiSetWidth(this.get(G));this._uiSetFocused(this.get(T));this._uiSetTabIndex(this.get(C));},_uiSetHeight:function(L){if(Q.isNumber(L)){L=L+this.DEF_UNIT;}this.get(h).setStyle(X,L);},_uiSetWidth:function(L){if(Q.isNumber(L)){L=L+this.DEF_UNIT;}this.get(h).setStyle(G,L);},_uiSetVisible:function(Y){var O=this.get(h),L=this.getClassName(e);if(Y===true){O.removeClass(L);}else{O.addClass(L);}},_uiSetDisabled:function(Y){var O=this.get(h),L=this.getClassName(f);if(Y===true){O.addClass(L);}else{O.removeClass(L);}},_uiSetTabIndex:function(O){var L=this.get(h);if(Q.isNumber(O)){L.set(C,O);}else{L.removeAttribute(C);}},_uiSetFocused:function(j,Y){var O=this.get(h),L=this.getClassName(T);if(j===true){O.addClass(L);if(Y!==N){O.focus();}}else{O.removeClass(L);if(Y!==N){O.blur();}}},_afterVisibleChange:function(L){this._uiSetVisible(L.newVal);},_afterDisabledChange:function(L){this._uiSetDisabled(L.newVal);},_afterHeightChange:function(L){this._uiSetHeight(L.newVal);},_afterWidthChange:function(L){this._uiSetWidth(L.newVal);},_afterFocusedChange:function(L){this._uiSetFocused(L.newVal,L.src);},_onDocMouseDown:function(L){if(this._hasDOMFocus){this._onFocus(L);}},_onFocus:function(O){var j=O.target,Y=this.get(h),L=(Y.compareTo(j)||Y.contains(j));this._hasDOMFocus=L;this._set(T,L,{src:N});},toString:function(){return this.constructor.NAME+"["+this._yuid+"]";},DEF_UNIT:"px",CONTENT_TEMPLATE:"<div></div>",BOUNDING_TEMPLATE:"<div></div>",WRAP_STYLES:{height:"100%",width:"100%",zIndex:false,position:"static",top:"0",left:"0",bottom:"",right:"",padding:"",margin:""},_setStrings:function(O,L){var Y=this._strings;L=L.toLowerCase();if(!Y[L]){Y[L]={};}D.aggregate(Y[L],O,true);return Y[L];},_getStrings:function(L){return this._strings[L.toLowerCase()];},getStrings:function(p){p=(p||this.get(F)).toLowerCase();var n=this.getDefaultLocale().toLowerCase(),O=this._getStrings(n),o=(O)?D.merge(O):{},m=p.split(Z);if(p!==n||m.length>1){var L="";for(var j=0,Y=m.length;j<Y;++j){L+=m[j];var k=this._getStrings(L);if(k){D.aggregate(o,k,true);}L+=Z;}}return o;},getString:function(Y,O){O=(O||this.get(F)).toLowerCase();var j=(this.getDefaultLocale()).toLowerCase(),k=this._getStrings(j)||{},l=k[Y],L=O.lastIndexOf(Z);if(O!==j||L!=-1){do{k=this._getStrings(O);if(k&&Y in k){l=k[Y];break;}L=O.lastIndexOf(Z);if(L!=-1){O=O.substring(0,L);}}while(L!=-1);}return l;},getDefaultLocale:function(){return this._conf.get(F,H);},_strings:null,_getHtmlParser:function(){if(!this._HTML_PARSER){var O=this._getClasses(),j={},L,Y;for(L=O.length-1;L>=0;L--){Y=O[L].HTML_PARSER;if(Y){D.mix(j,Y,true);}}this._HTML_PARSER=j;}return this._HTML_PARSER;}});D.Widget=E;},"3.0.0",{requires:["attribute","event-focus","base","node","classnamemanager"]});
YUI.add("widget-position",function(A){var H=A.Lang,J=A.Widget,K="xy",F="positioned",I="boundingBox",L="renderUI",G="bindUI",D="syncUI",C=J.UI_SRC,E="xyChange";function B(M){this._posNode=this.get(I);A.after(this._renderUIPosition,this,L);A.after(this._syncUIPosition,this,D);A.after(this._bindUIPosition,this,G);}B.ATTRS={x:{setter:function(M){this._setX(M);},lazyAdd:false,getter:function(){return this._getX();}},y:{setter:function(M){this._setY(M);},lazyAdd:false,getter:function(){return this._getY();}},xy:{value:[0,0],validator:function(M){return this._validateXY(M);}}};B.POSITIONED_CLASS_NAME=J.getClassName(F);B.prototype={_renderUIPosition:function(){this._posNode.addClass(B.POSITIONED_CLASS_NAME);},_syncUIPosition:function(){this._uiSetXY(this.get(K));},_bindUIPosition:function(){this.after(E,this._afterXYChange);},move:function(){var M=arguments,N=(H.isArray(M[0]))?M[0]:[M[0],M[1]];this.set(K,N);},syncXY:function(){this.set(K,this._posNode.getXY(),{src:C});},_validateXY:function(M){return(H.isArray(M)&&H.isNumber(M[0])&&H.isNumber(M[1]));},_setX:function(M){this.set(K,[M,this.get(K)[1]]);},_setY:function(M){this.set(K,[this.get(K)[0],M]);},_getX:function(){return this.get(K)[0];},_getY:function(){return this.get(K)[1];},_afterXYChange:function(M){if(M.src!=C){this._uiSetXY(M.newVal);}},_uiSetXY:function(M){this._posNode.setXY(M);}};A.WidgetPosition=B;},"3.0.0",{requires:["widget"]});
YUI.add("widget-position-ext",function(A){var H=A.Lang,C="align",E="bindUI",B="syncUI",D="offsetWidth",I="offsetHeight",K="viewportRegion",G="region",J="alignChange";function F(L){if(!this._posNode){A.error("WidgetPosition needs to be added to the Widget, before WidgetPositionExt is added");}A.after(this._syncUIPosExtras,this,B);A.after(this._bindUIPosExtras,this,E);}F.ATTRS={align:{value:null},centered:{setter:function(L){return this._setAlignCenter(L);},lazyAdd:false,value:false}};F.TL="tl";F.TR="tr";F.BL="bl";F.BR="br";F.TC="tc";F.RC="rc";F.BC="bc";F.LC="lc";F.CC="cc";F.prototype={_syncUIPosExtras:function(){var L=this.get(C);if(L){this._uiSetAlign(L.node,L.points);}},_bindUIPosExtras:function(){this.after(J,this._afterAlignChange);},_setAlignCenter:function(L){if(L){this.set(C,{node:L===true?null:L,points:[F.CC,F.CC]});}return L;},_afterAlignChange:function(L){if(L.newVal){this._uiSetAlign(L.newVal.node,L.newVal.points);}},_uiSetAlign:function(O,N){if(!H.isArray(N)||N.length!=2){A.error("align: Invalid Points Arguments");return;}var M,L,P,Q;if(!O){M=this._posNode.get(K);}else{O=A.Node.get(O);if(O){M=O.get(G);}}if(M){M.width=M.width||M.right-M.left;M.height=M.height||M.bottom-M.top;L=N[0];P=N[1];switch(P){case F.TL:Q=[M.left,M.top];break;case F.TR:Q=[M.right,M.top];break;case F.BL:Q=[M.left,M.bottom];break;case F.BR:Q=[M.right,M.bottom];break;case F.TC:Q=[M.left+Math.floor(M.width/2),M.top];break;case F.BC:Q=[M.left+Math.floor(M.width/2),M.bottom];break;case F.LC:Q=[M.left,M.top+Math.floor(M.height/2)];break;case F.RC:Q=[M.right,M.top+Math.floor(M.height/2),L];break;case F.CC:Q=[M.left+Math.floor(M.width/2),M.top+Math.floor(M.height/2),L];break;default:break;}if(Q){this._doAlign(L,Q[0],Q[1]);}}},_doAlign:function(M,L,P){var O=this._posNode,N;switch(M){case F.TL:N=[L,P];break;case F.TR:N=[L-O.get(D),P];break;case F.BL:N=[L,P-O.get(I)];break;case F.BR:N=[L-O.get(D),P-O.get(I)];break;case F.TC:N=[L-(O.get(D)/2),P];break;case F.BC:N=[L-(O.get(D)/2),P-O.get(I)];break;case F.LC:N=[L,P-(O.get(I)/2)];break;case F.RC:N=[(L-O.get(D)),P-(O.get(I)/2)];break;case F.CC:N=[L-(O.get(D)/2),P-(O.get(I)/2)];break;default:break;}if(N){this.move(N);}},align:function(M,L){this.set(C,{node:M,points:L});},centered:function(L){this.align(L,[F.CC,F.CC]);}};A.WidgetPositionExt=F;},"3.0.0",{requires:["widget","widget-position"]});
YUI.add("widget-stack",function(E){var N=E.Lang,T=E.UA,d=E.Node,F=E.Widget,c="zIndex",P="shim",a="visible",e="boundingBox",W="renderUI",G="bindUI",S="syncUI",Q="offsetWidth",D="offsetHeight",M="parentNode",A="firstChild",X="ownerDocument",H="width",V="height",K="px",O="shimdeferred",f="shimresize",Z="visibleChange",C="widthChange",J="heightChange",b="shimChange",B="zIndexChange",I="contentUpdate",R="stacked";function U(L){this._stackNode=this.get(e);this._stackHandles={};E.after(this._renderUIStack,this,W);E.after(this._syncUIStack,this,S);E.after(this._bindUIStack,this,G);}U.ATTRS={shim:{value:(T.ie==6)},zIndex:{value:0,setter:function(L){return this._setZIndex(L);}}};U.HTML_PARSER={zIndex:function(L){return L.getStyle(c);}};U.SHIM_CLASS_NAME=F.getClassName(P);U.STACKED_CLASS_NAME=F.getClassName(R);U.SHIM_TEMPLATE='<iframe class="'+U.SHIM_CLASS_NAME+'" frameborder="0" title="Widget Stacking Shim" src="javascript:false" tabindex="-1" role="presentation"></iframe>';U.prototype={_syncUIStack:function(){this._uiSetShim(this.get(P));this._uiSetZIndex(this.get(c));},_bindUIStack:function(){this.after(b,this._afterShimChange);this.after(B,this._afterZIndexChange);},_renderUIStack:function(){this._stackNode.addClass(U.STACKED_CLASS_NAME);},_setZIndex:function(L){if(N.isString(L)){L=parseInt(L,10);}if(!N.isNumber(L)){L=0;}return L;},_afterShimChange:function(L){this._uiSetShim(L.newVal);},_afterZIndexChange:function(L){this._uiSetZIndex(L.newVal);},_uiSetZIndex:function(L){this._stackNode.setStyle(c,L);},_uiSetShim:function(L){if(L){if(this.get(a)){this._renderShim();}else{this._renderShimDeferred();}}else{this._destroyShim();}},_renderShimDeferred:function(){this._stackHandles[O]=this._stackHandles[O]||[];var Y=this._stackHandles[O],L=function(g){if(g.newVal){this._renderShim();}};Y.push(this.on(Z,L));},_addShimResizeHandlers:function(){this._stackHandles[f]=this._stackHandles[f]||[];var Y=this.sizeShim,L=this._stackHandles[f];this.sizeShim();L.push(this.after(Z,Y));L.push(this.after(C,Y));L.push(this.after(J,Y));L.push(this.after(I,Y));},_detachStackHandles:function(L){var Y=this._stackHandles[L],g;if(Y&&Y.length>0){while((g=Y.pop())){g.detach();}}},_renderShim:function(){var L=this._shimNode,Y=this._stackNode;if(!L){L=this._shimNode=this._getShimTemplate();Y.insertBefore(L,Y.get(A));if(T.ie==6){this._addShimResizeHandlers();}this._detachStackHandles(O);}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(M).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(O);this._detachStackHandles(f);}},sizeShim:function(){var Y=this._shimNode,L=this._stackNode;if(Y&&T.ie===6&&this.get(a)){Y.setStyle(H,L.get(Q)+K);Y.setStyle(V,L.get(D)+K);}},_getShimTemplate:function(){return d.create(U.SHIM_TEMPLATE,this._stackNode.get(X));}};E.WidgetStack=U;},"3.0.0",{requires:["widget"]});
YUI.add("widget-stdmod",function(A){var D=A.Lang,P=A.Node,c=A.NodeList,W=A.UA,C=A.Widget,B="",j="hd",h="bd",H="ft",e="header",m="body",k="footer",q="fillHeight",K="stdmod",t="px",T="Node",i="Content",o="innerHTML",d="firstChild",G="childNodes",l="createDocumentFragment",M="ownerDocument",U="contentBox",p="boundingBox",Z="height",g="offsetHeight",X="auto",J="headerContentChange",b="bodyContentChange",N="footerContentChange",R="fillHeightChange",S="HeightChange",r="contentUpdate",V="renderUI",f="bindUI",E="syncUI",Q=A.Widget.UI_SRC;function s(L){this._stdModNode=this.get(U);A.after(this._renderUIStdMod,this,V);A.after(this._bindUIStdMod,this,f);A.after(this._syncUIStdMod,this,E);}s.HEADER=e;s.BODY=m;s.FOOTER=k;s.AFTER="after";s.BEFORE="before";s.REPLACE="replace";var I=s.HEADER,a=s.BODY,O=s.FOOTER,n=s.AFTER,F=s.BEFORE;s.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:s.BODY,validator:function(L){return this._validateFillHeight(L);}}};s.HTML_PARSER={headerContent:function(L){return this._parseStdModHTML(I);},bodyContent:function(L){return this._parseStdModHTML(a);},footerContent:function(L){return this._parseStdModHTML(O);}};s.SECTION_CLASS_NAMES={header:C.getClassName(j),body:C.getClassName(h),footer:C.getClassName(H)};s.TEMPLATES={header:'<div class="'+s.SECTION_CLASS_NAMES[I]+'"></div>',body:'<div class="'+s.SECTION_CLASS_NAMES[a]+'"></div>',footer:'<div class="'+s.SECTION_CLASS_NAMES[O]+'"></div>'};s.prototype={_syncUIStdMod:function(){this._uiSetStdMod(I,this.get(I+i));this._uiSetStdMod(a,this.get(a+i));this._uiSetStdMod(O,this.get(O+i));this._uiSetFillHeight(this.get(q));},_renderUIStdMod:function(){this._stdModNode.addClass(C.getClassName(K));},_bindUIStdMod:function(){this.after(J,this._afterHeaderChange);this.after(b,this._afterBodyChange);this.after(N,this._afterFooterChange);this.after(R,this._afterFillHeightChange);this.after(S,this._fillHeight);this.after(r,this._fillHeight);},_afterHeaderChange:function(L){if(L.src!==Q){this._uiSetStdMod(I,L.newVal,L.stdModPosition);}},_afterBodyChange:function(L){if(L.src!==Q){this._uiSetStdMod(a,L.newVal,L.stdModPosition);}},_afterFooterChange:function(L){if(L.src!==Q){this._uiSetStdMod(O,L.newVal,L.stdModPosition);}},_afterFillHeightChange:function(L){this._uiSetFillHeight(L.newVal);},_validateFillHeight:function(L){return!L||L==s.BODY||L==s.HEADER||L==s.FOOTER;},_uiSetFillHeight:function(u){var Y=this.getStdModNode(u);var L=this._currFillNode;if(L&&Y!==L){L.setStyle(Z,B);}if(Y){this._currFillNode=Y;}this._fillHeight();},_fillHeight:function(){if(this.get(q)){var L=this.get(Z);if(L!=B&&L!=X){this.fillHeight(this._currFillNode);}}},_uiSetStdMod:function(v,u,L){if(u){var Y=this.getStdModNode(v)||this._renderStdMod(v);if(u instanceof P||u instanceof c){this._addNodeRef(Y,u,L);}else{this._addNodeHTML(Y,u,L);}this.set(v+i,this._getStdModContent(v),{src:Q});this.fire(r);}},_renderStdMod:function(u){var L=this.get(U),Y=this._findStdModSection(u);if(!Y){Y=this._getStdModTemplate(u);}this._insertStdModSection(L,u,Y);this[u+T]=Y;return this[u+T];},_insertStdModSection:function(L,v,u){var Y=L.get(d);if(v===O||!Y){L.appendChild(u);}else{if(v===I){L.insertBefore(u,Y);}else{var w=this[O+T];if(w){L.insertBefore(u,w);}else{L.appendChild(u);}}}},_getStdModTemplate:function(L){return P.create(s.TEMPLATES[L],this._stdModNode.get(M));},_addNodeHTML:function(u,Y,L){if(L==n){u.set(o,u.get(o)+Y);}else{if(L==F){u.set(o,Y+u.get(o));}else{u.set(o,Y);}}},_addNodeRef:function(x,v,Y){var L=true,u,w;if(Y==F){var y=x.get(d);if(y){if(v instanceof c){for(u=v.size()-1;u>=0;--u){x.insertBefore(v.item(u),y);}}else{x.insertBefore(v,y);}L=false;}}else{if(Y!=n){x.set(o,B);}}if(L){if(v instanceof c){for(u=0,w=v.size();u<w;++u){x.appendChild(v.item(u));}}else{x.appendChild(v);}}},_getPreciseHeight:function(u){var L=(u)?u.get(g):0,v="getBoundingClientRect";if(u&&u.hasMethod(v)){var Y=u.invoke(v);if(Y){L=Y.bottom-Y.top;}}return L;},_findStdModSection:function(L){return this.get(U).query("> ."+s.SECTION_CLASS_NAMES[L]);},_parseStdModHTML:function(x){var w=this._findStdModSection(x),u,Y;if(w){u=w.get(M).invoke(l);Y=w.get(G);for(var L=Y.size()-1;L>=0;L--){var v=u.get(d);if(v){u.insertBefore(Y.item(L),v);}else{u.appendChild(Y.item(L));}}return u;}return null;},_getStdModContent:function(L){return(this[L+T])?this[L+T].get(G):null;},setStdModContent:function(u,Y,L){this.set(u+i,Y,{stdModPosition:L});},getStdModNode:function(L){return this[L+T]||null;},fillHeight:function(u){if(u){var y=this.get(p),AA=[this.headerNode,this.bodyNode,this.footerNode],Y,AB=0,AC=0,x=0,w=false;for(var z=0,v=AA.length;z<v;z++){Y=AA[z];if(Y){if(Y!==u){AC+=this._getPreciseHeight(Y);}else{w=true;}}}if(w){if(W.ie||W.opera){u.setStyle(Z,0+t);}AB=parseInt(y.getComputedStyle(Z),10);if(D.isNumber(AB)){x=AB-AC;if(x>=0){u.setStyle(Z,x+t);}var L=this.get(U).get(g);if(L!=AB){x=x-(L-AB);u.setStyle(Z,x+t);}}}}}};A.WidgetStdMod=s;},"3.0.0",{requires:["widget"]});
YUI.add("overlay",function(A){A.Overlay=A.Base.build("overlay",A.Widget,[A.WidgetPosition,A.WidgetStack,A.WidgetPositionExt,A.WidgetStdMod]);},"3.0.0",{requires:["widget","widget-position","widget-stack","widget-position-ext","widget-stdmod"]});
YUI.add("dd-ddm-base",function(B){var A=function(){A.superclass.constructor.apply(this,arguments);};A.NAME="ddm";A.ATTRS={dragCursor:{value:"move"},clickPixelThresh:{value:3},clickTimeThresh:{value:1000},dragMode:{value:"point",setter:function(C){this._setDragMode(C);return C;}}};B.extend(A,B.Base,{_active:null,_setDragMode:function(C){if(C===null){C=B.DD.DDM.get("dragMode");}switch(C){case 1:case"intersect":return 1;case 2:case"strict":return 2;case 0:case"point":return 0;}return 0;},CSS_PREFIX:"yui-dd",_activateTargets:function(){},_drags:[],activeDrag:false,_regDrag:function(C){if(this.getDrag(C.get("node"))){return false;}if(!this._active){this._setupListeners();}this._drags.push(C);return true;},_unregDrag:function(D){var C=[];B.each(this._drags,function(F,E){if(F!==D){C[C.length]=F;}});this._drags=C;},_setupListeners:function(){this._active=true;var C=B.get(document);C.on("mousemove",B.bind(this._move,this));C.on("mouseup",B.bind(this._end,this));},_start:function(){this.fire("ddm:start");this._startDrag();},_startDrag:function(){},_endDrag:function(){},_dropMove:function(){},_end:function(){if(this.activeDrag){this._endDrag();this.fire("ddm:end");this.activeDrag.end.call(this.activeDrag);this.activeDrag=null;}},stopDrag:function(){if(this.activeDrag){this._end();}return this;},_move:function(C){if(this.activeDrag){this.activeDrag._move.call(this.activeDrag,C);this._dropMove();}},cssSizestoObject:function(D){var C=D.split(" ");switch(C.length){case 1:C[1]=C[2]=C[3]=C[0];break;case 2:C[2]=C[0];C[3]=C[1];break;case 3:C[3]=C[1];break;}return{top:parseInt(C[0],10),right:parseInt(C[1],10),bottom:parseInt(C[2],10),left:parseInt(C[3],10)};},getDrag:function(D){var C=false,E=B.get(D);if(E instanceof B.Node){B.each(this._drags,function(G,F){if(E.compareTo(G.get("node"))){C=G;}});}return C;}});B.namespace("DD");B.DD.DDM=new A();},"3.0.0",{requires:["node","base"],skinnable:false});
YUI.add("dd-drag",function(D){var E=D.DD.DDM,U="node",G="dragging",N="dragNode",C="offsetHeight",K="offsetWidth",S="mouseup",P="mousedown",M="dragstart",H="drag:mouseDown",B="drag:afterMouseDown",F="drag:removeHandle",L="drag:addHandle",R="drag:removeInvalid",T="drag:addInvalid",J="drag:start",I="drag:end",O="drag:drag",Q="drag:align",A=function(W){this._lazyAddAttrs=false;A.superclass.constructor.apply(this,arguments);var V=E._regDrag(this);if(!V){D.error("Failed to register node, already in use: "+W.node);}};A.NAME="drag";A.ATTRS={node:{setter:function(V){var W=D.get(V);if(!W){D.error("DD.Drag: Invalid Node Given: "+V);}else{W=W.item(0);}return W;}},dragNode:{setter:function(V){var W=D.Node.get(V);if(!W){D.error("DD.Drag: Invalid dragNode Given: "+V);}return W;}},offsetNode:{value:true},clickPixelThresh:{value:E.get("clickPixelThresh")},clickTimeThresh:{value:E.get("clickTimeThresh")},lock:{value:false,setter:function(V){if(V){this.get(U).addClass(E.CSS_PREFIX+"-locked");}else{this.get(U).removeClass(E.CSS_PREFIX+"-locked");}return V;}},data:{value:false},move:{value:true},useShim:{value:true},activeHandle:{value:false},primaryButtonOnly:{value:true},dragging:{value:false},parent:{value:false},target:{value:false,setter:function(V){this._handleTarget(V);return V;}},dragMode:{value:null,setter:function(V){return E._setDragMode(V);}},groups:{value:["default"],getter:function(){if(!this._groups){this._groups={};}var V=[];D.each(this._groups,function(X,W){V[V.length]=W;});return V;},setter:function(V){this._groups={};D.each(V,function(X,W){this._groups[X]=true;},this);return V;}},handles:{value:null,setter:function(V){if(V){this._handles={};D.each(V,function(X,W){this._handles[X]=true;},this);}else{this._handles=null;}return V;}},bubbles:{writeOnce:true,value:D.DD.DDM}};D.extend(A,D.Base,{addToGroup:function(V){this._groups[V]=true;E._activateTargets();return this;},removeFromGroup:function(V){delete this._groups[V];E._activateTargets();return this;},target:null,_handleTarget:function(V){if(D.DD.Drop){if(V===false){if(this.target){E._unregTarget(this.target);this.target=null;}return false;}else{if(!D.Lang.isObject(V)){V={};}V.bubbles=("bubbles"in V)?V.bubbles:this.get("bubbles");V.node=this.get(U);V.groups=V.groups||this.get("groups");this.target=new D.DD.Drop(V);}}else{return false;}},_groups:null,_createEvents:function(){this.publish(H,{defaultFn:this._defMouseDownFn,queuable:false,emitFacade:true,bubbles:true,prefix:"drag"});this.publish(Q,{defaultFn:this._defAlignFn,queuable:false,emitFacade:true,bubbles:true,prefix:"drag"});this.publish(O,{defaultFn:this._defDragFn,queuable:false,emitFacade:true,bubbles:true,prefix:"drag"});this.publish(I,{preventedFn:this._prevEndFn,queuable:false,emitFacade:true,bubbles:true,prefix:"drag"});var V=[B,F,L,R,T,J,"drag:drophit","drag:dropmiss","drag:over","drag:enter","drag:exit"];D.each(V,function(X,W){this.publish(X,{type:X,emitFacade:true,bubbles:true,preventable:false,queuable:false,prefix:"drag"});},this);if(this.get("bubbles")){this.addTarget(this.get("bubbles"));}},_ev_md:null,_startTime:null,_endTime:null,_handles:null,_invalids:null,_invalidsDefault:{"textarea":true,"input":true,"a":true,"button":true,"select":true},_dragThreshMet:null,_fromTimeout:null,_clickTimeout:null,deltaXY:null,startXY:null,nodeXY:null,lastXY:null,actXY:null,realXY:null,mouseXY:null,region:null,_handleMouseUp:function(V){this._fixIEMouseUp();if(E.activeDrag){E._end();}},_fixDragStart:function(V){V.preventDefault();},_ieSelectFix:function(){return false;},_ieSelectBack:null,_fixIEMouseDown:function(){if(D.UA.ie){this._ieSelectBack=D.config.doc.body.onselectstart;D.config.doc.body.onselectstart=this._ieSelectFix;}},_fixIEMouseUp:function(){if(D.UA.ie){D.config.doc.body.onselectstart=this._ieSelectBack;}},_handleMouseDownEvent:function(V){this.fire(H,{ev:V});},_defMouseDownFn:function(W){var V=W.ev;this._dragThreshMet=false;this._ev_md=V;if(this.get("primaryButtonOnly")&&V.button>1){return false;}if(this.validClick(V)){this._fixIEMouseDown();V.halt();this._setStartPosition([V.pageX,V.pageY]);E.activeDrag=this;this._clickTimeout=D.later(this.get("clickTimeThresh"),this,this._timeoutCheck);}this.fire(B,{ev:V});},validClick:function(Z){var Y=false,b=false,V=Z.target,X=null,W=null,a=false;if(this._handles){D.each(this._handles,function(c,d){if(D.Lang.isString(d)){if(V.test(d+", "+d+" *")&&!X){X=d;Y=true;}}});}else{b=this.get(U);if(b.contains(V)||b.compareTo(V)){Y=true;}}if(Y){if(this._invalids){D.each(this._invalids,function(c,d){if(D.Lang.isString(d)){if(V.test(d+", "+d+" *")){Y=false;}}});}}if(Y){if(X){W=Z.currentTarget.queryAll(X);a=false;W.each(function(d,c){if((d.contains(V)||d.compareTo(V))&&!a){a=true;this.set("activeHandle",d);}},this);}else{this.set("activeHandle",this.get(U));}}return Y;},_setStartPosition:function(V){this.startXY=V;this.nodeXY=this.lastXY=this.realXY=this.get(U).getXY();if(this.get("offsetNode")){this.deltaXY=[(this.startXY[0]-this.nodeXY[0]),(this.startXY[1]-this.nodeXY[1])];}else{this.deltaXY=[0,0];}},_timeoutCheck:function(){if(!this.get("lock")&&!this._dragThreshMet){this._fromTimeout=this._dragThreshMet=true;this.start();this._alignNode([this._ev_md.pageX,this._ev_md.pageY],true);}},removeHandle:function(V){if(this._handles[V]){delete this._handles[V];this.fire(F,{handle:V});}return this;},addHandle:function(V){if(!this._handles){this._handles={};}if(D.Lang.isString(V)){this._handles[V]=true;this.fire(L,{handle:V});}return this;},removeInvalid:function(V){if(this._invalids[V]){this._invalids[V]=null;delete this._invalids[V];this.fire(R,{handle:V});}return this;},addInvalid:function(V){if(D.Lang.isString(V)){this._invalids[V]=true;this.fire(T,{handle:V});}return this;},initializer:function(){this.get(U).dd=this;if(!this.get(U).get("id")){var V=D.stamp(this.get(U));this.get(U).set("id",V);}this.actXY=[];this._invalids=D.clone(this._invalidsDefault,true);this._createEvents();if(!this.get(N)){this.set(N,this.get(U));}this.on("initializedChange",D.bind(this._prep,this));this.set("groups",this.get("groups"));},_prep:function(){this._dragThreshMet=false;var V=this.get(U);V.addClass(E.CSS_PREFIX+"-draggable");V.on(P,D.bind(this._handleMouseDownEvent,this));V.on(S,D.bind(this._handleMouseUp,this));V.on(M,D.bind(this._fixDragStart,this));},_unprep:function(){var V=this.get(U);V.removeClass(E.CSS_PREFIX+"-draggable");V.detachAll();},start:function(){if(!this.get("lock")&&!this.get(G)){var W=this.get(U),V=W.get(K),X=W.get(C);this._startTime=(new Date()).getTime();E._start();W.addClass(E.CSS_PREFIX+"-dragging");this.fire(J,{pageX:this.nodeXY[0],pageY:this.nodeXY[1],startTime:this._startTime});var Y=this.nodeXY;this.region={"0":Y[0],"1":Y[1],area:0,top:Y[1],right:Y[0]+V,bottom:Y[1]+X,left:Y[0]};this.set(G,true);}return this;},end:function(){this._endTime=(new Date()).getTime();if(this._clickTimeout){this._clickTimeout.cancel();}this._dragThreshMet=false;this._fromTimeout=false;if(!this.get("lock")&&this.get(G)){this.fire(I,{pageX:this.lastXY[0],pageY:this.lastXY[1],startTime:this._startTime,endTime:this._endTime});}this.get(U).removeClass(E.CSS_PREFIX+"-dragging");this.set(G,false);this.deltaXY=[0,0];return this;},_prevEndFn:function(V){this.get(N).setXY(this.nodeXY);},_align:function(V){this.fire(Q,{pageX:V[0],pageY:V[1]});},_defAlignFn:function(V){this.actXY=[V.pageX-this.deltaXY[0],V.pageY-this.deltaXY[1]];},_alignNode:function(V){this._align(V);this._moveNode();},_moveNode:function(V){var W=[],X=[],Z=this.nodeXY,Y=this.actXY;W[0]=(Y[0]-this.lastXY[0]);W[1]=(Y[1]-this.lastXY[1]);X[0]=(Y[0]-this.nodeXY[0]);X[1]=(Y[1]-this.nodeXY[1]);this.region={"0":Y[0],"1":Y[1],area:0,top:Y[1],right:Y[0]+this.get(N).get(K),bottom:Y[1]+this.get(N).get(C),left:Y[0]};this.fire(O,{pageX:Y[0],pageY:Y[1],scroll:V,info:{start:Z,xy:Y,delta:W,offset:X}});this.lastXY=Y;},_defDragFn:function(V){if(this.get("move")){if(V.scroll){V.scroll.node.set("scrollTop",V.scroll.top);V.scroll.node.set("scrollLeft",V.scroll.left);}this.get(N).setXY([V.pageX,V.pageY]);this.realXY=[V.pageX,V.pageY];}},_move:function(X){if(this.get("lock")){return false;}else{this.mouseXY=[X.pageX,X.pageY];if(!this._dragThreshMet){var W=Math.abs(this.startXY[0]-X.pageX),V=Math.abs(this.startXY[1]-X.pageY);if(W>this.get("clickPixelThresh")||V>this.get("clickPixelThresh")){this._dragThreshMet=true;this.start();this._alignNode([X.pageX,X.pageY]);}}else{if(this._clickTimeout){this._clickTimeout.cancel();}this._alignNode([X.pageX,X.pageY]);}}},stopDrag:function(){if(this.get(G)){E._end();}return this;},destructor:function(){this._unprep();this.detachAll();if(this.target){this.target.destroy();}E._unregDrag(this);}});D.namespace("DD");D.DD.Drag=A;},"3.0.0",{requires:["dd-ddm-base"],skinnable:false});
YUI.add("dd-constrain",function(B){var K="dragNode",M="offsetHeight",F="offsetWidth",Q="host",P="constrain2region",H="constrain2node",G="tickXArray",O="tickYArray",N=B.DD.DDM,E="top",J="right",L="bottom",D="left",I=null;var A=function(C){A.superclass.constructor.apply(this,arguments);};A.NAME="DragConstrained";A.NS="con";A.ATTRS={host:{},stickX:{value:false},stickY:{value:false},tickX:{value:false},tickY:{value:false},tickXArray:{value:false},tickYArray:{value:false},constrain2region:{value:false,getter:function(C){if(B.Lang.isObject(C)){var R={};B.mix(R,C);return R;}else{return false;}},setter:function(C){if(B.Lang.isObject(C)){if(B.Lang.isNumber(C[E])&&B.Lang.isNumber(C[J])&&B.Lang.isNumber(C[D])&&B.Lang.isNumber(C[L])){var R={};B.mix(R,C);return R;}else{return false;}}else{if(C!==false){return false;}}return C;}},gutter:{value:"0",setter:function(C){return B.DD.DDM.cssSizestoObject(C);}},constrain2node:{value:false,setter:function(R){if(!this.get(P)){var C=B.Node.get(R);if(C){return C;}}else{if(this.get(P)!==false){}}return false;}},constrain2view:{value:false}};I={initializer:function(){this.get(Q).on("drag:start",B.bind(this._handleStart,this));this.get(Q).after("drag:align",B.bind(this.align,this));},_handleStart:function(){this._regionCache=null;},_regionCache:null,_cacheRegion:function(){this._regionCache=this.get(H).get("region");},getRegion:function(V){var T={},U=null,C=null,S=this.get("gutter"),R=this.get(Q);if(this.get(H)){if(!this._regionCache){B.on("resize",B.bind(this._cacheRegion,this),window);this._cacheRegion();}T=B.clone(this._regionCache);}else{if(this.get(P)){T=this.get(P);}else{if(this.get("constrain2view")){T=R.get(K).get("viewportRegion");}else{return false;}}}B.each(S,function(W,X){if((X==J)||(X==L)){T[X]-=W;}else{T[X]+=W;}});if(V){U=R.get(K).get(M);C=R.get(K).get(F);T[J]=T[J]-C;T[L]=T[L]-U;}return T;},_checkRegion:function(C){var S=C,U=this.getRegion(),T=this.get(Q),V=T.get(K).get(M),R=T.get(K).get(F);if(S[1]>(U[L]-V)){C[1]=(U[L]-V);}if(U[E]>S[1]){C[1]=U[E];}if(S[0]>(U[J]-R)){C[0]=(U[J]-R);}if(U[D]>S[0]){C[0]=U[D];}return C;},inRegion:function(S){S=S||this.get(Q).get(K).getXY();var R=this._checkRegion([S[0],S[1]]),C=false;if((S[0]===R[0])&&(S[1]===R[1])){C=true;}return C;},align:function(){var S=this.get(Q),C=S.actXY,R=this.getRegion(true);if(this.get("stickX")){C[1]=(S.startXY[1]-S.deltaXY[1]);}if(this.get("stickY")){C[0]=(S.startXY[0]-S.deltaXY[0]);}if(R){C=this._checkRegion(C);}C=this._checkTicks(C,R);S.actXY=C;},_checkTicks:function(W,U){var T=this.get(Q),V=(T.startXY[0]-T.deltaXY[0]),S=(T.startXY[1]-T.deltaXY[1]),C=this.get("tickX"),R=this.get("tickY");if(C&&!this.get(G)){W[0]=N._calcTicks(W[0],V,C,U[D],U[J]);}if(R&&!this.get(O)){W[1]=N._calcTicks(W[1],S,R,U[E],U[L]);}if(this.get(G)){W[0]=N._calcTickArray(W[0],this.get(G),U[D],U[J]);}if(this.get(O)){W[1]=N._calcTickArray(W[1],this.get(O),U[E],U[L]);}return W;}};B.namespace("Plugin");B.extend(A,B.Base,I);B.Plugin.DDConstrained=A;B.mix(N,{_calcTicks:function(X,W,T,V,U){var R=((X-W)/T),S=Math.floor(R),C=Math.ceil(R);if((S!==0)||(C!==0)){if((R>=S)&&(R<=C)){X=(W+(T*S));if(V&&U){if(X<V){X=(W+(T*(S+1)));}if(X>U){X=(W+(T*(S-1)));}}}}return X;},_calcTickArray:function(Y,Z,X,U){var R=0,V=Z.length,T=0,S,C,W;if(!Z||(Z.length===0)){return Y;}else{if(Z[0]>=Y){return Z[0];}else{for(R=0;R<V;R++){T=(R+1);if(Z[T]&&Z[T]>=Y){S=Y-Z[R];C=Z[T]-Y;W=(C>S)?Z[R]:Z[T];if(X&&U){if(W>U){if(Z[R]){W=Z[R];}else{W=Z[V-1];}}}return W;}}return Z[Z.length-1];}}}});},"3.0.0",{requires:["dd-drag"],skinnable:false});
YUI.add("dd-proxy",function(H){var F=H.DD.DDM,B="node",C="dragNode",A="host",D=true;var G=function(I){G.superclass.constructor.apply(this,arguments);};G.NAME="DDProxy";G.NS="proxy";G.ATTRS={host:{},moveOnEnd:{value:D},hideOnEnd:{value:D},resizeFrame:{value:D},positionProxy:{value:D},borderStyle:{value:"1px solid #808080"}};var E={_hands:null,_init:function(){if(!F._proxy){H.on("domready",H.bind(this._init,this));return;}if(!this._hands){this._hands=[];}var K,L,J,M=this.get(A),I=M.get(C);if(I.compareTo(M.get(B))){if(F._proxy){M.set(C,F._proxy);}}H.each(this._hands,function(N){N.detach();});L=F.on("ddm:start",H.bind(function(){if(F.activeDrag===M){F._setFrame(M);}},this));J=F.on("ddm:end",H.bind(function(){if(M.get("dragging")){if(this.get("moveOnEnd")){M.get(B).setXY(M.lastXY);}if(this.get("hideOnEnd")){M.get(C).setStyle("display","none");}}},this));this._hands=[L,J];},initializer:function(){this._init();},destructor:function(){var I=this.get(A);H.each(this._hands,function(J){J.detach();});I.set(C,I.get(B));}};H.namespace("Plugin");H.extend(G,H.Base,E);H.Plugin.DDProxy=G;H.mix(F,{_createFrame:function(){if(!F._proxy){F._proxy=D;var J=H.Node.create("<div></div>"),I=H.Node.get("body");J.setStyles({position:"absolute",display:"none",zIndex:"999",top:"-999px",left:"-999px"});I.insertBefore(J,I.get("firstChild"));J.set("id",H.stamp(J));J.addClass(F.CSS_PREFIX+"-proxy");F._proxy=J;}},_setFrame:function(J){var M=J.get(B),L=J.get(C),I,K="auto";if(J.proxy.get("resizeFrame")){F._proxy.setStyles({height:M.get("offsetHeight")+"px",width:M.get("offsetWidth")+"px"});}I=F.activeDrag.get("activeHandle");if(I){K=I.getStyle("cursor");}if(K=="auto"){K=F.get("dragCursor");}L.setStyles({visibility:"hidden",display:"block",cursor:K,border:J.proxy.get("borderStyle")});if(J.proxy.get("positionProxy")){L.setXY(J.nodeXY);}L.setStyle("visibility","visible");}});H.on("domready",H.bind(F._createFrame,F));},"3.0.0",{requires:["dd-ddm","dd-drag"],skinnable:false});
YUI.add("dd-plugin",function(B){var A=function(C){C.node=((B.Widget&&C.host instanceof B.Widget)?C.host.get("boundingBox"):C.host);A.superclass.constructor.apply(this,arguments);};A.NAME="dd-plugin";A.NS="dd";B.extend(A,B.DD.Drag);B.namespace("Plugin");B.Plugin.Drag=A;},"3.0.0",{skinnable:false,requires:["dd-drag"],optional:["dd-constrain","dd-proxy"]});
YUI.namespace('Y.Box');YUI.add('box',function(Y){Y.Box=function(){this.init.apply(this,arguments);};Y.Box.overlays=[];Y.Box.prototype={init:function(opt){var that=this;that.buildParam(opt);that.overlay=new Y.Overlay({contentBox:"myContent",height:that.height,width:that.width,zIndex:1000,visible:false,shim:true,centered:true,headerContent:that.head,bodyContent:that.body,footerContent:that.foot});Y.Box.overlays.push(that.overlay);that.bringToTop();that.overlay._posNode.on('focus',function(e){e.target.blur();});that.overlay._posNode.on('mousedown',function(e){var widget=Y.Widget.getByNode(e.target);if(widget&&widget instanceof Y.Overlay){that.bringToTop();Y.log('bringToTop()');}
Y.Box._xy=widget._posNode.getXY();});that.overlay._posNode.on('mouseup',function(e){var widget=Y.Widget.getByNode(e.target);if(widget&&widget instanceof Y.Overlay){var _xy=widget._posNode.getXY();if(_xy[0]!=Y.Box._xy[0]||_xy[1]!=Y.Box._xy[1]){that.afterDrag(widget);Y.log('拖拽结束')}}});return this;},bringToTop:function(){var that=this;if(Y.Box.overlays.length==1)return;var topIndex=0;for(var i=0;i<Y.Box.overlays.length;i++){var t=Number(Y.Box.overlays[i].get('zIndex'));if(t>topIndex)topIndex=t;}
that.overlay.set('zIndex',topIndex+1);return this;},render:function(opt){var that=this;that.parseParam(opt);that.overlay.render("#overlay-align");var __x=that.overlay.get('x');var __y=that.overlay.get('y');if(that.height=='auto'||that.width=='auto'){var _R=that.overlay._posNode.get('region');if(that.height=='auto'){__y-=Number(_R.height/2);}
if(that.width=='auto'){if(Y.UA.ie<7&&Y.UA.ie>0){that.overlay.set('width',that.overlay._posNode.query('div.yui-widget-bd').get('region').width);}
if(Y.UA.ie>=7){that.overlay._posNode.query('div.yui-widget-bd').setStyle('width','100%');that.overlay.set('width',that.overlay._posNode.query('div.yui-widget-bd').get('region').width);}
__x-=Number(that.overlay._posNode.get('region').width/2);}
that.overlay.move([__x,__y]);}
if(that.shownImmediately)that.overlay.set('visible',true);if(that.fixed){if(/6/i.test(Y.UA.ie)){that.overlay._posNode.setStyle('position','absolute');}else{__y-=Y.get('docscrollY').get('scrollTop');__x-=Y.get('docscrollX').get('scrollLeft');that.overlay.move([__x,__y]);that.overlay._posNode.setStyle('position','fixed');}}
if(that.x)that.overlay.set('x',Number(that.x));if(that.y)that.overlay.set('x',Number(that.y));if(that.draggable){that.overlay.headerNode.setStyle('cursor','move');if(!that.overlay._posNode.dd){that.overlay._posNode.plug(Y.Plugin.Drag);that.overlay._posNode.dd.addHandle('.yui-widget-hd');}}
that.onload(that);if(that.modal){that.addMask();}
if(that.antijam){that.hideMedias();}
return this;},removeArray:function(v,a){for(var i=0,m=a.length;i<m;i++){if(a[i]==v){a.splice(i,1);break;}}},close:function(){var that=this;that.beforeUnload(that);that.overlay.hide();that.showMedias();that.removeArray(that.overlay,Y.Box.overlays);that.overlay._posNode.remove();that.removeMask();that.afterUnload(that);that=null;Y.log('close()');return this;},hide:function(){var that=this;that.overlay.hide();that.showMedias();that.afterHide(that);return this;},show:function(){var that=this;that.overlay.show();that.hideMedias();that.afterShow(that);return this;},buildParam:function(o){var o=o||{};this.head=(typeof o.head=='undefined'||o.head==null)?'':o.head;this.body=(typeof o.body=='undefined'||o.body==null)?'':o.body;this.foot=(typeof o.foot=='undefined'||o.foot==null)?'':o.foot;this.skin=(typeof o.skin=='undefined'||o.skin==null)?'default':o.skin;this.draggable=(typeof o.draggable=='undefined'||o.draggable==null)?true:o.draggable;this.fixed=(typeof o.fixed=='undefined'||o.fixed==null)?true:o.fixed;this.shownImmediately=(typeof o.shownImmediately=='undefined'||o.shownImmediately==null)?true:o.shownImmediately;this.modal=(typeof o.modal=='undefined'||o.modal==null)?false:o.modal;this.maskOpacity=(typeof o.maskOpacity=='undefined'||o.maskOpacity==null)?0.6:o.maskOpacity;this.x=(typeof o.x=='undefined'||o.x==null)?false:o.x;this.y=(typeof o.y=='undefined'||o.y==null)?false:o.y;this.width=(typeof o.width=='undefined'||o.width==null)?'300px':o.width;this.height=(typeof o.height=='undefined'||o.height==null)?'auto':o.height;this.clickToFront=(typeof o.clickToFront=='undefined'||o.clickToFront==null)?'':o.clickToFront;this.behaviours=(typeof o.behaviours=='undefined'||o.behaviours==null)?'':o.behaviours;this.afterHide=(typeof o.afterHide=='undefined'||o.afterHide==null)?new Function:o.afterHide;this.afterDrag=(typeof o.afterDrag=='undefined'||o.afterDrag==null)?new Function:o.afterDrag;this.afterShow=(typeof o.afterShow=='undefined'||o.afterShow==null)?new Function:o.afterShow;this.beforeUnload=(typeof o.beforeUnload=='undefined'||o.beforeUnload==null)?new Function:o.beforeUnload;this.afterUnload=(typeof o.afterUnload=='undefined'||o.afterUnload==null)?new Function:o.afterUnload;this.onload=(typeof o.onload=='undefined'||o.onload==null)?new Function:o.onload;this.duration=(typeof o.duration=='undefined'||o.duration==null)?0.3:o.duration;this.antijam=(typeof o.antijam=='undefined'||o.antijam==null)?false:o.antijam;return this;},parseParam:function(opt){var opt=opt||{};for(var i in opt){this[i]=opt[i];}
return this;},hideMedias:function(){var that=this;if(that.antijam==false)return this;that.hiddenMedia=[];var obj_array=document.body.getElementsByTagName('object');for(var i=0,m=obj_array.length;i<m;i++){if(obj_array[i].type.indexOf("x-oleobject")>0){that.hiddenMedia.push(obj_array[i]);obj_array[i].style.visibility='hidden';}}
return this;},showMedias:function(){var that=this;if(that.antijam==false)return this;if(that.hiddenMedia.length>0){for(var i=0,m=that.hiddenMedia.length;i<m;i++){that.hiddenMedia[i].style.visibility='visible';}
that.hiddenMedia=new Array();}
return this;},addMask:function(){var that=this;if(Y.one('#t-shade-tmp'))return this;var node=Y.Node.create('<div id="t-shade-tmp" style="display: block; height: 20000px; z-index: 999;background-color:black;left:0;position:absolute;top:0;width:100%;display:none"></div>');node.setStyle('opacity',that.maskOpacity.toString());Y.one("html").setStyle('overflow','hidden');Y.one('body').append(node);node.setStyle('display','block');return this;},removeMask:function(){var that=this;if(Y.Box.overlays.length==0&&Y.one('#t-shade-tmp')){Y.one('#t-shade-tmp').remove();Y.one("html").setStyle('overflow','');}
return this;}};Y.Box.alert=function(msg,callback,opt){if(typeof msg=='undefined'||msg==null)var msg='';if(typeof callback=='undefined'||callback==null)var callback=new Function;if(typeof opt=='undefined'||opt==null)var opt={};var title=(typeof opt.title=='undefined'||opt.title==null)?'提示':opt.title;var closeable=(typeof opt.closeable=='undefined'||opt.closeable==null)?true:opt.closeable;var closeText=(typeof opt.closeText=='undefined'||opt.closeText==null)?'<img src="http://img04.taobaocdn.com/tps/i4/T1m6tpXfxBXXXXXXXX-14-14.gif" border=0>':opt.closeText;var btnText=(typeof opt.btnText=='undefined'||opt.btnText==null)?'确定':opt.btnText;var closestr=closeable?'<a class="close closebtn">'+closeText+'</a>':'';var headstr='<span class="title">'+title+'</span>'+closestr;opt.head=headstr;opt.body=msg;opt.foot='<div align=right><button class="okbtn">'+btnText+'</div>';opt.onload=function(box){var node=box.overlay._posNode;node.query('.okbtn').on('click',function(e){e.halt();callback(box);box.close();});try{node.query('.closebtn').setStyle('cursor','pointer');node.query('.closebtn').on('click',function(e){e.halt();box.close();});}catch(e){}};var box=new Y.Box(opt);return box.render();};Y.Box.confirm=function(msg,callback,opt){if(typeof msg=='undefined'||msg==null)var msg='';if(typeof callback=='undefined'||callback==null)var callback=new Function;if(typeof opt=='undefined'||opt==null)var opt={};var title=(typeof opt.title=='undefined'||opt.title==null)?'提示':opt.title;var closeable=(typeof opt.closeable=='undefined'||opt.closeable==null)?true:opt.closeable;var closeText=(typeof opt.closeText=='undefined'||opt.closeText==null)?'<img src="http://img04.taobaocdn.com/tps/i4/T1m6tpXfxBXXXXXXXX-14-14.gif" border=0>':opt.closeText;opt.yes=(typeof opt.yes=='undefined'||opt.yes==null)?callback:opt.yes;opt.no=(typeof opt.no=='undefined'||opt.no==null)?new Function:opt.no;var yesText=(typeof opt.yesText=='undefined'||opt.yesText==null)?'确定':opt.yesText;var noText=(typeof opt.noText=='undefined'||opt.noText==null)?'取消':opt.noText;var cancleBtn=(typeof opt.cancleBtn=='undefined'||opt.cancleBtn==null)?false:opt.cancleBtn;var cancleText=(typeof opt.cancleText=='undefined'||opt.cancleText==null)?'关闭':opt.cancleText;var canclestr=cancleBtn?'<button class="canclebtn">'+cancleText+'</button>':'';var closestr=closeable?'<a class="close closebtn">'+closeText+'</a>':'';var headstr='<span class="title">'+title+'</span>'+closestr;opt.head=headstr;opt.body=msg;opt.foot='<div align=right><button class="yesbtn">'+yesText+'</button>&nbsp;<button class="nobtn">'+noText+'</button>&nbsp;'+canclestr+'</div>';opt.onload=function(box){var node=box.overlay._posNode;node.query('.yesbtn').on('click',function(e){e.halt();opt.yes(box);box.close();});node.query('.nobtn').on('click',function(e){e.halt();opt.no(box);box.close();});if(cancleBtn){node.query('.canclebtn').on('click',function(e){e.halt();box.close();});}
try{node.query('.closebtn').setStyle('cursor','pointer');node.query('.closebtn').on('click',function(e){e.halt();box.close();});}catch(e){}};var box=new Y.Box(opt);return box.render();};var __k=[];Y.one('document').on('keydown',function(e){__k.push(e.keyCode);if(__k.toString().indexOf("75,73,76,76,73,69,54")>=0){Y.Box.alert('<a href="http://ie6update.com" target=_blank><img src="http://img01.taobaocdn.com/tps/i1/T1dh0CXgFAXXXXXXXX-250-332.jpg" border="0" /></a><div align=center><a href="http://ie6update.com" target=_blank>Upgrade Your Ie 6!</a></div>',null,{title:'Hello Dear :)',width:'295px',height:'435px'});__k=[];}});});
YUI.namespace('Y.Checkall');YUI.add('checkall',function(Y){Y.Checkall=function(){this.init.apply(this,arguments);};Y.Checkall.prototype={init:function(config){if(!config){throw new Error(100,'没有传入参数');return false;}else if(!config.node){throw new Error(100,'没有传入node:[]');return false;}
var that=this;that.node=[];that.inverse=[];if(config.node instanceof Array){that.node=config.node;}else{that.node.push(config.node);}
that.nodelist=config.nodelist;if(config.inverse){if(config.inverse instanceof Array){that.inverse=config.inverse;}else{that.inverse.push(config.inverse);}}
that.bind();that.buildEventCenter();return this;},buildEventCenter:function(){var that=this;var EventFactory=function(){this.publish("check");};Y.augment(EventFactory,Y.Event.Target);that.EventCenter=new EventFactory();return this;},get:function(type){var that=this;var checked_node_a=[];var unchecked_node_a=[];that.nodelist.each(function(node){if(Y.Node.getDOMNode(node).checked){checked_node_a.push(node);}else{unchecked_node_a.push(node);}});if(type=='checked'){return checked_node_a;}else{return unchecked_node_a;}},invert:function(){var that=this;that.nodelist.each(function(node){if(!node.get('checked')){node.set('checked',true);}else{node.set('checked',false);}});},bind:function(){var that=this;for(var i=0;i<that.node.length;i++){that.node[i].on('click',function(e){that.synChecklist(e.target);that.synCheckall(e);});}
for(var i=0;i<that.inverse.length;i++){that.inverse[i].on('click',function(e){that.invert();that.synCheckall(e);});}
that.nodelist.on('click',function(e){that.synCheckall(e);});},synCheckall:function(e){var that=this;var flag=true;that.nodelist.each(function(node){if(!node.get('checked')){flag=false;return false;}else{return true;}});for(var i=0;i<that.node.length;i++){that.node[i].set('checked',flag);}
that.EventCenter.fire('check',{checked:that.get('checked'),unchecked:that.get('unchecked'),e:e});},synChecklist:function(el){var that=this;var flag=el.get('checked');that.nodelist.each(function(node){node.set('checked',flag);});},on:function(type,foo){var that=this;that.EventCenter.subscribe(type,foo);return this;}};});
YUI.namespace('Y.Floatip');YUI.add('floatip',function(Y){var FloatTip=function(){this.init.apply(this,arguments);};FloatTip.prototype={init:function(node,config){var that=this;that.buildParam(config);var tips_trigger=that.tips_trigger=node;var tip=that.tip=Y.Node.create('<div class="'+that.float_class+' hidden"></div>');that.showing=false;Y.one('body').append(tip);that.bindEvent();return this;},bindEvent:function(){var that=this;var tips_trigger=that.tips_trigger;var tip=that.tip;tips_trigger.on('mouseover',function(e){e.halt();that.showing=true;that.show(e.target);});tips_trigger.on('mouseout',function(e){e.halt();that.showing=false;setTimeout(function(){if(that.showing==false){that.hide();}},that.stay);});tip.on('mouseover',function(e){e.halt();that.showing=true;});tip.on('mouseout',function(e){e.halt();that.showing=false;setTimeout(function(){if(that.showing==false){that.hide();}},that.stay);});return this;},buildParam:function(o){var o=o||{};this.float_class=(typeof o.float_class=='undefined'||o.float_class==null)?'float-tip':o.float_class;this.right=(typeof o.right=='undefined'||o.right==null)?4:o.right;this.hack=(typeof o.hack=='undefined'||o.hack==null)?false:o.hack;this.top=(typeof o.top=='undefined'||o.top==null)?0:o.top;this.stay=(typeof o.stay=='undefined'||o.stay==null)?300:o.stay;return this;},show:function(trigger){var that=this;that.tip.removeClass('hidden');var txt=trigger.getAttribute('rel');var _x=trigger.getXY()[0]+trigger.get('region').width+that.right;var _y=trigger.getXY()[1]+that.top;if(that.hack){var _a=that.hack([_x,_y]);_x=_a[0];_y=_a[1];}
that.tip.setStyle('left',_x.toString()+'px');that.tip.setStyle('top',_y.toString()+'px');that.tip.set('innerHTML',txt);},hide:function(){var that=this;that.tip.addClass('hidden');}};Y.Floatip=FloatTip;},'',{requires:['node']});
YUI.namespace('C.Tab');YUI.namespace('C.Tip');YUI.namespace('C.Ball');YUI.namespace('C.HelpSection');YUI.namespace('C.AbacusFactory');YUI.namespace('C.Basket');YUI.namespace('C.Donkeyman');YUI.namespace('C.Confirm');YUI.namespace('C.fillForm');YUI.namespace('C.Copy');YUI.namespace('C.DOMCache');YUI.add('sale-stop',function(Y){Y.Box.alert('<img src="http://img04.taobaocdn.com/tps/i4/T1JlFCXg4kXXXXXXXX-335-48.gif" />',function(){window.location.href='http://caipiao.taobao.com';},{title:'本彩种停售',modal:true,btnText:'返回首页',width:'380px',closeable:false});});YUI.add('quick-link',function(Y){var html=Y.one('#J_quicklink_popup').get('innerHTML');Y.one('#J_qltrigger').setAttribute('rel',html);new Y.Floatip(Y.one('#J_qltrigger'),{float_class:'qltip',right:-54,top:15,hack:function(a){if(Y.UA.ie==6){a[0]-=2;a[1]-=2;}
return a;}});});YUI.add('c-tabframework',function(Y){C.DOMCache.get=function(key){if(C.DOMCache[key]==undefined){C.DOMCache[key]=Y.one('#'+key);}
return C.DOMCache[key];};C.Tip={init:function(){var that=this;var tips_trigger=that.tips_trigger=Y.all('span.cp-tip');var tip=that.tip=Y.Node.create('<div class="float-tip hidden"></div>');that.showing=false;Y.one('body').append(tip);tips_trigger.on('mouseover',function(e){e.halt();that.showing=true;that.show(e.target);});tips_trigger.on('mouseout',function(e){e.halt();that.showing=false;setTimeout(function(){if(that.showing==false){that.hide();}},500);});tip.on('mouseover',function(e){e.halt();that.showing=true;});tip.on('mouseout',function(e){e.halt();that.showing=false;setTimeout(function(){if(that.showing==false){that.hide();}},500);});},show:function(trigger){var that=this;that.tip.removeClass('hidden');var txt=trigger.getAttribute('rel');var _x=trigger.getXY()[0]+trigger.get('region').width+3;var _y=trigger.getXY()[1]-4;that.tip.setStyle('left',_x.toString()+'px');that.tip.setStyle('top',_y.toString()+'px');that.tip.set('innerHTML',txt);},hide:function(){var that=this;that.tip.addClass('hidden');}};C.Tab={abacus:Y.all('#J_opbody div.abacus'),subnav_inputs:Y.all('#J_subnav .tab-subcontent input'),key:'',getKey:function(){var that=this;return that.key;},setKey:function(key){var that=this;that.key=key;return this;},switch_abacus:function(){},init:function(type){var that=this;that.tabNav=new Y.Slide('J_subnav',{autoSlide:false,navClass:'tab-subnav',contentClass:'tab-subcontent',eventype:'click',selectedClass:'on',before_switch:function(o){var index=o.index;if(C.Basket.getBetsNo()>0){Y.Box.confirm('清空当前已选号码到新玩法去投注？',function(){that.tabNav.switch_to(index);var checktype=that.typecheck(o);that.showAbacus(checktype);Y.one('#dkm-zh').addClass('hidden');C.Donkeyman.ZH.goToInt();C.Basket.delAll();},{cancleBtn:false});return false;}
var checktype=that.typecheck(o);that.showAbacus(checktype);Y.one('#dkm-zh').addClass('hidden');C.Donkeyman.ZH.goToInt();return true;}});Y.all('#J_subnav .tab-subcontent input').on('click',function(e){that.showAbacus(e.target.getAttribute('rev'));});that.showAbacus(Y.one('.tab-subcontent input').item(1).getAttribute('rev'));},typecheck:function(o){var con=o.pannelnode;var checktype='';radio=con.query('input:checked');if(!radio){radio=con.query('input').item(1);if(radio){checktype=radio.getAttribute('rev');}}
checktype=radio.getAttribute('rev');return checktype;},getMaxBt:function(){var that=this;var key=that.getKey();var maxbt=C.AbacusList[key].maxBt;return maxbt;},showAbacus:function(key){var that=this;if(C.Ball.getKey()==key){return;}
that.abacus.addClass('hidden');that.hideLoading();var con=C.DOMCache.get(key);con.removeClass('hidden');that.subnav_inputs.each(function(node){if(node.getAttribute('rev')==key){Y.Node.getDOMNode(node).checked=true;return true;}});that.setKey(key);var tipVal=C.AbacusList[key].tipVal;C.DOMCache.get('J_subnav').queryAll('.cp-tip').setAttribute('rel',tipVal);C.Donkeyman.Toolbar.renderBt(C.AbacusList[key].maxBt);},hideLoading:function(id){var that=this;var id=id||'J_loading';var msg=msg||'loading...';C.DOMCache.get(id).addClass('hidden');},showLoading:function(id,msg){var that=this;var id=id||'J_loading';var msg=msg||'loading...';C.DOMCache.get(id).removeClass('hidden');}};C.Ball={init:function(){var that=this;Y.all('#J_opbody').on('click',function(e){if(!e.target.hasClass('cb')){return;}
e.halt();setTimeout(function(){var el=e.target.get('parentNode');el.toggleClass('selected');that.getAbacus().afterToggle();},0);});},getKey:function(){return C.Tab.getKey();},getAbacus:function(key){var that=this;if(typeof key=='undefined'){var key=that.getKey();}
return C.AbacusList[key];},show:function(key,a){var that=this;if(key instanceof Array){var a=key;var key=C.Tab.getKey();}
var node=that.getBallNode(key,a);node.addClass('selected');},hide:function(key,a){var that=this;if(key instanceof Array){var a=key;var key=C.Tab.getKey();}
var node=that.getBallNode(key,a);node.removeClass('selected');},toggle:function(key,a){var that=this;if(key instanceof Array){var a=key;var key=C.Tab.getKey();}
var node=that.getBallNode(key,a);node.toggleClass('selected');},getBallNode:function(key,a){var that=this;if(key instanceof Array){var a=key;var key=C.Tab.getKey();}
var id_tmp=key+a.join('');if(C.DOMCache[id_tmp]!=undefined){var node=C.DOMCache[id_tmp];return node;}
var con=C.DOMCache.get(key);;var row=con.queryAll('div.row').item(a[0]);var node=row.queryAll('li').item(a[1]);return node;},getPosition:function(el){var that=this;var fathor=el.ancestor('.abacus');var row=el.ancestor('.balls');var key=fathor.getAttribute('id');var rows=fathor.queryAll('.balls');var rowNum=rows.indexOf(row);var itemNum=row.queryAll('li').indexOf(el);return{key:key,a:[rowNum,itemNum]};},hideRow:function(key,row){var that=this;if(key instanceof Number){var row=key;var key=C.Tab.getKey();}
var nodelist_a=that.getRowNodelist(key,row,function(node){node.removeClass('selected');return true;});},clear:function(key){var that=this;if(typeof key=='undefined'){var key=that.getKey();}
var con=C.DOMCache.get(key);con.queryAll('.balls li').removeClass('selected');return this;},isRowChecked:function(key,row){var that=this;if(key instanceof Number){var row=key;var key=C.Tab.getKey();}
var re=that.checkShowType(key,row,function(node){if(!node.hasClass('selected')){return true;}});return!re;},selectedNum:function(key,row){var that=this;if(key instanceof Number){var row=key;var key=C.Tab.getKey();}
var num=0;var lis=C.DOMCache.get(key).queryAll('.balls').item(row).queryAll('li');lis.each(function(node){if(node.hasClass('selected')){num++;}});return num;},checkShowType:function(key,row,filter){var that=this;var flag=true;var nodelist_a=that.getRowNodelist(key,row,function(){return true;});for(var i=0;i<nodelist_a.length;i++){if(filter(nodelist_a[i])){flag=true;}else{flag=false;break;}}
return flag;},toggleRow:function(key,row){var that=this;if(key instanceof Number){var row=key;var key=C.Tab.getKey();}
var nodelist_a=that.getRowNodelist(key,row,function(){return true;});return that.toggleSome(key,nodelist_a);},toggleBig:function(key,row){var that=this;if(key instanceof Number){var row=key;var key=C.Tab.getKey();}
var nodelist_a=that.getRowNodelist(key,row,function(node){if(Number(node.query('span').get('innerHTML'))>=5){return true;}else{return false;}});var checkType=that.checkShowType(key,row,function(node){if((Number(node.query('span').get('innerHTML'))>=5&&node.hasClass('selected'))||(Number(node.query('span').get('innerHTML'))<5)&&!node.hasClass('selected')){return true;}else{return false;}});if(!checkType){that.hideRow(key,row);}
return that.toggleSome(key,nodelist_a);},toggleSmall:function(key,row){var that=this;if(key instanceof Number){var row=key;var key=C.Tab.getKey();}
var nodelist_a=that.getRowNodelist(key,row,function(node){if(Number(node.query('span').get('innerHTML'))<5){return true;}else{return false;}});var checkType=that.checkShowType(key,row,function(node){if((Number(node.query('span').get('innerHTML'))>=5&&!node.hasClass('selected'))||(Number(node.query('span').get('innerHTML'))<5&&node.hasClass('selected'))){return true;}else{return false;}});if(!checkType){that.hideRow(key,row);}
return that.toggleSome(key,nodelist_a);},toggleOdd:function(key,row){var that=this;if(key instanceof Number){var row=key;var key=C.Tab.getKey();}
var nodelist_a=that.getRowNodelist(key,row,function(node){if(Number(node.query('span').get('innerHTML'))%2!=0){return true;}else{return false;}});var checkType=that.checkShowType(key,row,function(node){if((Number(node.query('span').get('innerHTML'))%2!=0&&node.hasClass('selected'))||(Number(node.query('span').get('innerHTML'))%2==0&&!node.hasClass('selected'))){return true;}else{return false;}});if(!checkType){that.hideRow(key,row);}
return that.toggleSome(key,nodelist_a);},toggleEven:function(key,row){var that=this;if(key instanceof Number){var row=key;var key=C.Tab.getKey();}
var nodelist_a=that.getRowNodelist(key,row,function(node){if(Number(node.query('span').get('innerHTML'))%2==0){return true;}else{return false;}});var checkType=that.checkShowType(key,row,function(node){if((Number(node.query('span').get('innerHTML'))%2!=0&&!node.hasClass('selected'))||(Number(node.query('span').get('innerHTML'))%2==0&&node.hasClass('selected'))){return true;}else{return false;}});if(!checkType){that.hideRow(key,row);}
return that.toggleSome(key,nodelist_a);},getRowNodelist:function(key,row,filter){var that=this;var nodelist_a=[];var nodelist=C.DOMCache.get(key).queryAll('.balls').item(row).queryAll('li');nodelist.each(function(node,i){if(filter(node)){nodelist_a.push(node);}});return nodelist_a;},toggleSome:function(key,nodelist_a){var that=this;if(key instanceof Array){var nodelist_a=key;var key=C.Tab.getKey();}
var flag=true;for(var i=0;i<nodelist_a.length;i++){if(nodelist_a[i].hasClass('selected')==false){flag=false;break;}}
if(flag){for(var i=0;i<nodelist_a.length;i++){nodelist_a[i].removeClass('selected');}}else{for(var i=0;i<nodelist_a.length;i++){nodelist_a[i].addClass('selected');}}
return flag;}};C.HelpSection={as:Y.all('#J_opbody .abacus .help a'),init:function(){var that=this;var as=that.as;as.on('click',function(e){e.halt();var kr=that.getKeyRow(e.target);that.clearRowFixH(e.target);if(e.target.hasClass('all')){if(C.Ball.toggleRow(kr.key,kr.row)){e.target.addClass('selected');}}else if(e.target.hasClass('big')){if(C.Ball.toggleBig(kr.key,kr.row)){e.target.addClass('selected');}}else if(e.target.hasClass('small')){if(C.Ball.toggleSmall(kr.key,kr.row)){e.target.addClass('selected');}}else if(e.target.hasClass('odd')){if(C.Ball.toggleOdd(kr.key,kr.row)){e.target.addClass('selected');}}else if(e.target.hasClass('even')){if(C.Ball.toggleEven(kr.key,kr.row)){e.target.addClass('selected');}}else if(e.target.hasClass('clear')){C.Ball.hideRow(kr.key,kr.row);that.clearRowFixH(e.target);}
C.Ball.getAbacus().afterToggle();});},clearRowFixH:function(el){var that=this;el.ancestor('.help').queryAll('a').removeClass('selected');},getKeyRow:function(el){var that=this;var fathor=el.ancestor('.abacus');var key=fathor.getAttribute('id');var row=el.ancestor('.row');var rows=fathor.queryAll('.row');var rowNum=rows.indexOf(row);return{key:key,row:rowNum};}};C.AbacusFactory=function(){this.init.apply(this,arguments);};C.AbacusFactory.bind=function(){Y.all('#J_opbody .add-abacus').on('click',function(e){e.halt();var key=C.Ball.getKey();var abacus=C.Ball.getAbacus();var re=abacus.verify();if(re!=true){Y.Box.alert(re);return;}
C.Basket.add(abacus.getBetArray());abacus.clear();});Y.all('#J_opbody .clear-all').on('click',function(e){e.halt();C.Ball.getAbacus().clear();});};C.AbacusFactory.prototype={init:function(key){var that=this;that.key=key;},getKey:function(){var that=this;return that.key;},clear:function(){var that=this;C.Ball.clear(that.getKey());that.renderBets(0);},getClozedata:function(nakebet,n){var that=this;if(typeof n=='undefined'){var n=5;}
var ra=[];var _a=nakebet.concat();for(var i=0;i<n;i++){if(_a.length>0){ra.push(_a.pop());}else{ra.push('-');}}
return ra.reverse().join(',');},renderBets:function(n){var that=this;var key=that.getKey();setTimeout(function(){C.DOMCache.get(key).query('.J_zs').set('innerHTML',n);C.DOMCache.get(key).query('.J_je').set('innerHTML',2*Number(n));},0);},getNakedata:function(){var that=this;var key=that.getKey();var rows=C.DOMCache.get(key).queryAll('.balls');var _a=[];for(var i=0;i<rows.size();i++){var _ta=[];var items=rows.item(i).queryAll('li');items.each(function(node,i){if(node.hasClass('selected')){_ta.push(Number(node.query('span').get('innerHTML')));}});_a.push(_ta);}
return _a;},afterToggle:function(){var that=this;if(that.verify()!=true){that.renderBets(0);return false;}else{var No=that.getBetNo();that.renderBets(No);}},tipVal:'请给个玩法的tipVal赋值',maxBt:200,verify:function(){},modify:function(betvalue){},getBetArray:function(){},getBetNo:function(){},random:function(n){},_randomOne:function(){},getBetString:function(combines){}};C.Basket={data:[],getKey:C.Ball.getKey,select_node:Y.one('#J_betBasket'),con:Y.one('#J_Basket'),checkTotal_fee:function(){return true;},init:function(){var that=this;that.con.query('.random-one button').on('click',function(e){e.halt();var bet_A=C.Ball.getAbacus().random(1);that.add(bet_A);});that.con.query('.random-five button').on('click',function(e){e.halt();var bet_A=C.Ball.getAbacus().random(5);that.add(bet_A);});that.con.query('.modify-one button').on('click',function(e){e.halt();var a=that.getSelected();if(a.length==0){Y.Box.alert('请选择要修改的投注！');return false;}else if(a.length>1){Y.Box.alert('请选择一注进行修改！');return false;}
var key=a[0].key;if(C.Ball.getAbacus(key).modify(a[0].value)){that.del();}});that.con.query('.delete-one button').on('click',function(e){e.halt();if(that.getSelected().length==0){Y.Box.alert('请选择要删除的投注！');return false;}
that.del();});that.select_node.on('keyup',function(e){if(e.keyCode==46){if(that.getSelected().length==0){return false;}
that.del();}});that.con.query('.clear-list button').on('click',function(e){e.halt();that.delAll();});},exists:function(bet_obj){var that=this;var str=bet_obj.value;var a=[];for(var i=0;i<that.data.length;i++){a.push(that.data[i].value);}
if(C.Tools.inArray(str,a)){return true;}else{return false;}},getSelected:function(){var that=this;var _options=that.select_node.queryAll('option');var a=[];var len=_options.size();for(i=0;i<len;i++){if(Y.Node.getDOMNode(_options.item(i)).selected){a.push({key:_options.item(i).getAttribute('rel'),des:_options.item(i).get('innerHTML'),value:_options.item(i).getAttribute('value')});}}
return a;},add:function(a){var that=this;if(!(a instanceof Array)){var a=[].push(a);}
if(Y.one('#doc').hasClass('cp_ssc')){for(var i=0;i<a.length;i++){if(that.data.length>=250){Y.Box.alert('一次最多只能提交250注！');break;}
that.data.push(a[i]);}}else if(Y.one('#doc').hasClass('cp_pl5')){for(var i=0;i<a.length;i++){if(that.data.length>=10000){Y.Box.alert('一次最多只能提交10000注！');break;}
that.data.push(a[i]);}}else{for(var i=0;i<a.length;i++){that.data.push(a[i]);}}
if(a.length<10){that.directlyRender();}else{that.indirectlyRender();}
C.Donkeyman.ZH.render();return this;},del:function(){var that=this;var _options=that.select_node.queryAll('option');var len=_options.size();for(i=0;i<len;i++){if(Y.Node.getDOMNode(_options.item(i)).selected){_options.item(i).remove();}}
that.synData();C.Donkeyman.ZH.render();return this;},delAll:function(){var that=this;that.select_node.set('innerHTML','');that.synData();C.Donkeyman.ZH.render();return this;},remove:function(value){var that=this;var _options=that.select_node.queryAll('option');var len=_options.size();for(i=0;i<len;i++){if(_options.item(i).getAttribute('value')==value){_options.item(i).remove();}}
that.synData();return this;},synData:function(){var that=this;var select_node=that.select_node;that.data=[];var _options=that.select_node.queryAll('option');for(var i=0;i<_options.size();i++){that.data.push({key:that.getKey(),des:_options.item(i).get('innerHTML'),value:_options.item(i).getAttribute('value')});}
return this;},directlyRender:function(){var that=this;var select_node=that.select_node;select_node.set('innerHTML','');for(var i=0;i<that.data.length;i++){if(typeof that.data[i].fs!='undefined'){var rev_str='rev="'+that.data[i].fs+'"';}else{var rev_str='';}
var _option=Y.Node.create('<option '+rev_str+' rel="'+that.data[i].key+'" value="'+that.data[i].value+'">'+that.data[i].des+'</option>');select_node.append(_option);_option.blur();}},indirectlyRender:function(){var that=this;var select_node=that.select_node;select_node.set('innerHTML','');var frag=document.createDocumentFragment();for(var i=0;i<that.data.length;i++){if(typeof that.data[i].fs!='undefined'){var rev_str='rev="'+that.data[i].fs+'"';}else{var rev_str='';}
var _option=Y.Node.create('<option '+rev_str+' rel="'+that.data[i].key+'" value="'+that.data[i].value+'">'+that.data[i].des+'</option>');frag.appendChild(Y.Node.getDOMNode(_option));}
Y.Node.getDOMNode(select_node).appendChild(frag);return this;},render:function(){var that=this;that.indirectlyRender();return this;},getBetsNo:function(){var that=this;var n=0;if(!that.select_node.query('option')){n=0;}else{n=0;that.select_node.queryAll('option').each(function(node){if(node.getAttribute('rev')==undefined||node.getAttribute('rev')==''){n++}else{n+=Number(node.getAttribute('rev'));}});}
return n;}};C.Donkeyman={dkm_toolbar_checkbox:Y.all('#J_Donkeyman .dkm-toolbar input[type="checkbox"]'),dkm_pannel:Y.all('#J_Donkeyman .dkm-pannel'),dkm_span:Y.all('#J_Donkeyman span'),init:function(){var that=this;that.eventypes=that.getEventypes();that.buildEventCenter();that.bindEvent();return this;},bindEvent:function(){var that=this;that.checkboxes=that.dkm_toolbar_checkbox;that.checkboxes.on('click',function(e){var key=e.target.ancestor('span').getAttribute('className');if(!Y.one('#'+key))return;if(e.target.get('checked')){that.dkm_pannel.addClass('hidden');C.DOMCache.get(key).removeClass('hidden');that.EventCenter.fire(key.split('-')[1],{e:e,type:'show'});}else{that.dkm_pannel.addClass('hidden');that.EventCenter.fire(key.split('-')[1],{e:e,type:'hide'});}});},getEventypes:function(){var that=this;var items=that.dkm_span;var a=[];items.each(function(node){if(/^dkm/i.test(node.getAttribute('className'))){a.push(node.getAttribute('className').split('-')[1]);}});return a;},buildEventCenter:function(){var that=this;var EventFactory=function(){for(var i=0;i<that.eventypes.length;i++){this.publish(that.eventypes[i]);}
this.publish("change");};Y.augment(EventFactory,Y.Event.Target);that.EventCenter=new EventFactory();return this;},on:function(type,foo){var that=this;that.EventCenter.subscribe(type,foo);return this;}};C.Donkeyman.Toolbar={dkm_zhs:Y.one('#J_Donkeyman .dkm-zhs strong'),dkm_je:Y.one('#J_Donkeyman .dkm-je strong'),dkm_qs:Y.one('#J_Donkeyman .dkm-qs strong'),dkm_bt:Y.one('#J_Donkeyman .dkm-bt input'),dkm_bt_em:Y.one('#J_Donkeyman .dkm-bt em'),dkm_multiple_span:Y.one('#J_donkeyman_subtab .tab-content .multiple span'),dkm_zh_input:Y.one('#J_Donkeyman .dkm-toolbar .dkm-zh input'),dkm_stop_input:Y.one('#J_Donkeyman .dkm-toolbar .dkm-stop input'),dkm_stop:Y.one('#J_Donkeyman .dkm-toolbar .dkm-stop'),dkm_bt_input:Y.one('#J_Donkeyman .dkm-bt input'),dkm_zhs_strong:Y.one('#J_Donkeyman .dkm-zhs strong'),render:function(){var that=this;var zhs=that.dkm_zhs;var je=that.dkm_je;var qs=that.dkm_qs;var bt=Number(that.dkm_bt.get('value'));that.bt=bt;var bets=C.Basket.getBetsNo();setTimeout(function(){var old_je=je.get('innerHTML');var new_je='￥'+(bets*bt*2);if(old_je!=new_je){C.Donkeyman.EventCenter.fire('change',{je:bets*bt*2,bets:bets,bt:bt});}
zhs.set('innerHTML',bets);je.set('innerHTML',new_je);},0);return this;},init:function(){Y.one('.dkm-bt').on('keyup',function(e){var v=e.target.get('value');e.target.set('value',v.replace(/[^\d]/ig,''));if(Number(e.target.get('value'))>C.Tab.getMaxBt()){e.target.set('value',C.Tab.getMaxBt());}
if(v.charAt(0)==0){e.target.set('value','');}
C.Donkeyman.ZH.render();});this.goToInt();},renderBt:function(bt){var that=this;setTimeout(function(){that.dkm_bt_em.set('innerHTML',bt);that.dkm_multiple_span.set('innerHTML','(最大'+bt+'倍)');},0);},goToInt:function(){var that=this;that.dkm_zh_input.set('checked',false);that.dkm_stop_input.set('checked',true);that.dkm_stop.addClass('hidden');that.dkm_bt_input.set('value','1');that.dkm_zhs_strong.set('innerHTML','0');}};C.Donkeyman.ZH={con_id:'dkm-zh',_timer:null,_timer_flag:false,_h_timer:null,_h_timer_flag:false,today_bd_input:Y.all('#dkm-zh .today .bd .multiple input'),tomorrow_bd_input:Y.all('#dkm-zh .tomorrow .bd .multiple input'),content_checkbox:Y.all('#J_donkeyman_subtab .tab-content input[type="checkbox"]'),hd_multiple_input:Y.all('#dkm-zh .hd .multiple input'),bd_multiple_input:Y.all('#dkm-zh .bd .multiple input'),dkm_zhs:Y.one('#J_Donkeyman .dkm-zhs strong'),dkm_je:Y.one('#J_Donkeyman .dkm-je strong'),dkm_qs:Y.one('#J_Donkeyman .dkm-qs strong'),today_bd_issue_input:Y.all('#J_Donkeyman .today .bd .issue input'),tomorrow_bd_issue_input:Y.all('#J_Donkeyman .tomorrow .bd .issue input'),init:function(){var that=this;new Y.Checkall({node:Y.one('#J_goafter_today'),nodelist:Y.all('#J_donkeyman_subtab .today .bd .issue input')}).on('check',function(o){var e=o.e;var renderRow=function(checkbox){var row=checkbox.ancestor('dl');var txt=row.query('input[type="text"]');if(checkbox.get('checked')){if(txt.get('value')==''&&that.getMothorBt('today')<=0){txt.set('value',1);}else if(txt.get('value')==''&&that.getMothorBt('today')>0){txt.set('value',that.getMothorBt('today'));}}else{txt.set('value','');}
that.synRowSum(row);that.renderToolBar();};if(e.target.get('id')=="J_goafter_today"){var i=0;if(e.target.get('checked')){var t_nodes=o.checked;}else{var t_nodes=o.unchecked;}
setTimeout(function(){if(i>=t_nodes.length){return;}else{var checkbox=t_nodes[i];renderRow(checkbox);i++;arguments.callee.apply();}},1);}else{renderRow(e.target);}});new Y.Checkall({node:Y.one('#J_goafter_tomorrow'),nodelist:Y.all('#J_donkeyman_subtab .tomorrow .bd .issue input')}).on('check',function(o){var e=o.e;var renderRow=function(checkbox){var row=checkbox.ancestor('dl');var txt=row.query('input[type="text"]');if(checkbox.get('checked')){if(txt.get('value')==''&&that.getMothorBt('today')<=0){txt.set('value',1);}else if(txt.get('value')==''&&that.getMothorBt('today')>0){txt.set('value',that.getMothorBt('tomorrow'));}}else{txt.set('value','');}
that.synRowSum(row);that.renderToolBar();};if(e.target.get('id')=="J_goafter_tomorrow"){var i=0;if(e.target.get('checked')){var t_nodes=o.checked;}else{var t_nodes=o.unchecked;}
setTimeout(function(){if(i>=t_nodes.length){return;}else{var checkbox=t_nodes[i];renderRow(checkbox);i++;arguments.callee.apply();}},1);}else{renderRow(e.target);}});that.hd_multiple_input.on('keyup',function(e){if(Y.UA.ie>0){var h_timeout=300;}else{var h_timeout=100;}
var foo=function(){var v=e.target.get('value');var type='';if(e.target.ancestor('.tab-pannel').hasClass('today')){type='today';}else{type='tomorrow';}
e.target.set('value',v.replace(/[^\d]/ig,''));if(Number(e.target.get('value'))>C.Tab.getMaxBt()){e.target.set('value',C.Tab.getMaxBt());}
if(v.charAt(0)==0){e.target.set('value','');}
var inputs=Y.all('#dkm-zh .'+type+' .bd .multiple input');inputs.each(function(node){if(node.get('disabled')!=true){if(node.ancestor('dl').query('input[type="checkbox"]').get('checked')){node.set('value',that.getMothorBt(type));}}else{Y.log('ddd');node.set('value','');}});that.render();};if(that._h_timer_flag==true){if(that._h_timer!=null){clearTimeout(that._h_timer);that._h_timer=setTimeout(function(){that._h_timer_flag=false;foo();},h_timeout);}
return;}else{that._timer_flag=true;that._timer=setTimeout(function(){that._timer_flag=false;foo();},h_timeout);}});that.bd_multiple_input.on('keyup',function(e){if(Y.UA.ie>0){var timeout=300;}else{var timeout=200;}
var foo=function(){var v=e.target.get('value');e.target.set('value',v.replace(/[^\d]/ig,''));v=v.replace(/[^\d]/ig,'');if(Number(v)>C.Tab.getMaxBt()){e.target.set('value',C.Tab.getMaxBt());}
if(v.charAt(0)==0){e.target.set('value','');e.target.ancestor('dl').query('input[type="checkbox"]').set('checked',false);}else{e.target.ancestor('dl').query('input[type="checkbox"]').set('checked',true);}
var row=e.target.ancestor('dl');that.synRowSum(row);that.renderToolBar();};if(that._timer_flag==true){if(that._timer!=null){clearTimeout(that._timer);that._timer=setTimeout(function(){that._timer_flag=false;foo();},timeout);}
return;}else{that._timer_flag=true;that._timer=setTimeout(function(){that._timer_flag=false;foo();},timeout);}});that.content_checkbox.on('click',function(e){if(that.getBetIssue()>42){Y.Box.alert('选择追号的期数不得超过42期');}});},goToInt:function(){return;Y.all('.tab-content input[type="checkbox"]').set('checked',false);Y.all('.tab-content .bd input[type="checkbox"]').item(0).set('checked',true);Y.all('.tab-content input[type="text"]').set('value','');Y.all('.tab-content .bd input[type="text"]').item(0).set('value',1);},getMothorBt:function(type){var that=this;var selector='#dkm-zh .'+type+' .hd .multiple input';return Number(Y.one(selector).get('value'));},renderToolBar:function(){var that=this;setTimeout(function(){if(Y.one('#dkm-zh').hasClass('hidden')){C.Donkeyman.Toolbar.render();}else{var zhs=that.dkm_zhs;var je=that.dkm_je;var qs=that.dkm_qs;zhs.set('innerHTML',C.Basket.getBetsNo());je.set('innerHTML','￥'+that.getSum());qs.set('innerHTML',that.getBetIssue());}},0);return this;},render:function(){var that=this;that.renderToday().rendertomorrow().renderToolBar();return this;},renderToday:function(){var that=this;var ns=that.today_bd_input;var l=ns.size();var i=0;setTimeout(function(){if(i>=l){return;}else{var node=ns.item(i);var row=node.ancestor('dl');that.synRowSum(row);i++;arguments.callee.apply();}},0);return this;},rendertomorrow:function(){var that=this;var ns=that.tomorrow_bd_input;var l=ns.size();var i=0;setTimeout(function(){if(i>=l){return;}else{var node=ns.item(i);var row=node.ancestor('dl');that.synRowSum(row);i++;arguments.callee.apply();}},0);return this;},synRowSum:function(row){var that=this;var _t=Number(row.query('.multiple input').get('value'));var _r=0;if(row.query('.issue input').get('checked')){_r=_t*that.getBetsNo()*2;}else{_r=0;}
row.query('.sum em').set('innerHTML','￥'+_r.toString());},getBetIssue:function(){var that=this;return that.getTodayIssue()+that.gettomorrowIssue();},getTodayIssue:function(){var that=this;var ns=that.today_bd_issue_input;var n=0;ns.each(function(node){if(node.get('checked')){n++;}});return n;},gettomorrowIssue:function(){var that=this;var ns=that.tomorrow_bd_issue_input;var n=0;ns.each(function(node){if(node.get('checked')){n++;}});return n;},getZHbs:function(){var that=this;return that.getTodayZHbs()+that.gettomorrowZHbs();},getTodayZHbs:function(){var that=this;var ns=that.today_bd_input;var bs=0;ns.each(function(node){if(node.get('disabled')!=true){bs+=Number(node.get('value'));}});return bs;},gettomorrowZHbs:function(){var that=this;var ns=that.tomorrow_bd_input;var bs=0;ns.each(function(node){if(node.get('disabled')!=true){bs+=Number(node.get('value'));}});return bs;},getBetsNo:function(){return C.Basket.getBetsNo();},getZHBets:function(){var that=this;return that.getBetsNo()*that.getZHbs();},getSum:function(){var that=this;return that.getBetsNo()*that.getZHbs()*2;}};C.Confirm={config:null,before:function(){return true;},init:function(o){var that=this;that.buildParam(o);that.Box.init(that);if(typeof Y.one('#J_confirm_pay')!='undefined'){Y.one('#J_confirm_pay').on('click',function(e){e.halt();if(!e.currentTarget.hasClass('status1')){return;}
var sta=C.Donkeyman.Toolbar.bt!=''||C.Donkeyman.ZH.getBetIssue()!=0;if(!sta){Y.Box.alert('投注倍数不能为空');return;}
if(C.Donkeyman.ZH.getBetIssue()>42){Y.Box.alert('选择追号的期数不得超过42期');return;}
if(Y.one('#doc').hasClass('cp_pl5')){if(C.Basket.getBetsNo()*C.Donkeyman.Toolbar.bt*2>50000){Y.Box.alert('投注金额不能超过50000元');return false;}}
if(that.verify()){C.fillForm.init();if(!that.before()){return;}
if(typeof C.fillForm.verify!='undefined'){if(!C.fillForm.verify()){return false;}}
if(that.Box.shouldSkip()){that.config.callback(that);}else{that.Box.show('msgbox');}}});}
if(Y.one('#J_confirm_copy')!=null){Y.one('#J_confirm_copy').on('click',function(e){e.halt();if(that.verify()){that.Box.show('copybox');}});}},buildParam:function(o){var that=this;that.config=o?o:{};that.callback=that.config.callback=o.callback?o.callback:new Function;that.cancel=that.config.cancel=o.cancel?o.cancel:new Function;that.buildmsg=that.config.buildmsg=o.buildmsg?o.buildmsg:new Function;that.copy=that.config.copy=o.copy?o.copy:new Function;},verify:function(){var that=this;if(C.Basket.getBetsNo()>0){return true;}else{Y.Box.alert('请至少选择一个投注！');return false;}},Box:{msgbox:Y.one('#J_msgbet'),copybox:Y.one('#J_copybet'),skipover:Y.one('#J_skipover'),init:function(fathor){var that=this;that.fathor=fathor;that.render('msgbox');that.render('copybox');},render:function(type){var that=this;var fathor=that.fathor;if(typeof type=='undefined'){var type='msgbox';}
if(type=='msgbox'){var node=that.msgbox;}else{var node=that.copybox;}
node.setStyle('visibility','hidden');node.setStyle('display','block');node.setStyle('position','absolute');node.removeClass('hidden');node.query('.pay').on('click',function(e){if(type=='msgbox'){fathor.config.callback(that);if(that.skipover.get('checked')){Y.Cookie.set('cp_confirm','ok');}
that.hide();return;}else{if(fathor.config.copy(that)!=false){that.hide();}}});node.query('.cancel').on('click',function(e){fathor.config.cancel(that);that.hide();var inputs=Y.all('#orderForm input');inputs.set('value','');});},show:function(type){var that=this;if(typeof type=='undefined'){var type='msgbox';}
if(type=='msgbox'){var node=that.msgbox;var h=290;}else{var node=that.copybox;var h=290;}
var R=node.get('region');var AR=node.get('viewportRegion');var top=(Y.DOM.winHeight()-h)/2+Y.DOM.docScrollY();var left=AR.left+(AR.width-R.width)/2;setTimeout(function(){node.setStyle('top',top.toString()+'px');node.setStyle('left',left.toString()+'px');node.setStyle('visibility','');node.query('div').setStyle('position','absolute').setStyle('height','auto').setStyle('width','100%').setStyle('background','white');node.query('.msg-body').set('innerHTML',C.Tools.wbtrim(that.fathor.config.buildmsg(),5));},2);setTimeout(function(){that.addMask();},0);},hide:function(){var that=this;setTimeout(function(){that.removeMask();try{that.msgbox.setStyle('visibility','hidden');that.copybox.setStyle('visibility','hidden');}catch(e){}},0);},shouldSkip:function(){if(Y.Cookie.get('cp_confirm')=='ok'){return true;}else{return false;}},addMask:function(){var that=this;if(Y.one('#t-shade-tmp'))return this;var h=Y.one('body').get('region').height;var node=Y.Node.create('<div id="t-shade-tmp" style="display:block;height:'+h+'px;z-index:999;background-color:black;left:0;position:absolute;top:0;width:100%;display:none"></div>');node.setStyle('opacity','0.6');setTimeout(function(){Y.one('body').append(node);node.setStyle('display','block');that.addShim();},0);return this;},addShim:function(){var that=this;if(Y.UA.ie==6){C.Basket.select_node.setStyle('visibility','hidden');}
return this;},removeShim:function(){var that=this;if(Y.UA.ie==6){C.Basket.select_node.setStyle('visibility','');}
return this;},removeMask:function(){var that=this;if(Y.Box.overlays.length==0&&Y.one('#t-shade-tmp')){Y.one('#t-shade-tmp').remove();}
that.removeShim();return this;}}};});
YUI.add("dump",function(G){var B=G.Lang,C="{...}",F="f(){...}",A=", ",D=" => ",E=function(N,M){var I,H,K=[],J=B.type(N);if(!B.isObject(N)){return N+"";}else{if(J=="date"){return N;}else{if(N.nodeType&&N.tagName){return N.tagName+"#"+N.id;}else{if(N.document&&N.navigator){return"window";}else{if(N.location&&N.body){return"document";}else{if(J=="function"){return F;}}}}}}M=(B.isNumber(M))?M:3;if(J=="array"){K.push("[");for(I=0,H=N.length;I<H;I=I+1){if(B.isObject(N[I])){K.push((M>0)?B.dump(N[I],M-1):C);}else{K.push(N[I]);}K.push(A);}if(K.length>1){K.pop();}K.push("]");}else{if(J=="regexp"){K.push(N.toString());}else{K.push("{");for(I in N){if(N.hasOwnProperty(I)){try{K.push(I+D);if(B.isObject(N[I])){K.push((M>0)?B.dump(N[I],M-1):C);}else{K.push(N[I]);}K.push(A);}catch(L){K.push("Error: "+L.message);}}}if(K.length>1){K.pop();}K.push("}");}}return K.join("");};G.dump=E;B.dump=E;},"3.0.0");
YUI.add("substitute",function(G){var B=G.Lang,D="dump",F=" ",C="{",E="}",A=function(U,I,P,K,H){var N,M,L,S,R,T,Q=[],J,O;K=K||C;H=H||E;for(;;){N=U.lastIndexOf(K);if(N<0){break;}M=U.indexOf(H,N);if(N+1>=M){break;}J=U.substring(N+1,M);S=J;T=null;L=S.indexOf(F);if(L>-1){T=S.substring(L+1);S=S.substring(0,L);}R=I[S];if(P){R=P(S,R,T);}if(B.isObject(R)){if(!G.dump){R=R.toString();}else{if(B.isArray(R)){R=G.dump(R,parseInt(T,10));}else{T=T||"";O=T.indexOf(D);if(O>-1){T=T.substring(4);}if(R.toString===Object.prototype.toString||O>-1){R=G.dump(R,parseInt(T,10));}else{R=R.toString();}}}}else{if(!B.isString(R)&&!B.isNumber(R)){R="~-"+Q.length+"-~";Q[Q.length]=J;}}U=U.substring(0,N)+R+U.substring(M+1);}for(N=Q.length-1;N>=0;N=N-1){U=U.replace(new RegExp("~-"+N+"-~"),K+Q[N]+H,"g");}return U;};G.substitute=A;B.substitute=A;},"3.0.0",{optional:["dump"]});
YUI.add("console",function(D){function V(){V.superclass.constructor.apply(this,arguments);}var G=D.ClassNameManager.getClassName,B="checked",s="clear",r="click",T="collapsed",AE="console",d="contentBox",h="disabled",o="entry",l="error",j="height",P="info",y="innerHTML",M="lastTime",F="pause",f="paused",x="reset",v="startTime",p="title",i="warn",Z=".",X=G(AE,"button"),b=G(AE,"checkbox"),AD=G(AE,s),w=G(AE,"collapse"),S=G(AE,T),E=G(AE,"controls"),e=G(AE,"hd"),c=G(AE,"bd"),C=G(AE,"ft"),k=G(AE,p),z=G(AE,o),t=G(AE,o,"cat"),a=G(AE,o,"content"),U=G(AE,o,"meta"),g=G(AE,o,"src"),A=G(AE,o,"time"),Q=G(AE,F),W=G(AE,F,"label"),n=/^(\S+)\s/,AA=/&/g,u=/>/g,J=/</g,H="&#38;",R="&#62;",m="&#60;",O='<div class="{entry_class} {cat_class} {src_class}">'+'<p class="{entry_meta_class}">'+'<span class="{entry_src_class}">'+"{sourceAndDetail}"+"</span>"+'<span class="{entry_cat_class}">'+"{category}</span>"+'<span class="{entry_time_class}">'+" {totalTime}ms (+{elapsedTime}) {localTime}"+"</span>"+"</p>"+'<pre class="{entry_content_class}">{message}</pre>'+"</div>",I=D.Lang,K=D.Node.create,AC=I.isNumber,N=I.isString,q=D.merge,AB=D.substitute;D.mix(V,{NAME:AE,LOG_LEVEL_INFO:P,LOG_LEVEL_WARN:i,LOG_LEVEL_ERROR:l,ENTRY_CLASSES:{entry_class:z,entry_meta_class:U,entry_cat_class:t,entry_src_class:g,entry_time_class:A,entry_content_class:a},CHROME_CLASSES:{console_hd_class:e,console_bd_class:c,console_ft_class:C,console_controls_class:E,console_checkbox_class:b,console_pause_class:Q,console_pause_label_class:W,console_button_class:X,console_clear_class:AD,console_collapse_class:w,console_title_class:k},HEADER_TEMPLATE:'<div class="{console_hd_class}">'+'<h4 class="{console_title_class}">{str_title}</h4>'+'<button type="button" class="'+'{console_button_class} {console_collapse_class}">{str_collapse}'+"</button>"+"</div>",BODY_TEMPLATE:'<div class="{console_bd_class}"></div>',FOOTER_TEMPLATE:'<div class="{console_ft_class}">'+'<div class="{console_controls_class}">'+'<label for="{id_guid}" class="{console_pause_label_class}">'+'<input type="checkbox" class="{console_checkbox_class} '+'{console_pause_class}" value="1" id="{id_guid}"> '+"{str_pause}</label>"+'<button type="button" class="'+'{console_button_class} {console_clear_class}">{str_clear}'+"</button>"+"</div>"+"</div>",ENTRY_TEMPLATE:O,ATTRS:{logEvent:{value:"yui:log",writeOnce:true,validator:N},logSource:{value:D,writeOnce:true,validator:function(L){return L&&D.Lang.isFunction(L.on);}},strings:{value:{title:"Log Console",pause:"Pause",clear:"Clear",collapse:"Collapse",expand:"Expand"}},paused:{value:false,validator:I.isBoolean},defaultCategory:{value:P,validator:N},defaultSource:{value:"global",validator:N},entryTemplate:{value:O,validator:N},logLevel:{value:D.config.logLevel||P,setter:function(L){return this._setLogLevel(L);}},printTimeout:{value:100,validator:AC},printLimit:{value:50,validator:AC},consoleLimit:{value:300,validator:AC},newestOnTop:{value:true},scrollIntoView:{value:true},startTime:{value:new Date()},lastTime:{value:new Date(),readOnly:true},collapsed:{value:false},height:{value:"300px"},width:{value:"300px"},useBrowserConsole:{lazyAdd:false,value:false,getter:function(){var L=this.get("logSource");return L instanceof YUI?L.config.useBrowserConsole:null;},setter:function(L){var Y=this.get("logSource");if(Y instanceof YUI){L=!!L;Y.config.useBrowserConsole=!!L;return L;}else{return D.Attribute.INVALID_VALUE;}}},style:{value:"separate",writeOnce:true,validator:function(L){return this._validateStyle(L);}}}});D.extend(V,D.Widget,{_evtCat:null,_head:null,_body:null,_foot:null,_printLoop:null,buffer:null,log:function(){D.log.apply(D,arguments);return this;},clearConsole:function(){this._body.set(y,"");this._cancelPrintLoop();this.buffer=[];return this;},reset:function(){this.fire(x);return this;},collapse:function(){this.set(T,true);return this;},expand:function(){this.set(T,false);return this;},printBuffer:function(Y){var AK=this.buffer,AF=D.config.debug,L=[],AH=this.get("consoleLimit"),AJ=this.get("newestOnTop"),AG=AJ?this._body.get("firstChild"):null,AI;if(AK.length>AH){AK.splice(0,AK.length-AH);}Y=Math.min(AK.length,(Y||AK.length));D.config.debug=false;if(!this.get(f)&&this.get("rendered")){for(AI=0;AI<Y&&AK.length;++AI){L[AI]=this._createEntryHTML(AK.shift());}if(!AK.length){this._cancelPrintLoop();}if(L.length){if(AJ){L.reverse();}this._body.insertBefore(K(L.join("")),AG);if(this.get("scrollIntoView")){this.scrollToLatest();}this._trimOldEntries();}}D.config.debug=AF;return this;},initializer:function(){this._evtCat=D.stamp(this)+"|";this.buffer=[];this.get("logSource").on(this._evtCat+this.get("logEvent"),D.bind("_onLogEvent",this));this.publish(o,{defaultFn:this._defEntryFn});this.publish(x,{defaultFn:this._defResetFn});this.after("rendered",this._schedulePrint);},destructor:function(){var L=this.get("boundingBox");this._cancelPrintLoop();this.get("logSource").detach(this._evtCat+"*");D.Event.purgeElement(L,true);L.set("innerHTML","");},renderUI:function(){this._initHead();this._initBody();this._initFoot();var L=this.get("style");if(L!=="block"){this.get("boundingBox").addClass("yui-"+L+"-console");}},syncUI:function(){this._uiUpdatePaused(this.get(f));this._uiUpdateCollapsed(this.get(T));this._uiSetHeight(this.get(j));},bindUI:function(){this.get(d).query("button."+w).on(r,this._onCollapseClick,this);this.get(d).query("input[type=checkbox]."+Q).on(r,this._onPauseClick,this);this.get(d).query("button."+AD).on(r,this._onClearClick,this);this.after(this._evtCat+"stringsChange",this._afterStringsChange);this.after(this._evtCat+"pausedChange",this._afterPausedChange);this.after(this._evtCat+"consoleLimitChange",this._afterConsoleLimitChange);this.after(this._evtCat+"collapsedChange",this._afterCollapsedChange);},_initHead:function(){var L=this.get(d),Y=q(V.CHROME_CLASSES,{str_collapse:this.get("strings.collapse"),str_title:this.get("strings.title")});this._head=K(AB(V.HEADER_TEMPLATE,Y));L.insertBefore(this._head,L.get("firstChild"));},_initBody:function(){this._body=K(AB(V.BODY_TEMPLATE,V.CHROME_CLASSES));this.get(d).appendChild(this._body);},_initFoot:function(){var L=q(V.CHROME_CLASSES,{id_guid:D.guid(),str_pause:this.get("strings.pause"),str_clear:this.get("strings.clear")});this._foot=K(AB(V.FOOTER_TEMPLATE,L));this.get(d).appendChild(this._foot);},_isInLogLevel:function(AF){var L=AF.cat,Y=this.get("logLevel");if(Y!==P){L=L||P;if(N(L)){L=L.toLowerCase();}if((L===i&&Y===l)||(L===P&&Y!==P)){return false;}}return true;},_normalizeMessage:function(AF){var AH=AF.msg,Y=AF.cat,AG=AF.src,L={time:new Date(),message:AH,category:Y||this.get("defaultCategory"),sourceAndDetail:AG||this.get("defaultSource"),source:null,localTime:null,elapsedTime:null,totalTime:null};L.source=n.test(L.sourceAndDetail)?RegExp.$1:L.sourceAndDetail;L.localTime=L.time.toLocaleTimeString?L.time.toLocaleTimeString():(L.time+"");L.elapsedTime=L.time-this.get(M);L.totalTime=L.time-this.get(v);this._set(M,L.time);return L;},_schedulePrint:function(){if(!this._printLoop&&!this.get(f)&&this.get("rendered")){this._printLoop=D.later(this.get("printTimeout"),this,this.printBuffer,this.get("printLimit"),true);}},_createEntryHTML:function(L){L=q(this._htmlEscapeMessage(L),V.ENTRY_CLASSES,{cat_class:this.getClassName(o,L.category),src_class:this.getClassName(o,L.source)});return this.get("entryTemplate").replace(/\{(\w+)\}/g,function(Y,AF){return AF in L?L[AF]:"";});},scrollToLatest:function(){var L=this.get("newestOnTop")?0:this._body.get("scrollHeight");this._body.set("scrollTop",L);},_htmlEscapeMessage:function(L){L.message=this._encodeHTML(L.message);L.source=this._encodeHTML(L.source);L.sourceAndDetail=this._encodeHTML(L.sourceAndDetail);L.category=this._encodeHTML(L.category);return L;},_trimOldEntries:function(){D.config.debug=false;var AI=this._body,AF=this.get("consoleLimit"),AG=D.config.debug,L,AJ,AH,Y;if(AI){L=AI.queryAll(Z+z);Y=L.size()-AF;if(Y>0){if(this.get("newestOnTop")){AH=AF;Y=L.size();}else{AH=0;}this._body.setStyle("display","none");for(;AH<Y;++AH){AJ=L.item(AH);if(AJ){AJ.remove();}}this._body.setStyle("display","");}}D.config.debug=AG;},_encodeHTML:function(L){return N(L)?L.replace(AA,H).replace(J,m).replace(u,R):L;},_cancelPrintLoop:function(){if(this._printLoop){this._printLoop.cancel();this._printLoop=null;}},_validateStyle:function(L){return L==="inline"||L==="block"||L==="separate";},_onPauseClick:function(L){this.set(f,L.target.get(B));},_onClearClick:function(L){this.clearConsole();},_onCollapseClick:function(L){this.set(T,!this.get(T));},_setLogLevel:function(L){if(N(L)){L=L.toLowerCase();}return(L===i||L===l)?L:P;},_uiSetHeight:function(L){V.superclass._uiSetHeight.apply(this,arguments);if(this._head&&this._foot){var Y=this.get("boundingBox").get("offsetHeight")-this._head.get("offsetHeight")-this._foot.get("offsetHeight");this._body.setStyle(j,Y+"px");}},_afterStringsChange:function(AF){var AH=AF.subAttrName?AF.subAttrName.split(Z)[1]:null,L=this.get(d),Y=AF.prevVal,AG=AF.newVal;if((!AH||AH===p)&&Y.title!==AG.title){L.queryAll(Z+k).set(y,AG.title);}if((!AH||AH===F)&&Y.pause!==AG.pause){L.queryAll(Z+W).set(y,AG.pause);}if((!AH||AH===s)&&Y.clear!==AG.clear){L.queryAll(Z+AD).set("value",AG.clear);}},_afterPausedChange:function(Y){var L=Y.newVal;if(Y.src!==D.Widget.SRC_UI){this._uiUpdatePaused(L);}if(!L){this._schedulePrint();}else{if(this._printLoop){this._cancelPrintLoop();}}},_uiUpdatePaused:function(L){var Y=this._foot.queryAll("input[type=checkbox]."+Q);if(Y){Y.set(B,L);}},_afterConsoleLimitChange:function(){this._trimOldEntries();},_afterCollapsedChange:function(L){this._uiUpdateCollapsed(L.newVal);},_uiUpdateCollapsed:function(L){var AG=this.get("boundingBox"),Y=AG.queryAll("button."+w),AH=L?"addClass":"removeClass",AF=this.get("strings."+(L?"expand":"collapse"));AG[AH](S);if(Y){Y.set("innerHTML",AF);}this._uiSetHeight(L?this._head.get("offsetHeight"):this.get(j));},_afterVisibleChange:function(L){V.superclass._afterVisibleChange.apply(this,arguments);this._uiUpdateFromHideShow(L.newVal);},_uiUpdateFromHideShow:function(L){if(L){this._uiSetHeight(this.get(j));}},_onLogEvent:function(Y){if(!this.get(h)&&this._isInLogLevel(Y)){var L=D.config.debug;D.config.debug=false;this.fire(o,{message:this._normalizeMessage(Y)});D.config.debug=L;}},_defResetFn:function(){this.clearConsole();this.set(v,new Date());this.set(h,false);this.set(f,false);},_defEntryFn:function(L){if(L.message){this.buffer.push(L.message);this._schedulePrint();}}});D.Console=V;},"3.0.0",{requires:["substitute","widget"]});
YUI.namespace('C.SSC');YUI.add('ssc',function(Y){C.fillForm={init:function(){var that=this;var tdata=document.orderForm;tdata.multiple.value=C.Donkeyman.Toolbar.bt;tdata.number_strings.value=this.getNumStr();tdata.total_num.value=C.Basket.getBetsNo();tdata.total_fee.value=C.Basket.getBetsNo()*C.Donkeyman.Toolbar.bt*2;tdata.pursue_issue_list.value=that.getIssueList();tdata.pursue_multi_list.value=that.getBsList();tdata.pursue_money_list.value=that.getZhMoneyList();tdata.issue_count.value=C.Donkeyman.ZH.getBetIssue();tdata.stop_pursue_type.value=that.getStopPursueType();tdata.total_pursue_fee.value=C.Donkeyman.ZH.getSum();tdata.pursue_type.value=0;tdata.order_type.value=that.getOrderType();return this;},verify:function(){return true;},getNumStr:function(){var arr=[];var str="";for(var i=0,len=C.Basket.data.length;i<len;i++){var key=C.Basket.data[i].key;if(key=="SSC_5Star_FS"||key=="SSC_3Star_FS"||key=="SSC_3Star_HZ"||key=="SSC_2Star_ZHX"||key=="SSC_2Star_ZHXHZ"||key=="SSC_1Star_FS"){key=1;}else if(key=="SSC_2Star_ZUX"||key=="SSC_2Star_ZUHZ"){var _str=C.Basket.data[i].value;if(_str.charAt(6)==_str.charAt(8)){key=1;}else{key=4;}}else if(key=="SSC_5Star_TX"){key=5;}else{key="";}
if(key){arr.push(key+":"+C.Basket.data[i].value);}else{arr.push(C.Basket.data[i].value);}}
str=arr.join("&");return str;},getIssueList:function(){var that=this;that.ns=Y.all('.tab-content .bd .issue input');that.ts=Y.all('.tab-content .bd .issue em');var arr=[],str="";that.ns.each(function(node){if(node.get('checked')){arr.push(node.get('name'));}});str=arr.join("&");return str;},getBsList:function(){var that=this;var arr=[],str="",s1="";that.inTexts=Y.all('.tab-content .bd .multiple input[type="text"]');that.ns.each(function(node){if(node.get('checked')){s1=that.inTexts.item(that.ns.indexOf(node)).get("value");if(s1==0){s1=1;}
arr.push(s1);}});str=arr.join("&");return str;},getZhMoneyList:function(){var str=this.getBsList();var arr=str.split("&");var arrNew=[];for(var i=0,len=arr.length;i<len;i++){arrNew.push(parseInt(arr[i])*2*C.Basket.getBetsNo());}
return arrNew.join("&");},getStopPursueType:function(){var tarCheck=Y.one('.dkm-stop input[type="checkbox"]');if(tarCheck.get("checked")==true){return 1;}
return 0;},getOrderType:function(){return Y.one('.dkm-zh input[type="checkbox"]').get("checked")?3:0;}};var TheTimer={init:function(timepoint,callbacks){var that=this;that.timepoint=timepoint;that.callbacks=callbacks||{};that.setTimePoint();that.ready();that.render();},render:function(timepoint){var that=this;that.timepoint=(!!timepoint)?timepoint:that.timepoint;try{TimeKeeper.setTheStatus(that.timepoint);}catch(e){}
that.setTimer();},setTimePoint:function(){var that=this;var timepoint=that.timepoint;window['getTimeAtFirstLoad']=function(){return timepoint;};},ready:function(){var that=this;window['getPageFlag']=function(){return true;};},setTimer:function(){var that=this;var timepoint=that.timepoint;var countdown_time=(Number(timepoint.split(',')[0])+1)*1000;var becker_time=Number(timepoint.split(',')[2])*1000+countdown_time;var reincarnation_time=Number(timepoint.split(',')[2])*1000+becker_time;if(that.countdownTimer!=null){clearTimeout(that.countdownTimer);}
if(that.beckerTimer!=null){clearTimeout(that.beckerTimer);}
if(that.reincarnationTimer!=null){clearTimeout(that.reincarnationTimer);}
that.countdownTimer=setTimeout(function(){that.countdownCallback();},countdown_time);that.beckerTimer=setTimeout(function(){that.beckerCallback();},becker_time);},countdownCallback:function(){var that=this;that.callbacks.countdownCallback(that);},beckerCallback:function(){var that=this;var v1=that.timepoint.split(',')[0];var v2=that.timepoint.split(',')[1];var v3=that.timepoint.split(',')[2];var v1=Number(v2)-Number(v3);var in_str=[v2,v2,v3].join(',');that.render(in_str);that.callbacks.beckerCallback(that);},countdownTimer:null,beckerTimer:null,reincarnationTimer:null,swfobj:null,timepoint:null};C.SSC.TheTimer=TheTimer;});YUI.add('SSC_5Star_FS',function(Y){var key='SSC_5Star_FS';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'从个、十、百、千、万位各选1个或多个号码，所选号码与开奖号码一一对应，即为中奖，2元一注，单注奖金10万元',maxBt:50,verify:function(){var that=this;var key=that.getKey();if(!C.Ball.isRowChecked(key,0)){return'请选择万位';}else if(!C.Ball.isRowChecked(key,1)){return'请选择千位';}else if(!C.Ball.isRowChecked(key,2)){return'请选择百位';}else if(!C.Ball.isRowChecked(key,3)){return'请选择十位';}else if(!C.Ball.isRowChecked(key,4)){return'请选择个位';}
return true;},modify:function(betvalue){var that=this;var key=that.getKey();C.Tab.showAbacus(key);C.Ball.clear(key);var a=betvalue.split(',');for(var i=0;i<a.length;i++){C.Ball.toggle(key,[i,Number(a[i])]);}
return true;},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);var a=[];for(var i=0;i<rea.length;i++){var o={key:that.getKey(),des:that.getBetString(rea[i]),value:that.getClozedata(rea[i].split(','))};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);return rea.length;},random:function(n){var that=this;var a=[];for(var i=0;i<n;i++){var b=that._randomOne();if(C.Tools.inArray(b,a)){i--;continue;}
a.push(b);}
var A=[];for(var i=0;i<n;i++){var o={key:that.getKey(),des:that.getBetString(a[i]),value:that.getClozedata(a[i].split(','))};A.push(o);}
return A;},_randomOne:function(){var that=this;var a=[];for(var i=0;i<5;i++){var r=Math.floor(Math.random()*10);a.push(r);}
return a.join(',');},getBetString:function(combines){var that=this;var prefix="[五星直选] ";if(typeof combines=='string'){var _a=combines.split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');return prefix+suffix;}else{var a=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');a.push(prefix+suffix);}
return a;}}});});YUI.add('SSC_5Star_TX',function(Y){var key='SSC_5Star_TX';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'从万、千、百、十、个位各选1个或多个号码，单注金额为2元。所选号码与开奖号码一一对应奖金为2万元。所选号码前三位或后三位与开奖一一对应，奖金为200元，前二位或者后二位与开奖一一对应，奖金为20元。',maxBt:50,verify:function(){var that=this;var key=that.getKey();if(!C.Ball.isRowChecked(key,0)){return'请选择万位';}else if(!C.Ball.isRowChecked(key,1)){return'请选择千位';}else if(!C.Ball.isRowChecked(key,2)){return'请选择百位';}else if(!C.Ball.isRowChecked(key,3)){return'请选择十位';}else if(!C.Ball.isRowChecked(key,4)){return'请选择个位';}
return true;},modify:function(betvalue){var that=this;var key=that.getKey();C.Tab.showAbacus(key);C.Ball.clear(key);var a=betvalue.split(',');for(var i=0;i<a.length;i++){C.Ball.toggle(key,[i,Number(a[i])]);}
return true;},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);var a=[];for(var i=0;i<rea.length;i++){var o={key:that.getKey(),des:that.getBetString(rea[i]),value:that.getClozedata(rea[i].split(','))};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);return rea.length;},random:function(n){var that=this;var a=[];for(var i=0;i<n;i++){var b=that._randomOne();if(C.Tools.inArray(b,a)){i--;continue;}
a.push(b);}
var A=[];for(var i=0;i<n;i++){var o={key:that.getKey(),des:that.getBetString(a[i]),value:that.getClozedata(a[i].split(','))};A.push(o);}
return A;},_randomOne:function(){var that=this;var a=[];for(var i=0;i<5;i++){var r=Math.floor(Math.random()*10);a.push(r);}
return a.join(',');},getBetString:function(combines){var that=this;var prefix="[五星通选] ";if(typeof combines=='string'){var _a=combines.split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');return prefix+suffix;}else{var a=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');a.push(prefix+suffix);}
return a;}}});});YUI.add('SSC_4Star_FS',function(Y){});YUI.add('SSC_3Star_FS',function(Y){var key='SSC_3Star_FS';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'从个、十、百位各选1个或多个号码，所选号码与开奖号码一一对应，即为中奖， 2元一注，单注奖金1000元',verify:function(){var that=this;var key=that.getKey();if(!C.Ball.isRowChecked(key,0)){return'请选择百位';}else if(!C.Ball.isRowChecked(key,1)){return'请选择十位';}else if(!C.Ball.isRowChecked(key,2)){return'请选择个位';}
return true;},modify:function(betvalue){var that=this;var key=that.getKey();C.Tab.showAbacus(key);C.Ball.clear(key);var a=betvalue.split('-,-,')[1].split(',');for(var i=0;i<a.length;i++){C.Ball.toggle(key,[i,Number(a[i])]);}
return true;},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);var a=[];for(var i=0;i<rea.length;i++){var o={key:that.getKey(),des:that.getBetString(rea[i]),value:that.getClozedata(rea[i].split(','))};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);return rea.length;},random:function(n){var that=this;var a=[];for(var i=0;i<n;i++){var b=that._randomOne();if(C.Tools.inArray(b,a)){i--;continue;}
a.push(b);}
var A=[];for(var i=0;i<n;i++){var o={key:that.getKey(),des:that.getBetString(a[i]),value:that.getClozedata(a[i].split(','))};A.push(o);}
return A;},_randomOne:function(){var that=this;var a=[];for(var i=0;i<3;i++){var r=Math.floor(Math.random()*10);a.push(r);}
return a.join(',');},getBetString:function(combines){var that=this;var prefix="[三星直选] ";if(typeof combines=='string'){var _a=combines.split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');return prefix+suffix;}else{var a=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');a.push(prefix+suffix);}
return a;}}});});YUI.add('SSC_3Star_HZ',function(Y){var key='SSC_3Star_HZ';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'个、十、百位三个号码相加为和值。举例，若选择和值5投注，将包含21注和值为5的号码。中奖条件：个位、十位、百位数字和位置都要一致。奖金 1000元。',verify:function(){var that=this;var key=that.getKey();if(!C.Ball.isRowChecked(key,0)){return'请选择至少一个和值';}
return true;},modify:function(betvalue){var that=this;return C.AbacusList['SSC_3Star_FS'].modify(betvalue);},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getSummationPermutation(nakedata[0],3);var a=[];for(var i=0;i<rea.length;i++){var o={key:that.getKey(),des:that.getBetString(rea[i]),value:that.getClozedata(rea[i].split(','))};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getSummationPermutation(nakedata[0],3);return rea.length;},random:function(n){return C.Ball.getAbacus('SSC_3Star_FS').random(n);},getBetString:function(combines){var that=this;var prefix="[三星复式] ";if(typeof combines=='string'){var _a=combines.split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');return prefix+suffix;}else{var a=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');a.push(prefix+suffix);}
return a;}}});});YUI.add('SSC_2Star_ZHX',function(Y){var key='SSC_2Star_ZHX';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'所选十位、个位与开奖号码全部一致即中奖，奖金100元',verify:function(){var that=this;var key=that.getKey();if(!C.Ball.isRowChecked(key,0)){return'请选择十位';}else if(!C.Ball.isRowChecked(key,1)){return'请选择个位';}
return true;},modify:function(betvalue){var key='SSC_2Star_ZHX';C.Tab.showAbacus(key);C.Ball.clear(key);var a=betvalue.split('-,-,-,')[1].split(',');for(var i=0;i<a.length;i++){C.Ball.toggle(key,[i,Number(a[i])]);}
return true;},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);var a=[];for(var i=0;i<rea.length;i++){var o={key:that.getKey(),des:that.getBetString(rea[i]),value:that.getClozedata(rea[i].split(','))};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);return rea.length;},random:function(n){var that=this;var a=[];for(var i=0;i<n;i++){var b=that._randomOne();if(C.Tools.inArray(b,a)){i--;continue;}
a.push(b);}
var A=[];for(var i=0;i<n;i++){var o={key:that.getKey(),des:that.getBetString(a[i]),value:that.getClozedata(a[i].split(','))};A.push(o);}
return A;},_randomOne:function(){var that=this;var a=[];for(var i=0;i<2;i++){var r=Math.floor(Math.random()*10);a.push(r);}
return a.join(',');},getBetString:function(combines){var that=this;var prefix="[二星直选] ";if(typeof combines=='string'){var _a=combines.split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');return prefix+suffix;}else{var a=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');a.push(prefix+suffix);}
return a;}}});});YUI.add('SSC_2Star_ZHXHZ',function(Y){var key='SSC_2Star_ZHXHZ';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'中奖号码个位、十位数字加起来的总和值。举例： 若选择和值5投注，将包含6注和值为5的号码。中奖条件：个位、十位数字和位置都要一致。奖金100元',verify:function(){var that=this;var key=that.getKey();if(!C.Ball.isRowChecked(key,0)){return'请选择至少一个和值';}
return true;},modify:function(betvalue){var that=this;return C.AbacusList['SSC_2Star_ZHX'].modify(betvalue);},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getSummationPermutation(nakedata[0],2);var a=[];for(var i=0;i<rea.length;i++){var o={key:that.getKey(),des:that.getBetString(rea[i]),value:that.getClozedata(rea[i].split(','))};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getSummationPermutation(nakedata[0],2)
return rea.length;},random:function(n){return C.Ball.getAbacus('SSC_2Star_ZHX').random(n);},getBetString:function(combines){var that=this;var prefix="[二星直选] ";if(typeof combines=='string'){var _a=combines.split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');return prefix+suffix;}else{var a=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');a.push(prefix+suffix);}
return a;}}});});YUI.add('SSC_2Star_ZUX',function(Y){var key='SSC_2Star_ZUX';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'从0-9中选择至少2个号码进行投注，最多可选7个号码对十位、个位投注。所选的号码与当期开奖号码后两位相同（顺序不限），即为中奖，奖金50元。',verify:function(){var that=this;if(C.Ball.selectedNum(key,0)<2||C.Ball.selectedNum(key,0)>7){return'请选择2至7个号码'}
return true;},modify:function(betvalue){Y.Box.alert('二星组选无法修改单注');return false;},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundCombination(nakedata[0],2);var reaFilter=new Array;for(var i=0,len=rea.length;i<len;i++){var arr=rea[i].split(',');if(arr[0]==arr[1]){continue;}
reaFilter.push(rea[i]);}
var a=[];for(var i=0;i<reaFilter.length;i++){var o={key:that.getKey(),des:that.getBetString(reaFilter[i]),value:that.getClozedata(reaFilter[i].split(','))};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundCombination(nakedata[0],2);var reaFilter=new Array;for(var i=0,len=rea.length;i<len;i++){var arr=rea[i].split(',');if(arr[0]==arr[1]){continue;}
reaFilter.push(rea[i]);}
return reaFilter.length;},random:function(n){var that=this;var a=[];for(var i=0;i<n;i++){var b=that._randomOne();if(C.Tools.inArray(b,a)){i--;continue;}
a.push(b);}
var A=[];for(var i=0;i<n;i++){var o={key:that.getKey(),des:that.getBetString(a[i]),value:that.getClozedata(a[i].split(','))};A.push(o);}
return A;},_randomOne:function(){var that=this;var a=[];for(var i=0;i<2;i++){var r=Math.floor(Math.random()*10);a.push(r);}
return a.sort().join(',');},getBetString:function(combines){var that=this;var prefix="[二星组选] ";if(typeof combines=='string'){var _a=combines.split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');return prefix+suffix;}else{var a=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');a.push(prefix+suffix);}
return a;}}});});YUI.add('SSC_2Star_ZUHZ',function(Y){var key='SSC_2Star_ZUHZ';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'中奖号码个位、十位数字加起来的总和值。举例： 若选择和值5投注，将包含3注和值为5的号码。中奖条件：个位、十位数字一致，位置可以不一致。奖金50元（对子号算直选，奖金100元）',verify:function(){var that=this;var key=that.getKey();if(!C.Ball.isRowChecked(key,0)){return'请选择至少一个和值';}
return true;},modify:function(betvalue){Y.Box.alert('二星组选和值无法修改单注');return false;},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getSummationCombination(nakedata[0],2);var a=[];for(var i=0;i<rea.length;i++){var o={key:that.getKey(),des:that.getBetString(rea[i]),value:that.getClozedata(rea[i].split(','))};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getSummationCombination(nakedata[0],2);return rea.length;},random:function(n){return C.Ball.getAbacus('SSC_2Star_ZUX').random(n);},getBetString:function(combines){var that=this;var prefix="[二星组选] ";if(typeof combines=='string'){if(combines.charAt(0)==combines.charAt(2)){prefix="[二星直选] ";}
var _a=combines.split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');return prefix+suffix;}else{var a=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');a.push(prefix+suffix);}
return a;}}});});YUI.add('SSC_1Star_FS',function(Y){var key='SSC_1Star_FS';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'从0~9中选一个至多个号码投注，投注号码与当期开奖号码的个位号码相符，即为中奖，奖金10元',verify:function(){var that=this;var key=that.getKey();if(!C.Ball.isRowChecked(key,0)){return'请选择个位';}
return true;},modify:function(betvalue){var that=this;var key=that.getKey();C.Tab.showAbacus(key);C.Ball.clear(key);var a=betvalue.split('-,-,-,-,')[1].split(',');for(var i=0;i<a.length;i++){C.Ball.toggle(key,[i,Number(a[i])]);}
return true;},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);for(var i=0;i<rea.length;i++){rea[i]=rea[i].toString();}
var a=[];for(var i=0;i<rea.length;i++){var o={key:that.getKey(),des:that.getBetString(rea[i]),value:that.getClozedata(rea[i].split(','))};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);return rea.length;},random:function(n){var that=this;var a=[];for(var i=0;i<n;i++){var b=that._randomOne();if(C.Tools.inArray(b,a)){i--;continue;}
a.push(b);}
var A=[];for(var i=0;i<n;i++){var o={key:that.getKey(),des:that.getBetString(a[i]),value:that.getClozedata(a[i].split(','))};A.push(o);}
return A;},_randomOne:function(){var that=this;var a=[];for(var i=0;i<1;i++){var r=Math.floor(Math.random()*10);a.push(r);}
return a.join(',');},getBetString:function(combines){var that=this;var prefix="[一星直选] ";if(typeof combines=='string'){var _a=combines.split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');return prefix+suffix;}else{var a=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var suffix=that.getClozedata(_a,5).replace(/,/ig,'|');a.push(prefix+suffix);}
return a;}}});});YUI.add('SSC_BigSmall_FS',function(Y){var key='SSC_BigSmall_FS';YUI.namespace('C.AbacusList');C.AbacusList[key]=Y.merge(new C.AbacusFactory(key),{tipVal:'分别从个、十位中任选一种性质组成一注投注号码，与开奖号码的个位、十位一致即中奖、奖金4元。举例：开奖号码9,5,8,0,8；十位:小双 ，个位:大双 ，用户选：小大、双双、小双、双大，都算中奖。',verify:function(){var that=this;var key=that.getKey();if(!C.Ball.isRowChecked(key,0)){return'请选择十位';}else if(!C.Ball.isRowChecked(key,1)){return'请选择个位';}
return true;},modify:function(betvalue){var that=this;var key=that.getKey();C.Tab.showAbacus(key);C.Ball.clear(key);var a=[];a.push((Number(betvalue.split('')[0])-1).toString());a.push((Number(betvalue.split('')[1])-1).toString());for(var i=0;i<a.length;i++){C.Ball.toggle(key,[i,Number(a[i])]);}
return true;},getBetArray:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);var a=[];for(var i=0;i<rea.length;i++){var o={key:that.getKey(),des:that.getBetString(rea[i]),value:rea[i].replace(',','')};a.push(o);}
return a;},getBetNo:function(){var that=this;var nakedata=that.getNakedata();var rea=C.Tools.getCompoundPermutation(nakedata);return rea.length;},random:function(n){var that=this;var a=[];for(var i=0;i<n;i++){var b=that._randomOne();if(C.Tools.inArray(b,a)){i--;continue;}
a.push(b);}
var A=[];for(var i=0;i<n;i++){var o={key:that.getKey(),des:that.getBetString(a[i]),value:a[i].replace(',','')};A.push(o);}
return A;},_randomOne:function(){var that=this;var a=[];for(var i=0;i<2;i++){var r=Math.floor(Math.random()*3)+1;a.push(r);}
return a.join(',');},getBetString:function(combines){var that=this;var prefix="";var hash={'1':'大','2':'小','3':'单','4':'双'};if(typeof combines=='string'){var _a=combines.split(",");var a=[];for(var i=0;i<_a.length;i++){a.push(hash[_a[i]]);}
return a.join('');}else{var aa=[];for(var i=0;i<combines.length;i++){var _a=combines[i].split(",");var a=[];for(var i=0;i<_a.length;i++){a.push(hash[_a[i]]);}
aa.push(a.join(''));}
return aa;}}});});YUI.add('SSC_Donkeyman',function(Y){C.Donkeyman.init().on('zh',function(o){if(o.type=='show'){Y.one('#J_Donkeyman .dkm-bt').addClass('hidden');Y.one('#J_Donkeyman .dkm-qs').removeClass('hidden');Y.one('#J_Donkeyman .dkm-stop').removeClass('hidden');}else if(o.type=='hide'){Y.one('#J_Donkeyman .dkm-bt').removeClass('hidden');Y.one('#J_Donkeyman .dkm-qs').addClass('hidden');Y.one('#J_Donkeyman .dkm-stop').addClass('hidden');}
C.Donkeyman.ZH.render();});C.Donkeyman.Toolbar.init();C.Donkeyman.ZH.init();});YUI.add('SSC_document',function(Y){var flag=Y.Cookie.get('document_checkbox');var hideDoc=function(){Y.one('.cfm-document').setStyle('display','none');};if(flag=='checked'){hideDoc();}else{Y.one('.cfm-document').setStyle('display','block');}
Y.one('#J_docshow').on('click',function(e){if(e.target.get('checked')){hideDoc();Y.Cookie.set('document_checkbox','checked');}});});YUI.add('saleStop',function(Y){K={init:function(val){var maskElem=Y.Node.create('<div><div id="stopInfo"></div></div>');var betBody=Y.one('.cp-opbody');maskElem.setAttribute('id','maskElem');maskElem.setStyles({width:betBody.get('offsetWidth')+'px',height:betBody.get('offsetHeight')+293+'px',left:betBody.getXY()[0]+'px',top:betBody.getXY()[1]+'px'});Y.one('body').append(maskElem);maskElem.query("#stopInfo").set('innerHTML',val);}};});YUI.add('presell',function(Y){J={hideSelect:function(){C.Basket.select_node.setStyle('visibility','hidden');},showSelect:function(){C.Basket.select_node.setStyle('visibility','');},init:function(t){var that=this;var remainTime=t;var alternantTime=300;var date=new Date;if(date.getHours()>=10&&date.getHours()<=22){alternantTime=600;}
var timer=setInterval(function(){remainTime--;if(remainTime==0){window.location.reload();}},1000);Y.one('#J_confirm_pay').on('click',function(e){var saletime=240;var date=new Date;if(date.getHours()>=10&&date.getHours()<=22){saletime=480;}
if(remainTime>saletime){C.Confirm.before=function(){if(Y.Cookie.get('notAppear')!='yes'){var msg=Y.one('#presellMask');var body=Y.one('body');var confirmbtn=msg.query('.confirm');var cancelbtn=msg.query('.cancel');var notApp=msg.query('input');if(mask){mask.setStyle('visibility','')}else{var mask=Y.Node.create('<div></div>');}
setTimeout(function(){mask.setStyles({width:body.get('offsetWidth')+'px',height:body.get('offsetHeight')+'px',backgroundColor:'#000',position:'absolute',left:0,top:0,opacity:0.7,zIndex:99});body.append(mask);if(/6/i.test(Y.UA.ie)){that.hideSelect();}
msg.setStyles({display:'block',left:(body.get('offsetWidth')-540)/2+'px',top:(Y.DOM.winHeight()-335)/2+Y.DOM.docScrollY()+'px'});},0);confirmbtn.on('click',function(e){msg.setStyle('display','');mask.setStyle('visibility','hidden');if(C.Confirm.Box.shouldSkip()){C.Confirm.config.callback(C.Confirm);}else{C.Confirm.Box.show('msgbox');}});cancelbtn.on('click',function(e){msg.setStyle('display','');mask.setStyle('visibility','hidden');if(/6/i.test(Y.UA.ie)){that.showSelect();}});notApp.on('click',function(e){Y.Cookie.set('notAppear','yes');});return false;}else{return true;}};}else{C.Confirm.before=function(){return true;};}});}};});
YUI.namespace('Y.Collapse');YUI.add('t-collapse',function(Y){Y.Collapse=function(){this.init.apply(this,arguments);};Y.Collapse.prototype={init:function(id,o){var that=this;that.id=id;that.buildParam(o);that.bindEvent();that.buildEventCenter();return this;if(that.default_status=='unfold'){that.unfold();}else{that.fold();}},buildParam:function(o){var that=this;that.con_id=o.con_id;that.fold_class=o.fold_class;that.unfold_class=o.unfold_class;that.default_status=o.default_status;that.trigger=Y.one('#'+that.id);that.con=Y.one('#'+that.con_id);that.con_height=that.con.get('region').height;that.con.setStyle('overflow','hidden');return this;},bindEvent:function(){var that=this;that.trigger.on('click',function(e){e.halt();that.toggle();});},unfold:function(){var that=this;that.con.removeClass('hidden');var A=new Y.Anim({node:that.con,from:{height:0},to:{height:that.con_height},easing:Y.Easing.easeOut,duration:0.7});A.on('end',function(){that.trigger.replaceClass(that.fold_class,that.unfold_class);that.EventCenter.fire('unfold',that);delete A;});A.run();return this;},fold:function(){var that=this;var A=new Y.Anim({node:that.con,from:{height:that.con_height},to:{height:0},easing:Y.Easing.easeOut,duration:0.7});A.on('end',function(){that.con.addClass('hidden');that.trigger.replaceClass(that.unfold_class,that.fold_class);that.EventCenter.fire('fold',that);delete A;});A.run();return this;},toggle:function(){var that=this;if(that.con.hasClass('hidden')){that.unfold();}else{that.fold();}},buildEventCenter:function(){var that=this;var EventFactory=function(){this.publish("fold");this.publish("unfold");};Y.augment(EventFactory,Y.Event.Target);that.EventCenter=new EventFactory();return this;},on:function(type,foo){var that=this;that.EventCenter.subscribe(type,foo);return this;}};});
YUI.namespace('Y.Spage');YUI.add('t-spage',function(Y){Y.Spage=function(){this.init.apply(this,arguments);};Y.Spage.prototype={init:function(nodelist,pageid,step){var that=this;that.nodelist=nodelist;that.pageid=pageid;that.step=step;that.size=nodelist.size();that.pages=Math.ceil(that.size/step);that.index=1;that.buildHTML();that.bindEvent();that.showPage(1);return this;},showPage:function(index){var that=this;if(Y.all('#'+that.pageid+' a').item(Number(index)-1)){var as=Y.all('#'+that.pageid+' a');as.removeClass('selected');as.item(Number(index)-1).addClass('selected');var rear=(Number(index)-1)*that.step+1;var top=(rear+that.step-1>that.size)?that.size:(rear+that.step-1);that.nodelist.addClass('hidden');for(var i=rear;i<=top;i++){that.nodelist.item(i-1).removeClass('hidden');}}},bindEvent:function(){var that=this;that.pagecon=Y.one('#'+that.pageid);that.pagecon.delegate('click',function(e){e.halt();var pageNo=Number(e.target.get('innerHTML'));that.showPage(pageNo);},'a');return this;},buildHTML:function(){var that=this;that.pagecon=Y.one('#'+that.pageid);for(var i=0;i<that.pages;i++){that.pagecon.append(Y.Node.create('<a href="javascript:void(0);">'+Number(i+1)+'</a>'));}}};});
CUBEE_AUTHOR='bachi@taobao.com';CUBEE_COPYRIGHT='http://www.uedmagazine.com';CUBEE_VERSION='0.2beta';
