function on(flashsrc,flashwidth,flashheight,flashlink,br){
	document.write("<div style=\"position:relative\">");
	document.write("<embed style=\"position:absolute;z-index:0;left:0px\" src="+flashsrc+" quality=\"high\" width="+flashwidth+" height="+flashheight+" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" wmode=\"opaque\"></embed>");
	document.write("<div style=\"position:relative;filter:alpha(opacity=0);-moz-opacity:0;z-index:10;left:0;top:0;background:transparent !important;background:#cdeaf6;width:"+flashwidth+";height:"+flashheight+"px;\">");
	document.write("<a href="+flashlink+" target=\"_blank\" style=\"cursor:pointer;display:block;width:"+flashwidth+";height:"+flashheight+"px;\"></a>");
	document.write("</div>");
	document.write("</div>");
	if (br=="1") {
	document.write("<br>");
	}
}

function of(flashsrc,flashwidth,flashheight){
	document.write("<div style=\"position:relative\">");
	document.write("<embed style=\"position:absolute;z-index:10;left:0px\" src="+flashsrc+" quality=\"high\" width="+flashwidth+" height="+flashheight+" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" wmode=\"opaque\"></embed>");
	document.write("<div style=\"position:relative;filter:alpha(opacity=0);-moz-opacity:0;z-index:0;left:0;bottom:0;background:transparent !important;background:#cdeaf6;width:"+flashwidth+";height:"+flashheight+"px;\">");
	document.write("</div>");
	document.write("</div>");
	if (br=="1") {
	document.write("<br>");
	}
}




if(typeof Tuluo=="undefined"||!Tuluo){var Tuluo={};}Tuluo.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=Tuluo;for(B=(D[0]=="Tuluo")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};Tuluo.log=function(D,A,C){var B=Tuluo.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};Tuluo.register=function(A,E,D){var I=Tuluo.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=Tuluo.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{Tuluo.log("mainClass is undefined for module "+A,"warn");}};Tuluo.env=Tuluo.env||{modules:[],listeners:[]};Tuluo.env.getVersion=function(A){return Tuluo.env.modules[A]||null;};Tuluo.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){Tuluo.namespace("util","widget","example");if("undefined"!==typeof Tuluo_config){var B=Tuluo_config.listener,A=Tuluo.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();Tuluo.lang=Tuluo.lang||{isArray:function(B){if(B){var A=Tuluo.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||Tuluo.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return!Tuluo.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(Tuluo.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(Tuluo.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("Tuluo.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}Tuluo.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}Tuluo.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}Tuluo.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=Tuluo.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType"in A&&"tagName"in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=Tuluo.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C<A;C=C+1){Tuluo.lang.augmentObject(D,B[C],true);}return D;},later:function(H,B,I,D,E){H=H||0;B=B||{};var C=I,G=D,F,A;if(Tuluo.lang.isString(I)){C=B[I];}if(!C){throw new TypeError("method undefined");}if(!Tuluo.lang.isArray(G)){G=[D];}F=function(){C.apply(B,G);};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(B){var A=Tuluo.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};Tuluo.util.Lang=Tuluo.lang;Tuluo.lang.augment=Tuluo.lang.augmentProto;Tuluo.augment=Tuluo.lang.augmentProto;Tuluo.extend=Tuluo.lang.extend;Tuluo.register("Tuluo",Tuluo,{version:"2.5.0",build:"897"});(function(){var B=Tuluo.util,K,I,J={},F={},M=window.document;Tuluo.env._id_counter=Tuluo.env._id_counter||0;var C=Tuluo.env.ua.opera,L=Tuluo.env.ua.webkit,A=Tuluo.env.ua.gecko,G=Tuluo.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var N=function(P){if(!E.HYPHEN.test(P)){return P;}if(J[P]){return J[P];}var Q=P;while(E.HYPHEN.exec(Q)){Q=Q.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[P]=Q;return Q;};var O=function(Q){var P=F[Q];if(!P){P=new RegExp("(?:^|\\s+)"+Q+"(?:\\s+|$)");F[Q]=P;}return P;};if(M.defaultView&&M.defaultView.getComputedStyle){K=function(P,S){var R=null;if(S=="float"){S="cssFloat";}var Q=M.defaultView.getComputedStyle(P,"");if(Q){R=Q[N(S)];}return P.style[S]||R;};}else{if(M.documentElement.currentStyle&&G){K=function(P,R){switch(N(R)){case"opacity":var T=100;try{T=P.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(S){try{T=P.filters("alpha").opacity;}catch(S){}}return T/100;case"float":R="styleFloat";default:var Q=P.currentStyle?P.currentStyle[R]:null;return(P.style[R]||Q);}};}else{K=function(P,Q){return P.style[Q];};}}if(G){I=function(P,Q,R){switch(Q){case"opacity":if(Tuluo.lang.isString(P.style.filter)){P.style.filter="alpha(opacity="+R*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1;}}break;case"float":Q="styleFloat";default:P.style[Q]=R;}};}else{I=function(P,Q,R){if(Q=="float"){Q="cssFloat";}P.style[Q]=R;};}var D=function(P,Q){return P&&P.nodeType==1&&(!Q||Q(P));};Tuluo.util.Dom={get:function(R){if(R&&(R.nodeType||R.item)){return R;}if(Tuluo.lang.isString(R)||!R){return M.getElementById(R);}if(R.length!==undefined){var S=[];for(var Q=0,P=R.length;Q<P;++Q){S[S.length]=B.Dom.get(R[Q]);}return S;}return R;},getStyle:function(P,R){R=N(R);var Q=function(S){return K(S,R);};return B.Dom.batch(P,Q,B.Dom,true);},setStyle:function(P,R,S){R=N(R);var Q=function(T){I(T,R,S);};B.Dom.batch(P,Q,B.Dom,true);},getXY:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}return H(R);};return B.Dom.batch(P,Q,B.Dom,true);},getX:function(P){var Q=function(R){return B.Dom.getXY(R)[0];};return B.Dom.batch(P,Q,B.Dom,true);},getY:function(P){var Q=function(R){return B.Dom.getXY(R)[1];};return B.Dom.batch(P,Q,B.Dom,true);},setXY:function(P,S,R){var Q=function(V){var U=this.getStyle(V,"position");if(U=="static"){this.setStyle(V,"position","relative");U="relative";}var X=this.getXY(V);if(X===false){return false;}var W=[parseInt(this.getStyle(V,"left"),10),parseInt(this.getStyle(V,"top"),10)];if(isNaN(W[0])){W[0]=(U=="relative")?0:V.offsetLeft;}if(isNaN(W[1])){W[1]=(U=="relative")?0:V.offsetTop;}if(S[0]!==null){V.style.left=S[0]-X[0]+W[0]+"px";}if(S[1]!==null){V.style.top=S[1]-X[1]+W[1]+"px";}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true);}}};B.Dom.batch(P,Q,B.Dom,true);},setX:function(Q,P){B.Dom.setXY(Q,[P,null]);},setY:function(P,Q){B.Dom.setXY(P,[null,Q]);},getRegion:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=M.body){return false;}var S=B.Region.getRegion(R);return S;};return B.Dom.batch(P,Q,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(T,X,U,V){X=X||"*";U=(U)?B.Dom.get(U):null||M;if(!U){return[];}var Q=[],P=U.getElementsByTagName(X),W=O(T);for(var R=0,S=P.length;R<S;++R){if(W.test(P[R].className)){Q[Q.length]=P[R];if(V){V.call(P[R],P[R]);}}}return Q;},hasClass:function(R,Q){var P=O(Q);var S=function(T){return P.test(T.className);};return B.Dom.batch(R,S,B.Dom,true);},addClass:function(Q,P){var R=function(S){if(this.hasClass(S,P)){return false;}S.className=Tuluo.lang.trim([S.className,P].join(" "));return true;};return B.Dom.batch(Q,R,B.Dom,true);},removeClass:function(R,Q){var P=O(Q);var S=function(T){if(!Q||!this.hasClass(T,Q)){return false;}var U=T.className;T.className=U.replace(P," ");if(this.hasClass(T,Q)){this.removeClass(T,Q);}T.className=Tuluo.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},replaceClass:function(S,Q,P){if(!P||Q===P){return false;}var R=O(Q);var T=function(U){if(!this.hasClass(U,Q)){this.addClass(U,P);return true;}U.className=U.className.replace(R," "+P+" ");if(this.hasClass(U,Q)){this.replaceClass(U,Q,P);}U.className=Tuluo.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},generateId:function(P,R){R=R||"yui-gen";var Q=function(S){if(S&&S.id){return S.id;}var T=R+Tuluo.env._id_counter++;if(S){S.id=T;}return T;};return B.Dom.batch(P,Q,B.Dom,true)||Q.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);Q=B.Dom.get(Q);if(!P||!Q){return false;}if(P.contains&&Q.nodeType&&!L){return P.contains(Q);}else{if(P.compareDocumentPosition&&Q.nodeType){return!!(P.compareDocumentPosition(Q)&16);}else{if(Q.nodeType){return!!this.getAncestorBy(Q,function(R){return R==P;});}}}return false;},inDocument:function(P){return this.isAncestor(M.documentElement,P);},getElementsBy:function(W,Q,R,T){Q=Q||"*";R=(R)?B.Dom.get(R):null||M;if(!R){return[];}var S=[],V=R.getElementsByTagName(Q);for(var U=0,P=V.length;U<P;++U){if(W(V[U])){S[S.length]=V[U];if(T){T(V[U]);}}}return S;},batch:function(T,W,V,R){T=(T&&(T.tagName||T.item))?T:B.Dom.get(T);if(!T||!W){return false;}var S=(R)?V:window;if(T.tagName||T.length===undefined){return W.call(S,T,V);}var U=[];for(var Q=0,P=T.length;Q<P;++Q){U[U.length]=W.call(S,T[Q],V);}return U;},getDocumentHeight:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollHeight:M.documentElement.scrollHeight;var P=Math.max(Q,B.Dom.getViewportHeight());return P;},getDocumentWidth:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollWidth:M.documentElement.scrollWidth;var P=Math.max(Q,B.Dom.getViewportWidth());return P;},getViewportHeight:function(){var P=self.innerHeight;var Q=M.compatMode;if((Q||G)&&!C){P=(Q=="CSS1Compat")?M.documentElement.clientHeight:M.body.clientHeight;}return P;},getViewportWidth:function(){var P=self.innerWidth;var Q=M.compatMode;if(Q||G){P=(Q=="CSS1Compat")?M.documentElement.clientWidth:M.body.clientWidth;}return P;},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P;}}return null;},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return B.Dom.hasClass(S,P);};return B.Dom.getAncestorBy(Q,R);},getAncestorByTagName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return S.tagName&&S.tagName.toUpperCase()==P.toUpperCase();};return B.Dom.getAncestorBy(Q,R);},getPreviousSiblingBy:function(P,Q){while(P){P=P.previousSibling;if(D(P,Q)){return P;}}return null;},getPreviousSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getPreviousSiblingBy(P);},getNextSiblingBy:function(P,Q){while(P){P=P.nextSibling;if(D(P,Q)){return P;}}return null;},getNextSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getNextSiblingBy(P);},getFirstChildBy:function(P,R){var Q=(D(P.firstChild,R))?P.firstChild:null;return Q||B.Dom.getNextSiblingBy(P.firstChild,R);},getFirstChild:function(P,Q){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getFirstChildBy(P);},getLastChildBy:function(P,R){if(!P){return null;}var Q=(D(P.lastChild,R))?P.lastChild:null;return Q||B.Dom.getPreviousSiblingBy(P.lastChild,R);},getLastChild:function(P){P=B.Dom.get(P);return B.Dom.getLastChildBy(P);},getChildrenBy:function(Q,S){var R=B.Dom.getFirstChildBy(Q,S);var P=R?[R]:[];B.Dom.getNextSiblingBy(R,function(T){if(!S||S(T)){P[P.length]=T;}return false;});return P;},getChildren:function(P){P=B.Dom.get(P);if(!P){}return B.Dom.getChildrenBy(P);},getDocumentScrollLeft:function(P){P=P||M;return Math.max(P.documentElement.scrollLeft,P.body.scrollLeft);},getDocumentScrollTop:function(P){P=P||M;return Math.max(P.documentElement.scrollTop,P.body.scrollTop);},insertBefore:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}return P.parentNode.insertBefore(Q,P);},insertAfter:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}if(P.nextSibling){return P.parentNode.insertBefore(Q,P.nextSibling);}else{return P.parentNode.appendChild(Q);}},getClientRegion:function(){var R=B.Dom.getDocumentScrollTop(),Q=B.Dom.getDocumentScrollLeft(),S=B.Dom.getViewportWidth()+Q,P=B.Dom.getViewportHeight()+R;return new B.Region(R,S,P,Q);}};var H=function(){if(M.documentElement.getBoundingClientRect){return function(Q){var R=Q.getBoundingClientRect();var P=Q.ownerDocument;return[R.left+B.Dom.getDocumentScrollLeft(P),R.top+B.Dom.getDocumentScrollTop(P)];};}else{return function(R){var S=[R.offsetLeft,R.offsetTop];var Q=R.offsetParent;var P=(L&&B.Dom.getStyle(R,"position")=="absolute"&&R.offsetParent==R.ownerDocument.body);if(Q!=R){while(Q){S[0]+=Q.offsetLeft;S[1]+=Q.offsetTop;if(!P&&L&&B.Dom.getStyle(Q,"position")=="absolute"){P=true;}Q=Q.offsetParent;}}if(P){S[0]-=R.ownerDocument.body.offsetLeft;S[1]-=R.ownerDocument.body.offsetTop;}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(B.Dom.getStyle(Q,"display").search(/^inline|table-row.*$/i)){S[0]-=Q.scrollLeft;S[1]-=Q.scrollTop;}Q=Q.parentNode;}return S;};}}();})();Tuluo.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};Tuluo.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};Tuluo.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};Tuluo.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new Tuluo.util.Region(C,D,A,B);}else{return null;}};Tuluo.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new Tuluo.util.Region(C,D,A,B);};Tuluo.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};Tuluo.util.Region.getRegion=function(D){var F=Tuluo.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new Tuluo.util.Region(C,E,A,B);};Tuluo.util.Point=function(A,B){if(Tuluo.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};Tuluo.util.Point.prototype=new Tuluo.util.Region();Tuluo.register("dom",Tuluo.util.Dom,{version:"2.5.0",build:"897"});Tuluo.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||Tuluo.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new Tuluo.util.CustomEvent(E,this,true);}this.lastError=null;};Tuluo.util.CustomEvent.LIST=0;Tuluo.util.CustomEvent.FLAT=1;Tuluo.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new Tuluo.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var D=this.subscribers.length;if(!D&&this.silent){return true;}var H=[],F=true,C,I=false;for(C=0;C<arguments.length;++C){H.push(arguments[C]);}if(!this.silent){}for(C=0;C<D;++C){var L=this.subscribers[C];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==Tuluo.util.CustomEvent.FLAT){var A=null;if(H.length>0){A=H[0];}try{F=L.fn.call(K,A,L.obj);}catch(E){this.lastError=E;}}else{try{F=L.fn.call(K,this.type,H,L.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}if(I){var J=[],B=this.subscribers;for(C=0,D=B.length;C<D;C=C+1){J.push(B[C]);}this.subscribers=J;}return true;},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};Tuluo.util.Subscriber=function(B,C,A){this.fn=B;this.obj=Tuluo.lang.isUndefined(C)?null:C;this.override=A;};Tuluo.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};Tuluo.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};Tuluo.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!Tuluo.util.Event){Tuluo.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:Tuluo.env.ua.webkit,webkit:Tuluo.env.ua.webkit,isIE:Tuluo.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(Tuluo.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(Tuluo.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){Tuluo.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,Tuluo.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){Tuluo.util.Event.fireLegacyEvent(Tuluo.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M];for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return-1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=0,R=L.length;O<R;++O){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=0,R=J.length;O<R;O++){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J[O]=null;return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M[O]=null;break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I[Q]=null;return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(Tuluo.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;++M){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return-1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new Tuluo.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=Tuluo.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=Tuluo.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!this.DOMReady){this.startInterval();return false;}}this.locked=true;var P=!H;if(!P){P=(C>0);}var O=[];var Q=function(S,T){var R=S;if(T.override){if(T.override===true){R=T.obj;}else{R=T.override;}}T.fn.call(R,T.obj);};var L,K,N,M;for(L=0,K=F.length;L<K;++L){N=F[L];if(N&&!N.checkReady){M=this.getEl(N.id);if(M){Q(M,N);F[L]=null;}else{O.push(N);}}}for(L=0,K=F.length;L<K;++L){N=F[L];if(N&&N.checkReady){M=this.getEl(N.id);if(M){if(H||M.nextSibling){Q(M,N);F[L]=null;}}else{O.push(N);}}}C=(O.length===0)?0:C-1;if(P){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var M=(Tuluo.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=0,K=Q.length;N<K;++N){var L=Q[N];this.removeListener(M,L.type,L.fn,L.index);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(Tuluo.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T&&T.length>0){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(R){var Q=Tuluo.util.Event,O,N,L,K,M;for(O=0,K=J.length;O<K;++O){L=J[O];if(L){var P=window;if(L[Q.ADJ_SCOPE]){if(L[Q.ADJ_SCOPE]===true){P=L[Q.UNLOAD_OBJ];}else{P=L[Q.ADJ_SCOPE];}}L[Q.FN].call(P,Q.getEvent(R,L[Q.EL]),L[Q.UNLOAD_OBJ]);J[O]=null;L=null;P=null;}}J=null;if(I&&I.length>0){N=I.length;while(N){M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M);}N--;}L=null;}G=null;Q._simpleRemove(window,"unload",Q._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=Tuluo.util.Event;EU.on=EU.addListener;if(EU.isIE){Tuluo.util.Event.onDOMReady(Tuluo.util.Event._tryPreloadAttach,Tuluo.util.Event,true);EU._dri=setInterval(function(){var n=document.createElement("p");try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){n=null;}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}Tuluo.util.EventProvider=function(){};Tuluo.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(Tuluo.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new Tuluo.util.CustomEvent(G,H,E,Tuluo.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};Tuluo.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=Tuluo.util.KeyListener.KEYDOWN;}var D=new Tuluo.util.CustomEvent("keyPressed");this.enabledEvent=new Tuluo.util.CustomEvent("enabled");this.disabledEvent=new Tuluo.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){Tuluo.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){Tuluo.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};Tuluo.util.KeyListener.KEYDOWN="keydown";Tuluo.util.KeyListener.KEYUP="keyup";Tuluo.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};Tuluo.register("event",Tuluo.util.Event,{version:"2.5.0",build:"897"});Tuluo.register("Tuluo-dom-event",Tuluo,{version:"2.5.0",build:"897"});


(function(){var B=Tuluo.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,E,D){if(this.patterns.noNegatives.test(C)){E=(E>0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!Tuluo.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();Tuluo.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{Tuluo.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return-1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};Tuluo.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";var C=Tuluo.util;Tuluo.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var H=Tuluo.util.Dom.getStyle(G,E);if(this.patterns.transparent.test(H)){var F=G.parentNode;H=C.Dom.getStyle(F,E);while(F&&this.patterns.transparent.test(H)){F=F.parentNode;H=C.Dom.getStyle(F,E);if(F.tagName.toUpperCase()=="HTML"){H="#fff";}}}}else{H=D.getAttribute.call(this,E);}return H;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})();Tuluo.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return-D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return-D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-Tuluo.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return Tuluo.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return Tuluo.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=Tuluo.util;Tuluo.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0]instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=Tuluo.util;Tuluo.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();


Tuluo.namespace("Realte");


Tuluo.Realte.Window=function(){function openWindow(e,a,windowDefintion){Tuluo.util.Event.stopEvent(e);var df=Tuluo.Realte.WINDOWS.defaults;var f=Tuluo.Realte.WINDOWS[windowDefintion]||df;var ti=readAttribute(f.title,df.title);var w=readAttribute(f.width,df.width);var h=readAttribute(f.height,df.height);var t=readAttribute(f.top,df.top);var l=readAttribute(f.left,df.left);var sb=readAttribute(f.scrollbars,df.scrollbars);var tb=readAttribute(f.toolbar,df.toolbar);var d=readAttribute(f.directories,df.directories);var st=readAttribute(f.status,df.status);var mb=readAttribute(f.menubar,df.menubar);var loc=readAttribute(f.location,df.location);var rs=readAttribute(f.resizable,df.resizable);var newWindowForEachLink=readAttribute(f.newWindowForEachLink,df.newWindowForEachLink);if(newWindowForEachLink){ti=a.href;ti=ti.replace(/ylt=[A-Za-z.0-9]+/,'');ti=ti.replace(/\W/g,'');}
var url=Tuluo.Realte.escapeUrl(a.href);var newWindow=window.open(url,ti,'width='+w+',height='+h+',top='+t+',left='+l+',scrollbars='+sb+',toolbar='+tb+',directories='+d+',status='+st+',menubar='+mb+',location='+loc+',resizable ='+rs);if(window.focus)
{newWindow.focus();}}
function readAttribute(attrA,attrB){if(typeof attrA!=='undefined'){return attrA;}
return attrB;}
function setQuickNav(node)
{var a=Tuluo.Realte.EXTERNALQUICKLINKS,i=a.length-1;do
{if(Tuluo.util.Dom.hasClass(node.parentNode,a[i]))return true;}
while(i--);}
var set=function(root,classname,windowDefintion){if(typeof windowDefintion==='undefined')
{windowDefintion=classname;}
var nodes=Tuluo.util.Dom.getElementsByClassName(classname,"a",root);if(root==='ysp-quicklinks-nav'||root==='ysp-league-nav')
{nodes=Tuluo.util.Dom.getElementsBy(setQuickNav,'a',root);}
if(!nodes)return;var openWindowFunc=function(e){openWindow(e,this,windowDefintion);}
return Tuluo.util.Event.addListener(nodes,"click",openWindowFunc);}
return{'set':set}}();

function killErrors() {
return true;
}
window.onerror = killErrors;


(function(){var $U=Tuluo.util;var $D=$U.Dom;var $C=$U.CustomEvent;var DTK=Tuluo.namespace('Photo.Dtk');Tuluo.namespace('Photo.Dtk.util');var spawn=function(cls,args){if(!args)args=[];else if(!args instanceof Array)args=[args];var f=function(){};f.prototype=cls.prototype;f.prototype.constructor=cls;var obj=new f();cls.apply(obj,args);return obj;};DTK.util.Manager=function(daemonClass){var idCounter=[0];var p=daemonClass.prototype;if(typeof p.getId!=='function'){p.getId=function(){if(this.id){return this.id;}
return(this.id='daemon_'+(idCounter[0]++));};}
if(typeof p.toString!=='function'){p.toString=function(){return'Daemon '+this.getId();};}
this.onCreate=new $C('create',this);this.onDaemonEvent=new $C('daemonEvent');this.daemonClass=daemonClass;var unload=function(e){var s=this.stack;for(var i=s.length-1;i>-1;i--){if(s[i]){s[i].manager=null;if(typeof(s[i].unload)=='function'){s[i].unload();}
this.daemons[s[i].getId()]=null;s[i]=null;}}};$U.Event.addListener(window,'unload',unload,this,true);};DTK.util.Manager.prototype={daemons:{},stack:[],daemonEvents:{},spawnDaemon:function(){var obj=spawn(this.daemonClass,arguments)
this.onCreate.fire(obj);return obj;},idString:'Generic Daemon Manager',toString:function(){var s=[this.idString,'{\n'];for(var c in this.daemons){if(this.daemons[c]instanceof this.daemonClass){s.push('\t',c,' : (',this.daemons[c].toString(),')\n');}}
s.push('}');return s.join('');},init:function(){var d=this.spawnDaemon.apply(this,arguments);if(d&&d.manager!=this){var onDaemonEvent=this.onDaemonEvent;d.manager=this;this.daemons[d.getId()]=d;this.stack.push(d);for(var e in d){if(d[e]instanceof $C){if(!this.daemonEvents[e]){this.daemonEvents[e]=new $C(d[e].type);}
var evMgr=this.daemonEvents[e];var fn=function(type,data){evMgr.scope=this;evMgr.fire.apply(evMgr,data);onDaemonEvent.scope=this;onDaemonEvent.type=type;onDaemonEvent.fire.apply(onDaemonEvent,data);};d[e].subscribe(fn);}}}
return d;},initAll:function(finder){if(typeof(finder)!='function')return[];var things=finder();var ret=[];var len=things.length;var args=[null];var arglen=arguments.length;for(var i=1;i<arglen;i++){args.push(arguments[i]);}
for(var i=0;i<len;i++){args[0]=things[i];var d=this.init.apply(this,args);if(d){ret.push(d);}}
return ret;},getDaemonById:function(id){if(id.id)return this.getDaemonById(id.id);return this.daemons[id]||null;}};})();


(function(){var $U=Tuluo.util;var $D=$U.Dom;var $E=$U.Event;var $S=$U.Scroll;var DTK=Tuluo.namespace('Photo.Dtk');var Carousel;(function(){var addPageIndicators=function(){var navExists=false;var n=$D.getElementsByClassName('nav','div',this.getElement());if(n.length>0){navExists=true;}
n=n[0]||document.createElement('div');n.className='nav';removeNavLinks.call(this);var p=this.pages.length;for(var x=0;x<p;x++){var a=this.navLinks[x]||document.createElement('a');a.index=x;a.carousel=this;a.onmousedown=a.onclick=this.scrollTo_click;if(x==this.current){a.className='current';}
n.appendChild(a);this.navLinks[x]=a;}
if(!navExists){var s=this.warp;s.parentNode.insertBefore(n,s);}
return;};var removeNavLinks=function(){if(this.navLinks){for(var j=this.navLinks.length-1;j>-1;j--){var a=this.navLinks[j];if(a){a.onclick=null;a.onmousedown=null;a.onmouseup=null;a.carousel=null;}
a=null;this.navLinks[j]=null;}}
this.navLinks=[];};var addNavButtons=function(){var i=this.getElement().id;var prev=$D.getElementsByClassName('prev','a',i);var next=$D.getElementsByClassName('next','a',i);if(prev.length||next.length){prev[0].onmousedown=prev[0].onclick=this.scrollPrev_click;next[0].onmousedown=next[0].onclick=this.scrollNext_click;next[0].carousel=prev[0].carousel=this;this.prev=prev[0];this.next=next[0];return;}
var p=document.createElement('a'),n=p.cloneNode(true);p.className="prev";n.className="next";var s=this.warp;s.parentNode.insertBefore(p,s);s.parentNode.insertBefore(n,s);p.onmousedown=p.onclick=this.scrollPrev_click;n.onmousedown=n.onclick=this.scrollNext_click;this.prev=p;this.next=n;n.carousel=p.carousel=this;s=null;};var updateNavState=function(){var l=this.navLinks.length;for(var x=0;x<l;x++){if(x==this.current){this.navLinks[x].className='current';}else{this.navLinks[x].className='';}}
if(this.current==0&&!this.roundRobin){$D.addClass(this.prev,'off');$D.removeClass(this.next,'off');$D.setStyle(this.next,'cursor','')
$D.setStyle(this.prev,'cursor','default')}else if(this.current==(l-1)&&!this.roundRobin){$D.removeClass(this.prev,'off');$D.addClass(this.next,'off');$D.setStyle(this.prev,'cursor','')
$D.setStyle(this.next,'cursor','default')}else{$D.removeClass(this.prev,'off');$D.removeClass(this.next,'off');$D.setStyle(this.next,'cursor','')
$D.setStyle(this.prev,'cursor','')}};var clickHandler=function(whichFn,fnFailure,fnArgs){return function(e){e=e||window.event;fnFailure=fnFailure||function(){return false;};fnArgs=fnArgs||function(){};var a=$E.getTarget(e);if(!a||!a.carousel||fnFailure(a)){return true;}
if(!a.didMouseDown){a.carousel[whichFn](fnArgs(a));}else{a.blur();}
a.didMouseDown=(e.type=='mousedown');a=null;$E.stopEvent(e);return false;};};Carousel=function(el,args){var me=this;var currentScroll=0;this.getCurrentScroll=function(){return currentScroll;};var ontween=function(e,data){currentScroll=this.anim.doMethod('scroll',this.animAttrs.scroll.from,this.animAttrs.scroll.to)[0];};var oncomplete=function(e,data){if(data[0].duration>=this.animDur){data=data[0];data.carousel=this;var _toString=data.toString;data.toString=function(){return _toString()+', current page:'+this.carousel.current;};this.onPageChange.fire(data);}};var onclick=function(e){this.onClick.fire(e);};var _element=null;this.getElement=function(){return _element;};this.init=function(el,args){el=$D.get(el);if(el){_element=el;}
$D.generateId(el,'carousel_');s=$D.getElementsByClassName('warp','div',el)[0];if(typeof(args)=='object'){for(var i in args){this[i]=args[i];}}
var me=this;var list=this.pages=$D.getElementsBy(function(el){return me.pageFinder(el);},this.pageTagName,el);var len=list.length;if(!el||!s||!len){return false;}
this.onScrollStart=new $U.CustomEvent('scrollstart',this);this.onPageChange=new $U.CustomEvent('scrollcomplete',this);this.onClick=new $U.CustomEvent('click',this);var r=$D.getRegion(list[0]);this.scrollDistance=r.right-r.left;this.warp=s;$E.addListener(s,'click',onclick,this,true);var h=$D.getRegion(s);h=(h.bottom-h.top)+'px';s.parentNode.style.height=h;s.style.position='absolute';var p=$D.getElementsByClassName('scroll','div',s)[0];p.style.width=(len*this.scrollDistance*1.0)+'px';p.style.position='absolute';var sl=Math.round(s.scrollLeft/this.scrollDistance);if(sl<0)sl=0;else if(sl>=this.pages.length)sl=this.pages.length-1;this.current=sl;this.warp.scrollLeft=currentScroll=sl*this.scrollDistance;this.anim=new $S(this.warp,this.animAttrs,this.animDur,this.easeMethod);this.anim.onTween.subscribe(ontween,this,true);this.anim.onComplete.subscribe(oncomplete,this,true);if(len>1){addNavButtons.call(this);addPageIndicators.call(this);updateNavState.call(this);}else{var i=this.id;var prev=$D.getElementsByClassName('prev','a',i);var next=$D.getElementsByClassName('next','a',i);if(prev.length){$D.setStyle(prev[0],'display','none');}
if(next.length){$D.setStyle(next[0],'display','none');}
this.navLinks=[];return;}
list=s=null;return true;};this.getData=function(url,postExecute){var id=this.getId();var me=this;var s=function(){me.getDataSuccess.apply(me,arguments);};var f=function(){me.getDataFailure.apply(me,arguments);};var callback={success:s,failure:f,argument:{postExecute:postExecute}};var oConObj=$U.Connect.asyncRequest('GET',url,callback,null);};this.getDataSuccess=function(o){if(o.responseText){var sText=o.responseText;sText=sText.replace(/<\!--.+-->/gim,'');var oArr=eval('('+sText+')');var createdPages=false,removedPages=false;if(oArr){var numPages=this.pages.length;var len=oArr.length;for(var i=0;i<len;i++){var pg=oArr[i].pgIdx;var html=oArr[i].pgHtml;var page;if(pg<numPages&&pg>=0){page=this.pages[pg];}else{var p=this.pages[numPages-1];page=p.cloneNode(false);p.parentNode.appendChild(page);this.pages[numPages++]=page;createdPages=true;}
page.innerHTML=html;if(oArr[i].attributes){for(var a in oArr[i].attributes){page.setAttribute(a,oArr[i].attributes[a]);}}}
while(i<numPages){this.pages[i].parentNode.removeChild(this.pages[i]);delete this.pages[i];removedPages=true;i++;}
if(createdPages||removedPages){addPageIndicators.call(this);}}
if(o.argument.postExecute){o.argument.postExecute();}}};this.getDataFailure=function(o){};this.unload=function(){if(!this.navLinks){this.navLinks=[];}
this.navLinks.push(_element,this.prev,this.next,this.warp,this.anim);removeNavLinks.call(this);for(var j=this.pages.length-1;j>-1;j--){this.pages[j]=null;}};this.animAttrs={scroll:{from:[0,0],to:[0,0]}};if(el)this.init(el,args);};Carousel.prototype={pageFinder:function(el){return $D.hasClass(el,this.pageClassName);},pageTagName:'div',pageClassName:'page',easeMethod:$U.Easing.easeOut,roundRobin:false,animDur:1.5,onScrollStart:null,onPageChange:null,onClick:null,lazyLoaded:false,scrollTo:function(index){this.lazyLoadImages();if(this.roundRobin){if(index<0){index=this.pages.length-1;}else if(index>=this.pages.length){index=0;}}
if((!index&&index!==0)||index>=this.pages.length||index<0||index==this.current){return false;}
if(this.anim.isAnimated()){this.anim.stop();}
this.onScrollStart.fire({to:index,from:this.current,toString:function(){return'from:'+this.from+', to:'+this.to;}});var end=index*this.scrollDistance;this.animAttrs.scroll.from=[this.getCurrentScroll(),0];this.animAttrs.scroll.to=[end,0];this.current=index;updateNavState.call(this);this.anim.attributes=this.animAttrs;this.anim.duration=this.animDur;var a=this.anim;window.setTimeout(function(){a.animate();},0);if(Tuluo.Realte.ultTrackClick){Tuluo.Realte.ultTrackClick(null,{"sec":"photos_pagenav_inpage","slk":"pagenav","pos":index});}
return true;},lazyLoadImages:function(index){var id=this.getElement().id;if(Tuluo.Realte.CarouselImages&&!this.lazyLoaded){var len=Tuluo.Realte.CarouselImages.length;for(var i=0;i<len;i++){var this_image=document.getElementById(id+'-'+i);if(this_image){this_image.src=Tuluo.Realte.CarouselImages[i];}}}
this.lazyLoaded=true;},scrollNext:function(){var ret=this.scrollTo(this.current+1);if(Tuluo.Realte.ultTrackClick){Tuluo.Realte.ultTrackClick(null,{"sec":"photos_prevnext_inpage","slk":"next","pos":2});}
return ret;},scrollNext_click:clickHandler('scrollNext'),scrollPrev:function(){var ret=this.scrollTo(this.current-1);if(Tuluo.Realte.ultTrackClick){Tuluo.Realte.ultTrackClick(null,{"sec":"photos_prevnext_inpage","slk":"prev","pos":1});}
return ret;},scrollPrev_click:clickHandler('scrollPrev'),scrollTo_click:clickHandler('scrollTo',function(el){return(!el.index&&el.index!==0);},function(el){return el.index;}),toString:function(){var el=this.getElement();if(el){return'Carousel #'+el.id+' .'+el.className;}else{return'Carousel [Not Initiated]';}
el=null;},getId:function(){return this.getElement().id;}}})();(function(){var CarouselMgr=function(){CarouselMgr.superclass.constructor.call(this,Carousel);};Tuluo.extend(CarouselMgr,DTK.util.Manager);CarouselMgr.prototype.initAll=function(cls,args){var id='photos-carousel';if(args.id){id=args.id;}
return CarouselMgr.superclass.initAll.call(this,function(){return Array(document.getElementById(id));},args);};CarouselMgr.prototype.getCarousel=CarouselMgr.prototype.getDaemonById;CarouselMgr.prototype.idString='Carousel Manager';DTK.CarouselMgr=new CarouselMgr();})();})();
Tuluo.Realte.tabs={spinner_delay:Tuluo.Realte.SPINNER.delay,spinner_img:Tuluo.Realte.SPINNER.img,request_timeout:30000,default_pane:0,tabs:new Array(),panes:new Array(),selectPane:function(e,oPane){if(!oPane.tabsbase)return;var tabsbase=oPane.tabsbase;var pane=(oPane.showPane)?oPane.showPane:this.default_pane;if(e){var t=Tuluo.util.Event.getTarget(e);pane=this.tabs[tabsbase].lastIndexOf(t);if(pane<0||typeof(pane)=="undefined"){pane=this.tabs[tabsbase].lastIndexOf(t.parentNode);}}
var i=this.tabs[tabsbase].length-1;if(i<0)return;if(oPane.daily){this.selectDailyPane(tabsbase,i,pane);return;}
do{if(i==pane){this.showPane(tabsbase,i);}else{this.hidePane(tabsbase,i);}}while(i--);if(tabsbase=='fantasy-perf'){this.getFantasyPerformers(tabsbase,pane);}
if(tabsbase=='scoreboard'){this.getAjaxRequest(tabsbase,pane);}},selectDailyPane:function(tabsbase,j,pane){do{if(j==pane){this.showPane(tabsbase,j);this.showPane(tabsbase,j+2);}else{this.hidePane(tabsbase,j);this.hidePane(tabsbase,j+2);}}while(j--);},setPaneHeight:function(tabsbase){var paneMaxHeight=0;for(i=0;i<this.panes[tabsbase].length;i++){var header=Tuluo.util.Dom.getElementsByClassName("hd","div",this.panes[tabsbase][i]);if(header.length)Tuluo.util.Dom.setStyle(header,"display","none");var pane_body=Tuluo.util.Dom.getElementsByClassName("bd","div",this.panes[tabsbase][i]);if(pane_body.length){rawheight=Tuluo.Realte.getHeight(pane_body[0]);paneMaxHeight=Math.max(paneMaxHeight,parseInt(rawheight));}else{rawheight=Tuluo.Realte.getHeight(this.panes[tabsbase][i]);paneMaxHeight=Math.max(paneMaxHeight,parseInt(rawheight));}}
paneMaxHeight+=2;paneMaxHeight=paneMaxHeight+"px";for(i=0;i<this.panes[tabsbase].length;i++){var pane_body=Tuluo.util.Dom.getElementsByClassName("bd","div",this.panes[tabsbase][i]);if(pane_body.length){Tuluo.util.Dom.setStyle(pane_body,"height",paneMaxHeight);}else{Tuluo.util.Dom.setStyle(this.panes[tabsbase][i],"height",paneMaxHeight);}}},showPane:function(tabsbase,i){Tuluo.util.Dom.setStyle(this.panes[tabsbase][i],"display","");Tuluo.util.Dom.setStyle(this.panes[tabsbase][i],"visibility","visible");Tuluo.util.Dom.setStyle(this.panes[tabsbase][i],"position","static");Tuluo.util.Dom.addClass(this.tabs[tabsbase][i],"selected");Tuluo.util.Dom.addClass(this.tabs[tabsbase][i+1],"after_selected");},hidePane:function(tabsbase,i){Tuluo.util.Dom.setStyle(this.panes[tabsbase][i],"display","none");Tuluo.util.Dom.removeClass(this.tabs[tabsbase][i],"selected");Tuluo.util.Dom.removeClass(this.tabs[tabsbase][i+1],"after_selected");},getFantasyPerformers:function(tabsbase,pane){var p=this.panes[tabsbase][pane];if(!Tuluo.util.Dom.hasClass(p,'hidden')){return;}
var pos,l;var classes=p.className.split(' ');for(var x=0;x<classes.length;x++){if(classes[x].indexOf('pos-')==0){pos=classes[x].substring(classes[x].lastIndexOf('-')+1,classes[x].length);}
if(classes[x].indexOf('league-')==0){l=classes[x].substring(classes[x].lastIndexOf('-')+1,classes[x].length);}}
if(l&&pos){var url='/ajax_fantasy_performers?l='+l+'&position='+pos;var league_select=Tuluo.util.Dom.get("league_select");if(league_select){url+="&fl="+league_select.value;}
this.renderFantasyPerformers.argument.pane_node=p;this.renderFantasyPerformers.argument.tabsbase=tabsbase;this.renderFantasyPerformers.request_timeout=this.request_timeout;this.pane_node=p;if(this.loading&&Tuluo.util.Connect.isCallInProgress(this.loading)){Tuluo.util.Connect.abort(this.loading);}
this.loading=Tuluo.util.Connect.asyncRequest('GET',url,this.renderFantasyPerformers);this.renderFantasyPerformers.argument.to=window.setTimeout(this.renderFantasyPerformers.setAjaxSpinner,this.spinner_delay);}},renderFantasyPerformers:{success:function(o){this.removeAjaxSpinner(o);o.argument.pane_node.innerHTML+=o.responseText;Tuluo.util.Dom.removeClass(o.argument.pane_node,'hidden');Tuluo.Realte.toggleHotNot(null,true);Tuluo.Realte.tabs.setPaneHeight(o.argument.tabsbase);},failure:function(o){this.removeAjaxSpinner(o);var err=document.createElement('p');err.className='ajax-pane-error';err.innerHTML="There was an error connecting with the server";o.argument.pane_node.appendChild(err);},timeout:this.request_timeout,argument:{},setAjaxSpinner:function(){this.Tuluo.Realte.tabs.pane_node.appendChild(Tuluo.Realte.tabs.spinner_img);},removeAjaxSpinner:function(o){var s=o.argument.to;var p=o.argument.pane_node;if(s)window.clearTimeout(s);var img=document.getElementById('spinner');if(img)p.removeChild(img);}},getAjaxRequest:function(tabsbase,pane){var id=this.panes[tabsbase][pane].id;var pane_node=document.getElementById(id);this.pane_node=pane_node;var league=id.substring(0,id.indexOf('-'));if(pane_node.lastChild&&(!pane_node.lastChild.className||!pane_node.lastChild.className.match(/hd|ajax-pane-error/))){Tuluo.Realte.scorethin.reset(league);Tuluo.Realte.updateScorethinCookie(league);return;}
var after=document.getElementById('after-scoreboard');if(after)after.style.visibility='hidden';document.getElementById('scoreboard').style.borderBottomWidth='0px';if(pane_node.lastChild&&pane_node.lastChild.className=='ajax-pane-error')pane_node.removeChild(pane_node.lastChild);if(league=='my')league='myteams';this.renderAjaxPane.argument.pane_node=pane_node;this.renderAjaxPane.argument.league=league;this.renderAjaxPane.argument.request_timeout=this.request_timeout;if(this.loading&&Tuluo.util.Connect.isCallInProgress(this.loading)){Tuluo.util.Connect.abort(this.loading);}
this.loading=Tuluo.util.Connect.asyncRequest('GET','/'+league+'/ajax_scorethin',this.renderAjaxPane);this.renderAjaxPane.argument.to=window.setTimeout(this.renderAjaxPane.setAjaxSpinner,this.spinner_delay);},renderAjaxPane:{success:function(o){var l=o.argument.league;this.removeAjaxSpinner(o);o.argument.pane_node.innerHTML+=o.responseText;this.cleanup(o);Tuluo.Realte.updateScorethinCookie(l);Tuluo.Realte.scorethin.reset(l);Tuluo.Realte.Window.set('scoreboard','free-video');Tuluo.Realte.Window.set('scoreboard','mlbtv-game-link');},failure:function(o){this.removeAjaxSpinner(o);var err=document.createElement('p');err.className='ajax-pane-error';err.innerHTML="There was an error connecting with the server";o.argument.pane_node.appendChild(err);this.cleanup(o);},timeout:this.request_timeout,argument:{},setAjaxSpinner:function(){this.Tuluo.Realte.tabs.pane_node.appendChild(Tuluo.Realte.tabs.spinner_img);},removeAjaxSpinner:function(o){var s=o.argument.to;var p=o.argument.pane_node;if(s)window.clearTimeout(s);var img=document.getElementById('spinner');if(img)p.removeChild(img);},cleanup:function(o){Tuluo.Realte.tabs.loading=false;var a=document.getElementById('after-scoreboard');if(a)a.style.visibility='';document.getElementById('scoreboard').style.borderBottomWidth='';}},tabMouseOver:function(e){var t=Tuluo.util.Event.getTarget(e);Tuluo.util.Dom.addClass(t,"over");},tabMouseOut:function(e){var t=Tuluo.util.Event.getTarget(e);Tuluo.util.Dom.removeClass(t,"over");},setTabMouseOver:function(tabsbase){Tuluo.util.Event.addListener(this.tabs[tabsbase],"mouseover",this.tabMouseOver,{"tabsbase":tabsbase},this);Tuluo.util.Event.addListener(this.tabs[tabsbase],"mouseout",this.tabMouseOut,{"tabsbase":tabsbase},this);},init:function(tabsbase,pane,args){if(!tabsbase)return;var pane=pane||this.default_pane;var args=args||{};var setheight=(args.dontsetheight)?false:true;var mouseover=args.mouseover||false;var daily=args.daily||false;var tabclass=args.tabclass||'tab';var tabel=args.tabel||'li';var paneclass=args.paneclass||'pane';var paneel=args.paneel||'div';this.tabs[tabsbase]=Tuluo.util.Dom.getElementsByClassName(tabclass,tabel,tabsbase);this.panes[tabsbase]=Tuluo.util.Dom.getElementsByClassName(paneclass,paneel,tabsbase);if(mouseover){this.setTabMouseOver(tabsbase);}
if(setheight){this.setPaneHeight(tabsbase);}
var oPane={"tabsbase":tabsbase,"showPane":pane,"daily":daily};this.selectPane(null,oPane);Tuluo.util.Event.addListener(this.tabs[tabsbase],"click",this.selectPane,oPane,this);}};