/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V]);}}return Z;};var I=function(T,U,W){var V=W||"utf-8";return J("link",{"id":"yui__dyn_"+(R++),"type":"text/css","charset":V,"rel":"stylesheet","href":T},U);
};var P=function(T,U,W){var V=W||"utf-8";return J("script",{"id":"yui__dyn_"+(R++),"type":"text/javascript","charset":V,"src":T},U);};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId);}};};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T);}return V;};var Q=function(W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V));}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return;}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,A(T));}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.scope||T;T.onTimeout.call(U,A(T));}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel();}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return;}if(Z){U.url.shift();if(U.varName){U.varName.shift();}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName;}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.charset);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);a.appendChild(Y);}else{C(V);}return;}var T=U.url[0];if(!T){U.url.shift();return G(V);}if(U.timeout){U.timer=S.later(U.timeout,U,O,V);}if(U.type==="script"){W=P(T,c,U.charset);}else{W=I(T,c,U.charset);}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e);}}else{a.appendChild(W);}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T);}};var K=function(){if(E){return;}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T];}}E=false;};var D=function(a){var X=M[a];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.getElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,a);if(V){W=V.parentNode;}}for(var U=0;U<T;U=U+1){W.removeChild(Z[U]);}X.nodes=[];}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K();}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=M[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopurge" in W)?W.autopurge:(U==="script")?true:false;S.later(0,W,G,X);return{tId:X};};var F=function(c,X,W,U,Y,Z,b){var a=b||G;if(N.ie){X.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){X.onreadystatechange=null;a(W,U);}};}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventListener("load",function(){a(W,U);});}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;g<e;g=g+1){d=d[f[g]];if(!d){this.attempts++;if(this.attempts++>this.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h);}else{}return;}}T.timer.cancel();a(W,U);},null,true);}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U]);}}}}else{X.onload=function(){a(W,U);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T);},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true;}},script:function(T,U){return H("script",T,U);},css:function(T,U){return H("css",T,U);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.7.0",build:"1799"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.7.0/build/","base":"http://yui.yahooapis.com/2.7.0/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dom","event","dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["dom","event","element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dom","event","dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;
i<a.length;i=i+1){o[a[i]]=true;}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i);}}return a;}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2);},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i;}}return -1;},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}return o;},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name);}});this.skin=lang.merge(YUI.info.skin);this._config(o);};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i]);}else{this[i]=o[i];}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger");}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y;};}this.filter=this.FILTERS[f];}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false;}o.ext=("ext" in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true;},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a);},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext});}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext});}}return name;},getRequires:function(mod){if(!mod){return[];}if(!this.dirty&&mod.expanded){return mod.expanded;}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m));}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]));}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded;},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o;}if(m[ckey]){return m[ckey];}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm));}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i]);}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey];},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name);}}else{smod=this._addSkin(this.skin.defaultSkin,name);}m.requires.push(smod);}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules);}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore);}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i] in l){delete l[this.force[i]];}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j));}}this.loaded=l;},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req);}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod;}return s;},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]};}return null;},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m;}}}this.rollups=rollups;}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue;}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break;}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break;}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j] in r){delete r[s[j]];}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false});
}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false});}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false;}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true;}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true;}return false;};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i);}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break;}}if(moved){break;}else{p=p+1;}}if(!moved){break;}}this.sorted=s;},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1);},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target;}else{css+=target;}this._combining.push(s[i]);}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true;}this.loadNext(o.data);},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};this.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js");},scope:this},"js");return;}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort();}return;}if(m.type!=="js"){this._loadCount++;continue;}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data});}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data});}else{this._onFailure.call(this.varName+" reference failure");}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data});},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return;}if(mname){if(mname!==this._loading){return;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i] in this.inserted){continue;}if(s[i]===this._loading){return;}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return;}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data);};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true;}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return;}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this);}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data});}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load();}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str;},_url:function(path){return this._filter((this.base||"")+path);}};})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.7.0",build:"1799"});
(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y;}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y;}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x];}}}}return y;}if(y.DOM_EVENTS){y=y.get("element");}if("length" in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x]);}return z;}return y;}return null;},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y);}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y];}}return x;};}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default:Y.style[x]=y;}}else{}};}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x]=y;}else{}};}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G));},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC==c)){if(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10);}}AG[0]-=AE;AG[1]-=AD;}if((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(AG[1]);}else{}return AG;};}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){E.Dom.batch(Y,AE,x,AD);}return Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G);},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});
},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}return x;},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true);},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA);}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA);}}else{return false;}return y;},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth;}return G;},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return E.Dom.hasClass(y,G);};return E.Dom.getAncestorBy(Y,x);},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase();};return E.Dom.getAncestorBy(Y,x);},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x);},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getFirstChildBy(G);},getLastChildBy:function(G,x){if(!G){return null;}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G);},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z;}return false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop);},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}return G[Z].insertBefore(Y,G);},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x);},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G);},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G));},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y;}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G));},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0;}}y[0]+=G;y[1]+=Y;return y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent";}return x;};}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);
}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C);}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,true);},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=window;if(O){if(O===true){P=N;}else{P=O;}}M.call(P,"DOMReady",[],N);},0);}else{this.DOMReadyEvent.subscribe(M,N,O);}},_addListener:function(O,M,Y,S,W,b){if(!Y||!Y.call){return false;}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z;}return Z;}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R;}else{this.onAvailable(O,function(){YAHOO.util.Event.on(O,M,Y,S,W);});return true;}}}if(!O){return false;}if("unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true;}var N=O;if(W){if(W===true){N=S;}else{N=W;}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S);};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q);};}E[Q].push(a);}else{try{this._simpleAdd(O,M,P,b);}catch(X){this.lastError=X;this.removeListener(O,M,Y);return false;}}return true;},addListener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false);},addFocusListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true);},removeFocusListener:function(N,M){return this.removeListener(N,K,M);},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P,true);},removeBlurListener:function(N,M){return this.removeListener(N,L,M);},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S);}}M=G[P];if(M&&M[2]){M[2](R);}return T;},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return -1;}else{return B[M];}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N));},removeListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N);}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break;}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false);}catch(U){this.lastError=U;return false;}}delete I[S][this.WFN];delete I[S][this.FN];
I.splice(S,1);return true;},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M);},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode;}}catch(M){}return N;},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft();}}return M;},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop();}}return N;},getXY:function(M){return[this.getPageX(M),this.getPageY(M)];},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement;}else{if(N.type=="mouseover"){M=N.fromElement;}}}return this.resolveTextNode(M);},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N;}catch(M){this.lastError=M;return N;}}return O.time;},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M);},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation();}else{M.cancelBubble=true;}},preventDefault:function(M){if(M.preventDefault){M.preventDefault();}else{M.returnValue=false;}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break;}P=P.caller;}}return N;},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M];}return M;},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O;}}return -1;},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N;}return N;},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined");}catch(M){return false;}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach();}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._interval);this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj;}else{U=W.overrideContext;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null;}}else{T(P,Q);F[N]=null;}}else{R.push(Q);}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q);}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{if(this._interval){clearInterval(this._interval);this._interval=null;}}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T);}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J];}else{if(M==="unload"){N=[J];}else{N=[I];}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],index:S});}}}}return(R.length)?R:null;},_unload:function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ];}else{M=O[N.ADJ_SCOPE];}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q]=null;}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P);}}O=null;}G=null;N._simpleRemove(window,"unload",N._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},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();})();}YAHOO.util.EventProvider=function(){};YAHOO.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,overrideContext: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(YAHOO.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 YAHOO.util.CustomEvent(G,H,E,YAHOO.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].overrideContext);}}}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;}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN;}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D);}if(C.isFunction(E)){G.subscribe(E);}else{G.subscribe(E.fn,E.scope,E.correctScope);}function H(O,N){if(!I.shift){I.shift=false;}if(!I.alt){I.alt=false;}if(!I.ctrl){I.ctrl=false;}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break;}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O);}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I);}this.enabled=true;};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I);}this.enabled=false;};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"");};};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.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};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(C){var B=YAHOO.util.Event.getTarget(C),A=B.nodeName.toLowerCase();if((A==="input"||A==="button")&&(B.type&&B.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(B.name)+"="+encodeURIComponent(B.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},createXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F};}catch(D){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);E={conn:A,tId:F};break;}catch(C){}}}finally{return E;}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D);}else{C={};C.tId=D;C.isUpload=true;}if(C){this._transaction_id++;}}catch(B){}finally{return C;}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null;}else{if(E&&E.customevents){this.initCustomEvents(D,E);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D;}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData;}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);}}if((F.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);}if(this._has_default_headers||this._has_http_headers){this.setHeader(D);}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B);}return D;}},initCustomEvents:function(A,C){var B;for(B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B]);}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true);},D.timeout);}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId];}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A);}B.handleTransactionResponse(C,D);}},this._polling_interval);},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status;}else{D=13030;}}catch(E){D=13030;}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);}else{G.success.apply(G.scope,[C]);}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);C=null;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2);}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G;}return D;},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B;}else{E.status=F;E.statusText=G;}if(D){E.argument=D;}return E;},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true;
}else{this._has_http_headers=true;}},setHeader:function(A){var B;if(this._has_default_headers){for(B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B]);}}}if(this._has_http_headers){for(B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B]);}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(M,H,C){var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(typeof M=="string"){L=(document.getElementById(M)||document.forms[M]);}else{if(typeof M=="object"){L=M;}else{return;}}if(H){this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=L;return;}for(E=0,G=L.elements.length;E<G;++E){B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){K=encodeURIComponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){case"select-one":if(B.selectedIndex>-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D<N;++D){A=B.options[D];if(A.selected){F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);}}}break;case"radio":case"checkbox":if(B.checked){F[O++]=K+I;}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(J===false){if(this._hasSubmitListener&&this._submitElementValue){F[O++]=this._submitElementValue;}J=true;}break;default:F[O++]=K+I;}}}this._isFormSubmit=true;this._sFormData=F.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(YAHOO.env.ua.ie){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false";}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);},appendPostData:function(A){var D=[],B=A.split("&"),C,E;for(C=0;C<B.length;C++){E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=decodeURIComponent(B[C].substring(0,E));D[C].value=decodeURIComponent(B[C].substring(E+1));this._formNode.appendChild(D[C]);}}return D;},uploadFile:function(D,N,E,C){var I="yuiIO"+D.tId,J="multipart/form-data",L=document.getElementById(I),O=this,K=(N&&N.argument)?N.argument:null,M,H,B,G;var A={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",I);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",J);}else{this._formNode.setAttribute("enctype",J);}if(C){M=this.appendPostData(C);}this._formNode.submit();this.startEvent.fire(D,K);if(D.startEvent){D.startEvent.fire(D,K);}if(N&&N.timeout){this._timeOut[D.tId]=window.setTimeout(function(){O.abort(D,N,true);},N.timeout);}if(M&&M.length>0){for(H=0;H<M.length;H++){this._formNode.removeChild(M[H]);}}for(B in A){if(YAHOO.lang.hasOwnProperty(A,B)){if(A[B]){this._formNode.setAttribute(B,A[B]);}else{this._formNode.removeAttribute(B);}}}this.resetFormState();var F=function(){if(N&&N.timeout){window.clearTimeout(O._timeOut[D.tId]);delete O._timeOut[D.tId];}O.completeEvent.fire(D,K);if(D.completeEvent){D.completeEvent.fire(D,K);}G={tId:D.tId,argument:N.argument};try{G.responseText=L.contentWindow.document.body?L.contentWindow.document.body.innerHTML:L.contentWindow.document.documentElement.textContent;G.responseXML=L.contentWindow.document.XMLDocument?L.contentWindow.document.XMLDocument:L.contentWindow.document;}catch(P){}if(N&&N.upload){if(!N.scope){N.upload(G);}else{N.upload.apply(N.scope,[G]);}}O.uploadEvent.fire(G);if(D.uploadEvent){D.uploadEvent.fire(G);}YAHOO.util.Event.removeListener(L,"load",F);setTimeout(function(){document.body.removeChild(L);O.releaseObject(D);},100);};YAHOO.util.Event.addListener(L,"load",F);},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{D=false;}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B);}this.handleTransactionResponse(E,G,true);}return D;},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0;}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false;}else{return false;}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.7.0",build:"1799"});(function(){var B=YAHOO.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,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0;}if("style" in D){B.Dom.setStyle(D,C,F+E);}else{if(C in D){D[C]=F;}}},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("style" in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}}else{if(C in E){G=E[C];}}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=!YAHOO.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;})();YAHOO.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{YAHOO.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;}};};YAHOO.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";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.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 I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return !H.patterns.transparent.test(I);});if(F){I=C.Dom.getStyle(F,E);}else{I=A.DEFAULT_BGCOLOR;}}}else{I=D.getAttribute.call(this,E);}return I;};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;})();
/*
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
YAHOO.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-YAHOO.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 YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.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=YAHOO.util;YAHOO.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=YAHOO.util;YAHOO.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;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}return null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fireEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preventDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return;}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue;
}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("string"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterEvts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"];}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q});}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q});}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]});}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom.get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null;},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:function(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.swapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C};},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);
}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);
}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name);}return A;},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method){this.method.call(A,F,this.name);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};if(C){this._written=false;}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig,true);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null;}return B.getValue();},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A.isUndefined(this._configs[B])){C[C.length]=B;}}return C;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments);};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(F,D){var E=this.get("element");if(E){E[D]=F;}},DEFAULT_HTML_GETTER:function(D){var E=this.get("element"),F;if(E){F=E[D];}return F;},appendChild:function(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D);},getElementsByTagName:function(D){return this.get("element").getElementsByTagName(D);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E;return this.get("element").insertBefore(D,E);},removeChild:function(D){D=D.get?D.get("element"):D;return this.get("element").removeChild(D);},replaceChild:function(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get("element").replaceChild(D,E);},initAttributes:function(D){},addListener:function(H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!this._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,function(J){if(J.srcElement&&!J.target){J.target=J.srcElement;}D.fireEvent(H,J);},I,F);}this.createEvent(H,this);}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){return this.addListener.apply(this,arguments);},subscribe:function(){return this.addListener.apply(this,arguments);},removeListener:function(E,D){return this.unsubscribe.apply(this,arguments);},addClass:function(D){B.addClass(this.get("element"),D);},getElementsByClassName:function(E,D){return B.getElementsByClassName(E,D,this.get("element"));},hasClass:function(D){return B.hasClass(this.get("element"),D);},removeClass:function(D){return B.removeClass(this.get("element"),D);},replaceClass:function(E,D){return B.replaceClass(this.get("element"),E,D);},setStyle:function(E,D){return B.setStyle(this.get("element"),E,D);},getStyle:function(D){return B.getStyle(this.get("element"),D);},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){this[E[F][0]].apply(this,E[F][1]);}},appendTo:function(E,F){E=(E.get)?E.get("element"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});
F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false;}if(!E){return false;}if(D.parent!=E){if(F){E.insertBefore(D,F);}else{E.appendChild(D);}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D;},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D);}return C.prototype.get.call(this,D);},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G);}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G);}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G;}return;}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E);}return C.prototype.set.apply(this,arguments);},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments);},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments);},init:function(E,D){this._initElement(E,D);},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D);}this._queue=[];this._events={};this._configs={};this._configOrder=[];},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G];}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element});}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E);}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E);}this.fireEvent("available",{type:"available",target:B.get(E.element)});},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E);}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)});},this,true);},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true});},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue();},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this);}};YAHOO.augment(A,C);YAHOO.util.Element=A;})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});YAHOO.register("utilities", YAHOO, {version: "2.7.0", build: "1799"});


/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value);}},getConfig:function(){var D={},F=this.config,G,E;for(G in F){if(B.hasOwnProperty(F,G)){E=F[G];if(E&&E.event){D[G]=E.value;}}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F];}}this.initialConfig=E;}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]);}}},refresh:function(){var D;for(D in this.config){if(B.hasOwnProperty(this.config,D)){this.refireEvent(D);}}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.eventQueue[E]=null;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(R,Q){if(R){this.init(R,Q);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,N=YAHOO.util.Event,M=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,I=YAHOO.env.ua,H,P,O,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},J={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.RESIZE_MONITOR_BUFFER=1;G.textResizeEvent=new M("textResize");G.forceDocumentRedraw=function(){var Q=document.documentElement;if(Q){Q.className+=" ";Q.className=YAHOO.lang.trim(Q.className);}};function L(){if(!H){H=document.createElement("div");H.innerHTML=('<div class="'+G.CSS_HEADER+'"></div>'+'<div class="'+G.CSS_BODY+'"></div><div class="'+G.CSS_FOOTER+'"></div>');P=H.firstChild;O=P.nextSibling;E=O.nextSibling;}return H;}function K(){if(!P){L();}return(P.cloneNode(false));}function B(){if(!O){L();}return(O.cloneNode(false));}function C(){if(!E){L();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var Q=M.LIST;
this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=Q;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=Q;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature=Q;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=Q;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=Q;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=Q;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=Q;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=Q;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=Q;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=Q;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=Q;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=Q;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=Q;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=Q;},platform:function(){var Q=navigator.userAgent.toLowerCase();if(Q.indexOf("windows")!=-1||Q.indexOf("win32")!=-1){return"windows";}else{if(Q.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var Q=navigator.userAgent.toLowerCase();if(Q.indexOf("opera")!=-1){return"opera";}else{if(Q.indexOf("msie 7")!=-1){return"ie7";}else{if(Q.indexOf("msie")!=-1){return"ie";}else{if(Q.indexOf("safari")!=-1){return"safari";}else{if(Q.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(J.VISIBLE.key,{handler:this.configVisible,value:J.VISIBLE.value,validator:J.VISIBLE.validator});this.cfg.addProperty(J.EFFECT.key,{suppressEvent:J.EFFECT.suppressEvent,supercedes:J.EFFECT.supercedes});this.cfg.addProperty(J.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:J.MONITOR_RESIZE.value});this.cfg.addProperty(J.APPEND_TO_DOCUMENT_BODY.key,{value:J.APPEND_TO_DOCUMENT_BODY.value});},init:function(V,U){var S,W;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof V=="string"){S=V;V=document.getElementById(V);if(!V){V=(L()).cloneNode(false);V.id=S;}}this.id=F.generateId(V);this.element=V;W=this.element.firstChild;if(W){var R=false,Q=false,T=false;do{if(1==W.nodeType){if(!R&&F.hasClass(W,G.CSS_HEADER)){this.header=W;R=true;}else{if(!Q&&F.hasClass(W,G.CSS_BODY)){this.body=W;Q=true;}else{if(!T&&F.hasClass(W,G.CSS_FOOTER)){this.footer=W;T=true;}}}}}while((W=W.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(U){this.cfg.applyConfig(U,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var R=(I.gecko&&this.platform=="windows");if(R){var Q=this;setTimeout(function(){Q._initResizeMonitor();},0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var Q,S,U;function W(){G.textResizeEvent.fire();}if(!I.opera){S=F.get("_yuiResizeMonitor");var V=this._supportsCWResize();if(!S){S=document.createElement("iframe");if(this.isSecure&&G.RESIZE_MONITOR_SECURE_URL&&I.ie){S.src=G.RESIZE_MONITOR_SECURE_URL;}if(!V){U=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/script></head>","<body></body></html>"].join("");S.src="data:text/html;charset=utf-8,"+encodeURIComponent(U);}S.id="_yuiResizeMonitor";S.title="Text Resize Monitor";S.style.position="absolute";S.style.visibility="hidden";var R=document.body,T=R.firstChild;if(T){R.insertBefore(S,T);}else{R.appendChild(S);}S.style.width="2em";S.style.height="2em";S.style.top=(-1*(S.offsetHeight+G.RESIZE_MONITOR_BUFFER))+"px";S.style.left="0";S.style.borderWidth="0";S.style.visibility="visible";if(I.webkit){Q=S.contentWindow.document;Q.open();Q.close();}}if(S&&S.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(V){if(!N.on(S.contentWindow,"resize",W)){N.on(S,"resize",W);}}G.textResizeInitialized=true;}this.resizeMonitor=S;}}},_supportsCWResize:function(){var Q=true;if(I.gecko&&I.gecko<=1.8){Q=false;}return Q;},onDomResize:function(S,R){var Q=-1*(this.resizeMonitor.offsetHeight+G.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=Q+"px";this.resizeMonitor.style.left="0";},setHeader:function(R){var Q=this.header||(this.header=K());if(R.nodeName){Q.innerHTML="";Q.appendChild(R);}else{Q.innerHTML=R;}this.changeHeaderEvent.fire(R);this.changeContentEvent.fire();},appendToHeader:function(R){var Q=this.header||(this.header=K());Q.appendChild(R);this.changeHeaderEvent.fire(R);this.changeContentEvent.fire();},setBody:function(R){var Q=this.body||(this.body=B());if(R.nodeName){Q.innerHTML="";Q.appendChild(R);}else{Q.innerHTML=R;}this.changeBodyEvent.fire(R);this.changeContentEvent.fire();},appendToBody:function(R){var Q=this.body||(this.body=B());Q.appendChild(R);this.changeBodyEvent.fire(R);this.changeContentEvent.fire();},setFooter:function(R){var Q=this.footer||(this.footer=C());if(R.nodeName){Q.innerHTML="";Q.appendChild(R);}else{Q.innerHTML=R;}this.changeFooterEvent.fire(R);this.changeContentEvent.fire();},appendToFooter:function(R){var Q=this.footer||(this.footer=C());Q.appendChild(R);this.changeFooterEvent.fire(R);this.changeContentEvent.fire();},render:function(S,Q){var T=this,U;function R(V){if(typeof V=="string"){V=document.getElementById(V);}if(V){T._addToParent(V,T.element);T.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!Q){Q=this.element;}if(S){R(S);}else{if(!F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.header)){U=Q.firstChild;
if(U){Q.insertBefore(this.header,U);}else{Q.appendChild(this.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){Q.insertBefore(this.body,this.footer);}else{Q.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){Q.appendChild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var Q;if(this.element){N.purgeElement(this.element,true);Q=this.element.parentNode;}if(Q){Q.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(R,Q,S){var T=Q[0];if(T){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(S,R,T){var Q=R[0];if(Q){this.initResizeMonitor();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(Q,R){if(!this.cfg.getProperty("appendtodocumentbody")&&Q===document.body&&Q.firstChild){Q.insertBefore(R,Q.firstChild);}else{Q.appendChild(R);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(P,O){YAHOO.widget.Overlay.superclass.constructor.call(this,P,O);};var I=YAHOO.lang,M=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,N=YAHOO.util.Event,F=YAHOO.util.Dom,D=YAHOO.util.Config,K=YAHOO.env.ua,B=YAHOO.widget.Overlay,H="subscribe",E="unsubscribe",C="contained",J,A={"BEFORE_MOVE":"beforeMove","MOVE":"move"},L={"X":{key:"x",validator:I.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:I.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:I.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(K.ie==6?true:false),validator:I.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:I.isBoolean,supercedes:["constraintoviewport"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.VIEWPORT_OFFSET=10;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;B.windowScrollEvent=new M("windowScroll");B.windowResizeEvent=new M("windowResize");B.windowScrollHandler=function(P){var O=N.getTarget(P);if(!O||O===window||O===window.document){if(K.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}}};B.windowResizeHandler=function(O){if(K.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initialized===null){N.on(window,"scroll",B.windowScrollHandler);N.on(window,"resize",B.windowResizeHandler);B._initialized=true;}B._TRIGGER_MAP={"windowScroll":B.windowScrollEvent,"windowResize":B.windowResizeEvent,"textResize":G.textResizeEvent};YAHOO.extend(B,G,{CONTEXT_TRIGGERS:[],init:function(P,O){B.superclass.init.call(this,P);this.beforeInitEvent.fire(B);F.addClass(this.element,B.CSS_OVERLAY);if(O){this.cfg.applyConfig(O,true);}if(this.platform=="mac"&&K.gecko){if(!D.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!D.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superclass.initEvents.call(this);var O=M.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=O;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=O;},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);var O=this.cfg;O.addProperty(L.X.key,{handler:this.configX,validator:L.X.validator,suppressEvent:L.X.suppressEvent,supercedes:L.X.supercedes});O.addProperty(L.Y.key,{handler:this.configY,validator:L.Y.validator,suppressEvent:L.Y.suppressEvent,supercedes:L.Y.supercedes});O.addProperty(L.XY.key,{handler:this.configXY,suppressEvent:L.XY.suppressEvent,supercedes:L.XY.supercedes});O.addProperty(L.CONTEXT.key,{handler:this.configContext,suppressEvent:L.CONTEXT.suppressEvent,supercedes:L.CONTEXT.supercedes});O.addProperty(L.FIXED_CENTER.key,{handler:this.configFixedCenter,value:L.FIXED_CENTER.value,validator:L.FIXED_CENTER.validator,supercedes:L.FIXED_CENTER.supercedes});O.addProperty(L.WIDTH.key,{handler:this.configWidth,suppressEvent:L.WIDTH.suppressEvent,supercedes:L.WIDTH.supercedes});O.addProperty(L.HEIGHT.key,{handler:this.configHeight,suppressEvent:L.HEIGHT.suppressEvent,supercedes:L.HEIGHT.supercedes});O.addProperty(L.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:L.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:L.AUTO_FILL_HEIGHT.supercedes});O.addProperty(L.ZINDEX.key,{handler:this.configzIndex,value:L.ZINDEX.value});O.addProperty(L.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:L.CONSTRAIN_TO_VIEWPORT.value,validator:L.CONSTRAIN_TO_VIEWPORT.validator,supercedes:L.CONSTRAIN_TO_VIEWPORT.supercedes});
O.addProperty(L.IFRAME.key,{handler:this.configIframe,value:L.IFRAME.value,validator:L.IFRAME.validator,supercedes:L.IFRAME.supercedes});O.addProperty(L.PREVENT_CONTEXT_OVERLAP.key,{value:L.PREVENT_CONTEXT_OVERLAP.value,validator:L.PREVENT_CONTEXT_OVERLAP.validator,supercedes:L.PREVENT_CONTEXT_OVERLAP.supercedes});},moveTo:function(O,P){this.cfg.setProperty("xy",[O,P]);},hideMacGeckoScrollbars:function(){F.replaceClass(this.element,"show-scrollbars","hide-scrollbars");},showMacGeckoScrollbars:function(){F.replaceClass(this.element,"hide-scrollbars","show-scrollbars");},_setDomVisibility:function(O){F.setStyle(this.element,"visibility",(O)?"visible":"hidden");if(O){F.removeClass(this.element,"yui-overlay-hidden");}else{F.addClass(this.element,"yui-overlay-hidden");}},configVisible:function(R,O,X){var Q=O[0],S=F.getStyle(this.element,"visibility"),Y=this.cfg.getProperty("effect"),V=[],U=(this.platform=="mac"&&K.gecko),g=D.alreadySubscribed,W,P,f,c,b,a,d,Z,T;if(S=="inherit"){f=this.element.parentNode;while(f.nodeType!=9&&f.nodeType!=11){S=F.getStyle(f,"visibility");if(S!="inherit"){break;}f=f.parentNode;}if(S=="inherit"){S="visible";}}if(Y){if(Y instanceof Array){Z=Y.length;for(c=0;c<Z;c++){W=Y[c];V[V.length]=W.effect(this,W.duration);}}else{V[V.length]=Y.effect(this,Y.duration);}}if(Q){if(U){this.showMacGeckoScrollbars();}if(Y){if(Q){if(S!="visible"||S===""){this.beforeShowEvent.fire();T=V.length;for(b=0;b<T;b++){P=V[b];if(b===0&&!g(P.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){P.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}P.animateIn();}}}}else{if(S!="visible"||S===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire();}else{this._setDomVisibility(true);}}}else{if(U){this.hideMacGeckoScrollbars();}if(Y){if(S=="visible"){this.beforeHideEvent.fire();T=V.length;for(a=0;a<T;a++){d=V[a];if(a===0&&!g(d.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){d.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}d.animateOut();}}else{if(S===""){this._setDomVisibility(false);}}}else{if(S=="visible"||S===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire();}else{this._setDomVisibility(false);}}}},doCenterOnDOMEvent:function(){var O=this.cfg,P=O.getProperty("fixedcenter");if(O.getProperty("visible")){if(P&&(P!==C||this.fitsInViewport())){this.center();}}},fitsInViewport:function(){var S=B.VIEWPORT_OFFSET,Q=this.element,T=Q.offsetWidth,R=Q.offsetHeight,O=F.getViewportWidth(),P=F.getViewportHeight();return((T+S<O)&&(R+S<P));},configFixedCenter:function(S,Q,T){var U=Q[0],P=D.alreadySubscribed,R=B.windowResizeEvent,O=B.windowScrollEvent;if(U){this.center();if(!P(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center);}if(!P(R,this.doCenterOnDOMEvent,this)){R.subscribe(this.doCenterOnDOMEvent,this,true);}if(!P(O,this.doCenterOnDOMEvent,this)){O.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);R.unsubscribe(this.doCenterOnDOMEvent,this);O.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(R,P,S){var O=P[0],Q=this.element;F.setStyle(Q,"height",O);this.cfg.refireEvent("iframe");},configAutoFillHeight:function(T,S,P){var V=S[0],Q=this.cfg,U="autofillheight",W="height",R=Q.getProperty(U),O=this._autoFillOnHeightChange;Q.unsubscribeFromConfigEvent(W,O);G.textResizeEvent.unsubscribe(O);this.changeContentEvent.unsubscribe(O);if(R&&V!==R&&this[R]){F.setStyle(this[R],W,"");}if(V){V=I.trim(V.toLowerCase());Q.subscribeToConfigEvent(W,O,this[V],this);G.textResizeEvent.subscribe(O,this[V],this);this.changeContentEvent.subscribe(O,this[V],this);Q.setProperty(U,V,true);}},configWidth:function(R,O,S){var Q=O[0],P=this.element;F.setStyle(P,"width",Q);this.cfg.refireEvent("iframe");},configzIndex:function(Q,O,R){var S=O[0],P=this.element;if(!S){S=F.getStyle(P,"zIndex");if(!S||isNaN(S)){S=0;}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(S<=0){S=1;}}F.setStyle(P,"zIndex",S);this.cfg.setProperty("zIndex",S,true);if(this.iframe){this.stackIframe();}},configXY:function(Q,P,R){var T=P[0],O=T[0],S=T[1];this.cfg.setProperty("x",O);this.cfg.setProperty("y",S);this.beforeMoveEvent.fire([O,S]);O=this.cfg.getProperty("x");S=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([O,S]);},configX:function(Q,P,R){var O=P[0],S=this.cfg.getProperty("y");this.cfg.setProperty("x",O,true);this.cfg.setProperty("y",S,true);this.beforeMoveEvent.fire([O,S]);O=this.cfg.getProperty("x");S=this.cfg.getProperty("y");F.setX(this.element,O,true);this.cfg.setProperty("xy",[O,S],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([O,S]);},configY:function(Q,P,R){var O=this.cfg.getProperty("x"),S=P[0];this.cfg.setProperty("x",O,true);this.cfg.setProperty("y",S,true);this.beforeMoveEvent.fire([O,S]);O=this.cfg.getProperty("x");S=this.cfg.getProperty("y");F.setY(this.element,S,true);this.cfg.setProperty("xy",[O,S],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([O,S]);},showIframe:function(){var P=this.iframe,O;if(P){O=this.element.parentNode;if(O!=P.parentNode){this._addToParent(O,P);}P.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var O=this.iframe,Q=this.element,S=B.IFRAME_OFFSET,P=(S*2),R;if(O){O.style.width=(Q.offsetWidth+P+"px");O.style.height=(Q.offsetHeight+P+"px");R=this.cfg.getProperty("xy");if(!I.isArray(R)||(isNaN(R[0])||isNaN(R[1]))){this.syncPosition();R=this.cfg.getProperty("xy");}F.setXY(O,[(R[0]-S),(R[1]-S)]);}},stackIframe:function(){if(this.iframe){var O=F.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(O)&&!isNaN(O)){F.setStyle(this.iframe,"zIndex",(O-1));}}},configIframe:function(R,Q,S){var O=Q[0];function T(){var V=this.iframe,W=this.element,X;if(!V){if(!J){J=document.createElement("iframe");if(this.isSecure){J.src=B.IFRAME_SRC;}if(K.ie){J.style.filter="alpha(opacity=0)";
J.frameBorder=0;}else{J.style.opacity="0";}J.style.position="absolute";J.style.border="none";J.style.margin="0";J.style.padding="0";J.style.display="none";J.tabIndex=-1;}V=J.cloneNode(false);X=W.parentNode;var U=X||document.body;this._addToParent(U,V);this.iframe=V;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function P(){T.call(this);this.beforeShowEvent.unsubscribe(P);this._iframeDeferred=false;}if(O){if(this.cfg.getProperty("visible")){T.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(P);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);}},configConstrainToViewport:function(P,O,Q){var R=O[0];if(R){if(!D.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}if(!D.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM);}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(T,S,P){var W=S[0],Q,O,U,R,V=this.CONTEXT_TRIGGERS;if(W){Q=W[0];O=W[1];U=W[2];R=W[3];if(V&&V.length>0){R=(R||[]).concat(V);}if(Q){if(typeof Q=="string"){this.cfg.setProperty("context",[document.getElementById(Q),O,U,R],true);}if(O&&U){this.align(O,U);}if(this._contextTriggers){this._processTriggers(this._contextTriggers,E,this._alignOnTrigger);}if(R){this._processTriggers(R,H,this._alignOnTrigger);this._contextTriggers=R;}}}},_alignOnTrigger:function(P,O){this.align();},_findTriggerCE:function(O){var P=null;if(O instanceof M){P=O;}else{if(B._TRIGGER_MAP[O]){P=B._TRIGGER_MAP[O];}}return P;},_processTriggers:function(S,U,R){var Q,T;for(var P=0,O=S.length;P<O;++P){Q=S[P];T=this._findTriggerCE(Q);if(T){T[U](R,this,true);}else{this[U](Q,R);}}},align:function(P,O){var U=this.cfg.getProperty("context"),T=this,S,R,V;function Q(W,X){switch(P){case B.TOP_LEFT:T.moveTo(X,W);break;case B.TOP_RIGHT:T.moveTo((X-R.offsetWidth),W);break;case B.BOTTOM_LEFT:T.moveTo(X,(W-R.offsetHeight));break;case B.BOTTOM_RIGHT:T.moveTo((X-R.offsetWidth),(W-R.offsetHeight));break;}}if(U){S=U[0];R=this.element;T=this;if(!P){P=U[1];}if(!O){O=U[2];}if(R&&S){V=F.getRegion(S);switch(O){case B.TOP_LEFT:Q(V.top,V.left);break;case B.TOP_RIGHT:Q(V.top,V.right);break;case B.BOTTOM_LEFT:Q(V.bottom,V.left);break;case B.BOTTOM_RIGHT:Q(V.bottom,V.right);break;}}}},enforceConstraints:function(P,O,Q){var S=O[0];var R=this.getConstrainedXY(S[0],S[1]);this.cfg.setProperty("x",R[0],true);this.cfg.setProperty("y",R[1],true);this.cfg.setProperty("xy",R,true);},getConstrainedX:function(V){var S=this,O=S.element,e=O.offsetWidth,c=B.VIEWPORT_OFFSET,h=F.getViewportWidth(),d=F.getDocumentScrollLeft(),Y=(e+c<h),b=this.cfg.getProperty("context"),Q,X,j,T=false,f,W,g=d+c,P=d+h-e-c,i=V,U={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var Z=function(){var k;if((S.cfg.getProperty("x")-d)>X){k=(X-e);}else{k=(X+j);}S.cfg.setProperty("x",(k+d),true);return k;};var R=function(){if((S.cfg.getProperty("x")-d)>X){return(W-c);}else{return(f-c);}};var a=function(){var k=R(),l;if(e>k){if(T){Z();}else{Z();T=true;l=a();}}return l;};if(V<g||V>P){if(Y){if(this.cfg.getProperty("preventcontextoverlap")&&b&&U[(b[1]+b[2])]){Q=b[0];X=F.getX(Q)-d;j=Q.offsetWidth;f=X;W=(h-(X+j));a();i=this.cfg.getProperty("x");}else{if(V<g){i=g;}else{if(V>P){i=P;}}}}else{i=c+d;}}return i;},getConstrainedY:function(Z){var W=this,P=W.element,i=P.offsetHeight,h=B.VIEWPORT_OFFSET,d=F.getViewportHeight(),g=F.getDocumentScrollTop(),e=(i+h<d),f=this.cfg.getProperty("context"),U,a,b,X=false,V,Q,c=g+h,S=g+d-i-h,O=Z,Y={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var T=function(){var k;if((W.cfg.getProperty("y")-g)>a){k=(a-i);}else{k=(a+b);}W.cfg.setProperty("y",(k+g),true);return k;};var R=function(){if((W.cfg.getProperty("y")-g)>a){return(Q-h);}else{return(V-h);}};var j=function(){var l=R(),k;if(i>l){if(X){T();}else{T();X=true;k=j();}}return k;};if(Z<c||Z>S){if(e){if(this.cfg.getProperty("preventcontextoverlap")&&f&&Y[(f[1]+f[2])]){U=f[0];b=U.offsetHeight;a=(F.getY(U)-g);V=a;Q=(d-(a+b));j();O=W.cfg.getProperty("y");}else{if(Z<c){O=c;}else{if(Z>S){O=S;}}}}else{O=h+g;}}return O;},getConstrainedXY:function(O,P){return[this.getConstrainedX(O),this.getConstrainedY(P)];},center:function(){var R=B.VIEWPORT_OFFSET,S=this.element.offsetWidth,Q=this.element.offsetHeight,P=F.getViewportWidth(),T=F.getViewportHeight(),O,U;if(S<P){O=(P/2)-(S/2)+F.getDocumentScrollLeft();}else{O=R+F.getDocumentScrollLeft();}if(Q<T){U=(T/2)-(Q/2)+F.getDocumentScrollTop();}else{U=R+F.getDocumentScrollTop();}this.cfg.setProperty("xy",[parseInt(O,10),parseInt(U,10)]);this.cfg.refireEvent("iframe");if(K.webkit){this.forceContainerRedraw();}},syncPosition:function(){var O=F.getXY(this.element);this.cfg.setProperty("x",O[0],true);this.cfg.setProperty("y",O[1],true);this.cfg.setProperty("xy",O,true);},onDomResize:function(Q,P){var O=this;B.superclass.onDomResize.call(this,Q,P);setTimeout(function(){O.syncPosition();O.cfg.refireEvent("iframe");O.cfg.refireEvent("context");},0);},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(P){var O=null;if(P.ownerDocument&&P.ownerDocument.defaultView){var Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){O=parseInt(Q.height,10);}}return(I.isNumber(O))?O:null;};}else{return function(P){var O=null;
if(P.style.pixelHeight){O=P.style.pixelHeight;}return(I.isNumber(O))?O:null;};}})(),_validateAutoFillHeight:function(O){return(!O)||(I.isString(O)&&B.STD_MOD_RE.test(O));},_autoFillOnHeightChange:function(R,P,Q){var O=this.cfg.getProperty("height");if((O&&O!=="auto")||(O===0)){this.fillHeight(Q);}},_getPreciseHeight:function(P){var O=P.offsetHeight;if(P.getBoundingClientRect){var Q=P.getBoundingClientRect();O=Q.bottom-Q.top;}return O;},fillHeight:function(R){if(R){var P=this.innerElement||this.element,O=[this.header,this.body,this.footer],V,W=0,X=0,T=0,Q=false;for(var U=0,S=O.length;U<S;U++){V=O[U];if(V){if(R!==V){X+=this._getPreciseHeight(V);}else{Q=true;}}}if(Q){if(K.ie||K.opera){F.setStyle(R,"height",0+"px");}W=this._getComputedHeight(P);if(W===null){F.addClass(P,"yui-override-padding");W=P.clientHeight;F.removeClass(P,"yui-override-padding");}T=Math.max(W-X,0);F.setStyle(R,"height",T+"px");if(R.offsetHeight!=T){T=Math.max(T-(R.offsetHeight-T),0);}F.setStyle(R,"height",T+"px");}}},bringToTop:function(){var S=[],R=this.element;function V(Z,Y){var b=F.getStyle(Z,"zIndex"),a=F.getStyle(Y,"zIndex"),X=(!b||isNaN(b))?0:parseInt(b,10),W=(!a||isNaN(a))?0:parseInt(a,10);if(X>W){return -1;}else{if(X<W){return 1;}else{return 0;}}}function Q(Y){var X=F.hasClass(Y,B.CSS_OVERLAY),W=YAHOO.widget.Panel;if(X&&!F.isAncestor(R,Y)){if(W&&F.hasClass(Y,W.CSS_PANEL)){S[S.length]=Y.parentNode;}else{S[S.length]=Y;}}}F.getElementsBy(Q,"DIV",document.body);S.sort(V);var O=S[0],U;if(O){U=F.getStyle(O,"zIndex");if(!isNaN(U)){var T=false;if(O!=R){T=true;}else{if(S.length>1){var P=F.getStyle(S[1],"zIndex");if(!isNaN(P)&&(U==P)){T=true;}}}if(T){this.cfg.setProperty("zindex",(parseInt(U,10)+2));}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);G.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);B.superclass.destroy.call(this);},forceContainerRedraw:function(){var O=this;F.addClass(O.element,"yui-force-redraw");setTimeout(function(){F.removeClass(O.element,"yui-force-redraw");},0);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;};this.focus=function(J){var K=this.find(J);if(K){K.focus();}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);M.focusEvent.unsubscribe(this._onOverlayFocusHandler,M);M.blurEvent.unsubscribe(this._onOverlayBlurHandler,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager",null);}if(M.focusEvent._managed){M.focusEvent=null;}if(M.blurEvent._managed){M.blurEvent=null;}if(M.focus._managed){M.focus=null;}if(M.blur._managed){M.blur=null;}}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur();}while(J--);}};this._manageBlur=function(J){var K=false;if(H==J){E.removeClass(H.element,A.CSS_FOCUSED);H=null;K=true;}return K;};this._manageFocus=function(J){var K=false;if(H!=J){if(H){H.blur();}H=J;this.bringToTop(H);E.addClass(H.element,A.CSS_FOCUSED);K=true;}return K;};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},_onOverlayFocusHandler:function(H,G,I){this._manageFocus(I);},_onOverlayBlurHandler:function(H,G,I){this._manageBlur(I);},_bindFocus:function(G){var H=this;if(!G.focusEvent){G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.focusEvent._managed=true;}else{G.focusEvent.subscribe(H._onOverlayFocusHandler,G,H);}if(!G.focus){C.on(G.element,H.cfg.getProperty("focusevent"),H._onOverlayElementFocus,null,G);G.focus=function(){if(H._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst();}this.focusEvent.fire();}};G.focus._managed=true;}},_bindBlur:function(G){var H=this;if(!G.blurEvent){G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focusEvent._managed=true;}else{G.blurEvent.subscribe(H._onOverlayBlurHandler,G,H);}if(!G.blur){G.blur=function(){if(H._manageBlur(this)){this.blurEvent.fire();}};G.blur._managed=true;}G.hideEvent.subscribe(G.blur);},_bindDestroy:function(G){var H=this;G.destroyEvent.subscribe(H._onOverlayDestroy,G,H);},_syncZIndex:function(G){var H=E.getStyle(G.element,"zIndex");if(!isNaN(H)){G.cfg.setProperty("zIndex",parseInt(H,10));}else{G.cfg.setProperty("zIndex",0);}},register:function(G){var J=false,H,I;if(G instanceof D){G.cfg.addProperty("manager",{value:this});this._bindFocus(G);this._bindBlur(G);this._bindDestroy(G);this._syncZIndex(G);this.overlays.push(G);this.bringToTop(G);J=true;}else{if(G instanceof Array){for(H=0,I=G.length;H<I;H++){J=this.register(G[H])||J;}}}return J;},bringToTop:function(M){var I=this.find(M),L,G,J;if(I){J=this.overlays;J.sort(this.compareZIndexDesc);G=J[0];if(G){L=E.getStyle(G.element,"zIndex");
if(!isNaN(L)){var K=false;if(G!==I){K=true;}else{if(J.length>1){var H=E.getStyle(J[1].element,"zIndex");if(!isNaN(H)&&(L==H)){K=true;}}}if(K){I.cfg.setProperty("zindex",(parseInt(L,10)+2));}}J.sort(this.compareZIndexDesc);}}},find:function(G){var K=G instanceof D,I=this.overlays,M=I.length,J=null,L,H;if(K||typeof G=="string"){for(H=M-1;H>=0;H--){L=I[H];if((K&&(L===G))||(L.id==G)){J=L;break;}}}return J;},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return -1;}else{if(H>G){return -1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;for(G=I-1;G>=0;G--){H[G].show();}},hideAll:function(){var H=this.overlays,I=H.length,G;for(G=I-1;G>=0;G--){H[G].hide();}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.ContainerEffect=function(E,H,G,D,F){if(!F){F=YAHOO.util.Anim;}this.overlay=E;this.attrIn=H;this.attrOut=G;this.targetElement=D||E.element;this.animClass=F;};var B=YAHOO.util.Dom,C=YAHOO.util.CustomEvent,A=YAHOO.widget.ContainerEffect;A.FADE=function(D,F){var G=YAHOO.util.Easing,I={attributes:{opacity:{from:0,to:1}},duration:F,method:G.easeIn},E={attributes:{opacity:{to:0}},duration:F,method:G.easeOut},H=new A(D,I,E,D.element);H.handleUnderlayStart=function(){var K=this.overlay.underlay;if(K&&YAHOO.env.ua.ie){var J=(K.filters&&K.filters.length>0);if(J){B.addClass(D.element,"yui-effect-fade");}}};H.handleUnderlayComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){B.removeClass(D.element,"yui-effect-fade");}};H.handleStartAnimateIn=function(K,J,L){B.addClass(L.overlay.element,"hide-select");if(!L.overlay.underlay){L.overlay.cfg.refireEvent("underlay");}L.handleUnderlayStart();L.overlay._setDomVisibility(true);B.setStyle(L.overlay.element,"opacity",0);};H.handleCompleteAnimateIn=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateInCompleteEvent.fire();};H.handleStartAnimateOut=function(K,J,L){B.addClass(L.overlay.element,"hide-select");L.handleUnderlayStart();};H.handleCompleteAnimateOut=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null;}L.overlay._setDomVisibility(false);B.setStyle(L.overlay.element,"opacity",1);L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateOutCompleteEvent.fire();};H.init();return H;};A.SLIDE=function(F,D){var I=YAHOO.util.Easing,L=F.cfg.getProperty("x")||B.getX(F.element),K=F.cfg.getProperty("y")||B.getY(F.element),M=B.getClientWidth(),H=F.element.offsetWidth,J={attributes:{points:{to:[L,K]}},duration:D,method:I.easeIn},E={attributes:{points:{to:[(M+25),K]}},duration:D,method:I.easeOut},G=new A(F,J,E,F.element,YAHOO.util.Motion);G.handleStartAnimateIn=function(O,N,P){P.overlay.element.style.left=((-25)-H)+"px";P.overlay.element.style.top=K+"px";};G.handleTweenAnimateIn=function(Q,P,R){var S=B.getXY(R.overlay.element),O=S[0],N=S[1];if(B.getStyle(R.overlay.element,"visibility")=="hidden"&&O<L){R.overlay._setDomVisibility(true);}R.overlay.cfg.setProperty("xy",[O,N],true);R.overlay.cfg.refireEvent("iframe");};G.handleCompleteAnimateIn=function(O,N,P){P.overlay.cfg.setProperty("xy",[L,K],true);P.startX=L;P.startY=K;P.overlay.cfg.refireEvent("iframe");P.animateInCompleteEvent.fire();};G.handleStartAnimateOut=function(O,N,R){var P=B.getViewportWidth(),S=B.getXY(R.overlay.element),Q=S[1];R.animOut.attributes.points.to=[(P+25),Q];};G.handleTweenAnimateOut=function(P,O,Q){var S=B.getXY(Q.overlay.element),N=S[0],R=S[1];Q.overlay.cfg.setProperty("xy",[N,R],true);Q.overlay.cfg.refireEvent("iframe");};G.handleCompleteAnimateOut=function(O,N,P){P.overlay._setDomVisibility(false);P.overlay.cfg.setProperty("xy",[L,K]);P.animateOutCompleteEvent.fire();};G.init();return G;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=C.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=C.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=C.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=C.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(E,D,F){},handleTweenAnimateIn:function(E,D,F){},handleCompleteAnimateIn:function(E,D,F){},handleStartAnimateOut:function(E,D,F){},handleTweenAnimateOut:function(E,D,F){},handleCompleteAnimateOut:function(E,D,F){},toString:function(){var D="ContainerEffect";if(this.overlay){D+=" ["+this.overlay.toString()+"]";}return D;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});


/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
YAHOO.lang.JSON=(function(){var l=YAHOO.lang,_UNICODE_EXCEPTIONS=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s*\[)+/g,_INVALID=/^[\],:{}\s]*$/,_SPECIAL_CHARS=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function _revive(data,reviver){var walk=function(o,key){var k,v,value=o[key];if(value&&typeof value==="object"){for(k in value){if(l.hasOwnProperty(value,k)){v=walk(value,k);if(v===undefined){delete value[k];}else{value[k]=v;}}}}return reviver.call(o,key,value);};return typeof reviver==="function"?walk({"":data},""):data;}function _char(c){if(!_CHARS[c]){_CHARS[c]="\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4);}return _CHARS[c];}function _prepare(s){return s.replace(_UNICODE_EXCEPTIONS,_char);}function _isValid(str){return l.isString(str)&&_INVALID.test(str.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""));}function _string(s){return'"'+s.replace(_SPECIAL_CHARS,_char)+'"';}function _stringify(h,key,d,w,pstack){var o=typeof w==="function"?w.call(h,key,h[key]):h[key],i,len,j,k,v,isArray,a;if(o instanceof Date){o=l.JSON.dateToString(o);}else{if(o instanceof String||o instanceof Boolean||o instanceof Number){o=o.valueOf();}}switch(typeof o){case"string":return _string(o);case"number":return isFinite(o)?String(o):"null";case"boolean":return String(o);case"object":if(o===null){return"null";}for(i=pstack.length-1;i>=0;--i){if(pstack[i]===o){return"null";}}pstack[pstack.length]=o;a=[];isArray=l.isArray(o);if(d>0){if(isArray){for(i=o.length-1;i>=0;--i){a[i]=_stringify(o,i,d-1,w,pstack)||"null";}}else{j=0;if(l.isArray(w)){for(i=0,len=w.length;i<len;++i){k=w[i];v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}else{for(k in o){if(typeof k==="string"&&l.hasOwnProperty(o,k)){v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}}a.sort();}}pstack.pop();return isArray?"["+a.join(",")+"]":"{"+a.join(",")+"}";}return undefined;}return{isValid:function(s){return _isValid(_prepare(s));},parse:function(s,reviver){s=_prepare(s);if(_isValid(s)){return _revive(eval("("+s+")"),reviver);}throw new SyntaxError("parseJSON");},stringify:function(o,w,d){if(o!==undefined){if(l.isArray(w)){w=(function(a){var uniq=[],map={},v,i,j,len;for(i=0,j=0,len=a.length;i<len;++i){v=a[i];if(typeof v==="string"&&map[v]===undefined){uniq[(map[v]=j++)]=v;}}return uniq;})(w);}d=d>=0?d:1/0;return _stringify({"":o},"",d,w,[]);}return undefined;},dateToString:function(d){function _zeroPad(v){return v<10?"0"+v:v;}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z";},stringToDate:function(str){if(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.test(str)){var d=new Date();d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);return d;}return str;}};})();YAHOO.register("json",YAHOO.lang.JSON,{version:"2.7.0",build:"1799"});

YAHOO.namespace("YAHOO.util.EU");
YAHOO.namespace("YAHOO.EU");

/**
 * @fileoverview Useful utility functions
 *
 */

/**
 * function to convert pixel value to ems.
 * @param {HTMLElement} Element to use to source font size value
 * @param {int} Pixel value to convert
 * @author Lawrence Carvalho carvalho@uk.yahoo-inc.com
 * @returns Em value
 * @type Float
 * @version 0.1
 */

YAHOO.util.EU.convertPxToEm= function(oElem,iPx) {
	var iFontSize = (YAHOO.util.Dom.getStyle(oElem,'fontSize'));

	//IE kludge alert
	//%
	if (iFontSize.indexOf('%')!=-1) {
		iFontSize=parseFloat(YAHOO.util.Dom.getStyle(oElem,'lineHeight'))+1;
	}
	else if (isNaN(iFontSize)) {
	
		if (iFontSize=="small")	 {
			iFontSize = parseFloat(YAHOO.util.Dom.getStyle(oElem,'lineHeight'))+1.5;
		}
		else if (iFontSize=="x-small")	 {
			iFontSize=parseFloat(YAHOO.util.Dom.getStyle(oElem,'lineHeight'));
		}
	}
	return parseFloat(iPx)/parseFloat(iFontSize);
}


YAHOO.namespace("util.EU");
YAHOO.namespace("EU.News");

/**
 * @fileoverview Documentation for the ModuleTabs object
 * @author Lawrence Carvalho carvalho@uk.yahoo-inc.com
 * @version 0.3
 */




/**
 * Construct a new ModuleTabs object
 * @class This is the basic ModuleTab class. A ModuleTab is essentially a manager
 * of {@link YAHOO.EU.Tab} objects. It implements the Yahoo <a href="http://developer.yahoo.com/ypatterns/pattern.php?pattern=moduletabs">ModuleTabs</a> 
 * and the <a href="http://developer.yahoo.com/ypatterns/pattern.php?pattern=spotlight">Spotlight</a> design patterns.<br>
 *  
 * @constructor
 * @param {string} sId The id of the container elem
 * @param {object} oConfig A value object = <br>
 {<br>
	bDoHilite	: true,<br>
	oHiliteArgs : {<br>
		from:"A2BCCE",<br>
		to:"ffffff",<br>
		duration:2,<br>
		bTransparent:true,<br>
		fEase:YAHOO.util.Easing.easeOut<br>
	}<br>
}<br>
 * 
 * @return {object} A reference to the ModuleTab object
 */
 

YAHOO.EU.ModuleTabs = function(sId,oConfig	) {
		/**
	 * The containing element
	 * @type htmlref
	 */
	this.elContainer=null;
	
	/**
	 * Flag denoting whether to perform spotlight interaction pattern when 
	 * displaying content
	 * @type boolean
	 */
	 
	 this.bDoHilite=false;
	 
	 /**
	  * Arguments for spotlight pattern
	  * @type object fields={ from=#fff,to:#ff0000}
	  */
	 this.oHiliteArgs=null;
	 
	 /**
	  * Index of current tab
	  * @type integer
	  */
//	 this.iCurrTabIndex=-1;
	
	/**
	 * Initialisation function
	 * @param {object} init args
	 */ 
	 
	 /**
	  * Reference to the currently active tab
	  * @type object
	  */
	 this.oActiveTab=null;
	 
	 /**
	  * Unique string denoting the group that a collection of tags belong to. 
	  * Used for drag and drop
	  * @type string
	  */
	 
	 /**
	  * Flag denoting whether the tabs have been activated for the first time. 
	  * Used to stop the spotlight when the page is first loaded.
	  * @type boolean 
	  */
	  this.bFirstRun=true;
	  
	  /**
	   * Array of YAHOO.EU.Tabs representing the module's tabs.
	   */
	  this.aTabs=[];
	  this.aEvents=[];
	  this.oConfig=null;
	if (sId) {
		this.init(sId,oConfig);	
	}
};
YAHOO.EU.ModuleTabs.prototype =  {

	 init : function(sId,oConfig) {
		this.oConfig = oConfig;
	   	this.elContainer = YAHOO.util.Dom.get(sId);
		for (var sItem in oConfig) {
			if (this[sItem] !== oConfig[sItem]) {
				this[sItem] = oConfig[sItem];
			}
			
		}

	   	if(this.elContainer) {

		
		   	this.aEvents.TabActivated = new YAHOO.util.CustomEvent('onTabActivated',this);
		   	this.aEvents.TabDeactivated = new YAHOO.util.CustomEvent('onTabDeactivated',this);
		   	this.aEvents.TabAdded = new YAHOO.util.CustomEvent('onTabAdded',this);
			this.aEvents.TabRemoved = new YAHOO.util.CustomEvent('onTabRemoved',this);
					   	
		   	
		    var aTriggers = this.elContainer.getElementsByTagName('li');
			var elUl = this.elContainer.getElementsByTagName('ul')[0];
		    for(var i=0,oTrgr;aTriggers[i];i++) {
		        oTrgr = aTriggers[i];
			   	if (oTrgr.parentNode === elUl) {
				   	oTrgr.id = this.elContainer.id+'-item'+(this.aTabs.length+1);
					this.addTab(oTrgr);
			   	}
		   }
		
		   var aPanes = null, sShowCSSClass = null;
		   aTriggers = null;
		   this.activateTab((this.oActiveTab!==null) ? this.oActiveTab : this.aTabs[0]);
		   
		   YAHOO.util.Event.addListener(this.elContainer,'click',this.selectTab,this,true);
		   YAHOO.util.Dom.addClass(elUl,YAHOO.EU.ModuleTabs.JS_IS_ACTIVE);
	   	}
	},
	addTab :function(elTab) {
		var oConfig = this.oConfig;
		oConfig.elTab = elTab;
	   	var oTab = new YAHOO.EU.Tab(oConfig);
	   	this.aTabs.push(oTab);

	    if ((this.oActiveTab===null) && (oTab.getPane())) {  //TODO: getTab()
	    
	    	this.activateTab(oTab);
	    	this.oActiveTab = oTab;
	    }
	    
	    if (window.location.hash.substring(1).toLowerCase() === oTab.toString().toLowerCase()) {
			this.bFirstRun=true;
	    	this.activateTab(oTab);
	    	this.oActiveTab = oTab;
		}
					
		if (this.aEvents.TabAdded) {
			this.aEvents.TabAdded.fire(this.aTabs.length);
		}
		return oTab;	
	},
	removeTab : function(oTab) {
		var iTabIndex = -1;
		for (var i=0,tab;this.aTabs[i];i++) {
		    tab = this.aTabs[i];
			if (oTab.id  === tab.id) {
				iTabIndex = i;
				break;
			}
		}
		if (iTabIndex !== -1) {
			var elTab = this.aTabs[iTabIndex].elTab;
			elTab.parentNode.removeChild(elTab);
			oTab = this.aTabs.splice(iTabIndex,1);
			if (this.aTabs.length>0) {
				oTab = this.aTabs[Math.min(iTabIndex,(this.aTabs.length===0)? 0 : this.aTabs.length-1)];
				this.activateTab(oTab);
			}
			
		}
		if (this.aEvents.TabRemoved) {
			this.aEvents.TabRemoved.fire();
		}
		return false;
		
	},
	/**
	 * Deactivates Tab and fire deactivate event
	 * @param {string} type The event type
	 * @param {array}  aArgs Argument array.
	 */
	deactivateTab :function() {
		if (this.oActiveTab) {
			this.oActiveTab.deactivate();
			this.oActiveTab = null;
			if (this.aEvents.TabDeactivated) {
				this.aEvents.TabDeactivated.fire();
			}
		}
	    return false;	
	
	},	
	/**
	 * Activates Tab within Moduletab context. Actual Tab has already been activated
	 * but ModuleTab's internal state is updated here. Deactivates current tab and 
	 * executes activate callback
	 * @param {string} type The event type
	 * @param {array}  aArgs Argument array.
	 */
	activateTab : function(oTab) {
		if (oTab && (this.oActiveTab!==oTab)) {
			this.deactivateTab();
		   	this.oActiveTab = oTab;

			oTab.activate();
			if ((this.bFirstRun === false) && this.bDoHilite) {
		      	this.hilite();
		    }
			this.bFirstRun = false;
			this.manageHeight();
			if (this.aEvents.TabActivated) {
				this.aEvents.TabActivated.fire();
			}
		}
	},
	manageHeight : function() {
		var elPane = this.oActiveTab.elPane;
		//get Height of last child
		var oYngest = elPane.lastChild;
		while(oYngest.nodeType!==1) {
			oYngest = oYngest.previousSibling;
		}
		//get difference between last child height and elem height
		var iDelta =  (YAHOO.util.Dom.getXY(elPane)[1] + elPane.offsetHeight) - (YAHOO.util.Dom.getXY(oYngest)[1] + oYngest.offsetHeight);
	
		//new height must be in ems so we convert
		var iNewHeight = YAHOO.util.EU.convertPxToEm(elPane,parseInt(elPane.offsetHeight,10)-(iDelta)); 

		//Direct replacement of height
		YAHOO.util.Dom.setStyle(this.elContainer,'height',iNewHeight+"em");
		
	},
	
	/**
	 * Fades background color as a means of highlighting that a change has occured.
	 * any specified callbacks.
	 * @param {int} iIndex The index of the container to display
	 */
	
	hilite : function() {
		if (!YAHOO.util.ColorAnim) {
			return;
		}
		//stop anim and reset bg if another anim is started before the previous has finished
		
		if (this.oConfig.oHiliteArgs.bTransparent && this.hiliteAnim !== null && this.hiliteAnim !== undefined) {
			this.hiliteAnim.stop(true);
			YAHOO.util.Dom.setStyle(this.hiliteAnim.getEl(),'backgroundColor','');
		}
			this.hiliteAnim = new YAHOO.util.ColorAnim([this.oActiveTab.elTabLnk,this.oActiveTab.elPane],{  
								backgroundColor : 	{ 
									from:this.oHiliteArgs.from,
									to:this.oHiliteArgs.to
								} 
						},this.oHiliteArgs.duration,this.oHiliteArgs.fEase || YAHOO.util.Easing.easeOut);
			this.hiliteAnim.animate();
		
	},
	addListener : function(sEvt,fCallback,oObj,bScope) {
		if (this.aEvents[sEvt]) {
			this.aEvents[sEvt].subscribe(fCallback,oObj || window, bScope || false);
		}

	},
	selectTab : function(e) {
		
		var elSrc = YAHOO.util.Event.getTarget(e);
		if (YAHOO.util.Dom.hasClass(elSrc,YAHOO.EU.ModuleTabs.CSS_TAB_HOOK)) {
			var oTab = this.identifyTab(elSrc.parentNode);
			if (oTab) {
				this.activateTab(oTab);								
			}
			YAHOO.util.Event.stopEvent(e);
		}
	},
	identifyTab : function(el) {
		for(var i=0,oTab;this.aTabs[i];i++) {
		    oTab = this.aTabs[i];
			if (el === oTab.getTab()) {
				return oTab;
			}
		}
		return false;
	}
};




/**
 * Value to represent the class name that is used as a hook to identify elements
 * that should trigger behaviour
 * @type string
 * @final
 */
YAHOO.EU.ModuleTabs.CSS_TAB_HOOK	=	"tab";

/**
 * Value to represent the class name that is used as a hook to identify container
 * elements that are to be hidden/shown
 * @type string
 * @final
 */
YAHOO.EU.ModuleTabs.CSS_PANE_HOOK	=	"pane";
/**
 * Value to represent the class name that is used as a hook to identify default 
 * container elements that are to be shown as default. Also applied to current 
 * container that is being shown
 * @type string
 * @final
 */
YAHOO.EU.ModuleTabs.SHOW_PANE_CLASS_NAME	=	"paneShow";
/**
 * Value to represent the class name that is used as a hook to identify default 
 * container elements that are to be hidden as default. Also applied to current 
 * container that is to be hidden
 * @type string
 * @final
 */
YAHOO.EU.ModuleTabs.HIDE_PANE_CLASS_NAME	=	"paneHide";

YAHOO.EU.ModuleTabs.ACTIVE_TAB_CLASS_NAME = 'on';

YAHOO.EU.ModuleTabs.JS_IS_ACTIVE = 'js';


/*
 * Tab Object 
 */

YAHOO.EU.Tab = function(oConfig) {
	this.initTab(oConfig);
};

YAHOO.EU.Tab.prototype.initTab = function(oConfig) {
	/**
	 * @type {HtmlElRef}
	 */
	this.elTab = oConfig.elTab;
	/**
	 * @type {HtmlElRef}
	 */
	this.elPane = this.elTab.getElementsByTagName('div')[0];
	this.elTabLnk = this.elTab.getElementsByTagName('a')[0];
/**
 * @type {String}
 */
	this.id = this.elTab.id;

/**
 * @type {YAHOO.util.CustomEvent}
 */

};




/**
 * Deactivates Tab. Assigns appropiates CSS class and removes 'title' attribute
 * of linked element.
 *
 */
    YAHOO.EU.Tab.prototype.deactivate = function() {
	if (YAHOO.util.Dom.hasClass(this.elPane,YAHOO.EU.ModuleTabs.SHOW_PANE_CLASS_NAME)) {
		YAHOO.util.Dom.replaceClass(this.elPane,YAHOO.EU.ModuleTabs.SHOW_PANE_CLASS_NAME,YAHOO.EU.ModuleTabs.HIDE_PANE_CLASS_NAME);   
  	}
  	else  { 
		YAHOO.util.Dom.addClass(this.elPane,YAHOO.EU.ModuleTabs.HIDE_PANE_CLASS_NAME);
  	}
 	  
	//deactivate tab
	YAHOO.util.Dom.removeClass(this.elTab,YAHOO.EU.ModuleTabs.ACTIVE_TAB_CLASS_NAME);
  	this.elTabLnk.setAttribute('title','');
	this.bActive =false;
	return this.bActive;
  };
/**
 * Activates Tab. Assigns appropiates CSS class and sets 'title' attribute
 * of linked element. TODO : i18n
 */
   YAHOO.EU.Tab.prototype.activate = function() {
	if (YAHOO.util.Dom.hasClass(this.elPane,YAHOO.EU.ModuleTabs.HIDE_PANE_CLASS_NAME)) {
		YAHOO.util.Dom.replaceClass(this.elPane,YAHOO.EU.ModuleTabs.HIDE_PANE_CLASS_NAME,YAHOO.EU.ModuleTabs.SHOW_PANE_CLASS_NAME);
	} 
 	else  { 
 		YAHOO.util.Dom.addClass(this.elPane,YAHOO.EU.ModuleTabs.SHOW_PANE_CLASS_NAME);
 	}
	//activate tab
	YAHOO.util.Dom.addClass(this.elTab,YAHOO.EU.ModuleTabs.ACTIVE_TAB_CLASS_NAME);
	this.elTabLnk.setAttribute('title',YAHOO.EU.Tab.ACTIVE_TITLE_TEXT);
	
	this.bActive =true;
	return this.bActive;	
    };

/**
 * Add Listeners to Tab's custom events
 */

	
	YAHOO.EU.Tab.prototype.getTab = function() {
		return this.elTab;
	};
	YAHOO.EU.Tab.prototype.getPane = function() {
		return this.elPane;
	};
	YAHOO.EU.Tab.prototype.toString = function() {
		var elText = this.elTabLnk.firstChild;
		while (elText.nodeType!==3) {
			elText=elText.firstChild;
		}
		return elText.nodeValue;
	};
/**
 * text to set into the active attribute of the tab link of an active tab
 * 
 */
YAHOO.EU.Tab.ACTIVE_TITLE_TEXT	=	"active";

YAHOO.namespace('YAHOO.EU.widget.Carousel');
/**
 *
 * Base Carousel class
 * <p>Usage: new YAHOO.EU.widget.Carousel().init('yeug-ticker', oCarouselConfig);</p>
 * @class Carousel
 * @namespace YAHOO.EU.widget.Carousel
 * @requires YAHOO.util.AnimMgr
 * @requires YAHOO.util.Easing
 * @requires YAHOO.util.Dom
 * @requires YAHOO.util.Event
 * @requires YAHOO.util.CustomEvent
 * @constructor
 * @param {String | HTMLElement} el Reference to the outer container of the Carousel
 * @param {Object} oConfig The config options for the Carousel.
 *   {integer} visiblePanes (optional, defaults to 1) Number of panes visible at any one time
 *   {integer} panesToMove (optional, defaults to 1) Number of panes to move per animation
 *   {number} animDuration (optional, defaults to 0.5 seconds) Length of animation in milliseconds
 *   {Function} easing (optional, defaults to YAHOO.util.Easing.easeOut) Computes the values that are applied to the animation per frame (generally a YAHOO.util.Easing method)
 *   {Boolean} isVertical (optional, defaults to true) Orientation of the Carousel animation
 *   {Boolean} loop (optional, defaults to false) Loop back to the begining
 *   {Object} btnPrev Config for previous button, requires id, imgUrl, imgDisabledUrl, (optional) toolTip
 *   {Object} nextPrev Config for next button, requires imgUrl, imgDisabledUrl, (optional) toolTip
 *   {String | HTMLElement} buttonCont (optional, defaults to el) element to append buttons to
 */
YAHOO.EU.widget.Carousel = function(){
	return this;
};

YAHOO.EU.widget.Carousel.prototype = {

	init : function(el, oConfig){
		this.oConfig 		= oConfig;
		this.nVisiblePanes	= oConfig.visiblePanes || 1;
		this.nPanesToMove 	= oConfig.panesToMove || this.nVisiblePanes;
		this.bHorizontal	= !oConfig.isVertical;
		this.bLoop			= oConfig.loop || 0;
		this.oCont			= YAHOO.util.Dom.get(el);
		this.oClip			= YAHOO.util.Dom.getElementsByClassName('clip', 'div', this.oCont)[0];
		this.oPanel	 		= this.oCont.getElementsByTagName('ul')[0];
		this.oButtonCont	= oConfig.buttonCont || this.oCont;
		YAHOO.util.Dom.addClass(this.oCont, "js");
		this.assignElements();
		this.nCurrentPane 	= 0;
		YAHOO.util.Dom.setStyle(this.oClip, "overflow", "hidden");
		if (this.nPanes>1) {		
			this.createNav();
		}
		this.createEvents();
		this.onAnimStart.fire();
		return this;
	},
	
	assignElements : function(){
		var self 			= this;
		this.aPanels 		= YAHOO.util.Dom.getElementsBy(function(o){
								if(o.parentNode === self.oPanel){
									//o.style.width = self.oClip.offsetWidth / self.nVisiblePanes - 2 + "px";
									return true;
								}
								return false;
								}, "li", this.oPanel);
		this.nPanes			= this.aPanels.length;
		this.nMoveInc		= (this.bHorizontal) ? this.aPanels[0].offsetWidth + (parseInt(YAHOO.util.Dom.getStyle(this.aPanels[0],'marginRight'), 10)*2) :  this.aPanels[0].offsetHeight;
//		this.nMoveInc		= (this.bHorizontal) ? this.aPanels[0].offsetWidth  :  this.aPanels[0].offsetHeight;
	},

	createNav : function(){
		this.oButtonCont = YAHOO.util.Dom.get(this.oButtonCont);
		
		var oA = document.createElement("button");
		YAHOO.util.Dom.addClass(oA, "btnprev");
		oA.appendChild(document.createTextNode(YAHOO.EU.widget.Carousel.LOCALISATION.PREV_BUTTON_ALT || ''));
/*
		oI = document.createElement("img");
		oI.setAttribute("src", this.oConfig.btnPrev.imgUrl);
		oI.setAttribute("alt", YAHOO.EU.widget.Carousel.LOCALISATION.PREV_BUTTON_ALT || '');
		oI.setAttribute("title", this.oConfig.btnPrev.toolTip || "");
		oA.appendChild(oI);
*/
		this.oButtonCont.appendChild(oA);
		this.oBtnPrev = YAHOO.util.Dom.get(oA);

		oA = document.createElement("button");
		YAHOO.util.Dom.addClass(oA, "btnnext");
		oA.appendChild(document.createTextNode(YAHOO.EU.widget.Carousel.LOCALISATION.NEXT_BUTTON_ALT || ''));
/*
		oI = document.createElement("img");
		oI.setAttribute("src", this.oConfig.btnNext.imgUrl);
		oI.setAttribute("alt", YAHOO.EU.widget.Carousel.LOCALISATION.NEXT_BUTTON_ALT || '');
		oI.setAttribute("title", this.oConfig.btnNext.toolTip || "");
		oA.appendChild(oI);
*/
		this.oButtonCont.appendChild(oA);

		this.oBtnNext = YAHOO.util.Dom.get(oA);

	},

	createEvents : function(){
		this.onAnimStart 	= new YAHOO.util.CustomEvent("onAnimStart");
		this.onAnimEnd		= new YAHOO.util.CustomEvent("onAnimEnd");
		this.onNavigate		= new YAHOO.util.CustomEvent("onNavigate");
		this.onCarouselEnd	= new YAHOO.util.CustomEvent("onCarouselEnd");
		this.onAnimStart.subscribe(this.enableButtons, this, true);	
		this.onAnimEnd.subscribe(this.enableButtons, this, true);
		if (this.nPanes>1) {
			YAHOO.util.Event.on(this.oBtnPrev, 'click', function(e){this.moveBy(e, -1);if (this.pause) {this.pause();}}, this, true);
				YAHOO.util.Event.on(this.oBtnNext, 'click', function(e){this.moveBy(e, 1);if (this.pause) {this.pause();}}, this, true);
		}
	},

	enableButtons : function(){
		if (this.nPanes>1) {
			this.oBtnPrev.firstChild.src = this.oConfig.btnPrev.imgUrl;
			this.oBtnNext.firstChild.src = this.oConfig.btnNext.imgUrl;
			if(!this.nCurrentPane && !this.bLoop){
				this.oBtnPrev.firstChild.src = this.oConfig.btnPrev.imgDisabledUrl;
				this.oBtnNext.firstChild.src = this.oConfig.btnNext.imgUrl;
			}
			if(this.nCurrentPane >= Math.ceil(this.nPanes/this.nVisiblePanes) && !this.bLoop){
				this.oBtnPrev.firstChild.src = this.oConfig.btnPrev.imgUrl;
				this.oBtnNext.firstChild.src = this.oConfig.btnNext.imgDisabledUrl;
			}
		}
	},

	moveBy : function(e, nPanes){
		if(e){
			YAHOO.util.Event.preventDefault(e);
			this.onNavigate.fire();
		}
		this.nCurrentPane += nPanes * this.nPanesToMove;
		if(this.nCurrentPane + this.nVisiblePanes - this.nPanesToMove >= this.nPanes){
			if(this.bLoop){
				this.nCurrentPane = 0;
			}
			this.onCarouselEnd.fire();
		}else if(this.nCurrentPane <= -this.nPanesToMove){
			if(this.bLoop){
				this.nCurrentPane = this.nPanes + (nPanes * this.nPanesToMove);
			}
			this.onCarouselEnd.fire();
		}
		this.gotoPane(this.nCurrentPane);
	},

	gotoPane : function(nPane){
		if(nPane < 0){
			nPane = 0;
		}

		if(nPane > this.nPanes - this.nVisiblePanes){
			nPane = this.nPanes - this.nVisiblePanes;
		}

		this.nCurrentPane = nPane;
		var oAnim = new YAHOO.util.Anim(this.oPanel, (this.bHorizontal) ? { left : {to : -this.nMoveInc * nPane}} : { top : {to : -this.nMoveInc * nPane}}, this.oConfig.animDuration || 0.5, this.oConfig.easing || YAHOO.util.Easing.easeOut);
		var onAnimEnd = function(type, args) {
			this.onAnimEnd.fire();
		};
		oAnim.onComplete.subscribe(onAnimEnd, this, true);
		this.onAnimStart.fire();
		oAnim.animate();
	}
};




/**
 *
 * Extends the Carousel Class to add auto-play animations
 * <p>Usage: new YAHOO.EU.widget.Carousel().init('yeug-ticker', oCarouselConfig).autoPlay(oConfig);</p>
 * @param {Object} oConfig The config options for Auto-play.  
 *   {number} autoPlayDelay (optional, defaults to 5 seconds) Length of delay in milliseconds
 *   {Object} btnPause Config for pause/play toggle button, requires id, imgUrl, imgPlayUrl, (optional) toolTip
 */
YAHOO.EU.widget.Carousel.prototype.autoPlay = function(oConfig){
	var self = this;
	if(oConfig){
		this.oAutoConfig = oConfig;
		if (oConfig.btnPause) {
			oA = document.createElement("a");
			YAHOO.util.Dom.addClass(oA, "btnpause");
			oA.setAttribute("href", "#");
			oI = document.createElement("img");
			oI.setAttribute("src", oConfig.btnPause.imgUrl);
			oI.setAttribute("alt", YAHOO.EU.widget.Carousel.LOCALISATION.PLAY_BUTTON_ALT || '');
			oI.setAttribute("title", oConfig.btnPause.toolTip || "");
			oA.appendChild(oI);
			this.oButtonCont.appendChild(oA);
			this.oBtnPause = YAHOO.util.Dom.get(oA);
		
		YAHOO.util.Event.on(this.oBtnPause, 'click', this.pause, this, true);
		this.onNavigate.subscribe(function(){this.pause(true);}, this, true);
		}
	}
	this.bPaused = 0;
	if (this.oBtnPause) {
		this.oBtnPause.firstChild.src = this.oAutoConfig.btnPause.imgUrl;
	}
	this.oTimer = window.setInterval(function(){self.moveBy(null, 1);}, this.oAutoConfig.autoPlayDelay || 5000);
	return this;
};

YAHOO.EU.widget.Carousel.prototype.pause = function(e){
	if(e && e !== true){
		YAHOO.util.Event.preventDefault(e);
		if(this.bPaused){
			this.moveBy(null, 1);
			return this.autoPlay();
		}
	}
	this.bPaused = 1;
	if (this.oBtnPause) {
	  this.oBtnPause.firstChild.src = this.oAutoConfig.btnPause.imgPlayUrl;
        }
	clearTimeout(this.oTimer);
};





/**
 *
 * Extends the Carousel Class to add auto-load of content via Ajax
 * <p>Usage: new YAHOO.EU.widget.Carousel().init('yeug-ticker', oCarouselConfig).enableCheckForUpdates(oConfig);</p>
 * @requires YAHOO.util.Connect
 * @param {Object} oConfig The config options for Auto-play.  
 *   {String} url Url for Ajax request
 *   {Number} checkDelay (optional, defaults to 10 seconds) Interval between checking for updates
 */
YAHOO.EU.widget.Carousel.prototype.enableCheckForUpdates = function(oConfig){
	var self = this;
	this.oLoadConfig = oConfig;
	this.oLoadTimer = window.setInterval(function(){self.checkForUpdates();}, this.oLoadConfig.checkDelay || 10000);
	return this;
};
YAHOO.EU.widget.Carousel.prototype.checkForUpdates = function(){
	YAHOO.util.Connect.asyncRequest("GET", this.oLoadConfig.url + "?n=" + (this.nPanes + 1), {
			success : this.checkedForUpdates,
			scope	: this
		}
	);
};
YAHOO.EU.widget.Carousel.prototype.checkedForUpdates = function(oResponse){
	this.oPanel.innerHTML += oResponse.responseText;
	this.assignElements();
	this.enableButtons();
};


YAHOO.EU.widget.Carousel.prototype.paginate = function(sType) {
	
	
	sType = sType || 'default';
	
	
	var self = this;
	if (sType==='default') {
		var oL, oI;
		oL = document.createElement('ul');
		YAHOO.util.Dom.addClass(oL, 'pagination');
		updatePagination = function() {
			var oLi = YAHOO.util.Dom.getElementsBy(function(o) {
				if(o.parentNode === oL) {
					return true;
				}
				return false;
			}, "li", oL);
			var len = oLi.length;
	
			for(i=0;i<len;i+=1){
				if(i === Math.ceil(self.nCurrentPane / self.nPanesToMove)) {
					YAHOO.util.Dom.addClass(oLi[i],'current');
					oLi[i].getElementsByTagName('button')[0].disabled = true;
				}
				else {
					YAHOO.util.Dom.removeClass(oLi[i],'current');
					oLi[i].getElementsByTagName('button')[0].disabled = false;
				}
			}
		};
		for (i=1;i<Math.ceil((this.nPanes-this.nVisiblePanes)/this.nPanesToMove)+2;i+=1) {
			oI = document.createElement('li');
			oB = document.createElement('button');
			oSp = document.createElement('span');
			oB.appendChild(oSp);
			oB.appendChild(document.createTextNode(i));
			oI.appendChild(oB);
			oL.appendChild(oI);
		}
		
		YAHOO.util.Event.on(oL, 'click', function(e){
			this.gotoPane((YAHOO.util.Event.getTarget(e).lastChild.nodeValue -1) * this.nPanesToMove);
			if (this.pause) {
				this.pause();
			}
			YAHOO.util.Event.preventDefault(e);
		}, this, true);

		this.oButtonCont.appendChild(oL);
	}
	else {
		oP = document.createElement('p');
		YAHOO.util.Dom.addClass(oP, 'pagination');
		this.oButtonCont.appendChild(oP);
		this.oButtonCont.appendChild(oP);
		updatePagination = function() {
			oP.innerHTML = self.nCurrentPane+1+ " / " +self.nPanes;
		};
		
	}
	
	
	updatePagination();
	this.onAnimStart.subscribe(updatePagination, this, true);	


	return this;
};


YAHOO.EU.widget.Carousel.LOCALISATION = {
    "NEXT_BUTTON_ALT":      "Next",
    "PREV_BUTTON_ALT":      "Previous",
    "PLAY_BUTTON_ALT":      "Play/Pause",
    "DIRECT_BUTTON_ALT":    "Go to %s"
};
YAHOO.util.ListToSelect = function(oConfig){
	this.init(oConfig)
};
YAHOO.util.ListToSelect.prototype = {
	init : function(oConfig){
		this.oEl = YAHOO.util.Dom.get(oConfig.sID);
		var oForm 	= document.createElement("form");
		this.oSelect = document.createElement("select");
		YAHOO.util.Dom.generateId(this.oSelect);
		if(oConfig.sLabel){
			var oLabel	= document.createElement("label");
			oLabel.setAttribute("for", this.oSelect.id);
			oLabel.appendChild(document.createTextNode(oConfig.sLabel));
			oForm.appendChild(oLabel);
		}
		oForm.appendChild(this.oSelect);
		if(oConfig.sFirstOption){
			oOption = document.createElement("option");
			oOption.appendChild(document.createTextNode(oConfig.sFirstOption));
			this.oSelect.appendChild(oOption);
		}
		var aOptions, oGroup, oOption;
		if(oConfig.aOptgroups){
			var aGroups = oConfig.aOptgroups;
			for(var i=0; i<aGroups.length; i++){
				aOptions = aGroups[i].parentNode.getElementsByTagName("a");
				oGroup = document.createElement("optgroup");
				oGroup.setAttribute("label", aGroups[i].firstChild.nodeValue);
				for(var j=0; j<aOptions.length; j++){
					oOption = document.createElement("option");
					oOption.appendChild(document.createTextNode(aOptions[j].firstChild.nodeValue));
					oOption.setAttribute("value", aOptions[j].getAttribute("href"));
					oGroup.appendChild(oOption);
				}
				this.oSelect.appendChild(oGroup);
			}
		}else{
			aOptions = oConfig.aOptions;
			for(var j=0; j<aOptions.length; j++){
				oOption = document.createElement("option");
				oOption.appendChild(document.createTextNode(aOptions[j].firstChild.nodeValue));
				oOption.setAttribute("value", aOptions[j].getAttribute("href"));
				this.oSelect.appendChild(oOption);
			}
		}
		var oButton 	= document.createElement("input");
		oButton.type 	= "submit";
		oButton.value 	= oConfig.sSubmitText;
		YAHOO.util.Dom.addClass(oButton, "sub");
		YAHOO.util.Event.addListener(oButton, "click", function(e){this.submitItem(e)}, this, true);		
		oForm.appendChild(oButton);
		var oWrapper = this.oEl.getElementsByTagName("div")[0];
		oWrapper.parentNode.removeChild(oWrapper);
		this.oEl.insertBefore(oForm, this.oEl.firstChild);
	},
	submitItem : function(e){
		YAHOO.util.Event.stopEvent(e);
		if(this.oSelect.selectedIndex){
			self.location = this.oSelect[this.oSelect.selectedIndex].value;
		}
	}
};//
//  Link Popper and Link Popdown
//  

YAHOO.EU.LinkPopper = {
    init:   
        function () {
            YAHOO.util.Event.addListener(document.getElementsByTagName('a'), 'click', function (e) {
                if ( e.button === 2 ) {
                    return;
                }

                var link = YAHOO.util.Event.getTarget(e);
                while (link && link.nodeName != "A") {                                  // Bubble up from the event target till we hit a link.
                    link = link.parentNode;
                }

                if (                                                                    // IF:
                    link && link.href                                                   //  the link is a link with an HREF
                    && link.getAttribute("rel") != "popless"                            //  and isn't declared as a non-popup link
                    && (                                                                //  and matches either
                        link.href.match(/\/photos\/slideshow/)                          //      UK's SEO URL style
                        ||                                                              //  or
                        link.href.match(/\/fotos\/diapositivas/)                        //      Spain's SEO URL style
                        ||                                                              //  or
                        link.href.match(/\/fotos\/diashow/)                             //      Germany's SEO URL style
                        ||                                                              //  or
                        link.href.match(/\/foto\/galleria/)                             //      Italy's SEO URL style
                        ||                                                              //  or
                        link.href.match(/\/photos\/diaporama/)                          //      France's SEO URL style
                        ||                                                              //  or
                        link.href.match(/photos\/photo_ss_single/)                      //  the nonSEO url style
                    )
                    && !window.opener                                                   //  and we're not already in a popup 
                ) {
                    YAHOO.util.Event.stopEvent(e);
                    /* Ticket 2616144: Make popup taller and scrollable. */
                    // var newwindow = window.open(link.href, "SlideshowPopupWindow", "height=650,width=760,scrollbars=no");
                    var newwindow = window.open(link.href, "SlideshowPopupWindow", "height=730,width=790,resizable=yes,scrollbars=yes");
                    newwindow.opener = window;
                    return false;
                }
            });
        },
    popdownInit: 
        function() {
            popdownFunction = function (e) {
                var link = YAHOO.util.Event.getTarget(e);
                while (link && link.nodeName != "A") {
                    link = link.parentNode;
                }
                
                if (!link) { return true; }
                
                if (link.href && window.opener) {
                    window.opener.location = link.href;
                    YAHOO.util.Event.stopEvent(e);
                    window.close();
                }
            };
        //
        //  POPDOWN LINKS
        //
            var thePopdownLinks = YAHOO.util.Dom.getElementsByClassName("popdown-ss","a");
            YAHOO.util.Event.addListener(
                thePopdownLinks,
                'click',
                popdownFunction
            );
            
            popdownFormFunction = function (e) {
                var form = this;
                var url = form.getAttribute('action');
                if (window.opener && url.match(/http:\/\/\w+\.search\.yahoo\.com/)) {
                    // Build URL string

                    var data = '';
                    for (var i=0, len=form.elements.length; i<len; i++) {
                        var oName  = encodeURIComponent(form.elements[i].name);
                        var oValue = encodeURIComponent(form.elements[i].value);
                        if (oName) {
                            data += oName + "=" + oValue + "&";                            
                        }
                    }
                    data = data.substr(0, data.length - 1);
                    url += "?"+data;
                    window.opener.location = url;
                    YAHOO.util.Event.stopEvent(e);
                    window.close();
                }
                return true;
            }
            var theForms = document.getElementsByTagName('form');
            YAHOO.util.Event.addListener(
                theForms,
                'submit',
                popdownFormFunction
            );
        
        }
};

YAHOO.EU.LinkPopper.init();
YAHOO.util.Event.onContentReady('bd', YAHOO.EU.LinkPopper.popdownInit);

        var stupendously_ugly_utf8_to_latin1_hack = function (str) {
            var is_latin1 = function () {
                var metaTags = document.getElementsByTagName('meta');
                for (var i=0;i<metaTags.length;i++) {
                    if (metaTags[i].getAttribute('content').match(/8859/)) {
                        return true;
                    }
                }
                return false;
            }
            if (is_latin1()) {
                eval("str = str.replace(/Ã/,'Á');     str = str.replace(/Ãƒ/,'Ã');     str = str.replace(/Ã„/,'Ä');     str = str.replace(/Ã…/,'Å');     str = str.replace(/Ã†/,'Æ');     str = str.replace(/Ã‡/,'Ç');     str = str.replace(/Ãˆ/,'È');     str = str.replace(/Ã‰/,'É');     str = str.replace(/ÃŠ/,'Ê');     str = str.replace(/Ã‹/,'Ë');     str = str.replace(/ÃŒ/,'Ì');     str = str.replace(/Ã/,'Í');     str = str.replace(/ÃŽ/,'Î');     str = str.replace(/Ã/,'Ï');     str = str.replace(/Ã‘/,'Ñ');     str = str.replace(/Ã’/,'Ò');     str = str.replace(/Ã“/,'Ó');     str = str.replace(/Ã”/,'Ô');     str = str.replace(/Ã•/,'Õ');     str = str.replace(/Ã–/,'Ö');     str = str.replace(/Ã™/,'Ù');     str = str.replace(/Ãš/,'Ú');     str = str.replace(/Ã›/,'Û');     str = str.replace(/Ãœ/,'Ü');     str = str.replace(/ÃŸ/,'ß');     str = str.replace(/Ã /,'à');     str = str.replace(/Ã¡/,'á');     str = str.replace(/Ã¢/,'â');     str = str.replace(/Ã£/,'ã');     str = str.replace(/Ã¤/,'ä');     str = str.replace(/Ã§/,'ç');     str = str.replace(/Ã¨/,'è');     str = str.replace(/Ã©/,'é');     str = str.replace(/Ãª/,'ê');     str = str.replace(/Ã«/,'ë');     str = str.replace(/Ã¬/,'ì');     str = str.replace(/Ã­/,'í');     str = str.replace(/Ã®/,'î');     str = str.replace(/Ã¯/,'ï');     str = str.replace(/Ã±/,'ñ');     str = str.replace(/Ã²/,'ò');     str = str.replace(/Ã³/,'ó');     str = str.replace(/Ã´/,'ô');     str = str.replace(/Ãµ/,'õ');     str = str.replace(/Ã¶/,'ö');     str = str.replace(/Ã¹/,'ù');     str = str.replace(/Ãº/,'ú');     str = str.replace(/Ã»/,'û');     str = str.replace(/Ã¼/,'ü');  /* this is a comment that will hopefully suck up more characters. */");     
            }
            return str;
        };
        
        var stupendously_ugly_latin1_to_utf8_hack = function (str) {
            var is_latin1 = function () {
                var metaTags = document.getElementsByTagName('meta');
                for (var i=0;i<metaTags.length;i++) {
                    if (metaTags[i].getAttribute('content').match(/8859/)) {
                        return true;
                    }
                }
                return false;
            }
            if (is_latin1()) {
                eval("str = str.replace(/Á/,'Ã');     str = str.replace(/Ã/,'Ãƒ');     str = str.replace(/Ä/,'Ã„');     str = str.replace(/Å/,'Ã…');     str = str.replace(/Æ/,'Ã†');     str = str.replace(/Ç/,'Ã‡');     str = str.replace(/È/,'Ãˆ');     str = str.replace(/É/,'Ã‰');     str = str.replace(/Ê/,'ÃŠ');     str = str.replace(/Ë/,'Ã‹');     str = str.replace(/Ì/,'ÃŒ');     str = str.replace(/Í/,'Ã');     str = str.replace(/Î/,'ÃŽ');     str = str.replace(/Ï/,'Ã');     str = str.replace(/Ñ/,'Ã‘');     str = str.replace(/Ò/,'Ã’');     str = str.replace(/Ó/,'Ã“');     str = str.replace(/Ô/,'Ã”');     str = str.replace(/Õ/,'Ã•');     str = str.replace(/Ö/,'Ã–');     str = str.replace(/Ù/,'Ã™');     str = str.replace(/Ú/,'Ãš');     str = str.replace(/Û/,'Ã›');     str = str.replace(/Ü/,'Ãœ');     str = str.replace(/ß/,'ÃŸ');     str = str.replace(/à/,'Ã ');     str = str.replace(/á/,'Ã¡');     str = str.replace(/â/,'Ã¢');     str = str.replace(/ã/,'Ã£');     str = str.replace(/ä/,'Ã¤');     str = str.replace(/ç/,'Ã§');     str = str.replace(/è/,'Ã¨');     str = str.replace(/é/,'Ã©');     str = str.replace(/ê/,'Ãª');     str = str.replace(/ë/,'Ã«');     str = str.replace(/ì/,'Ã¬');     str = str.replace(/í/,'Ã­');     str = str.replace(/î/,'Ã®');     str = str.replace(/ï/,'Ã¯');     str = str.replace(/ñ/,'Ã±');     str = str.replace(/ò/,'Ã²');     str = str.replace(/ó/,'Ã³');     str = str.replace(/ô/,'Ã´');     str = str.replace(/õ/,'Ãµ');     str = str.replace(/ö/,'Ã¶');     str = str.replace(/ù/,'Ã¹');     str = str.replace(/ú/,'Ãº');     str = str.replace(/û/,'Ã»');     str = str.replace(/ü/,'Ã¼');  /* this is a comment that will hopefully suck up more characters. */");     
            }
            return str;
        };

YAHOO.namespace('ulm');
YAHOO.ulm = new function(){
    //**************************************************************************
    //internal vars - know about configs and which config is active
    //**************************************************************************
    //I hate typing
    var D      = document;
    var Y      = YAHOO;
    var YUTI   = Y.util;
    var YDOM   = YUTI.Dom;
    var YEVT   = YUTI.Event;
    var YCON   = YUTI.Connect;
    var YANI   = YUTI.Anim;
    var YWID   = Y.widget;
    
    //"global" properties
    var oULM   = null;      // the widget
    var sULM   = 'yulm';    // the widget id
    var setup  = {};        // configurations (builtin, and user registered)
    var oLOCS  = {};
    var oDATA  = {};
    var oBODY  = null;
    var aTIPS  = [];        // array of tootips
    var uMSGS  = {};        // messages (what to show in tooltips, twirls, etc.)
    var oBIN   = {};        // builtin setup
    var uCRMB  = '';        // crumb
    
    //page text box and widget text box
    var ptb = null;
    var wtb = null;
    
    //current state
    this.messagesset = 0;
    this.builtinregd = 0;
    var cACT     = null;      // the current action being taken - this is to handle switching actions for the picklist...
    var cACTROW  = null;
    var cSET     = null;      // the current configuration (from setup)
    var cVIS     = 'hidden';  // current visibility (default is hidden)
    var cLOC     = null;      // current location
    var cSTAT    = null;      // current status
    var cDEF     = 'r-0';     // current default
    var cROW     = null;      // the current row;
    var cLOCKED  = false;     // currently clearing (to disable the row mouseovers)
    var oUSERKEY =false;
    
    
    var oCONSTANTS = {
                 'picklist' : 'picklist',
                 'recent'   : 'recent',
                 'saved'    : 'saved',
                 'ULD' : '368',
                 'ULL' : '370',
                 'ULR' : '371',
                 'ULT' : '436',
                 'ULW' : '369',
                 'ULB' : '372',
                 'ULS' : '373',
                 'SWC' : '516'
                 };
                 
    //**************************************************************************
    //debug vars and stufff
    //**************************************************************************
    
    function debug(args){
        if(oBIN.debug == 1 ){
            try{
//                console.log(args);
            }
            catch(err){
                try {
                    YAHOO.log(args);
                } catch (err) {
                    alert(err);
                }
            }
        } else {
            return;
        }
    }
    
    //**************************************************************************
    //public vars - user configured settings
    //**************************************************************************
    
    this.uACTS = {}; // user defined callbacks
    
    
    //**************************************************************************
    //private methods
    //**************************************************************************
    
    //adding support for default and checkbox handling
    function trim(str) //strips all whitespact + non alpha chars
    {
        var regex;
        if(arguments[1] != undefined && arguments[1] == 'saved'){
            //only trims leading and trailing whitespace
            regex = /^\s*|\s*$|/g;
        } else {
            regex = /^\s*|\s*$|[^a-zA-Z0-9_]/g;
        }
        
        return str.replace(regex,"");
    }
    
    function handletextbox(){
        if(wtb && ptb){
            //if theres a wtb and ptb, set the wtb value to whatever the user entered in the ptb
            wtb.value = ptb.value;
        }
    }
    
    function initform(){
        if(wtb){
            wtb.value = '';
            if(oUSERKEY === false){
                if(oBIN.prefill[cSET.locationtype] && oBIN.prefill[cSET.locationtype] !== ''){
                    wtb.value = oBIN.prefill[cSET.locationtype];
                }
            }
        }
        
        if(ptb){
            ptb.value = wtb.value;
        }
        
        handletextbox();
    }
    
    
    //use this to kill event handlers on elements before updating dom
    function purge(d) {
        //debug('===== PURGING EVENTS ==== ' + d.id);
        var a = d.attributes, i, l, n;
        if (a) {
            l = a.length;
            for (i = 0; i < l; i += 1) {
                n = a[i].name;
                if (typeof d[n] === 'function') {
                    d[n] = null;
                }
            }
        }
        a = d.childNodes;
        if (a) {
            l = a.length;
            for (i = 0; i < l; i += 1) {
                purge(d.childNodes[i]);
            }
        }
    }
    
    
    //use this to process the connection manager responseText
    function processresponsetext(rt){
        var data = null;
        
        var reg  = new RegExp('<!--.+-->', 'g');
        var clean = rt.replace(reg, '');
        eval("var data  = " + clean);
        
        return data;
    }
    
    //use this to set the PL cookie
    function setcookie(c){
        var PL_t = new Date();
        var plvalue;
        
        if(c !== undefined && c.PL && c.PL.value){
            plvalue       = c.PL.value;
            PL_t.setTime(PL_t.getTime()+(525600*60000));
            D.cookie="PL=" + plvalue + ";expires=" + PL_t.toGMTString() + ";domain=.yahoo.com;path=/";
        }
        
        if(c == undefined){
            plvalue       = '';
            PL_t.setTime(PL_t.getTime()-(525600*60000));
            D.cookie="PL=" + plvalue + ";expires=" + PL_t.toGMTString() + ";domain=.yahoo.com;path=/";
        }
        
        
    }
    
    function showerror(){
        //clear the widget's events and stuff
        purge(oULM);
        //set the widget body to the new markup (widget + picklist or error)
        oULM.setBody(oBODY);
        oULM.render();
        
        //clear the twirl
        clearcontextmsg();
        
        //set event handlers for the new markup
        setevents();
        
        //show or hide the form
        handleform();
        
        //fix the error box
        
        if(oLOCS.picklist.length > 0){
            debug('fixing picklist');
            applyerrorstyles();
        }
        //show the widget
        showit();
    }
    
    function applyerrorstyles(){
        var hreg = YDOM.getRegion('yulmerrormsg');
        
        var hwid = (hreg.right - hreg.left) - 40 + 'px';
        YDOM.setStyle('yulmpicklistwrapper', 'width', hwid);
        YDOM.setStyle('yulmpicklistwrapper', 'position', 'relative');
        YDOM.setStyle('yulmpicklist', 'width', hwid);
    }
    
    function editlocation(el){
        //pass location info to edit
        var msg;
        if(el === 'new'){
            msg = uMSGS.ACTconfirmaddnew;
        } else {
            msg = uMSGS.ACTconfirmedit;
            
            //get the locationdata
            locationdata = getlocationdata(el);
            
            //set the action to edit
            var action = 'edit';
            var locationname = locationdata.data.name;
        }
        
        var ok = confirm(msg);
        if(ok && el == 'new'){
            window.location.href = oBIN.editpageurl +
                        '?locale=' + oBIN.locale +
                        '&a=add&done=' + oBIN.dotdone;
        } else if(ok && el !== 'new'){
            //pass location data (address, csz, etc...)
            //debug('location name = ' + locationname);
            var url = oBIN.editpageurl +
                      '?locale=' + oBIN.locale +
                      '&a='     + action +
                      '&ln='    + encodeURIComponent(locationname) +
                      '&cr='    + uCRMB +
                      '&r='     + Math.random() + 
                      '&done=' + oBIN.dotdone;
            
            window.location.href = url;
        } else {
            // debug('exiting without save');
        }
    }
    
    function savelocation(e,el){
        cLOCKED = true;
        if(arguments[2]){
            cACTROW = arguments[2];
        }
        //get the text/location name out of the <a> in the <li> (childNode[0])
        var elLocName = el.childNodes[0].innerHTML;
        
        YEVT.stopEvent(e);
        
        setcontextmsg(uMSGS.ACTsaving, el);
        
        var responseSuccess = function(o){
            var data = processresponsetext(o.responseText);
            oDATA = data.data;
            oBODY = data.html;
            oLOCS = data.locations;
            cLOC = oLOCS.currentloc;
            //if the request status is OK... set the cookie, fade the row out and redraw the widget
            //when saving a location api can return req_status['371']:[value] (object) OR req_status = 0 (number)
            //- need to check for both...
            //- var stat is used to test and normalize the req_status value... 
            var stat = (oDATA.req_status === 0 || oDATA.req_status['371'] === 0)? 0 : -1;
            switch(stat){
                case 0:
                    //set the "saved, sorting message in the saved list
                    var savedlist = YDOM.get('yulmsavedlist');
                        newsaved = '<li class="yulmnewsaved">Saved. Sorting... ' + elLocName + '</li>';
                        savedlist.innerHTML = newsaved + savedlist.innerHTML;
                    //if el is not the default location row, remove the row from the dom
                    if(el.id.indexOf('def') == -1 && oDATA.jscookie !== null){
                        setcookie(oDATA.jscookie);
                        
                        var attributes = {
                            opacity: { to: 0.1 }
                        };
                        fade(el,attributes, 0.4);
                    }
                    if(cACTROW !== null){
                        clearlocation(null,YDOM.get(cACTROW),'nomsg');
                    }
                    
                    //get the new data, passin elLocName, so the scroller knows to fire
                    var to = setTimeout(function(){
                        clearcontextmsg();
                        getdata(elLocName);
                        }, 1000);
                    //reset cACT
                    cACT = null;
                    break;
                    
                default:
                    cACTROW = cROW;
                    showerror();
                    break;
            }

        };
        
        var responseFailure = function(o){
                setcontextmsg(uMSGS.ERRsaving);
        };
        
        
        
        var saveCallback =
        {
        success:responseSuccess,
        failure:responseFailure,
        argument: { 'el' : el }
        };
        
        //set up the url
        var loc       = getlocationdata(el);
        var locdata   = loc.data;
        var locindex  = loc.pickindex;
        var isdefault = locdata.isdefault;
        var props = '&la='   + trim(encodeURIComponent(locdata.address)  , 'saved') +
                    '&lc='   + trim(encodeURIComponent(locdata.city)     , 'saved') +
                    '&ls='   + trim(encodeURIComponent(locdata.state)    , 'saved') +
                    '&lz='   + trim(encodeURIComponent(locdata.zip)      , 'saved') +
                    '&lco='  + trim(encodeURIComponent(locdata.country)  , 'saved') +
                    '&u='    + trim(encodeURIComponent(locdata.uniquezip), 'saved');
                    
        if(loc.data.id && (loc.data.language && loc.data.language !== '')){
            props += '&lang=' + loc.data.language + 
                     '&id='   + loc.data.id +
                     '&li=def';
        } else {
            props += '&li='   + locindex;
        }
        
        var anchor     = cSET.triggers[0];
        var elAnchor   = YDOM.get(anchor);
        var elAtype    = elAnchor.nodeName.toLowerCase();
        
        debug('hs5 setting inp and usserloc');
        var userloc;
        if(elAtype == 'input'){
            userloc = elAnchor;
            inp = 'h';
        } else {
            userloc = YDOM.get('yulmlocation');
            inp = 's';
        }
        
        var saveurl   = oBIN.dataurl +
                      '?locale=' + oBIN.locale + 
                      '&a='    + 's' +
                      props +
                      '&p=' + cROW +
                      '&inp=' + inp +
                      '&cr='   + uCRMB +
                      '&r='    + Math.random();
                      
        var cObj = YCON.asyncRequest('GET',saveurl,saveCallback,null);
        cLOCKED = false;
    }
    
    
    
    function setdefaultlocation(e,el){
        cLOCKED = true;
        
        YEVT.stopEvent(e);
        
        var msg = uMSGS.ACTsettingdefault;
        setcontextmsg(msg, el);
        
        var responseSuccess = function(o){
            //get the responsetext
            var data = processresponsetext(o.responseText);
            
            oDATA = data.data;
            oBODY = data.html;
            oLOCS = data.locations;
            cLOC  = oLOCS.currentloc;
            
            //depending on the status returned, do different things..
            //handle 'ok', 'ambiguous', and errors
            switch(oDATA.req_status){
                case 0 : //status UPAPI_OK
                    //set the isdefault and prefill
                    if(oDATA.isdefault == 1){
                        oBIN.prefill.isdefault = 1;
                        oBIN.prefill[oCONSTANTS.ULD] = formatlocation(cLOC, 'cszc');
                    }
                    
                    setcookie(oDATA.jscookie);
                    
                    purge(oULM);
                    getdata();
                    setposition();
                    oULM.render();
                    break;
                    
                default:
                    showerror();
                    break;
            }
                    
        };
        
        var responseFailure = function(o){
            setcontextmsg(uMSGS.ERRsaving);
            //oULM.render();
        };
        
        var setDefaultCallback =
        {
        success:responseSuccess,
        failure:responseFailure,
        argument:{ 'e':e, 'el':el }
        };
        
        
        var action = 'sd';
        var locationdata, locationname, locationaddress, locationcsz, locationcountry, locationid;
        
        //get the locationdata
        //debug('the el is = ' + el.id);
        //this.pick = the LI.id split on '-'
        var pick = el.id.split("-");
        
        //picktype -> recent, saved, or picklist pick
        //pickindex -> the numeric index of the row (this is for matching it back to the js data)
        var picktype = oCONSTANTS.recent;
        var pickindex = pick[1];
        
        locationdata = oLOCS[picktype][pickindex];
        //set the action to edit
        action = 'sd';
        locationaddress = locationdata.address;
        locationcity    = locationdata.city;
        locationstate   = locationdata.state;
        locationzip     = locationdata.zip;
        
        locationcountry = locationdata.country;
        if(locationcountry.toLowerCase() == 'usa'){
            locationcountry = 'US';
        }
        locationid      = locationdata.id;
        loc             = formatlocation(locationdata, 'cszc2_commadelim');
        
        var setdefaulturl = oBIN.dataurl +
                            '?locale=' + oBIN.locale + 
                            '&a='  + action +
                            '&l='  + encodeURI(loc) +
                            '&la=' + encodeURI(locationaddress) +
                            '&lc=' + encodeURI(locationcity) +
                            '&ls=' + encodeURI(locationstate) +
                            '&lz=' + encodeURI(locationzip) +
                            '&lco='+ encodeURI(locationcountry) +
                            '&d=1' +
                            '&r='  + Math.random() + 
                            '&cr=' + uCRMB;
                            
        //debug('SETTING DEFAULT... URL: ' + setdefaulturl);
        var cObj = YAHOO.util.Connect.asyncRequest('GET',setdefaulturl,setDefaultCallback,null);
        cLOCKED = false;
    }
    
    function clearlocation(e,el){
        //debug('=== CLEARING LOCATION ===');
        cLOCKED = true;
        
        if(e){
            YEVT.stopEvent(e);
        }
        
        var ok;
        if(!arguments[2]){
            //setup the confirm msg
            var msg = uMSGS.ACTconfirmclear;
            ok = confirm(msg);
        } else {
            ok = true;
        }
        
        //if confirmed = ok
        if(ok){
            msg = uMSGS.ACTclearone;
            
            setcontextmsg(msg, el);
            
            var responseSuccess = function(o){
                var data = processresponsetext(o.responseText);
                //debug('data from clear ' + o.responseText);
                //set the cookie...
                oDATA = data.data;
                oBODY = data.html;
                
                if(typeof(oDATA.req_status) == 'object'){
                    stat = oDATA.req_status['371'];
                } else {
                    stat = oDATA.req_status;
                }
                switch(stat){
                    case 0:
                        if(o.argument.locationtype !== 's'){
                            //debug('setting cookie');
                            setcookie(oDATA.jscookie);
                        }
                        
                        //remove the element from the dom
                        var attributes = {
                            opacity: { to: 0.1 }
                        };
                        fade(el,attributes, 0.4);
                        
                        var to = setTimeout(function(){
                            purge(oULM);
                            el.parentNode.removeChild(el);
                            getdata();
                            setposition();
                        }, 400);
                        
                        break;
                        
                    default:
                        showerror();
                        break;
                        
                }
            };
            
            var responseFailure = function(o){
                setcontextmsg(uMSGS.ERRclearing);
            };
            
            
            var eltoclear = el.id.split('-');
            
            var action, locvalue;
            switch(eltoclear[0]){
                case 'r': //recent
                    if(eltoclear[1] !== 'def'){
                        action = 'rco';
                        locvalue = '&l=' + trim(eltoclear[1], 'saved');
                    } else {
                        action = 'rcd';
                        oBIN.prefill.isdefault = 0;
                        locvalue = '';
                    }
                    
                    break;
                case 's': //saved
                    action = 'sco';
                    isdefault = '&d=0';
                    locvalue = '&ln=' + trim(encodeURIComponent(oLOCS.saved[eltoclear[1]].name), 'saved');
                    break;
            }
            
            var args = { 'locationtype':eltoclear[0] };
            
            var clearCallback =
            {
            success:responseSuccess,
            failure:responseFailure,
            argument:args
            };
            
            
            var clearurl = oBIN.dataurl +
                           '?locale=' + oBIN.locale +
                           '&a='+ action +
                           locvalue + 
                           '&cr='  + uCRMB +
                           '&r='+Math.random();
            //debug('CLEAR URL = ' + clearurl);
            var cObj = YAHOO.util.Connect.asyncRequest('GET',clearurl,clearCallback,null);
        }
        cLOCKED = false;
    }
    
    function clearalllocations(e){
        //if cLOCKED is true, stop here
        //debug('cLOCKED for clear all locations == ' + cLOCKED);
        if(cLOCKED === true){ YEVT.stopEvent(e); return false; }
        
        //if cLOCKED is false,continue
        cLOCKED = true;
        //debug('======CLEAR ALL LOCATIONS ====');
        YEVT.stopEvent(e);
        
        //setup the confirm msg
        var msg = uMSGS.ACTconfirmclearall;
        var ok = confirm(msg);
        
        //if confirmed = ok
        if(ok){
            msg = uMSGS.ACTclearall;
            
            setcontextmsg(msg);
            
            var elRecent = YDOM.get('yulmrecent');
            //('elRecent id = ' + elRecent.id);
            setcookie();
            
            oBIN.prefill[cSET.locationtype] = '';
            oBIN.prefill[oCONSTANTS.ULD] = '';
            oBIN.prefill.isdefault = 0;
            //initform();
            
            //decoration: fade out the list
            var attributes = {
                opacity: { to: 0.1 }
            };
            fade('yulmrecent',attributes, 0.4);
            
            //wait till the fade happens, then tell the user they have no locations
            var wait = function(){
                //clear the recentlocations
                elRecent.innerHTML = '';
                
                //remove any error messaging
                var oERR = YDOM.get('yulmerror');
                if(oERR){
                    oERR.innerHTML = '';
                }
                var attributes = {
                    opacity: { to: 0.95 }
                };
                fade('yulmrecent',attributes, 0.4);
                clearTimeout(to);
                purge(oULM);
                getdata();
                setposition();
                cLOCKED = false;
            };
            var to = setTimeout(wait, 500);
            clearcontextmsg();
        } else {
            cLOCKED = false;
        }
        
    }
    
    //show the location controls
    function showlocationcontrols(li){
        if(cLOCKED === false){
            cLOCKED = true;
            
            cROW = li.id;
            var controls = li.getElementsByTagName('SPAN');
            var controlLinks = controls[0];
            
            if(controlLinks && li.id.indexOf('p') == -1){
                li.childNodes[0].style.textDecoration = 'underline';
                controlLinks.className = 'yulmcontrolon';
                
                var actionLinks = controlLinks.getElementsByTagName('A');
                var aLLen = actionLinks.length;
                for(var i=0; i<aLLen; i++){
//                    if(!aTIPS[cROW + 'ttro' + i]){
//                        aTIPS[cROW + 'ttro' + i] = new YWID.Tooltip( cROW + '-' + i, { context: actionLinks[i], iframe:false } );
//                    }
                }
            }
            cLOCKED = false;
        }
    }
    
    //hide the location controls
    function hidelocationcontrols(li){
        if(cLOCKED === false){
            li.childNodes[0].style.textDecoration = 'none';
            var controls = li.getElementsByTagName('SPAN');
            //cROW = null;
            
            if(controls[0] && li.id.indexOf('p') == -1){
                controls[0].className = 'yulmcontroloff';
            }
        }
        
    }
    
    function getlocationdata(el){
        //get a hook on the <LI>
        //('the el is = ' + el.id);
        
        var pick = el.id.split("-");
        
        //picktype -> recent, saved, or picklist pick
        //pickindex -> the numeric index of the row (this is for matching it back to the js data)
        var picktype;
        var pickindex;
        var ret = [];
        
        //getting picktype
        pickindex = pick[1];
        switch(pick[0]){
            case 'p':
                picktype = oCONSTANTS.picklist;
                break;
                
            case 's':
                picktype = oCONSTANTS.saved;
                break;
                
            case 'r':
                picktype = oCONSTANTS.recent;
                break;
        }
        
        //getting pickindex
        ret.picktype  = picktype;
        ret.pickindex = pickindex;
        
        //get the data node and pass it back to the caller
        ret.data = oLOCS[picktype][pickindex];
        
        return ret;
    }
    
    function formatlocation(locdata, type){
        //init the location format components
        var fmt = '';
        var fmtaddress = '';
        var fmtcity    = '';
        var fmtstate   = '';
        var fmtzip     = '';
        var fmtcountry = '';
        var fmtcountry2= '';
        var space_ac   = '';
        var comma_ac   = '';
        var space_cs   = '';
        var comma_cs   = '';
        var space_sz   = '';
        var comma_sz   = '';
        var space_zc   = '';
        var comma_zc   = '';
        var space_zc2  = '';
        var comma_zc2  = '';
        
        //set up the core location components
        fmtaddress = (cSET.showaddress === true && locdata.address !== '') ? locdata.address : '';
        fmtcity    = (locdata.city    !== '') ? locdata.city    : '';
        fmtstate   = (locdata.state   !== '') ? locdata.state   : '';
        if( (trim(locdata.country.toLowerCase()) == 'us') || (trim(locdata.country.toLowerCase()) == 'usa') ){
            fmtzip = ( (locdata.zip   !== '') && (locdata.uniquezip == 1)) ? locdata.zip : '';        fmtzip     = ( (locdata.zip   !== '') && (locdata.uniquezip == 1)) ? locdata.zip : '';
        } else {
            fmtzip = locdata.zip;
        }
        
        fmtcountry = ( (trim(locdata.country.toLowerCase()) !== 'us') && (trim(locdata.country.toLowerCase()) !== 'usa') ) ? locdata.country : '';
        fmtcountry2= ( (trim(locdata.country.toLowerCase())  == 'us') && (trim(locdata.country.toLowerCase())  == 'usa') ) ? 'US' : locdata.country;
        
        //set up the punctuation and spaces
        if(fmtaddress !== '' && (fmtcity !== '' || fmtstate !== '' || fmtzip !== '' || fmtcountry !== '') ){
            space_ac = ' ';
            comma_ac = ', ';
        }
        
        if(fmtcity !== '' && (fmtstate !== '' || fmtzip !== '') ){
            space_cs = ' ';
            comma_cs = ', ';
        }
        
        if(fmtstate !== '' && fmtzip !== ''){
            space_sz = ' ';
            comma_sz = ', ';
        }
        
        if(fmtcountry !== '' &&( fmtcity !== '' || fmtstate !== '' || fmtzip !== '' || fmtcountry !== '')){
            space_zc = ' ';
            comma_zc = ', ';
        }
        
        if(fmtcountry2 !== '' &&( fmtcity !== '' || fmtstate !== '' || fmtzip !== '' || fmtcountry !== '')){
            space_zc2 = ' ';
            comma_zc2 = ', ';
        }
        
        //format the location string
        switch(type){
            case 'cszc':
                fmt = fmtcity + space_cs + fmtstate + space_sz + fmtzip +  space_zc + fmtcountry;
                break;
            case 'acszc':
                fmt = fmtaddress + space_ac + fmtcity + space_cs + fmtstate + space_sz + fmtzip +  space_zc + fmtcountry;
                break;
            case 'cszc2':
                fmt = fmtcity + space_cs + fmtstate + space_sz + fmtzip +  space_zc2 + fmtcountry2;
                break;
            case 'csz':
                fmt = fmtcity + space_cs + fmtstate + space_sz;
                break;
            case 'acsz':
                fmt = fmtaddress + space_ac + fmtcity + space_cs + fmtstate + space_sz;
                break;
            case 'csc':
                fmt = fmtaddress + comma_ac + fmtcity + space_cs + fmtstate + space_zc + fmtcountry;
                break;
            case 'cszc_commadelim':
                fmt = fmtcity + comma_cs + fmtstate + comma_sz + fmtzip + comma_zc + fmtcountry;
                //debug('cszc_commadelim = ' + fmt);
                break;
            case 'cszc2_commadelim':
                fmt = fmtcity + comma_cs + fmtstate + comma_sz + fmtzip + comma_zc2 + fmtcountry2;
                //debug('cszc2_commadelim = ' + fmt);
                break;
            case 'acszc2_commadelim':
                fmt = fmtaddress + comma_ac + fmtcity + comma_cs + fmtstate + comma_sz + fmtzip + comma_zc2 + fmtcountry2;
                //debug('cszc2_commadelim = ' + fmt);
                break;
            default:
                fmt = fmtcity + comma_ac + fmtcity;
                break;
        }
        
        //return the location format string
        return trim(fmt, 'saved');
    }
    
    //pick location -- when a user clicks on a location, populate the form and submit
    function picklocation(e,el){
        YEVT.stopEvent(e);
        
        //get the data associated with this element
        var thisloc = getlocationdata(el);
        
        //fill in the form
        var filler;
        var thisdata = thisloc.data;
        
        //if the use clicked on a saved location
        //- fill the location field w/ the citystatezip value
        //if the user clicked on !saved, 
        //- fill the location field w/ city + , + state
        
        var thisformat = (cSET.showaddress === true) ? 'acszc2_commadelim' : 'cszc2_commadelim';
        
        switch(thisloc.picktype){
            case 'saved':
                filler = thisdata.citystatezip + ', ' + thisdata.country;
                break;
                
            case 'recent':
                filler = formatlocation(thisdata, thisformat);
                break;
                
            case 'picklist':
                filler = formatlocation(thisdata, thisformat);
                break;
                
            //no default case
        }
        
        //textbox
        var form   = cSET.formname  || 'yulmform';
        var txtbox = cSET.forminput || 'yulmlocation';
        
        var theform = D.forms[form];
        
        theform[txtbox].value = filler;
        //debug('picklist filler = ' + filler);
        handletextbox(filler.toString());
        
        //submit the form
        if(cACT !== 'save'){
            handlesubmit(function(){ theform.submit(); }, el, thisloc.picktype);
        } else {
            savelocation(e,el,cACTROW);
        }
    }
    
    function setcontextmsg(msg, el){
        var msgbox;
        //el is the element that you want to associate the twirly msg with... i.e. a location row
        //if el is set, replace the contents of el with the twirly msg,
        //else put the twirly in the input field
        if(el){
            msgbox = YDOM.get(el);
            msg = '<strong class="yulmstatusmsg row">' + msg + '</strong>';
            msgbox.innerHTML = msg;
            msgbox.style.display = 'block';
        } else {
            var elAnchor = YDOM.get(cSET.triggers[0]);
            var elAtype  = (elAnchor && elAnchor.nodeName.toLowerCase() == 'input') ? 'input' : 'notinput';
            
            var inp;
            var inp_region;
            var mod_r = -18;
            var mod_t = 3;
            if(elAtype == 'input'){
                inp = YDOM.get(elAnchor);
            } else {
                inp = YDOM.get('yulmlocation');
                var issafari = (navigator.userAgent.indexOf('Safari') > -1) ? true : false;
                if(issafari){
                    mod_r = -28;
                    mod_t = -15;
                }
            }
            
            inp_region = YDOM.getRegion(inp);
            
            inp_right = inp_region.right + mod_r;
            inp_top = inp_region.top + mod_t;
            
            var box = (YDOM.get('yulm')) ? (YDOM.get('yulm')) : null;
            var msgs = (YDOM.get('yulmmessages')) ? YDOM.get('yulmmessages') : null;
            if(box !== null){
                
                if(msgs !== null){
                    msgbox = msgs;
                } else {
                    msgbox = document.createElement('DIV');
                    msgbox.id = 'yulmmessages';
                    box.appendChild(msgbox);
                }
            }
            
            
            msg = '<strong class="yulmstatusmsg txtbox"></strong>';
            msgbox.innerHTML = msg;
            msgbox.style.display = 'block';
            YDOM.setXY(msgbox, [inp_right, inp_top]);
            
        }
        
    }
    
    //clear the twirly messages
    function clearcontextmsg(){
        var msgbox = YDOM.get('yulmmessages');
        if(msgbox){
            msgbox.style.display = 'none';
        }
        var elAnchor = YDOM.get(cSET.triggers[0]);
        var elAtype  = (elAnchor && elAnchor.nodeName.toLowerCase() == 'input') ? 'input' : 'notinput';
        var inp;
        var inp_region;
        if(elAtype == 'input'){
            inp = YDOM.get(elAnchor);
        } else {
            inp = YDOM.get('yulmlocation');
        }
        
        inp.style.backgroundImage = 'none';
    }
    
    //handlesubmit
    //bug -- need to add pick from list handling... saved should not show up in recent
    //e = event
    //el= element
    //p = picktype (if this is from the saved/recent list
    //arguments[3] optional/overload 
    //- to pass the key into handlesubmit if the widget is never triggered
    //- (like from the submit button on a form where the user wants to use
    //  the prefill, and never toggles the widget)
    function handlesubmit(e,el,p){
        
        debug('=== starting handlesubmit ===');
        debug('hs1 el.id = '+el.id);
        debug('hs2 p = '+p);
        
        //lock attempts to prevent collisions
        if(cLOCKED === true){ return false; }
        cLOCKED = true;
        //stop the event (traps/prevent's the form default submit action)
        YEVT.stopEvent(e);
                
        //if the function is called and the widget has not been toggled
        //- cSET has never been defined yet
        //- expect arguments[3] -> the 'current setup key'
        if(arguments[3]){
            //set the 'current setup'
            debug('hs3 arg3 = '+ arguments[3]);
            cSET = setup[arguments[3]];
        }
        
        if(!oULM){
            createulm();
            getdata();
        }
        
        
        debug('hs4 setting context msg')
        if(p === null){
            setcontextmsg(uMSGS.ACTsubmitting);
        } else {
            setcontextmsg(uMSGS.ACTsubmitting, el);
        }
        
        
        var anchor     = cSET.triggers[0];
        var elAnchor   = YDOM.get(anchor);
        var elAtype    = elAnchor.nodeName.toLowerCase();
        
        debug('hs5 setting inp and usserloc');
        var userloc;
        if(elAtype == 'input'){
            userloc = elAnchor;
            inp = 'h';
        } else {
            userloc = YDOM.get('yulmlocation');
            inp = 's';
        }
        
        

        debug('hs6 clearing context msg');
        if(userloc === ''){
            clearcontextmsg();
            return false;
        }
        
        var encodedloc   = encodeURIComponent(userloc.value);
        var locationtype = cSET.locationtype;
        var wcb          = YDOM.get('yulmdefault');
        var makedefault  = (!wcb || (wcb && wcb.checked)) ? 1 : 0;
        if(p !== null){
            var thisloc = getlocationdata(el);
            var qsaddr  = (thisloc.data.address !== '') ? '&la=' + encodeURIComponent(thisloc.data.address + ' ') : '';
            var qscity  = (thisloc.data.city !== ''   ) ? '&lc=' + encodeURIComponent(thisloc.data.city + ' '   ) : '';
            var qsstate = (thisloc.data.state !== ''  ) ? '&ls=' + encodeURIComponent(thisloc.data.state + ' '  ) : '';
            var qszip   = (thisloc.data.uniquezip == 1 && thisloc.data.zip !== '') ? '&lz=' + encodeURIComponent(thisloc.data.zip) : '';
        }
        //construct the request query string to get data
        var qs;
        var qsaction = 'sl';
        switch(p){
            case 'recent':
                debug('hs7 recent -> encodedloc = ' + encodedloc);
                
                qs = '?a='   + qsaction +
                     '&l='   + encodedloc +
                     qsaddr  + 
                     qscity  +
                     qsstate +
                     qszip;
                break;
            
            case 'saved':
                debug('hs7 saved -> encodedloc = ' + encodedloc);
                qs =   '?a='  + qsaction +
                       qsaddr +
                       '&l='  + encodedloc;
                break;
                
            case 'picklist':
                debug('hs7 pick -> encodedloc = ' + encodedloc);
                thisloc = getlocationdata(el);
                qsaction = 'sfp';
                qs =  '?a='    + qsaction +
                      '&lang=' + thisloc.data.language + 
                      '&id='   + thisloc.data.id;
                break;
                
            default:
                debug('hs7 default -> encodedloc = ' + encodedloc);
                qs =  '?a=' + qsaction +
                      '&l=' + encodedloc;
                break;
        }
        var dataurl = oBIN.dataurl + qs +
                      '&inp='    + inp +
                      '&locale=' + oBIN.locale +
                      '&t='      + locationtype+
                      '&d='      + makedefault +
                      '&cr='     + uCRMB +
                      '&r='      + Math.random();
        
        
        //handle the transaction...
        var responseSuccess = function(o){
            debug('hs9 call succeeded, processing response text');
            var data = processresponsetext(o.responseText);
            
            debug('hs10 setting up data');
            oDATA = data.data;
            oBODY = data.html;
            oLOCS = data.locations;
            cLOC = oLOCS.currentloc;
            
            //depending on the status returned, do different things..
            //handle 'ok', 'ambiguous', and errors
            //debug('SET LOCATION REQUEST STATUS = ' + oDATA.req_status + '<br><br>');
            switch(oDATA.req_status){
                case 0 : //status UPAPI_OK
                    debug('hs11 status ok, continuing...');
                    //if the user clicked on a saved location, do not set it in the recent list...
                    
                    
                    if(p !== oCONSTANTS.saved){
                        debug('hs12a set cookie fired');
                        setcookie(oDATA.jscookie);
                    }
                    debug('hs13 SET LOCATION SETTING COOKIE -- DONE');
                    
                    debug('hs14 SET LOCATION SETTING PREFILL ');
                    var thisformat;
                    
                    if(cLOC.country.toLowerCase() == 'us' || cLOC.country.toLowerCase() == 'usa'){
                        thisformat = (cSET.showaddress === true) ? 'acsz' : 'csz';
                    } else {
                        thisformat = (cSET.showaddress === true) ? 'acszc' : 'cszc';
                    }
                    filler = formatlocation(cLOC, thisformat);
                    oBIN.prefill[cSET.locationtype] = filler;
                    
                    var elAnchor = YDOM.get(cSET.triggers[0]);
                    var elAtype  = (elAnchor && elAnchor.nodeName.toLowerCase() == 'input') ? 'input' : 'notinput';
                    
                    if(elAtype == 'input'){
                        elAnchor.value = filler;
                    }
                    
                    
                    
                    debug('hs15 SET LOCATION SETTING PREFILL -- DONE');
                    //if it's defined, fire the callback from this setup
                    debug('hs16 SET LOCATION FIRE USER FUNCTION/CALLBACK');
                    if(cSET.callback){
                        cSET.callback(cLOC);
                    }
                    
                    debug('hs17 --last -- SET LOCATION HIDING PANEL');
                    
                    setTimeout(function(){ cACT = null; purge(oULM); hideit(); oUSERKEY = false; cLOCKED = false; }, 1000);
                    break;
                    
                default:
                    debug('hs11 status not ok... showing error...');
                    showerror();
                    cLOCKED = false;
                    break;
            }
            clearcontextmsg();
            
        };
        
        var responseFailure = function(o){
            debug('hs9 call failed');
            purge(oULM);
            var msg = uMSGS.ERRgetdata;
            
            oULM.setBody(msg);
            oULM.render();
            
            showit();
        };
        
        var callback =
        {
            success:responseSuccess,
            failure:responseFailure,
            argument:null
        };
        debug('hs8 making call... xhr...');
        var cObj = YAHOO.util.Connect.asyncRequest('GET',dataurl,callback,null);
        
        cLOCKED = false;
    }
    
    
    //handleform
    //if the anchor is an 'input':
    //- don't display the input or the go button in the widget
    //- handle submit from the widget or page
    function handleform(){
        // helper functions
        var hideform = function(){
            var el = YDOM.get(formcontrols);
            if(el){
                
                YEVT.onAvailable(cSET.forminput,function(){ this.focus(); }, this);
                YEVT.addListener(cSET.forminput,'mouseover',function(){ this.focus(); this.select(); } );
            } else {
                YEVT.onAvailable(formcontrols, hideform);
            }
        };
        
        var showform = function(){
            var el = YDOM.get(formcontrols);
            if(el){
                YEVT.addListener('yulmform', 'submit', function(e){  cACT = 'set'; handlesubmit(e,this,null); YEVT.stopEvent(e); });
                
                
                //prefill the form textbox
                YEVT.onAvailable('yulmlocation',function(){
                    this.focus();
                    this.select();
                    var tmp = YDOM.get('yulmlocation');
                    tmp.value = stupendously_ugly_utf8_to_latin1_hack(oBIN.prefill[cSET.locationtype]);
                }, this);
                YEVT.addListener('yulmlocation','mouseover',function(){ this.focus(); this.select(); } );
                
                timerenddate = new Date();
                timerend = timerenddate.getTime();
                //alert(timerend + ' ' + timerstart + ' ' + (timerend - timerstart));
                
            } else {
                YEVT.onAvailable(formcontrols, hideform);
            } 
        };
        
        //get the forms anchor and check if it's an input or link
        var elAnchor = YDOM.get(cSET.triggers[0]);
        var elAtype  = (elAnchor && elAnchor.nodeName.toLowerCase() == 'input') ? 'input' : 'notinput';
        
        var formcontrols = 'yulmformcontrols';
        
        //debug('anchor type = ' + elAtype);
        if(elAtype == 'input'){
            hideform();
            YEVT.onAvailable('yulmdefault', function(){ YEVT.addListener('yulmdefault', 'mouseup', function(){ var tmp = YDOM.get(cSET.forminput); tmp.focus(); }); hideform(); } );
            
        } else {
            showform();
        }
    }
    
    function closer(e){
        // if the ulm is closed, stop here... nothing to do...
        if(cVIS === 'hidden'){
            return;
        }
        
        // for cross-browser reasons set up the targ variable
        var tgt      = YEVT.getTarget(e);
        var isclosed = YDOM.isAncestor('yulm',tgt);
        
        //if the anchor is an input, need to loop thru the triggers, since they are possibly not a descendent of yulm
        var elAnchor = YDOM.get(cSET.triggers[0]);
        var elAtype  = (elAnchor && elAnchor.nodeName.toLowerCase() == 'input') ? 'input' : 'notinput';
        if(elAtype == 'input' && (tgt.id === cSET.formgobutton)){
            isclosed = true;
        }
        
        
        if(!isclosed){
            hideit();
            isclosed = null;
        }
    }
    
    //setevents
    //- setup all the event handlers for the widget
    function setevents(){
        purge(oULM);
//        aTIPS = [];
        
        //initialize textbox and checkbox vars
        tmpptb = cSET.forminput  || 'yulmlocation';
        tmpwtb = 'yulmlocation';
        
        //get dom hooks to the textbox and checkbox
        ptb = YDOM.get(tmpptb);
        wtb = YDOM.get(tmpwtb);
        
        //global closer -- if the user clicks 'outside' the dropdown, close it
        YEVT.addListener(D, 'mousedown', function(e){ closer(e); });
        
        //set up the window closer
        var el = 'yulmcloser';
        YEVT.addListener(el,'mousedown',function(e){ cACT = null; /*aTIPS['yulmcloser'].hide();*/ hideit(); YEVT.stopEvent(e); });
//        aTIPS[el] = new YWID.Tooltip( 'tt-'+el, { context: el, text: uMSGS.TTcloser, iframe:false } );
        
        //set up the help link tooltipo
        el = 'yulmhelp';
//        aTIPS[el] = new YWID.Tooltip( 'tt-'+el, { context: el, text: uMSGS.TThelp, iframe:false } );
        
        //set up the clear all link
        el = 'yulmclearall';
        YEVT.addListener(el,'mousedown',function(e){ cACT = null; clearalllocations(e); YEVT.stopEvent(e); });
//        aTIPS[el] = new YWID.Tooltip( 'tt-'+el, { context: el, text: uMSGS.TTclearall, iframe:false } );
        
        //set up the add new link
        if(YDOM.get('yulmsavedaddnew')){
            el = 'yulmsavedaddnew';
            YEVT.addListener(el,'mousedown',function(e){ cACT = null; editlocation('new'); YEVT.stopEvent(e); });
//            aTIPS[el] = new YWID.Tooltip( 'tt-'+el, { context: el, text: uMSGS.TTsaveaddnew, iframe:false } );
        }
        
        //set up the location row rollover
        var aLIs = [];
        
        //picklist rollovers
        var oPickList = YDOM.get('yulmpicklist');
        if(oPickList){
            var liPickCollection = oPickList.getElementsByTagName('LI');
            var liPickCollectionLen = liPickCollection.length;

            var aPickLIs = [];
            
            //pickcounter = separate counter from loop iterator
            //the loop loops over each li... only set aPickLIs if it's a location
            //use pickcounter to match the li in the loop w/ the correct data
            var pickcounter = 0; 
            
            for (i = 0; i < liPickCollectionLen; i++){
                if(liPickCollection[i].id && liPickCollection[i].id.indexOf('p') > -1 ){
                    aPickLIs[pickcounter] = liPickCollection[i];
                    pickcounter++;
                }
            }
            // debug('aPickLIs.len = ' + aPickLIs.length);
            aLIs = aLIs.concat(aPickLIs);
        }
        
        //recent rollovers
        var oRecentList = YDOM.get('yulmrecentlist');
        if(oRecentList){
            var liRecentCollection = oRecentList.getElementsByTagName('LI');
            var liRecentCollectionLen = liRecentCollection.length;
            
            var aRecentLIs = [];
            
            for (i = 0; i < liRecentCollectionLen; i++){
                if(liRecentCollection[i].className !== 'yulmcalltoaction'){
                    aRecentLIs[i] = liRecentCollection[i];
                }
            }
            aLIs = aLIs.concat(aRecentLIs);
        }
        
        //saved rollovers
        var oSavedList = YDOM.get('yulmsavedlist');
        if(oSavedList){
            var liSavedCollection = oSavedList.getElementsByTagName('LI');
            var liSavedCollectionLen = liSavedCollection.length;
            
            var aSavedLIs = [];
            
            for (var i = 0; i < liSavedCollectionLen; i++){
                if(liSavedCollection[i].className !== 'yulmcalltoaction'){
                    aSavedLIs[i] = liSavedCollection[i];
//                    aTIPS['tt-sl' + i] = new YWID.Tooltip( 'tt-ls'+i, { context: aSavedLIs[i].childNodes[0], showdelay : 150, iframe:false } );
                }
            }
            aLIs = aLIs.concat(aSavedLIs);
        }
        
        YEVT.addListener(aLIs, 'mouseover',function(){ showlocationcontrols(this); }, this);
        YEVT.addListener(aLIs, 'mouseout', function(){ hidelocationcontrols(this); }, this);
        
        var aLIsLen = aLIs.length;
        for(var i = 0; i < aLIsLen; i++){
            var eleye = aLIs[i];
            var elA   = eleye.childNodes[0];
            YEVT.addListener(elA, 'mousedown',function(e){ picklocation(e,this.parentNode); }, this);
        }
        
        
        //**********************************************
        //set up the tooltips and onclick handlers
        //for makedefault, save, edit, clear/delete
        //**********************************************
        
        //yulmmakedefault
        var ctlsRecentMakeDefault = YDOM.getElementsByClassName('yulmmakedefault');
        var ctlRMD = ctlsRecentMakeDefault.length;
        //debug('setting make default handlers for ' + ctlRMD + ' links');
        var aRMD = [];
        for (i = 0; i < ctlRMD; i++){
            aRMD[i] = ctlsRecentMakeDefault[i];
            YEVT.addListener(aRMD[i], 'mousedown', function(e){ cACT = null; setdefaultlocation(e, this.parentNode.parentNode); YEVT.stopEvent(e); }, this);
        }
        
        //yulmsave
        var ctlsSave = YDOM.getElementsByClassName('yulmsave');
        //debug('saved class name = ' + oBIN.ctlsave);
        var ctlS = ctlsSave.length;
        var aS = [];
        for (i = 0; i < ctlS; i++){
            aS[i] = ctlsSave[i];
            YEVT.addListener(aS[i], 'mousedown', function(e){ cACT = 'save'; savelocation(e, this.parentNode.parentNode); YEVT.stopEvent(e); });
        }
        
        //yulmedit
        var ctlsEdit = YDOM.getElementsByClassName('yulmedit');
        var ctlE = ctlsEdit.length;
        var aE = [];
        for (i = 0; i < ctlE; i++){
            aE[i] = ctlsEdit[i];
            YEVT.addListener(aE[i], 'mousedown', function(e){ cACT = null; editlocation(this.parentNode.parentNode); YEVT.stopEvent(e); });
        }
        
        //yulmclear
        var ctlsClear = YDOM.getElementsByClassName('yulmclear');
        var ctlC = ctlsClear.length;
        var aC = [];
        for (i = 0; i < ctlC; i++){
            aC[i] = ctlsClear[i];
            YEVT.addListener(aC[i], 'mousedown', function(e){ cACT = null; clearlocation(e, this.parentNode.parentNode); YEVT.stopEvent(e);});
        }
    }
    
    //scrolltorow
    function scrolltorow(elLocName){
        //get the saved locations list (UL)
        var newsavedlist = YDOM.get('yulmsavedlist');
        
        //get the LI's in the savedlist
        var lis = newsavedlist.getElementsByTagName('LI');
        
        //get the number of LI's
        var lislen = lis.length;
        
        //init thisnode to null -- use this as a check later
        //loop over the li's; if the innerHTML of the LI matches elLocName, you want 'thisnode'
        var thisnode = null;
        for(var i=0; i < lislen; i++){
            if(lis[i].childNodes[0].nodeName == 'A' && (lis[i].childNodes[0].innerHTML == elLocName)){
                thisnode = lis[i];
                break;
            }
        }
        
        //if you find a matching node (the for loop above)
        if(thisnode != null){
            //get the region of the saved container (NOT the UL, the containing DIV)
            var elSavedBox = YDOM.get('yulmsaved');
            var regSavedBox = YAHOO.util.Region.getRegion(elSavedBox);
            
            //get the region of the first row 's-0'
            var elTopRow = YDOM.get('s-0');
            var regTopRow = YAHOO.util.Region.getRegion(elTopRow);
            
            //get the region of thisnode's row/LI
            var regThisRow = YAHOO.util.Region.getRegion(thisnode);
            //give it a class name to hook css onto
            thisnode.className = 'yulmnewsaved';
            
            //boxcontains row is a boolean that checks to see if the savedbox's region contains thisnode's region
            //(this is just a convenient use of the yui libs to see if this row is visible or not
            var boxcontainsrow = regSavedBox.contains(regThisRow);
            
            //if thisrow is NOT inside the savedbox (it's not visible; it's "below the scroll")
            if(!boxcontainsrow){
                //set up a yui scroll animation
                var attributes = {
                    scroll: { to: [regSavedBox.left, regThisRow.bottom - regTopRow.bottom] }
                };
                //create the scroll object
                sc = new YAHOO.util.Scroll('yulmsavedlist', attributes);
                //do the animation
                sc.animate();
            }
            
            //set up a custom event -- listen for the scroll to complete
            var onscrollcomplete = new YUTI.CustomEvent('scrollcomplete');
            
            //when the scroll completes, after 2 seconds, fade thisrow's background color to white
            var onscrollcompletesubscriber = function(){
                setTimeout(function(){
                    var dofadeO = new YUTI.ColorAnim(thisnode, { backgroundColor: { to: '#FFFFFF' } }, 2, YUTI.Easing.easeOut);
                    dofadeO.animate();
                },2000);
            };
            
            //set up the listener/subscription to the scroll-complete
            onscrollcomplete.subscribe(onscrollcompletesubscriber);
            
            //tell the browser the scroll is complete
            onscrollcomplete.fire();
        }
    }
    //getdata
    function getdata(){
        purge(oULM);
        //get ready to get the data
        var msg = uMSGS.ACTloading;
        var msgbox = YDOM.get('yulmmessages');
        var el;
        if(!msgbox){
           msgbox = '<div id="yulmmessages"></div>';
           oULM.setBody(msgbox);
           oULM.render();
           el = YDOM.get('yulmmessages');
           YDOM.addClass(el, 'init');
           setcontextmsg(msg, el);
        }
        
        var responseSuccess = function(o){ //transaction success case logic
            var data = processresponsetext(o.responseText);
            oLOCS = data.locations;     //this is an array of location data (recent, saved, picklist, current, display
            cLOC  = oLOCS.currentloc;   //this is an object that contains the current location's data
            
            cDEF  = '';
            
            if(data.locations.recent){
                var aREC = data.locations.recent;
                var aREClen = aREC.length;
                //debug('number of locations = ' + aREClen);
                for(var r=0; r<aREClen; r++){
                    if(aREC[r].isdefault == 1){
                        cDEF = 'r-' + r;
                        break;
                    }
                }
            }
            
            
            var body = data.html;
            
            oULM.setBody(body);
            oULM.render();
            
            clearcontextmsg();
            
            YEVT.onAvailable('yulmrecent',function(){ handleform(); setevents(); });
            if(o.argument != null){
                YEVT.onAvailable('yulmsavedlist',function(){ scrolltorow(o.argument); });
            }
        };
        
        var responseFailure = function(o){ //transaction failure case logic
            purge(oULM);
            var msg = uMSGS.ERRgetdata;
            oULM.setBody(msg);
            oULM.render();
        };
        
        var callback =
        {
            success:responseSuccess,
            failure:responseFailure,
            argument:arguments[0]
        };
        
        var elAnchor = YDOM.get(cSET.triggers[0]);
        var elAtype  = (elAnchor && elAnchor.nodeName.toLowerCase() == 'input') ? 'input' : 'notinput';
        var inp;
        if(elAtype == 'input'){
            inp = 'h';
        } else {
            inp = 's';
        }
        debug('input = ' + inp);
        debug(oBIN);
        var dataurl = oBIN.dataurl + '?inp=' + inp + '&locale=' + oBIN.locale + '&cr='  + uCRMB + '&done=' + oBIN.dotdone + '&r='+Math.random();
        //debug('<br>GET DATA URL = ' + dataurl + '<br><br>');
        var cObj = YAHOO.util.Connect.asyncRequest('GET',dataurl,callback,null);
    }
    
    //creatulm
    function createulm(){
        if(!oULM){
        debug('creating ulm');
        oULM = new YWID.Overlay('yulm');
        oULM.render(D.body);
        }
    }
    
    //toggle functions
    function toggle(key)
    {
        timerstartdate = new Date();
        timerstart = timerstartdate.getTime();
        debug('toggling key = ' + key);
        
        if(!oULM){
            createulm();
        }
                
        var nSET = setup[key];
        
        if(YDOM.getStyle(sULM,'visibility')){
            cVIS = YDOM.getStyle(sULM,'visibility');
        } else {
            cVIS = 'hidden';
        }
        //debug('toggling -> cVis = ' + cVIS + ', trigger0 = ' + cSET.triggers[0] + ', setup[key].trigger0 = ' + setup[key].trigger[0]);
        if(cVIS === 'hidden' || cSET === null || nSET.triggers[0] !== cSET.triggers[0]){
            if(YDOM.get('yulmcont')){
                var box = YDOM.get('yulmcont');
                box.innerHTML = '';
            }
            
            if(cSET && cSET.forminputwrap){
                var el = YDOM.get(cSET.forminputwrap);
                if(YDOM.hasClass(el,'ulmopened')){
                    YDOM.replaceClass(el,'ulmopened','ulmclosed');
                }
            }
            
            //set the 'current setup' to the setup with *this* key
            cSET = setup[key];
            getdata();
            showit();
        } else {
            purge(oULM);
            //set the 'current setup' to the setup with *this* key
            cSET = setup[key];
            hideit();
        }
    }
    
    function setposition(){
        var anchor = cSET.triggers[0];
        var anchorregion = YDOM.getRegion(YDOM.get(anchor));
        
        var alignX = (cSET.alignX)  ? cSET.alignX  : 'left';
        var moveX  = (cSET.adjustX) ? cSET.adjustX : 0;
        var moveY  = (cSET.adjustY) ? cSET.adjustY : 0;
        var setnewX = null;
        var setnewY = null;
        
        var elULM = YDOM.get('yulm');
        var regULM = YDOM.getRegion(elULM);
        var widULM = regULM.right - regULM.left;
        widULM = (widULM < 300) ? 300 : widULM;
        
        if(alignX == 'right'){
            setnewX = anchorregion.right - widULM + 5 + moveX;
        } else {
            setnewX = anchorregion.left - 5 + moveX;
        }
        setnewY = anchorregion.bottom + moveY;
        
        oULM.cfg.setProperty('xy', [setnewX, setnewY]);
        
        //override the zindex if it's in cSET
        var zidx = (cSET['zindex']) ? cSET['zindex'] : '9999999';
        oULM.cfg.setProperty('zIndex',zidx);
        oULM.render();
    }
    
    function showit(){
        //position the dd on *this* anchor, and fix the 'saved call to action'
        setposition();
        
        //toggle the arrow
        var el = YDOM.get(cSET.forminputwrap);
        if(el && YDOM.hasClass(el,'ulmclosed')){
            YDOM.replaceClass(el,'ulmclosed','ulmopened');
        }
        //show the dd
        oULM.show();
        oULM.render();
        cVIS = 'visible';
        pubvisibility.fire(cVIS);
    }
    
    function hideit(){
        //clear all the event handlers
        purge(oULM);
        
        //clear the content of the dd
        if(YDOM.get('yulmcont')){
            var box = YDOM.get('yulmcont');
            box.innerHTML = '';
        }
        
        //move the dd offscreen
        //oULM.cfg.setProperty('xy', [-5000, 0]);
        
        //toggle the arrow
        var el = YDOM.get(cSET.forminputwrap);
        if(el && YDOM.hasClass(el,'ulmopened')){
            YDOM.replaceClass(el,'ulmopened','ulmclosed');
        }
        
        //hide the dd
        oULM.hide();
        oULM.render();
        //set the global property
        cVIS = 'hidden';
        pubvisibility.fire(cVIS);
    }
    
    function fade(el,attrs){
        var anim = new YANI(el, attrs, 0.2);
        anim.animate();
    }
    
    
    //**************************************************************************
    //Public method to register a configuration
    //**************************************************************************
    //register
    this.register = function(props)
    {
        if(D.getElementById && D.createElement){
            var key = props.module;
            setup[key] = props.props;
            
            if(key !== 'builtin'){
                var triggers = setup[key].triggers;
                var tlen = triggers.length;
                
                for(var t = 0; t < tlen; t++){
                    var el = triggers[t];
                    var oEl = YDOM.get(el);
                    
                    //set up the toggle events
                    YEVT.addListener(el,'mousedown',function(e){ debug('trigger toggle '+ el); toggle(key); YEVT.stopEvent(e); });
                    
                    if(oEl.nodeName.toLowerCase() == 'input'){
                        YEVT.addListener(oEl, 'mouseover', function(){ this.select(); this.focus(); }, this);
                        YEVT.addListener(oEl, 'keyup',     function(){ oUSERKEY = true; });
                        YEVT.addListener(oEl, 'keydown',   function(){
                            oUSERKEY = true;
                            if(!oULM){
                                createulm();
                            }
                            
                            var checkvis = YDOM.getStyle(sULM,'visibility');
                            
                            if( checkvis == 'hidden'){
                                cSET = setup[key];
                                getdata();
                                showit();
                            }                            
                        });
                        
                        YEVT.addListener(setup[key].formname, 'submit', function(e){ cACT = 'set'; handlesubmit(e,this,null,key); YEVT.stopEvent(e); });
                        if ( oBIN && oBIN.prefill ) {
                            oEl.value = oBIN.prefill[props.props.locationtype];
                        } else {
                            oEl.value = '';
                        }
                    } else {
                        YEVT.onAvailable('yulmlocation', function(){
                            var txtbox = YDOM.get('yulmlocation');
                            txtbox.value = oBIN.prefill[props.props.locationtype];
                        });
                    }
                    YEVT.addListener(setup[key].triggers[0], 'keydown', function(e){ if(cVIS === 'hidden'){toggle(key);} });
                }
            } else {
                oBIN = setup[key];
                this.builtinregd = 1;
            }
        }
    };
    
    this.cVIS = cVIS;
    this.setmessages = function(msgs){
        uMSGS = msgs;
        this.messagesset = 1;
    };
    
    this.setcrumb = function(cr){
        uCRMB = cr;
    };
    
    //custom event for implementor to monitor visibility of the dropdown
    pubvisibility = new YAHOO.util.CustomEvent("my event");
    
    this.pubvisibilitymonitor = pubvisibility;
    this.pubtoggle = function(e,key){
        //add some kind of nocloser thing here... so the toggle works
        toggle(key);
        YEVT.stopEvent(e);
    };
}();
/** SWF OBJECT **/
/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

YAHOO.EU.VideoPlayer = function(){
    var nPlayerId = YAHOO.util.Dom.generateId();
    var oLinksCont, oPlayer;
    return {
        init : function(oConfig){
            this.oConfig = oConfig;
            if (   
                oConfig.videolinkCont
                &&
                (
                    typeof this.oConfig.samePlayer === "undefined"
                    ||
                    this.oConfig.samePlayer == 1
                )
            ) {
                YAHOO.util.Event.on(oConfig.videolinkCont, "click", function(e){
                    var oTarget = YAHOO.util.Event.getTarget(e);
                    if(oTarget.nodeName.toLowerCase() == "a"){
                        YAHOO.util.Event.stopEvent(e);
                        oPlayer.playID(this.videoIdFromLink(oTarget));
                    }
                }, this, true);
            }
            this.initPlayer();
        },
        getAllIDs:  function() {
            if ( this.oConfig.videolinkCont ) {
                var list    = YAHOO.util.Dom.get(this.oConfig.videolinkCont).getElementsByTagName("a");
                var idList  = [];
                for (var i=0,len=list.length; i<len; i++) {
                    var temp = this.videoIdFromLink(list[i]);
                    if ( temp ) {
                        idList.push(temp);
                    }
                }
                return idList.join(",");
            }
        },
        addParam : function(oFlash, param, value) {
            //console.log("Param: %s, Value: %s", param, value);
            oFlash.addParam(param, value);
        },
        addVariable : function(oFlash, variable, value) {
            //console.log("Variable: %s, Value: %s", variable, value);
            oFlash.addVariable(variable, value);
        },
        initPlayer : function(){
            var oFlash = new SWFObject(this.oConfig.swfUri, nPlayerId, this.oConfig.width, this.oConfig.height, "9", "#ffffff");

            var cosmosIDs = '';
            if ( typeof this.oConfig.cosmosid !== "undefined" ) {
                cosmosIDs = this.oConfig.cosmosid;
            }

            if ( typeof this.oConfig.videolinkCont ) {
                if ( cosmosIDs ) {
                    cosmosIDs += "," + this.getAllIDs();
                } else {
                    cosmosIDs = this.getAllIDs();
                }
            }
            
            this.addParam(oFlash, "allowScriptAccess", "always");
            this.addParam(oFlash, "allowFullScreen", "true");
            this.addVariable(oFlash, "enableFullScreen", "1");
            this.addVariable(oFlash, "lang", this.oConfig.lang);
            this.addParam(oFlash, "wmode", "opaque");
                        
            if ( this.oConfig.vycPlaylistID ) {
                // Video.yahoo.com
                this.addVariable(oFlash, "playlistId", this.oConfig.vycPlaylistID)
                this.addVariable(oFlash, "isCarouselEnabled", (typeof this.oConfig.carouselEnabled !== "undefined")?this.oConfig.carouselEnabled:0);
                this.addVariable(oFlash, "intl", (typeof this.oConfig.intl !== "undefined")?this.oConfig.intl:'fr');
            } else {
                // FOP
                this.addVariable(oFlash, "id", cosmosIDs);
                this.addVariable(oFlash, "autoStart", (typeof this.oConfig.autoStart !== "undefined")?this.oConfig.autoStart:0);
                //this.addVariable(oFlash, "pm", "4");
                this.addVariable(oFlash, "infoEnable", (typeof this.oConfig.infoEnable !== "undefined")?this.oConfig.infoEnable:0);
                this.addVariable(oFlash, "nowplayingEnable", "0");
                this.addVariable(oFlash, "prepanelEnable", "1");
                this.addVariable(oFlash, "postpanelEnable", "1");
                this.addVariable(oFlash, "showSkip", "0");
                if ( (cosmosIDs+"").split(',').length > 1 ) {
                    this.addVariable(oFlash, "epGalleryType", (typeof this.oConfig.epGalleryType !== "undefined")?this.oConfig.epGalleryType:"current");
                    this.addVariable(oFlash, "epCountdownDuration", "10");
                }
                this.addVariable(oFlash, "shareEnable", (typeof this.oConfig.shareEnable !== "undefined")?this.oConfig.shareEnable:0);
            }

            oFlash.write(YAHOO.util.Dom.get(this.oConfig.videoCont).id);
            oPlayer = YAHOO.util.Dom.get(nPlayerId);
            YAHOONEWSGLOBALS.embeddedVideoObj = oPlayer;
        },
        videoIdFromLink : function(oLink){
            var id = parseInt(oLink.href.split("cl=")[1]);
            if ( !id ) {
                id = parseInt(oLink.id.split("-")[1]);
            }
            return id;
        }
    }
}();

YAHOO.EU.VideoPlayer.loadState = function(){
	if(!YAHOONEWSGLOBALS.videoLoaded){
		YAHOONEWSGLOBALS.videoLoaded = true;
		YAHOO.EU.VideoPlayer.init( YAHOONEWSGLOBALS.embeddedVideo );
	}
}


if ( YAHOONEWSGLOBALS.embeddedVideo ) {
	YAHOO.lang.later(1500, window, function(){
		YAHOO.EU.VideoPlayer.loadState();
	});
	YAHOO.util.Event.on(window, 'load', function(){
		YAHOO.EU.VideoPlayer.loadState();
	})
}

YAHOO.util.Event.addListener(window, 'load', function () {
    for (var i=0,length=YAHOONEWSGLOBALS.ajaxQueue.length;i<length;i++) {
        var s = document.createElement("script");
        s.setAttribute("src", YAHOONEWSGLOBALS.ajaxQueue[i]);
        document.body.appendChild(s);
    }
});/* eu-news-legacygalleryoverview */
(function () {

    // Check dependencies:
    if (!this.window ||
        !this.YAHOO ||
        !this.YAHOO.util || 
        !this.YAHOO.util.Dom || 
        !this.YAHOO.util.Event ||
        !this.YAHOO.widget ||
        !this.YAHOO.widget.Module) {
        return;
    }
    
    var win      = this.window,
        //YAHOO    = this.YAHOO,
        Dom      = YAHOO.util.Dom;

    
    YAHOO.namespace("YAHOO.EU.News.LegacyGalleryOverview");
    
    /**
     * Set a given minimum height for an array of elements.
     * @method setMinimumHeight
     * @param els {Array} array of element references
     * @param height {Integer} desired minimum height in pixels
     */
    YAHOO.EU.News.LegacyGalleryOverview.setMinimumHeight = function (els, height) { 
        var i,
            el;

        for (i = 0; (el = els[i]); i = i + 1) { 
           
            if ('inline-table' === Dom.getStyle(el, 'display')) {
                // height acts like min-height for inline-table
                Dom.setStyle(el, 'height', height + 'px');
            }
            else {
                Dom.setStyle(el, 'min-height', height + 'px');

                // HACK: IE6: height acts like min-height:
		if (YAHOO.env.ua.ie > 0 && YAHOO.env.ua.ie < 7) {
			Dom.setStyle(el, 'height', height + 'px');
		}
                  
            }
            

        }            
    
    };
    
    /**
     * Clear minimum height for an array of elements.
     * @method clearMinimumHeight
     * @param els {Array} array of element references
     */
    YAHOO.EU.News.LegacyGalleryOverview.clearMinimumHeight = function (els) { 
        
        var i,
            el;

        for (i = 0; (el = els[i]); i = i + 1) { 
                       
            if ('inline-table' === Dom.getStyle(el, 'display')) {
                // height acts like min-height for inline-table
                Dom.setStyle(el, 'height', 'auto');
            }
            else {
                Dom.setStyle(el, 'min-height', '0');
                //Dom.setStyle(el, 'min-height', 'inherit');

                // HACK: IE6: height acts like min-height:
		if (YAHOO.env.ua.ie > 0 && YAHOO.env.ua.ie < 7) {
			Dom.setStyle(el, 'height', 'auto');
		}
                  
            }
            
        }             
    
    };     
    
    /**
     * Make all elements in the rows of a given series of elements the same
     * height. Rows here are defined by looking at the offset height of each
     * element in turn.
     * @param els {Array} array of element references in series order
     */ 
    YAHOO.EU.News.LegacyGalleryOverview.equalizeHeightsByRow = function (els) {
    
        var rows = [],
            row,
            i,
            el,
            minHeight,
            previousOffset,
            elStack;
            
        YAHOO.EU.News.LegacyGalleryOverview.clearMinimumHeight(els);

        for (i = 0, minHeight = 0, previousOffset = 0, elStack = [];
            true ;
            i = i + 1) {
            el = els[i];

            if (!el) {
            
                if (0 < elStack.length) {            
                    rows.push({
                        'els'       : elStack,
                        'minHeight' : minHeight
                    });                       
                }    
        
                break; 
            }    
      
            Dom.setStyle(el, 'min-height', '0');  

            if (previousOffset !== el.offsetTop) {         
                previousOffset = el.offsetTop;
                
                if (0 < elStack.length) {            
                    rows.push({
                        'els'       : elStack,
                        'minHeight' : minHeight
                    });                       
                }
        
                elStack   = [el];
                minHeight = 0;
            }
            else {
                elStack.push(el);
            }

            if (minHeight < el.offsetHeight) {
                minHeight = el.offsetHeight;
            }        

        }
        
    
        for (i = 0, el = false, minHeight = 0, previousOffset = 0;
             (row = rows[i]);
             i = i + 1) {

            if (0 < row.els.length) {
                YAHOO.EU.News.LegacyGalleryOverview.setMinimumHeight(row.els,
                    row.minHeight);
            }
            
        }

    };

    /**
     * Enhance the EU News gallery module by equalizing the heights of the
     * items in its rows.
     * @param el {element or id} root ul of the gallery;
     */     
    YAHOO.EU.News.LegacyGalleryOverview.enhance = function (el) {
        var el = Dom.get(el),
            viewportWidth  = Dom.getViewportWidth(),
            viewportHeight = Dom.getViewportHeight(),       
            mod,
            fixRows;         

        fixRows = (function () {
            this.displayName = "generateFixRowsFunction";
            return function () {
                YAHOO.EU.News.LegacyGalleryOverview.equalizeHeightsByRow(
                    el.getElementsByTagName("li")
		);
            }; 
        }());
        
        /** 
         * HACK:Make the gallery UL into a "Module" instance, purely in order
         * to not rewrite "textResizeEvent" code.
         */
        mod = new YAHOO.widget.Module(el, {});
        mod.render();        
        YAHOO.widget.Module.textResizeEvent.subscribe(fixRows);
         
        YAHOO.util.Event.on(win, 'resize', function () {
            
            var w  = Dom.getViewportWidth(),
                h  = Dom.getViewportHeight();
            
            // Check the viewport size really has changed:   
            if (w !== viewportWidth || h !== viewportHeight) {
                viewportWidth  = viewportWidth;
                viewportHeight = viewportHeight; 
                fixRows();                
            }
            
        });         
        
        fixRows();

    };

}());

/* End of eu-news-legacygalleryoverview */
(function () {
    if (this.window &&
        this.YAHOO &&
        this.YAHOO.util &&
        this.YAHOO.util.Event &&    
        this.YAHOO.EU &&
        this.YAHOO.EU.News &&
        this.YAHOO.EU.News.LegacyGalleryOverview &&
        this.YAHOO.EU.News.LegacyGalleryOverview.enhance) {
        this.YAHOO.util.Event.onDOMReady(function () {
            var uls = YAHOO.util.Dom.getElementsByClassName('sld-sect', 'ul');
            if (uls && uls.length) {
                this.YAHOO.EU.News.LegacyGalleryOverview.enhance(uls[0]);
            }
        });
    }
     
}());          
